Edge Detection and Manual Thresholds
hegedus
I am trying to understand the edge detection algorithm and specifically the use of the /S and /T flags.
My Problem: I have height data over an array and it is easily thought of as an image where height is now the Z value. What I am trying to detect are areas of sudden height variation and using the image processing tools and the edge detection seems an appropriate route.
The data I have is in microns and is floating point and I convert that to an unsigned byte since the functions require an imagematrix as an input. All is well and good and I can create an new image and test various combinations of the builtin methods. Thus far the Canny seems to be working out the best.
What I would like to do is be more precise in the threshold for the detection and the sensitivity. It appears that the /S and /T are my tools and I would like to better understand how they play.
For /T I have been testing values in the 1-10 range How does this relate to the base imagematrix which is 0-255 in value? Is it looking for change in value >=T and if so over what length scale?
/S how should I think about this factor relative to my imagematrix? How is the smoothing done? Does it impact the length scale over which a change in value is measured against?
I have ordered the book by Pratt for $0.99 from Alibris.
1. For the record, you can perform edge detection on SP and DP -- I am not sure where you got the idea that you had to convert to unsigned byte.
2. Some of the edge detection method result in a wave that needs to pass through thresholding in order to obtain a binary image containing edges. The threshold method is specified by /M flag. If you want to see what your results are like without thresholding use /M=-1. If you specify /M=1, which is my first choice, then /T is not needed. If you specify /T=value then /M is not needed because then you are telling IGOR to use manual threshold with the value that you provide. Therefore, unless you know the range of values that you expect at the output (/M=-1) use one of the automatic thresholding methods, e.g., /M=1 and forget about /T.
3. /S=sValue: The Canny edge detector uses a Gaussian (and its derivative) filter with sValue as the sigma. The filter is symmetric (actually 1d array) and considers every pixel to be square (1 dimensionless unit).
4. $0.99 is a good price but I am not sure it is worth the trouble as you can find plenty of information on the Canny filter online.
I hope this helps,
A.G.
WaveMetrics, Inc.
May 31, 2013 at 02:46 pm - Permalink
If I use my test image which is SP (FP32) and use edge detection from the Image analysis package. I get an error:"Image must be Unsigned Byte".
That is why I thought I needed it to be an unsigned byte. Was I taking things too literally? Of course when my kids say "literally" they actually mean figuratively.
Andy
May 31, 2013 at 03:03 pm - Permalink
The IP Procedures represent a tiny subset of the Image Processing features in IGOR.
May 31, 2013 at 04:17 pm - Permalink