how to calculate gradient using canny operator in 45 and 135 degrees direction

asked 2012-10-26 01:46:25 -0500

kritika gravatar image

updated 2012-11-07 10:41:37 -0500

i want to calculate gradient using canny operator in 45 and 135 degrees direction. Is there any direct formula to get this?

edit retag flag offensive close merge delete

Comments

the canny algorithm uses the sobel operator to calculate the gradient direction atan2(sobelY,sobelX). I am not sure what you are asking, could you clarify your question?

HugoRune gravatar imageHugoRune ( 2012-10-27 21:36:02 -0500 )edit

It seems that this question is a duplicate of http://answers.opencv.org/question/387. @kritika, is it so?

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-10-29 02:55:45 -0500 )edit

i think i got my answer from both of your comments @HugoRune and @Kirill Kornyakov..as canny operator uses sobel operator to calculate gradient so the formula given in link http://answers.opencv.org/question/387. works for canny operator also. Am i right?

kritika gravatar imagekritika ( 2012-11-07 10:53:08 -0500 )edit