MATLAB: How to declare [X,Y] for image

image processing

Hi, i would like to know how to declare a coordinate for an image?

Best Answer

Let image be of size mxnx3 or mxn depending on binary on rgb. You can define X,Y as follows.
[X,Y]=meshgrid (1:m,1:n)
The above is w.r.t the indices. If you have x axis and y axis values/ positions you can use meshgrid.