No BSD License  

Highlights from
Figure Digitizer

4.0

4.0 | 6 ratings Rate this file 30 Downloads (last 30 days) File Size: 14.55 KB File ID: #11077

Figure Digitizer

by Hongxue Cai

 

14 May 2006 (Updated 16 May 2006)

Digiize a curve in a figure to get the data coordinates.

| Watch this File

File Information
Description

This function digitizes curves in a figure, e.g. an image save form a PDF file, plots and displays the data.

% figure digitizer
%
% Use: 1. Input image to be digitized, e.g. test.jpg. You can type the
% name of the image in the editable text field, or push "Browse"
% button to browse the file.
% 2. Digitize left x, by pushing "Digi x1," and enter corresponding
% value for x1.
% 3. Similarly for x2, y1, y2.
% 4. Digitize x & y along a curve, press "Return" when done.
% 5. x & y will be plotted and displayed.
%
% Note: x & y axis can be linear or log
%
% Tips: How to save a jpg image file from a figure in a PDF file
% 1. open the PDF file using Adobe Reader 7.07 (Free on the WEB)
% 2. select the figure using the Snapshot tool of Adobe Reader
% 3. File -> print
% 4. "Selected graphic" in "print range," "Fit to printer margins"
% for "print scaling."
% 5. select "print to file" ... ...
%
% I beleive that these codes are also a good example of GUI development
%
% by Hongxue Cai (h-cai@northwestern.edu)
%

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
29 May 2006 Patrick Sibanda  
21 Jul 2006 pornthep rachnavy  
28 Nov 2006 c z

If you can output the final reproduced data as a text file, that will be better.

15 Feb 2008 ming s

East to use UI. Although I tried it with log graph and it showed a wrong result. I think you need to you something like the following for log input:
    c = (log10(handles.y2v) - log10(handles.y1v))/(handles.y2 - handles.y1);
    d = log10(handles.y1v) - handles.y1*c;
    yy = c*handles.y + d;
    yy = 10.^yy;

Anyway, think you for sharing it.

08 Mar 2011 Shannon

Agree with "ming s", there is an error with log plots. The fix provided works for me if I use a slightly different script (in this example, I calculate d differently than ming s:
    c = (log10(handles.y2v) - log10(handles.y1v))/(handles.y2 - handles.y1);
    d = log10(handles.y2v) - handles.y2*c;
    yy = c*handles.y + d;
    yy=10.^yy;

17 May 2011 Marko Radosavljevic

Here's how a Swiss guy, Dominique Lovy solved this:
http://www.unige.ch/sciences/chifi/cpb/windig.html

It works really fine on any Windows machine.

07 Oct 2011 KYAW KYAW  
07 Oct 2011 KYAW KYAW

Dear Hongxue Cai,

Thank you for your contribution and I would like to know how to use your GUI funciton since I am looking for a way to get the x and y coordinates of edge detected images(*.jpg).

Since I was new in this task and pls advise me. I am looking forward to hearing from you good news soon.

Thanks and best regards
 

Please login to add a comment or rating.
Updates
16 May 2006

fix a bug

Tag Activity for this File
Tag Applied By Date/Time
graphics import Hongxue Cai 22 Oct 2008 08:25:30
graphics export Hongxue Cai 22 Oct 2008 08:25:30
digitizing Hongxue Cai 22 Oct 2008 08:25:30
figure Hongxue Cai 22 Oct 2008 08:25:30
curve Hongxue Cai 22 Oct 2008 08:25:30
pdf Hongxue Cai 22 Oct 2008 08:25:30
graphics Hongxue Cai 22 Oct 2008 08:25:30
import Hongxue Cai 22 Oct 2008 08:25:30
export Hongxue Cai 22 Oct 2008 08:25:30
extract Jose Ercolino 20 May 2010 20:39:47
scan Jose Ercolino 20 May 2010 20:39:47
digitize Jose Ercolino 20 May 2010 20:39:47
curve lukas wischounig 25 Mar 2011 15:19:28
digitize Heinz 15 Apr 2011 10:14:22
digitize Egon Geerardyn 23 Nov 2011 14:30:30
curve Vladimir Korol 09 Dec 2011 10:47:39
digitize Vladimir Korol 09 Dec 2011 10:47:42

Contact us at files@mathworks.com