MATLAB: Receiving x and y coordinates of an image.

Image Processing ToolboxMATLABretrieving coordinates

Using the code:
"I = imread('pic.png');
[m, n, p] = size (I);
x = 1: n;
y = 1: m;
[x, y] = meshgrid (x, y);"
I was able to plot this image onto MATLAB.
However, now I am unable to retrieve all of the x and y coordinates. I need to have all of the x and y coordinates in order to later use it in a different code, where i use Fourier Transform and Epicycles in order to trace this image.
Can somebdy please help me to retrieve all of the x and y coordinates for the traced image.
Many thanks

Best Answer

I = imread("image.jpeg") ;
[y,x] = find(I~=255) ;
coor = [x y] ;
Related Question