截图保存 matlab
2015-09-08 14:16
489 查看
file=dir('D:\Program Files\MATLAB\R2014a\bin\MyPro\OCR\图像中时间识别\')
for i=3:length(file)
path= strcat('D:\Program Files\MATLAB\R2014a\bin\MyPro\OCR\图像中时间识别\',file(i).name);
I=imread(path);
imshow(I);
[x,y,c]=ginput(2);
if c==1
BB=imcrop(I,[min(x(1),x(2)),min(y(1),y(2)),abs(x(2)-x(1)),abs(y(2)-y(1))]);
%axes(handles.axes2); %你的截图放在GUI中的axes2中
imshow(BB);
path= strcat('D:\Program Files\MATLAB\R2014a\bin\MyPro\OCR\pre_image\',file(i).name);
imwrite(BB,path);
end
end
for i=3:length(file)
path= strcat('D:\Program Files\MATLAB\R2014a\bin\MyPro\OCR\图像中时间识别\',file(i).name);
I=imread(path);
imshow(I);
[x,y,c]=ginput(2);
if c==1
BB=imcrop(I,[min(x(1),x(2)),min(y(1),y(2)),abs(x(2)-x(1)),abs(y(2)-y(1))]);
%axes(handles.axes2); %你的截图放在GUI中的axes2中
imshow(BB);
path= strcat('D:\Program Files\MATLAB\R2014a\bin\MyPro\OCR\pre_image\',file(i).name);
imwrite(BB,path);
end
end
相关文章推荐
- dir matlab
- Matlab函数——std,std2与mean,mean2区别
- Matlab 仿真实现TI Instaspin 的Foc 逆Clarke变换和SVPWM
- matlab std函数 用法及实例
- Matlab基本用法
- matlab实现人脸识别
- 11.9 Matlab 中Figure的创建和设置
- Matlab psf2otf与fft2函数的关系
- 初学MATLAB笔记-绘图
- MATLAB — axis
- Matlab——plot polyfit polyval
- Matlab绘图颜色控制
- MATLAB中strcmp函数
- matlab中repmat函数的用法
- 在Matlab中读取、写入二进制数据文件
- matlab使用小技巧与注意事项
- 图像处理函数详解——padarray(matlab)
- matlab批量修改变量的名称
- C#中调用matlab
- Matlab函数总结