From: Mathieu Dubois <mathieu.dubois@li...>  20100629 09:44:33

Hello, I'm playing with some image processing algorithm (HOG descriptor) and I'm a bit lost. I am a newbie in image processing (especially in python). I have computed the vertical and horizontal gradients of an image (convolution with [1, 0, 1] on the 0 and 1 axis respectively). After that I computed the gradient' magnitude (sqrt(horizontal_gradient**2 + vertical_gradient**2)) and orientation (arctan2(vertical_gradient, horizontal_gradient)). Now I would like to display the original image with the gradient vector. The quiver() function allows to plot vector fields and it's pretty easy to convert the gradient' magnitude and orientation into U and V (U =grad_mag*cos(grad_orientation), V = grad_mag*sin(grad_orientation)) but I cannot figure out how to display the image and the gradient with the right orientation. Can anyone help? Thanks in advance, Mathieu 