The partial x and y derivatives are computed by convolving the cameraman image with D_x and D_y respectively.The gradient magnitude is computed by taking the square root of the sum of the partial derivatives squared.Results of partial x and y derivatives and gradient magnitude are shown below (with threshold set to 0.001). However in order to show important edges of the man and the camera, noises in the lake are also reserved.
Below is the result of applying gaussian filter before taking derivatives. Compared with result without gaussian filter, we can see the noise in the lake is eliminated and we can choose a lower threshold so that edges of cameraman are more clear.
Below are x derivative of gaussian filter, y derivative of gaussian filter and the resulting image. The resulting image is the same as applying gaussian before taking derivatives.
The rotating angle is chosen by picking the angle that results in highest vetical plus horizontal frequency in the orientation histogram.
Before rotation
After rotating 4 degree
The original image of Pisa Tower
After rotation
Before rotation
After rotation
Failure case: the straigthening process fails because of the stripes on the phone case
After rotation
We can collect hight frequent part of a image by subtracting the low frequent part from it. By adding these high frequencies to the original image, we can get a sharpened version of the original image. The whole process can be combined into a single convolution operation called the unsharp mask filter
Below is the original taj and sharpend maj.
The original flower image
After blurring the image using a gaussian filter
After shapening the blurred image
catperson example
Custom image: icecream and Trump
Original icecream and trump with their Fourier transforms
Low pass filtered icecream image and its Fourier transform
High pass filtered trump image and its Fourier transform
Hybrid image and its Fourier transform
Another example: Biden and trump
Original Biden and Trump
Biden Trump hybrid:
Original Lincoln image
gaussian stack layer 1
laplacian stack layer 1
Another example using the precious catperson image:
gaussian stack layer 1
laplacian stack layer 1
Original apple and orange
mask:
stack1
We get the final result by combining all stack levels
Custom example
stack1