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

조회 수: 17 (최근 30일)
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

채택된 답변

Chad Greene
Chad Greene 2017년 3월 18일
편집: MathWorks Support Team 2022년 6월 8일
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
dd
dd 2025년 5월 1일
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

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

sajeela khan
sajeela khan 2018년 4월 22일
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