I computed the gradient magnitude by computing the partial derivative of x and the partial derivative of y using scipy.signal.conv2d with D_x and D_y seperately, and then summing their squares up and taking the square root. Here are the images:
partial derivative of x
partial derivative of y
gradient magnitude
edge
After applying the Gaussian filter, the difference that I noticed is that there is much less noise, here is an
comparison under the same threhold of 25:
with gaussian filter without gaussian filter
Here are the two one-step DoG filters for D_x and D_y respectively:
DoG for D_x DoG for D_y
Here are the two edge images, all threholded at 25:
2 step filter 1 step filter
Here is the proof that they are the same, g_edge is the 2 step filter one and gk_edge is the one step filter
one:
From left to right are the original, straightened, and histogram
Above is the one that failed since I was intending to let the billboard straighten, but it seems the high frequency
backgroud edges were dominating the gradients
These are the ones that worked
Here is the provided image:
original sharpened
Here are some own examples:
original sharpened
original sharpened
Here is a sharp image bourred and then sharpened again:
original
blurred sharpened
I noticed that there is high frequency noise in the re-sharpened image, since when blurring we lost the original
high-frequency information, and the resharpening could not recover it.
Here are the images, the first one with its accompanying FFT graphs:
input for low pass input for high pass
result
FFT for low pass input FFT for high pass
input
FFT for after low pass FFT for after high
pass
FFT after merge
Here are some more images:
input for low pass input for high pass
result
Here is one failed example: The fence frequency is obstructing the merge
input for low pass input for high pass
result
Here are the guassian and laplacian stacks for the Lincoln image (the laplacian stack is normalized to make
viewability better):
original image
gaussian stack
laplacian stack
Here are the stacks for the hybrid image:
original image
gaussian stack
laplacian stack
For this part I incorporated also bells and whisltes as my implementation supports color images.
Here is the oraple:
apple orange
mask orapple
Here are the laplacian stacks:
apple
orange
result
Here are my images:
autumn winter
mask auter
eye
hand mask
eye in hand