Function Reference
— Function File: [imout, thresh] = edge(im, method, thresh, param2)

Find image edges.

The output is

imout
Output image
thresh
Output thresholds

The input is

im
Input image (greyscale)
thresh
Threshold value (value is estimated if not given)

The following methods are based on high pass filtering the image in two directions, calculating a combined edge weight from and then thresholding

method = 'roberts'
               filt1= [1 0 ; 0 -1];   filt2= rot90( filt1 )
               combine= sqrt( filt1^2 + filt2^2 )

method = 'sobel'
               filt1= [1 2 1;0 0 0;-1 -2 -1];      filt2= rot90( filt1 )
               combine= sqrt( filt1^2 + filt2^2 )

method = 'prewitt'
               filt1= [1 1 1;0 0 0;-1 -1 -1];      filt2= rot90( filt1 )
               combine= sqrt( filt1^2 + filt2^2 )

method = 'kirsh'
               filt1= [1 2 1;0 0 0;-1 -2 -1];  filt2 .. filt8 are 45 degree rotations of filt1
               combine= max( filt1 ... filt8 )

Methods based on filtering the image and finding zero crossings

method = 'log'
Laplacian of Gaussian. param2 is the standard deviation of the filter, default is 2.
method = 'zerocross'
generic zero-crossing filter. param2 is the user supplied filter.
method = 'andy'
A.Adler's idea (c) 1999. somewhat based on the canny method. The steps are
  1. Do a sobel edge detection and to generate an image at a high and low threshold.
  2. Edge extend all edges in the LT image by several pixels, in the vertical, horizontal, and 45degree directions. Combine these into edge extended (EE) image.
  3. Dilate the EE image by 1 step.
  4. Select all EE features that are connected to features in the HT image.

The parameters for the method are:

param2(1)==0 or 4 or 8
Perform x connected dilatation (step 3).
param2(2)
Dilatation coeficient (threshold) in step 3.
param2(3)
Length of edge extention convolution (step 2).
param2(4)
Coeficient of extention convolution in step 2.
defaults = [8 1 3 3]