EECS 207A. LAB 4 assignment
By Nasser Abbasi
Conclusion and resulting images
Marr or Zero crossing, or the
Laplacian of Gaussian (LOG) algorithm..
The goal of this lab is to apply the marr edge detection algorithm (also called zero crossing, or the Laplacian of Gaussian edge detector) on 2 different types of images (one with more details, and another with more noise) and observe and comment on the results.
Next, Apply the canny algorithm on same images and
comments on the differences between the two algorithms.
I observed the following:
To view or download the images, click on the image
name.
In addition to using standard deviation of 2, I also used standard deviation of 3 to see what the difference will be. With STD=3, we see that less of the smaller edges are detected as compared to when using STD=2. The Gaussian filter window is larger when the STD is larger; hence this explains why smaller boundaries are not detected in the later case. This can be seen best when putting all the images next to each other.
This can be seen in this visio drawing generated image.
Image
type |
Original
Image |
Resulting image at standard deviation 2 |
Resulting image at standard deviation 3 |
More details |
MARR_STD_2 (filter windows used 9x9 and 19x19) |
STD_3 filter windows used
15x15 and 29x29) |
|
More noise |
MARR_STD_2 filter windows used 9x9 and 19x19) |
MARR_STD_3 filter windows used 15x15
and 29x29) |
The algorithm was run using default values. To better see the performance of the canny edge detector, both original and resulting image are put next to each other. T
his is shown here
This table contains the original (same originals used with the MARR algorithm) and the resulting image files.
Image
type |
Original
Image |
Resulting image at standard deviation 2 |
More details |
CANNY (Gaussian smoothing window of width 7) |
|
More noise |
CANNY (Gaussian smoothing window of width 7) |
Canny algorithms is based on these criteria:
Trying to run the canny.exe program from the CD in the book resulted in this error
Stack Fault at eip=21fe
eax=00000301 ebx=000063b4 ecx=00000000 edx=0000ffff
esi=00000634 edi=0000af51
ebp=0000ff9e esp=000518a8 cs=19f ds=17f es=17f fs=0
gs=0 ss=1b7 cr2=00001fd8
Call frame traceback EIPs:
0x000021fe
0xffb00001
The above happened on my home PC as well, which is
XP professional. I have tried all windows OS’s by changing the compatibility
mode on the .exe file, (using the properties dialog) and I kept getting the
same error. Building the files from source resolved the problem.
The command for running Marr on the freeway image (detailed type image):
$ ./marr.exe
freeway.pgm 2
Standard deviation=
2.000000
PBM file class 5
size 650 columns X 435 rows Max=255
Smoothing with a
Gaussian of size 9x9
Convolution with
LoG:
Zero crossings:
Smoothing with a
Gaussian of size 19x19
Convolution with
LoG:
Zero crossings:
Done. File is
'marr.pgm'.
The command for running Marr on the riverpost image (noisy type image):
$ ./marr.exe
rivergaugepost.pgm 2
Standard deviation=
2.000000
PBM file class 5
size 693 columns X 900 rows Max=255
Smoothing with a
Gaussian of size 9x9
Convolution with
LoG:
Zero crossings:
Smoothing with a
Gaussian of size 19x19
Convolution with
LoG:
Zero crossings:
Done. File is
'marr.pgm'.
Using standard deviation of 3
$ ./marr.exe rivergaugepost_original.pgm 3 Standard
deviation= 3.000000
PBM file class 5
size 693 columns X 900 rows Max=255
Smoothing with a
Gaussian of size 15x15
Convolution with
LoG:
Zero crossings:
Smoothing with a
Gaussian of size 27x27
Convolution with
LoG:
Zero crossings:
Done. File is
'marr.pgm'.
$ ./canny.exe freeway_original.pgm
CANNY: Apply the Canny edge detector to an image.
Parameter file 'canny.par' does not exist.
PBM file class 5
size 650 columns X 435 rows Max=255
Smoothing with a
Gaussian (width = 7) ...
Convolution with the
derivative of a Gaussian...
Beginning hysteresis
thresholding...
Hysteresis
thresholds (from image): HI 255 LOW D
Output file is:
canny.pgm - edge-only image
$ ./canny.exe rivergaugepost.pgm
CANNY: Apply the Canny edge detector to an image.
Parameter file 'canny.par' does not exist.
PBM file class 5
size 693 columns X 900 rows Max=255
Smoothing with a
Gaussian (width = 7) ...
Convolution with the
derivative of a Gaussian...
Beginning hysteresis
thresholding...
Hysteresis
thresholds (from image): HI 255 LOW D
Output file is:
canny.pgm - edge-only image