CS 7321 Winter 1998 PS #2 Solutions by Joe Bayes
Problem #2
I had some problems understanding exactly what was done to create
each image, but I think I got most of them done right.
The two biggest problems I had with this assignment were getting
matlab to print out the images using the right colormap (and realizing
that the problem was the colormap in the first place), and getting
netscape to reload images when I had changed the images (again, and
recognizing that that was the problem.
- Original Image
- Filtered with
frod=medfilt2(rod);
- Gradient using 1x2 and 2x1 masks (filtered):
- Gradient using 1x2 and 2x1 masks (filtered), T=32:
- Gradient using 2x2 masks (filtered)
- Gradient using 2x2 masks (filtered), T=64
- Roberts Cross (filtered)
I can't figure out how to get the "edge" operator to spit out a
greyscale image, so for the Roberts Cross, Sobel, and Prewitt
operators I'm just showing you the black and white image.
- Sobel (filtered)
- Prewitt (filtered)
- Gradient using 1x2 and 2x1 masks (unfiltered):
- Gradient using 1x2 and 2x1 masks (unfiltered), T=32:
- Gradient using 2x2 masks (unfiltered)
- Gradient using 2x2 masks (unfiltered), T=64
- Roberts Cross (unfiltered)
- Sobel (unfiltered)
- Prewitt (unfiltered)
Now, here's the same thing, when we introduce noise:
- Original (noisy) Image
- Filtered with
frod=medfilt2(rod);
- Gradient using 1x2 and 2x1 masks (filtered):
- Gradient using 1x2 and 2x1 masks (filtered), T=32:
- Gradient using 2x2 masks (filtered)
- Gradient using 2x2 masks (filtered), T=64
- Roberts Cross (filtered)
I can't figure out how to get the "edge" operator to spit out a
greyscale image, so for the Roberts Cross, Sobel, and Prewitt
operators I'm just showing you the black and white image.
- Sobel (filtered)
- Prewitt (filtered)
- Gradient using 1x2 and 2x1 masks (unfiltered):
- Gradient using 1x2 and 2x1 masks (unfiltered), T=32:
- Gradient using 2x2 masks (unfiltered)
- Gradient using 2x2 masks (unfiltered), T=64
- Roberts Cross (unfiltered)
- Sobel (unfiltered)
- Prewitt (unfiltered)
ps2.m: Here's the source code.
Joe Bayes,
jbayes@cc.gatech.edu