We first convolve the image in each direction with $[[1, -1]]$ and $[[1], [-1]]$ to get the partial derivatives for x and y. The gradient image was produced by taking the sum of the squared partial derivatives in each direction, and then square-rooting that. I then used a threshold of 0.14 to binarize the image.
For the Gaussian blurs, we see that the edges are a lot cleaner due to a lot of the noise being cut out due to the filter; additionally, the edges are made more pronounced, helping even further with the edge detection.
-----1.1----- X:
Y:
Magnitude:
-----1.2----- Gaussian
Gaussian single X direction:
Y direction:
-----Facade-----
degree: -3, score: 0.008314477202157087
-----City-----
degree: -60, score: 0.015664845173041893
We see the city fails since the angle is too intense, and I didn't check every angle due to computation time. Additionally, the lines aren't all parallel to one another.
-----Pisa-----
degree: 8, score: 0.010509053954175906
-----Sunset-----
degree: -3, score: 0.025191549754988923
-----Taj-----
-----Bokeh-----
-----Sakura----- Original:
Blurred:
Resharpened:
For the sharpening, blurring, and re-sharpening, we see the image looks a lot more unnatural, with the colors being overly saturated and not smooth. The edges are also a lot more defined, which is not preferred in the case of the sakura picture. This is due to the fact that not all details were recovered as the highest frequencies are erased by the low-pass filter.
-----Derek + Nutmeg----- Derek
Nutmeg
Hybrid:
((613.8060485759025, 284.73553922220447), (766.5288018203721, 362.156076577117), (274.6096394407655, 345.35430463576154), (439.4367181751288, 331.22626931567333))
-----Killua Happy + Sneak----- Happy
Sneak
Hybrid:
((268.9602357133913, 278.7708475151815), (388.8980181712891, 274.4873552845423), (245.78894177704183, 286.07339955849886), (376.79059740618095, 280.2511037527594))
-----Killua Happy + Sad----- Happy
Sad
Hybrid:
((273.2432375734423, 278.7687157909639), (395.3238209060382, 274.48518655122365), (255.4823399558499, 274.52575423105225), (405.5927152317882, 280.41243561442235))
This one looks pretty bad because of a number of reasons. The image sizes are too different, and the positioning of the character within the images is also really different (in one, his hair cut off, while in the other, all of it is shown along with additional space on top). Addtionally, the color schemes are very off.
-----Dog + Cat----- Dog
Cat
Hybrid:
((118.56171695557038, 189.7986582946544), (282.35861540777387, 203.019932609182), (124.29022948859455, 194.47718910963943), (279.2310177520236, 196.13741721854305))
-----Lincoln-----
Gaussian stack:
Laplacian stack:
''
-----Killua Happy + Sneak-----
Gaussian stack:
Laplacian stack:
''
-----Cat + Dog-----
Gaussian stack:
Laplacian stack:
''
-----Oraple----- Orange
Apple
Mask
Image 1 Levels:
Image 2 Levels:
-----Opid----- Opie
Kid
Mask
Image 1 Levels:
Image 2 Levels:
Gaussian stack:
Laplacian stack:
-----Trorange----- Trump
Orange
Mask
Image 1 Levels:
Image 2 Levels: