matlab-图片-imrect使用
2015-12-01 20:03
573 查看
1.使用固定大小的框
Display updated position in the title. Specify a position constraint function using makeConstrainToRectFcn to keep the rectangle inside the original Xlim and Ylim ranges.
f igure, imshow('cameraman.tif');
h = imrect(gca, [10 10 100 100]);
addNewPositionCallback(h,@(p) title(mat2str(p,3)));
fcn = makeConstrainToRectFcn('imrect',get(gca,'XLim'),get(gca,'YLim'));
setPositionConstraintFcn(h,fcn);
Now drag the rectangle using the mouse.
Display updated position in the title. Specify a position constraint function using makeConstrainToRectFcn to keep the rectangle inside the original Xlim and Ylim ranges.
f igure, imshow('cameraman.tif');
h = imrect(gca, [10 10 100 100]);
addNewPositionCallback(h,@(p) title(mat2str(p,3)));
fcn = makeConstrainToRectFcn('imrect',get(gca,'XLim'),get(gca,'YLim'));
setPositionConstraintFcn(h,fcn);
Now drag the rectangle using the mouse.
相关文章推荐
- 解析在main函数之前调用函数以及对设计的作用详解
- java和matlab画多边形闭合折线图示例讲解
- C#调用Matlab生成的dll方法的详细说明
- 从java中调用matlab详细介绍
- VC++与Matlab混合编程的快速实现
- Matlab 矩阵运算
- matlab与opencv部分函数的对照
- matlab神经网络工具箱创建神经网络
- Matlab
- MATLAB 入门教程
- matlab函数_连通区域
- MATLAB中函数模式和命令模式的区别
- MATLAB 添加自定义的模块到simulink库浏览器
- MATLAB for Mac使编辑器支持中文
- [转]matlab中plot用法
- 初学数模-MATLAB Quick Start! Part I
- 初学数模-MATLAB Quick Start! Part II
- matlab程序优化以及eclipse与github的结合
- matlab中的rand函数(用于产生随机数)
- 图像增强算法四种,图示与源码,包括retinex(ssr、msr、msrcr)和一种混合算法