Extract data from .PNG file

조회 수: 28 (최근 30일)
Zena Assaad
Zena Assaad 2015년 8월 17일
댓글: Walter Roberson 2020년 4월 27일
Hi all,
I have an x,y,z plot saved as a .PNG file. I want to extract the data from the x, y and z axes. Preferably in matrix form. Any tips?

답변 (2개)

Sebastian Castro
Sebastian Castro 2015년 8월 17일
I'd recommend using the Data Theif (yes, they misspelled it too) entry in the File Exchange. It lets you click on an image to calibrate its dimensions and extract X-Y data points.
... Now, I'm not sure if that works for 3-D since an image is 2-D, but that would be true of almost any image processing algorithm as well (unless you have multiple images or depth data).
Was that JPG image saved from MATLAB? If possible, it would make things a lot easier if whoever generated that figure saved it as a .fig file instead. Then, you could load it into MATLAB and get the exact point locations.
- Sebastian
  댓글 수: 3
Image Analyst
Image Analyst 2020년 4월 7일
According to the error message, it expects a .mat file, not a .fig file. Try saving your image array into a .mat file instead.
Walter Roberson
Walter Roberson 2020년 4월 27일
.fig files are mat files, and it did in fact try to read it as a binary mat file.
The problem must be with the way the .fig was created.

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


Image Analyst
Image Analyst 2015년 8월 17일
  댓글 수: 3
george panayotov
george panayotov 2020년 4월 27일
Yes, does not allow to export data. Don't waste time with it, just a click bait.
Walter Roberson
Walter Roberson 2020년 4월 27일
Run it as a function; the digitized data will be returned.

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

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by