David Dominguez Hooper 24828373
Frequencies and Gradients: The objective of this project is to blend images together using different approaches.
To sharpen an image, I first applied a gaussian filter (with a 5 x 5 kernel) on each of the 3 color channels of the image to create the blur filter and subtracted that result from the original image to get the high frequency details of the image. I multiplied the highpass detailed image by alpha and added it back to the original image. For this image I used an 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. I tried to find a Gaussian kernel that would work well on all of the images provided. I found that a [4 4] kernel does well as it doesnt blur the lowpass image too much and doesnt bring out too much detail of the high pass image.
[4 4] Gaussian
[4 4] Gaussian
[4 4] Gaussian
The color images help the low pass filter part of the image become more pronounced. I would say that when only using color in the high pass image, you can barely see the color in the details, but in the low pass use of color, the color is more prominent.
The high pass images (details) can clearly be seen up close. As you move farther away from the image, you begin to see the low pass features of the image. In the last set of images, I found that a failure point is when the size of the images aren't well-correlated. The wolf's face is much bigger than the dog's and so it looks a tad bit off. I considered this a failure but the effect still works if you stand far away, you only see the wolf. Still, I think it's important to note that the images should also be proportional to each other.
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 with an increasing kernel size. The Gaussain kernel starts off at [1 1] and then doubles until the 5th stack when it becomes [16 16]. For the Laplacian Stack, I subtracted the Gaussian filter of that level from the level above. I set the number of levels of the stack to be N=5.
Lowpass
Highpass
Lowpass
Highpass
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 processed each color channel concurrently, and then put the results back together to create the final image.
The drone looks extremely dark in the Poisson blending result. I think this is because the drone was already dark and the tanish/shaded color of my friend Trey's skin caused it to be even darker.
The mixed gradients defintely helped with matching the background target texture to the source image. If you notice on the sweater, there are shaded parts due to the folds of the sweater. The mixed gradients was able to take this into account and creat the same fold on thd Cal logo.
Using the same images used during the Trey and Daph example, I ran it with the Poisson Blending and got the following results:
The blending is much better due to the Poisson using the Gaussian to determine the gradients.
The blending is here is not good because of Daph's nose and eye features being more prominent than Trey's nose and eyes since the dog has darker features it takes more effect in the final result.
Overall, I had a great time with this project. I learned the importance of creating a system of equations to solve for gradients to be used to merge an image with another. I personally like Multiresolution blending because it has more predictable effects. I felt that Poission had more artifacts but resulted in better results because of how it integrates the target image's intensities uinto the source image.