Matlab: First derivative edge detection, about gradients
问题 I'm writing a program that asks the user to choose between Prewitt and Sobel image filters to detect edges of objects of an image. I must use their filter templates, not the edge function. The user also tells if he wants to detect 'horizontal', 'vertical' or 'diagonal' edges. My problem is theoretical rather than about programming. In my notes i've got that to compute the magnitude of the gradient at each pixel, it is often approximated as sqrt(Gx^2 + Gy^2) where Gx would be the vertical