We find the gradient of the image by convolving it with finite difference operators in the x and y directions. We then combine these gradients, using the summation sqrt(D_x^2 + D_y^2) in order to get the gradient magnitudes. We then create the edge image by setting a threshold for the gradient values to turn the edges white and the rest of the image black. The threshold I used was that gradient values of 0.15 and above are white.
Original cameraman
Cameraman Horizontal Edges (D_y)
Cameraman Vertical Edges (D_x)
Cameraman Gradient Magnitudes
Cameraman Edges
We then blur the cameraman by convolving it with a Gaussian filter, and then we look at the gradient magnitudes and edge picture. The main difference I notice is that there is a lot less noise in the edges, although the edges of blurred picture do not show the buildings in the background, so there is a bit of detail lost as well. There is also a lot less noise in the edge image without thresholding.
Blurred cameraman
Blurred Cameraman Horizontal Edges (D_y)
Blurred Cameraman Vertical Edges (D_x)
Blurred Cameraman Gradient Magnitudes
Blurred Cameraman Edges
We repeated the process by taking the derivative of the gaussian kernel in both directions and convolving these with the original image, and the result was the same.
Derivative of Gaussian (Dx)
Derivative of Gaussian (Dy)
Image convoluted with the DoG Dx
Image convoluted with the DoG Dy
Gradient magnitudes using DoG
Edges using DoG
We sharpened images. This sharpened taj mahal was created by subtracting the blurred version of the taj mahal to get the high frequencies, and then adding this to the image multiplied by an alpha. I repeated this for this nature image, which I blurred first and then sharpened. The image after blurring and sharpening looks similar to the original, but lost some detail due to the information lost from these operations.
Taj Mahal original
Taj Mahal blurred
Taj Mahal high frequences
Taj Mahal sharpened (alpha = 3)
Nature image original
Nature image blurred
Nature image blurred + sharpened
We made hybrid images. We did this by first aligning them, then taking the low frequencies of one image and combining them with the high frequences of another image to merge the two together. We have done so for Derek and his former cat Nutmeg. I have one failure, which was a failed hybrid of Robert Downey Jr and an apple. The reason I think this failed was because the images were too different and also difficult to align. Another hybrid image I have is of a cheetah combined with Arnold Schwarzenegger. I have attached the log magnitude of the fourier transform of the original images, filtered images, and hybrid image for the cheetah and Arnold hybrid.
Original image of Derek
Original image of Nutmeg
Derek image after low pass filter
Nutmeg image after high pass filter
Derek & Nutmeg hybrid
Original image of Robert Downey Jr
Original image of apple
Robert Downey Jr & Apple hybrid
Original image of Arnold
Log magnitude of Fourier transform of Arnold image
Original image of a cheetah
Log magnitude of Fourier transform of cheetah image
Arnold image after low pass filter
Log magnitude of Fourier transform of Arnold image after low pass filter
Cheetah image after high pass filter
Log magnitude of Fourier transform of cheetah image after high pass filter
Cheetah & Arnold Hybrid
Log magnitude of Fourier transform of cheetah & Arnold hybrid
We also spliced images together. We did this by creating Laplacian stacks for each image, and using a mask to select which portion of each image to use in the final product, we created a new image that contains part of each original image. We blended the edge of the image by using the Laplacian stacks with the banded frequency to make the boundary look smooth. I have included both the black and white "orapple" as well as a color version. The color adds to the effect well and makes it look nicer. I have attached the Laplacian stacks for levels 0, 2, 4, and the final level.
Black and white orapple
Color orapple
Apple Laplacian stack level 0
Orange Laplacian stack level 0
Orapple Laplacian stack level 0
Apple Laplacian stack level 2
Orange Laplacian stack level 2
Orapple Laplacian stack level 2
Apple Laplacian stack level 4
Orange Laplacian stack level 4
Orapple Laplacian stack level 4
Apple Laplacian stack merged
Orange Laplacian stack merged
Orapple Laplacian stack merged
I also used multiresolution blending to combine a moon and a basketball, and I used a custom mask to put a basketball onto the blacktop.
Original basketball
Original moon
Spliced moon and basketball
Original basketball
Original blacktop
Mask
Spliced blacktop and basketball
Acknowledgements: None of these imagse are mine. Images of cameraman, taj mahal, Derek, nutmeg, apple, and orange were provided by CS 194-26. Nature photo is from hongkiat.com. Robert Downey Jr photo is from cheatsheet.com. Cheetah picture is from nationalzoo.si.edu. Arnold picture is from Wikipedia. Blacktop picture is from https://vandaliablacktop.com/. Basketball picture is from shutterstock.