[Insight-developers] Problems with Variance in CannyEdgeDetectionImageFilter

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Jun 4 14:54:01 EDT 2008


The following runs are with the provided canny edge example with itk 3.6

Now it's also possible that I forgot about some work around I had in  
my code (I was a little neglectful with CVS with this project in the  
beginning.) Currently, I made a copy of the Canny class and replaced  
the gaussian filter with the recursive one for my large variances.


Thanks,
Brad

$ ../build/canny
Usage:
../build/canny inputImage outputImage [variance]

$ ../build/canny /nfs/Mead/Data/Pill\ Images/Latest\ Renamed/Tiff/ 
000001a.tif foo.tiff 16
TIFFReadDirectory: Warning, /nfs/Mead/Data/Pill Images/Latest Renamed/ 
Tiff/000001a.tif: unknown field with tag 34665 (0x8769) encountered.
TIFFReadDirectory: Warning, /nfs/Mead/Data/Pill Images/Latest Renamed/ 
Tiff/000001a.tif: invalid TIFF directory; tags are not sorted in  
ascending order.
TIFFReadDirectory: Warning, /nfs/Mead/Data/Pill Images/Latest Renamed/ 
Tiff/000001a.tif: unknown field with tag 34665 (0x8769) encountered.
TIFFReadDirectory: Warning, /nfs/Mead/Data/Pill Images/Latest Renamed/ 
Tiff/000001a.tif: invalid TIFF directory; tags are not sorted in  
ascending order.

$ ../build/canny /nfs/Mead/Data/Pill\ Images/Latest\ Renamed/Tiff/ 
000001a.tif foo.tiff 2
TIFFReadDirectory: Warning, /nfs/Mead/Data/Pill Images/Latest Renamed/ 
Tiff/000001a.tif: unknown field with tag 34665 (0x8769) encountered.
TIFFReadDirectory: Warning, /nfs/Mead/Data/Pill Images/Latest Renamed/ 
Tiff/000001a.tif: invalid TIFF directory; tags are not sorted in  
ascending order.
TIFFReadDirectory: Warning, /nfs/Mead/Data/Pill Images/Latest Renamed/ 
Tiff/000001a.tif: unknown field with tag 34665 (0x8769) encountered.
TIFFReadDirectory: Warning, /nfs/Mead/Data/Pill Images/Latest Renamed/ 
Tiff/000001a.tif: invalid TIFF directory; tags are not sorted in  
ascending order.
WARNING: In /nfs/mead/Users/blowek1/local/include/InsightToolkit/ 
Common/itkGaussianOperator.txx, line 54
itkGaussianOperator (0xbfffee38): Kernel size has exceeded the  
specified maximum width of 32 and has been truncated to 33 elements.   
You can raise the maximum width using the SetMaximumKernelWidth method.

WARNING: In /nfs/mead/Users/blowek1/local/include/InsightToolkit/ 
Common/itkGaussianOperator.txx, line 54
itkGaussianOperator (0xbfffee38): Kernel size has exceeded the  
specified maximum width of 32 and has been truncated to 33 elements.   
You can raise the maximum width using the SetMaximumKernelWidth method.

WARNING: In /nfs/mead/Users/blowek1/local/include/InsightToolkit/ 
Common/itkGaussianOperator.txx, line 54
itkGaussianOperator (0x46d4e0): Kernel size has exceeded the specified  
maximum width of 32 and has been truncated to 33 elements.  You can  
raise the maximum width using the SetMaximumKernelWidth method.

WARNING: In /nfs/mead/Users/blowek1/local/include/InsightToolkit/ 
Common/itkGaussianOperator.txx, line 54
itkGaussianOperator (0x46d528): Kernel size has exceeded the specified  
maximum width of 32 and has been truncated to 33 elements.  You can  
raise the maximum width using the SetMaximumKernelWidth method.
On Jun 4, 2008, at 11:45 AM, Bill Lorensen wrote:

> Brad,
>
> Can you send the exact warning messages you are receiving?
>
> Bill
>
> On Mon, Jun 2, 2008 at 12:59 PM, Bradley Lowekamp
> <blowekamp at mail.nih.gov> wrote:
>> I had a program which used larger values for the variance in the  
>> Canny edge
>> filter algorithm. As I am updating the program to a newer version  
>> of the ITK
>> library I had discovered that this is problematic with changes made  
>> in this
>> algorithm. My observations can be observed with the Canny edge  
>> example
>> program. With the following variance values I get the following:
>>
>> ~1 : good results
>> ~2-4: warning of "itkGaussianOperator.txx", line 54 kernel being  
>> truncated.
>> Results look plausible
>> ~8+: the out put is an image full of nan (ugly!)
>>
>> Looking at the CVS, and knowing I was using ITK version 2.8.1 or  
>> 3.0 before.
>> I am really not sure where this problem came from. Perhaps there  
>> was a
>> change to DiscreteGaussianImageFilter?
>>
>> Any idea's why this class broke how I was using it?
>> Also the method CannyEdgeDetectionImageFilter::SetMaximumError  has  
>> a small
>> mistake in it.
>> if (m_Variance[i] != v)
>> should be:
>> if (m_MaximumError[i] != v)
>>
>> Thank,
>> Brad
>>
>> ========================================================
>>
>> Bradley Lowekamp
>>
>> Lockheed Martin Contractor for
>>
>> Office of High Performance Computing and Communications
>>
>> National Library of Medicine
>>
>> blowekamp at mail.nih.gov
>>
>>
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk.org
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>

========================================================
Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20080604/92893a46/attachment.htm>


More information about the Insight-developers mailing list