Does anyone know a way of superimposing the gradient vector field of an image onto the image itself? As far as I can tell, the "quiver" function should allow this, but I cannot get it to work... it just shows a blue figure. This is the code I am using:
img = imread('bubbles.jpg');
ycbcr = rgb2ycbcr(img);
lum = ycbcr(:,:,1);
[gx gy] = gradient(lum);
Thanks for any help you are able to give me.