GRABIT Extracts data points from an image file.
GRABIT starts a GUI program for extracting data from an image file. It is capable of reading in BMP, JPG, TIF, GIF, and PNG files (anything that is readable by IMREAD). Multiple data sets can be extracted from a single image file, and the data is saved as an n-by-2 matrix variable in the workspace. It can also be renamed and saved as a MAT file.
Following steps should be taken:
1. Load the image file.
2. Calibrate axes dimensions. You will be prompted to select 4 points on the image.
3. Grab points by clicking on points. Right-click to delete a point. Image can be zoomed during this stage.
4. Multiple data sets will remain in memory so long as the GUI is open. Variables can be renamed, saved to file, or edited in Array Editor.
Panning is achieved by clicking and dragging on the image. In addition to using the zoom button, there are keyboard shortcuts for zooming:
<shift> - center view
<a> - zoom in
<b> - zoom out
<space> - reset view
This code will also work for extracting data points from a tilted or a skewed image (even upside-down or mirrored). The calibration stage ensures that the imperfect orientation or quality of the image is accounted for.
The types of files that will most likely work are BMP, JPG, TIF, GIF (up to 8-bit), and PNG files. Basically, any format supported by the IMREAD is accepted.
GRABIT(FILENAME) will start the GUI program and open the image file FILENAME.
Type GRABIT('-sample') to load a sample image.
Created in MATLAB® R13. Tested up to R2006a
jiro (2021). GRABIT (https://www.mathworks.com/matlabcentral/fileexchange/7173-grabit), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!