Kristine Lin 25523003
Frequencies and Gradients: The objective of this project is to blend images together using different approaches.
To sharpen an image, I took the gaussian filter and subtracted the result from the original image to get the high frequencies. I multiplied the highpass by alpha and added it back to the original image. For this image I used the alpha of 3.
These hybrid images were obtained by taking the low frequencies of one image and the high frequencies of the other and adding them together. For many of the results, I needed to play around with the sigmas in order for the image to come out looking blended. The cat and bunny ended up being a failure since the head sizes did not quite match up and did not overlap when aligned using the eyes.
Sigmas 2, 4
Sigmas 2, 2
Sigmas 2, 4
Sigmas 2, 8
Although there are vague results using this technique, the blending is only clear from a distance. Up close, the blending is not seamless. In addition, a down side to this is that in the case of blending faces, the face size and shape need to be similar in order for blending to be more seamless.
Here, I implemented the Gaussian and Laplacian stack. The images are the same dimension every step. I applied the Gaussian filter at each level for the Gaussian stack. For the Laplacian Stack, I subtracted the Gaussian filter of that level from the level above. To create these images, I scaled the images by the min and max of that image. I set the number of levels of the stack to be 5.
Lowpass
Highpass
Lowpass
Highpass
Honestly, the last picture is going to give me nightmares. Let's fix this by using grumpy cat again.
Lowpass
Highpass
Human vision cares much more about the gradient of an image than the overall intensity. So, when blending, we want the gradient of the composite inside the region to look as close as possible to the source image gradient, and the composite must match the target image on the boundary.
For this part, I followed the instructions and recreated the toy image. I used the following equations:
From here, this becomes a system of linear equations, and I used the format Ax = b to solve for x. Then, x is resized into the image and saved.
For this part, I utilized the following equation:
To do this, I created a matrix A and a vector b that would mimic the system of linear equations for Ax = b. Using these matrices, I solved for x, resized x and displayed the final result. For this part, since color is involved, I created the equation for each individual color, and then put the results back together to create the final image. For many of the results, you can see the slight outline of the masks involved.
Because the background of the Baymax image was white, it was more difficult for Poisson blending to blend the night sky and the background of Baymax, causing the result to be super grey instead of the deep color of the night sky.
To try to fix the problem from the previous example, I tried to find a picture with a more drastic background of Baymax and put him in the sky of Tokyo.
Using the same images used during the kangaroo mouse example, I ran it with the Poisson Blending and got the following results:
You can definitely see the blue sky blending into the head of the mouse, but there was definitely less of the mouse's curr blending onto the sky.
Overall, in my opinion, Laplacian blending generally worked better than Poisson blending since it's rare that the background colors are drastically different. There were many examples in Poisson blending where the background color would interfere with the entire image and the edges of the masks became visible. However, if background was not taken into account and the images are drastically different, it seems that Poisson blending would be a better choice as it is able to blend more seamlessly. For the multi-resolution blending, while the transitions (seams) may not be visible, the intensity or the color of the source cutout area may be different from the background/target image. Therefore, the cutout area in the composite image may still be noticeable. With the Poisson blending, since only the gradients are kept the same, there is no sudden change in intensity or color, thus, preserving the color/intensity consistency of the composite images.