Hi everybody,
Is there a way to import a plot in .jpeg into MATLAB and convert it to .fig such that "Data Cursor" can be used to get data values of some specific points in the graph?
Thanks
"Omid" <omid_dr@yahoo.com> wrote in message <hbuolc$27f$1@fred.mathworks.com>...
> Hi everybody,
> Is there a way to import a plot in .jpeg into MATLAB and convert it to .fig such that "Data Cursor" can be used to get data values of some specific points in the graph?
> Thanks
you can use image processing techniques for example edge detection to detect curves on the graph and extract the data in that way. or you could display the image then overlay an axes and use the data cursor or ginput to extract the position of the relevant pixels. These positions would then need scaling to suit the scale on the original graph.
I don't know anything about the image processing you meant and I think it isn't worth it for me to work on that, but the second approach seems applicable however it's a bit time consuming to get all the points coordinates using ginput to reproduce the figure. I wish there was a more straight way!
"Omid" <omid_dr@yahoo.com> wrote in message <hc0vrh$ghv$1@fred.mathworks.com>...
> I don't know anything about the image processing you meant and I think it isn't worth it for me to work on that, but the second approach seems applicable however it's a bit time consuming to get all the points coordinates using ginput to reproduce the figure. I wish there was a more straight way!
by reading in your image, you will get a matrix of numbers (the actual numbers will depend on the type of your image). For example a black and white image would give a matrix with 1s and 0s. From this you could plot the black pixels in a figure and then fit a spline to the data.
edge detection could also work (type 'help edge' in the command window). If you could supply an example image it would be easier to give suitable example lines of code back to you.
extracting data is always a time consuming process, for extracting
data from documents, the web, websites, or data files, i found http://www.extractingdata.com to be really useful, they build quick
custom web scraping and data extracting programs
Tags for this Thread
Add a New Tag:
Separated by commas
Ex.: root locus, bode
What are tags?
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.