MATLAB: How to convert an image to the cartesian X,Y coordinates

image processingmatrix

I have a grayscale image and i want to convert to the cartesian X,Y coordinates

Best Answer

[x,y]=meshgrid(1:size(A,1), 1:size(A,2));
result=[x(:),y(:),A(:)];