I am having issue with opencv’s Sobel edge detector. From its documentation it seems to work only for horizontal and vertical direction edges (by specifying 0,1 or 1,0). Has anyone got idea how to get the diagonal edges 45deg and 135deg with cvSobel (not Canny methods).
Matlab has a soultion with its edge(I,’sobel’ …) option, but my code is all in c++ and I would like to keep it as such.
Thanks for suggestions and solutions.
Hei.
You can generally calculate any filter in any direction in the following way:
This works for edge detection, motion blur and any linear directed filter.