Here are the resulting images:
Computed gradient magnitude image:
I used a threshold of 0.3, setting all values in the image that has value less than 0.3 to 0. I did some experiments around the threshold value, for example, here is the image output with a threshold of 0.2. The formula used to calculate the gradient magnitude is square root of ((partial derivative in x)^2 + (partial derivative in y)^2)
The image differs from the one generated from Part 1.1 in the way that the edges are more visible. That is because blurring the image suppresses the noises in the image.
|
|
|
|
|
|
The image is the same as the output image in 1.2.2. Because convolving is a communtative operation, so
1. convolve image with partial_x
2. convolve resulting image from step1 with partial_y
3. apply gaussian filter to resulting image in part 2
is the same as
1. convolve gaussian filter with partial_x
2. convolve result from step 1 with partial_y
3. filter the image with the filter calculated in step 2
|
|
|
|
|
|
We can see that after sharpening, the edges of the shapes in the image is more visible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The colored image has the problem that the high pass filtered is not so visible because its color is not emphasized compared to the low pass filtered image. We would probably want the picture with a more hybrid color to be high-pass filtered, and the other picture to be low-pass filtered. We could also try to enhance the color of the high-pass filtered image.
for example, in the colored bird image I showed above, because the color tone of the seagull image is kind of white, while the color tone of the chicken image is much more vivid than the seagull one, when I high-pass filter the seagull image and blend them, the seagull image is somehow hard to see. We could only see the boundary of the seagull while the color is not really obvious to viewers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|