Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

What mask size does the Canny edge detection use for calculating the magnitude?

Hi, everyone. The original Canny edge detection algorithm uses the first derivative of Gaussian to compute the magnitude. I need to implement the original Canny edge detection algorithm but I can not figure out what size of the mask I should use. 
Or maybe somebody knows the idea of how this step is implemented in Matlab?

0 Kudos
Message 1 of 2
(2,688 Views)

Hi Tanya,

 

I assume you are using the IMAQ CannyEdgeDetection VI in LabVIEW. If so, sigma corresponds to mask size. The mask size you should use is dependent on the edges you are identifying. Smaller sigma sizes cause less blurring, and allow detection of small, sharp lines. A larger sigma causes more blurring, smearing out the value of a given pixel over a larger area of the image. This can be useful if you are trying to identify smudged or blurred lines. I would try some values between 1 and 5 and see what gives you the best result. 

 

Have a great day,

Aaron Douglass
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,628 Views)