From: Matthieu on
Hello,

After overlaying a contour over an image of size 512x512, I need to know for each pixel in the image the distance to that contour.

imshow(log(1+abs(E3(:,:))), [1 15]); colormap(jet);hold on
[KX, KY] = meshgrid(1:512,1_512);
[C, h] = contour(KX, KY, OMEGA0, kt, 'Color', 'r', 'Linewidth', 2);

(OMEGA0 is a non-linear function of KX and KY, kt a scalar)

Checking the C returned by contour function (trying to understand what the values correspond to), I tried to reconstitute it by the plot function but failed. Any help would be appreciated.

Something vaguely related to it on Matlab central, though it seems too sophisticated for what I need :

http://www.mathworks.com/matlabcentral/newsreader/view_thread/156475#722702

Regards

M