File Exchange

image thumbnail

ReversePlot

version 1.1.0.0 (7.9 KB) by Jordi Palacin
To create a new plot from a scanned image file

10 Downloads

Updated 22 Feb 2011

View License

This function opens an image file containing a plot. Then the origin, maximum X and Y axis, and data points can be manually and automatically selected to obtain a new vectorial plot (the animated screenshot shows the menus included).

Using Image Processing Toolbox to open idexed and gray images (functions ind2rgb, gray2rgb).

More functions at http://robotica.udl.cat

Comments and Ratings (12)

Nice software but logscaling is not working in R2015b

Anna

Great code!

Just tried it out and it works simply and well. I like software that doesn't require any reading of manuals, and the results are great. Thanks!

Bug "Delete an area of the curve...:
I think all is needed to correct it is to change line 420 with
rbbox %(no arguments)

Comparing with GRABIT
(http://www.mathworks.co.uk/matlabcentral/fileexchange/7173-grabit):

-Zooming the figure is not possible in reverseplot;
-reverseplot doesn't mark the datapoints manually pointed at, while marking them one by one, only at the end;
-reverseplot does not offer to delete the last point erroneously pointed (could e.g. be bound to Backspace)

-GRABIT misses the automatic curve detection;

Besides, I just realized that in reverseplot "Delete an area of the curve..." has a bug (the selection rectangle is misplaced)

Anyway, both pieces of software are nice and useful.

I see no reason why png should not be supported. To that extent, it is sufficient to change lines 84-90 with:

[filename, pathname] = uigetfile( ...
{'*.jpg;*.jpeg;*.gif;*.bmp;*.tif;*.png','All suported formats'
'*.jpg;*.jpeg','JPEG (*.jpg;*.jpeg)'; ...
'*.gif','Gif (*.gif)'; '*.png','PNG (*.png)'; ...
'*.bmp','Bitmap (*.bmp)'; ...
'*.tif','TIFF (*.tif)'}, ...
'Open scanned image...');

Coooooool. I've found a basic bug, though. In function loaddata, lines 98-100,
info = imfinfo([lower(pathname) lower(filename)]);
[a,map] = imread([lower(pathname) lower(filename)]);
is plainly wrong on a case-sensitive OS like unix, and files with uppercase pathnames won't load. Removing all lower() solves the problem.

dewi

Really useful for me.....

sono fera

I wonder if it's could work on a plot-with-marker like seismic plot.

Dick Beresford

A very neat bit of code that provides a useful function. Deals with log as well as linear axes. Would be even more useful if it could return the coordinates as data values in the MATLAB workspace.

R J

This is super handy

Alberto Zin

Really useful !

Updates

1.1.0.0

This update has automatic data points selection and manipulation, zooming, escaling, etc (see the animated screenshot).

1.0.0.0

1) New functions to decode the information from points of the scanned image. 2) The data can be exported to the workspace.

New options added in the menus:
-Automatic line selection.
-Line manipulation.

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux