Skip to content

Commit 2700e16

Browse files
authored
Update proj2.html
1 parent 76d405e commit 2700e16

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

project-2/proj2.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,24 @@ <h3>Part 1.2: Finite Difference Operator</h3>
6363
<p>
6464
Given the following image:
6565
</p>
66-
6766
<div align="center">
6867
<img src="images/cameraman.png" alt="cameraman.png" width="50%">
6968
</div>
70-
71-
we can convolve
69+
<p>
70+
we can convolve this image with <i>D<sub>x</sub></i> and <i>D<sub>y</sub></i> to get the partial derivatives in the <i>x</i>- and <i>y</i>- direction. Using <code>np.dot</code>, we can then compute the gradient magnitude as follows:
71+
</p>
72+
<div align="center">
73+
<img src="images/noblurclip.png" alt="noblurclip.png" width="50%">
74+
</div>
75+
<p>
76+
Although the edges are visible, it's not clear, especially in the magnitude image. This is because when convolving an image with channel values in the range [0, 255], the resulting image will have a range of [-255, 255], so normalizing the image directly makes the overall image darker. To reduce the noise of the non-edge pixels, we can set a limit for each channel value before normalizing. Using a threshold of 25% from both sides, we get the following result:
77+
</p>
78+
<div align="center">
79+
<img src="images/noblur.png" alt="noblur.png" width="50%">
80+
</div>
81+
<p>
82+
From the image above, the edges in the gradient magnitude image are brighter and clearer to see.
83+
</p>
7284

7385
</article>
7486

0 commit comments

Comments
 (0)