How to read the X,Y and Z coordinates from a TIFF image extracted into Matlab?

17 Ansichten (letzte 30 Tage)
I have extracted a TIFF image into Matlab using the geotiff function [A, R] = geotiffread(filename). Now the image is stored for example in A. I want to extract the X,Y and Z coordinates from this image and plot it later using surf function. How do I achieve this?
Thanks for any inputs or pointers

Akzeptierte Antwort

Chad Greene
Chad Greene am 18 Mär. 2017
Bearbeitet: MathWorks Support Team am 8 Jun. 2022
Here are the x and y coordinates of a geotiff:
I = geotiffinfo(filename);
[x,y]=pixcenters(I);
2022 Update - The function pixcenters will be removed in a future release. Use the worldGrid functions instead.
  6 Kommentare
dd
dd am 1 Mai 2025
Hi Chad,
Would you know how to replace the 'pixcenters' function to get the x and y coordinates of a georeferenced image?
I used to call this function in 'geoimread', but calling the 'worldGrid' that you advised here does not work.
Best, Dd

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

sajeela khan
sajeela khan am 22 Apr. 2018
hello sir can u plz send me the code that hp ow u find the x y and z axis of an image

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by