4
votes

Matlab Version : 7.8.0(R2009a)

I am getting edges from an image by using Canny edge detector using standard 'edge' function. But for my project I need to get intermediate Gradient Magnitude matrix. I.e. gradient magnitude values for each pixel.

I know we could do it using imgradientxy(), But I need exact result what canny would have given and I don't know the implementation used by Matlab for Canny. Is there any way to do it or do I have to implement canny from scratch?

Background: I am basically changing intensity values for some pixels on the edges as detected by canny. I need to know that after the change, when the gradient is calculated using new values, will they still come under Threshold values?

1

1 Answers

5
votes

To find the implementation of the Canny edge detector in Matlab, you can simply open the file (edit edge), since the function isn't built-in. This way, you can check the filtering and gradient scheme that is used in your release of Matlab.