Sunday, February 26, 2017

Turn photo into painting: Using different mixing levels for foreground and background

Most of the pictures are taken with people in some kind of background scene. We usually want to make the background scene artistic, but we may not always want to stylize the people that much because we still want the people in the picture to look like the original people. In this post we demonstrate the technique of using two different mixing levels in photopaint.us to create two different stylized images, and use grabCut to separate the foreground and background and then combine the low mixing foreground and the high mixing background. Here we start from the raw picture:
To stylize this wedding photo, we used the following style:
We created two stylized images with a high mixing level and a low mixing level:
high mixing
low mixing

We can see that the image with high mixing level looks quite artistic, but the people in the picture is more distorted than we want them to be. The people in the low mixing level image look nice and real, but the background is not too different from the raw picture. To combine the two images, we use grabCut algorithm to create a mask like below. The exact code which created this mask can be found here.

 Then combing the high mixing and low mixing image using the mask, we get the following image. See how the background is very artistic while the foreground (the people) are still nice and real.
Below is another example using similar technique. The details of the process is omitted due to similarity.
Original photo
\

 Style




High Mixing

Low Mixing
 

 Mask
 
 
Combined
 


 


No comments:

Post a Comment