Dx = [-1 1]
and Dy = [-1 1]
T. Since the gradient magnitude can be derived from the
two partial derivatives, it is now possible to combine the two and binarize it (threshold = 0.30) to get the final
result. For the threshold, I experimented with values that would include the tripod edges while reducing the noise
from the grass ground.
Original |
Convolved w/ Dx |
Convolved w/ Dy |
Grad Magnitude |
Final Result |
sigma = 1
. This set of parameters seemed to smooth the image in a way that preserved most of the long
edges while reducing the specks. After this, I was able to regenerate the partial derivatives that reconstructs the
gradient magnitude image. For this part, I had to use a smaller threshold (threshold=0.125) because the smoothing had
significantly reduced the magnitudes.
Original |
Smoothed |
Convolved w/ Dx |
Convolved w/ Dy |
Grad Magnitude |
Final Result |
Original |
Dx Smoothed |
Dy Smoothed |
Grad Magnitude |
Final Result |
taj.png |
taj.png (Sharpened) |
monastery.png |
monastery.png (Sharpened) |
cathedral.png |
cathedral.png (Sharpened) |
train.jpg |
train.jpg (Smoothed) |
train.jpg (Sharpened) |
sigma
low_freq
= 3
,
sigma
high_freq
= 6
, and
ratio = 0.3
, I was able to create the following derek—cat image:
DerekPicture.jpg |
cat.jpeg |
Derek Cat |
sigma
low_freq
= 6
,
sigma
high_freq
= 6
, and
ratio = 0.8
:
cat.jpeg |
dog.jpeg |
Cat Dog |
sigma
low_freq
= 3
,
sigma
high_freq
= 11
, and
ratio = 0.5
:
mona_lisa.jpeg |
einstein.jpeg |
Mona Lisa Einstein |
sigma
low_freq
= 6
,
sigma
high_freq
= 6
, and
ratio = 0.125
:
smile.jpg |
mad.jpg |
Smile Mad |
FT of smile.jpg |
FT of mad.jpg |
Low Passed smile.jpg |
High Passed mad.jpg |
FT of Smile Mad |
kernel
filter
= 81x81
,
kernel
image_gauss
= 5x5
,
sigma
filter
= 25
,
sigma
image_gauss
= 5
, and
N = 20
:
kernel
filter
= 81x81
,
kernel
image_gauss
= 5x5
,
sigma
filter
= 25
,
sigma
image_gauss
= 5
, and
N = 20
:
kernel
filter
= 81x81
,
kernel
image_gauss
= 5x5
,
sigma
filter
= 25
,
sigma
image_gauss
= 5
, and
N = 5
: