0
$\begingroup$

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]

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

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.}} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.