# coordinates of the ImageData

I’m trying to get the coordinates of the ImageData, in term of X and Y separately I have paste my trials and would gratefully need your help.

In 3D, the array generated by ImageData [image] is arranged such that the first part corresponds to the top slice, with rows running from back to front, and columns running from left to right.

cc = ColorConvert[imageOfPalmTree, "Grayscale"];
imageCoordinates = ImageData[cc];
ListPlot3D[imageCoordinates, Mesh -> None]

Export["imageCoordinates.csv", imageCoordinates]

exportStringimageCoordinates = ExportString[imageCoordinates, "Table"];

Export["exportStringimageCoordinates.csv", exportStringimageCoordinates]


## 1 Answer

Start with a simple example to see how ImageData returns the data in an image.

i = Image[{{0., 1.}, {1., 0.}}]
ImageData[i]

(* {{0., 1.}, {1., 0.}} *)