Digitizer is a GUI that enables you to digitize a scanned or downloaded linear graph. The output is stored as an ascii file.
Step 1 - Load image
Loads any image that can be handled by the imread command.
Step 2 - Calibrate the image:
While calibrating, the menus are enabled.
You can choose a maximum of 2 points on the graph.
The arrow keys on the keyboard will move the last entered point with small steps to accurately place your calibration points.
The input is cyclic for two points i.e. the third input will replace the first input etc.
To finish input press the 2nd mouse button, after which the numeric values of the chosen two points can be entered.
You can calibrate or recalibrate at any time when you are not using the input feature.
Step 3 - Start Input
During input, all menus will be disabled:
Mouse button 1: Add a new point
Mouse button 3: Removes the last point (only if you have three mouse buttons, button 3 is the center one)
Mouse button 2: Ends input
As long as the graph is not resetted, you can start and stop input at will, for example to change the accuracy or to recalibrate.
Input accuracy: The input will snap to the rounded value as specified in the preferences.
During input, arrow keys will move the last point in steps according to the scale of the graph as defined in the preferences.
Step 4: Save data
The digitized data is stored in an ascii "Graphfilename.txt"
Example of output:
The digitzer REQUIRES round2 from with input
round2(value,decimal places) as provided here at the file exchange as File ID: #4261.
S. A. van der Wulp (2021). Graph Digitzer (https://www.mathworks.com/matlabcentral/fileexchange/23317-graph-digitzer), MATLAB Central File Exchange. Retrieved .
it's dosent work it's give me this message when i starte to input image (error using ==>round2 toomany input arguments.
error in ==> digitizer>click_image at 443
1. Some versions have line 171/172 as
imshow(ud.image); hold on;
This MUST be changed to
image(ud.image); hold on;
2."mouse button 2" = scroll wheel (on my machine.)
3. Be sure to set "step sizes" and "accuracies" in the Preferences
window before you start. (Default values are useless.)
Thanks to Jon!!
This is exactly what I was looking for. Short of actually using image recognition to 'find' the graph line, this is the next best thing. It took 1/2 an hour of trial-and-error but otherwise it is a simple and effective tool.
Works well, but user-friendliness could be improved. Explaining the settings available within the 'preferences' would be helpful.
Thanks for making this available.
I'll concede that there is a problem with self ratings. The author should never be allowed to rate their own work. As importantly, it should be possible to retract an errant mouse click. At this time, the only solution is to request that the website administrator remove such mis-clicks. A fix has been requested many times, certainly so by me.
So I won't hold the admittedly mistaken self-rating against this author as I write this review. In fact, (writing this before I look at the contents at all) if this submission merits a 5 rating in my opinion, I'll give it that.
FIrst, look at the help. As it is, it is useless, even though it is actually reasonably good help. How can something be reasonably good, yet still completely useless? See what happens when you use the help utility on digitizer.
>> help digitizer
by: S.A. van der Wulp (March 2009)
This is all you see, not the reasonably detailed description that is actually included in the file. The problem is help only displays the first contiguous block of comments. The author has put a blank (no comment character at the beginning) line after his name. So help stops the output immediately, without returning the rest of the help as written.
As I said, it is useless as help for someone who will use this. I know, some will suggest that you just edit the file to look at the help. This is foolish, to force a potentially novice user to edit the file to read the help, since they may then make unintentional changes, corrupting the code. Just write your help correctly, with no blank lines and all is perfect.
Next, there is no useful H1 line. An H1 line is the very first line of the help block. It is used by lookfor to search for your file. What happens when your user forgets the name of this file next year when they need to use it again? How will they find it? Matlab provides the lookfor function, which does a keyword search on only the first comment line in the help block. So just add a single line of text that describes your function and includes the logical keywords that someone might search on.
Given all of that, next I tried to use this utility. I created a jpeg image of some plotted data, then loaded the file. Unfortunately, the help as written is not at all specific as to how to use this code. For example, I tried this
>> im = imread('test.jpg');
??? Error using ==> fileparts at 17
Input must be a row vector of characters.
Error in ==> digitizer at 55
[pathstr,name,ext,versn] = fileparts(action);
Hmm. What happened? Here is the beginning of the help:
% Digitizer is a GUI that enables you to digitize a scanned or downloaded
% linear graph. % The output is stored as an ascii file.
% Step 1 - Load the image.
It tells me to load the image. But then it does not tell me how to get the loaded image into digitizer. Perhaps I'm supposed to do something else. But when I just call digitizer with no input arguments, it put up a blank set of axes. Good help would tell me what to expect.
A bit more fussing about, and I realize that I needed to use the load image menu item on the figure. So, I try that. Nope. The figure is still just a blank set of axes, not the just created jpeg.
So I can't make this code work. While the author must know the magic incantations to make it work, it is apparently useful only to the author.
Other problems? Why return the result as an ascii file? It is very easy to return a variable from a GUI. Why force the user to load an image? Allow them to provide the image as input to your function directly. Make your code friendly is you expect anyone else to be able to use it.
So, what should I rate this submission? It is not useless dreck, and the author has made an effort. But the file as is is useless. The help needs improvement. It needs an H1 line. It needs a better interface. I did not look carefully at the code to look for error checking, but given the poor result above, there appears to be no error checking. A quick scan ofthe code showed some internal comments, enough to follow what was happening. All of these problems are quite fixable with some time invested.
I'll be charitable and give it 2 stars.
the stars got clicked unintentionally, funny that this is possible by the file author.
Its more of a help to get some feedback about the utility.
I would say, Just try the judge for one's self, whether its worth 5 or 0 stars or not, and comment.
It happens so often, that people - intentionally or unintentionally - hit the rating stars. The Mathworks should think about disabling self-ratings.
Inspired by: round2
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!