使用MATLAB快速提取图片数据

今天介绍一下如何使用MATLAB提取图片数据。在MATLAB中其实也有很多好用的附加功能可免费使用,而今天介绍的这个就是小编在附加功能中发现所发现,一起来了解下吧!


1.GRABIT下载

MATLAB中下载

图片

下载前需要先登录MATLAB账号。

图片

然后搜索下载GRABIT,下载完成后解压,打开GRABIT。

图片

2.GRABIT使用

打开MATLAB运行GRABIT,弹出操作窗口

图片

导入图片,点击calibrate,选取x轴最大值以及最小值,完成后依次选取y轴最大值及最小值。

图片

点击grab points,鼠标左键单击即可选取需要提取的点,右侧会呈现出数据点。

图片

完成后再次点击grab points即可完成数据提取,点击save   to file,下拉选择TXT格式保存就算完成了。

图片

图片

此外双击右侧已提取数据即可在MATLAB中查看,也可以将数据写入到Excel中

图片

MATLAB中的这个工具比较简单,功能也比较单一,但是提供了代码,可以再次根据自己的需求在前人的基础上进行修改。如果想要直接使用多功能数据提取还是建议使用Origin自带的工具。此次分享主要是推荐小伙伴使用附加功能中很多现成且好用的工具,为进一步学习MATLAB提供帮助。

 

 

 

function 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. Zoom and pan enabled. % 3. Grab points by clicking on points. Right-click to delete a point. % Image can be zoomed and panned. % 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. Double-click % to center view. Right click and drag to zoom in and out. In addition, % there are keyboard shortcuts for zooming: % - zoom in % - zoom out % - 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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值