matlab之viscircles()函数
函数功能:画圆
语法:
viscircles(centers,radii)viscircles(ax,centers,radii)viscircles(___,Name,Value)h = viscircles(___)描述:
viscircles(centers,radii) draws circles with specified centers and radii onto the current axes.
viscircles(centers,radii) 将具有指定中心和半径的圆绘制到当前轴上。
举例:
1.read the image into the workspace and display it.
将图像读入工作区并进行显示。
A = imread('circlesBrightDark.png');
imshow(A)

define the radius range.
定义半径范围。
Rmin = 30;
Rmax = 65;
find all the bright circles in the image within the radius range.
在定义的半径范围内找到图像中所有明亮的圆圈。
[centersBright, radiiBright] = imfindcircles(A,[Rmin Rmax],'ObjectPolarity','bright');
find all the dark circles in the image within the radius range.
在定义的半径范围内找到图像中的所有暗眼圈。
[centersDark, radiiDark] = imfindcircles(A,[Rmin Rmax],'ObjectPolarity','dark');
draw red lines around the edges of the bright circles.
在明亮的圆圈边缘画一条红线。
viscircles(centersBright, radiiBright,'Color','r');

draw red dashed lines around the edges of the dark circles.
围绕暗圆的边缘绘制红色虚线。
viscircles(centersDark, radiiDark,'LineStyle','--');

2.viscircles(ax,centers,radii) draws circles onto the axes specified by ax.
viscircles(ax,centers,radii) 把圆画到指定的轴上。
举例:
the viscircles function does not clear the target axes before plotting circles. to remove circles that have been previously plotted in an axes, use the cla function. to illustrate, this example creates a new figure and then loops, drawing a set of circles with each iteration, clearing the axes each time.
在绘制圆之前,viscircles不去除目标轴。若要删除以前在轴中绘制的圆圈,请使用CLA函数。为了举例说明,这个示例创建一个新的图形,然后循环,用每次迭代绘制一组圆圈,每次清除轴。
figure
colors = {'b','r','g','y','k'}; % for k = 1:5
% Create 5 random circles to display,
X = rand(5,1);
Y = rand(5,1);
centers = [X Y];
radii = 0.1*rand(5,1); % Clear the axes.
cla % Fix the axis limits.
xlim([-0.1 1.1])
ylim([-0.1 1.1]) % Set the axis aspect ratio to 1:1.
axis square % Set a title.
title(['k = ' num2str(k)]) % Display the circles.
viscircles(centers,radii,'Color',colors{k}); % Pause for 1 second.
pause(1)
end
https://ww2.mathworks.cn/help/images/ref/viscircles.html
matlab之viscircles()函数的更多相关文章
- matlab中patch函数的用法
http://blog.sina.com.cn/s/blog_707b64550100z1nz.html matlab中patch函数的用法——emily (2011-11-18 17:20:33) ...
- Matlab基本函数-conj函数
Matlab基本函数-conj函数 1.conj函数:用于计算复数的共轭值 2.用法说明:y=conj(x)函数计算复数x的共轭值.输出结果y的维数跟输入x的维数一致,返回值为:real(y)-i*i ...
- 【原创】Matlab.NET混合编程技巧之找出Matlab内置函数
本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新 Matlab和C#混合编程文章目录 :[目录]Matlab和C#混合编程文章目录 Matlab与.N ...
- 【原创】Matlab.NET混合编程技巧之直接调用Matlab内置函数
本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新 Matlab和C#混合编程文章目录 :[目录]Matlab和C#混合编程文章目录 在我的上一篇文章[ ...
- matlab画图形函数 semilogx
matlab画图形函数 semilogx loglog 主要是学习semilogx函数,其中常用的是semilogy函数,即后标为x的是在x轴取对数,为y的是y轴坐标取对数.loglog是x y轴都取 ...
- 【matlab】设定函数默认参数
C++/java/python系列的语言,函数可以有默认值,通常类似如下的形式: funtion_name (param1, param2=default_value, ...) 到了matlab下发 ...
- matlab中subplot函数的功能
转载自http://wenku.baidu.com/link?url=UkbSbQd3cxpT7sFrDw7_BO8zJDCUvPKrmsrbITk-7n7fP8g0Vhvq3QTC0DrwwrXfa ...
- Matlab:max函数
Matlab中max函数在矩阵中求函数大小的实例如下: C = max(A)返回一个数组各不同维中的最大元素.如果A是一个向量,max(A)返回A中的最大元素.如果A是一个矩阵,max(A)将A的每一 ...
- 【原创】Matlab中plot函数全功能解析
[原创]Matlab中plot函数全功能解析 该帖由Matlab技术论(http://www.matlabsky.com)坛原创,更多精彩内容参见http://www.matlabsky.com 功能 ...
随机推荐
- rm 命令简要
rm 单独使用只能删除文件不能删除文件夹 rm -r 可以删除文件夹和文件 1.rm test.txt 删除文件 2.rm -r test.txt 每次删除的时候都询问是 ...
- hive beeline 的server启动与连接
启动hiveServer2 启动beeline之后 连接 !connect jdbc:hive2://localhost:10000/default 启动的时候连接 /beeline -u jdbc: ...
- python 学习2 测试报告
1. py.test test_class.py --resultlog=./log.txt 2.生成html格式 py.test test_class.py --html=./report.htm ...
- Windows server2008 搭建ASP接口訪问连接oracle数据库全过程记录
真的是太不easy了,曾经的时候在window server 2003上面搭建了一套asp+oracle的接口系统.就费了好大的劲儿,事实上那会迷迷瞪瞪的也不知道怎么的就弄好了,也懒得管了.OK,从昨 ...
- 趣味编程:C#中Specification模式的实现(参考答案 - 下)
一篇文章中我们利用C#语言的特性实现了一种轻量级的Specification模式,它的关键在于抛弃了具体的Specification类型,而是使用一个委托对象代替唯一关键的IsSatisfiedBy方 ...
- TP5.0中的小知识总结
2017年6月26日15:01:231.input 获取输入数据 支持默认值和过滤:接收用户在前台输入的数据,可以是get方式也可以是post方式.2.ThinkPHP5.0内置了分页实现,要给 ...
- D - Invitation Cards
D - Invitation Cards Time Limit:8000MS Memory Limit:262144KB 64bit IO Format:%lld & %llu ...
- 宇视摄像机/NVR OCX插件插件安装出现:Failed to register ocx, error code 14001 错误的解决方法
最近在使用EasyNVR接入海康.宇视的摄像机进行景观直播的项目时,需要进入宇视设备进行音视频编码参数的调整,要说呢,海康的产品好就是要好很多: 海康的设备后台管理页面,不需要装插件也能进去,而且能调 ...
- [note]树链剖分
树链剖分https://www.luogu.org/problemnew/show/P3384 概念 树链剖分,是一种将树剖分成多条不相交的链的算法,并通过其他的数据结构来维护这些链上的信息. 最简单 ...
- Django 路飞学成书写规范的总结
路飞学成书写规范的总结 命名 项目/文件/函数 -> 小写+下划线 类 驼峰式 路由 将每个功能的路由进行分割, 或者做上注释 类和方法的注释 每个类都要注释是干什么的 每个方法也要进行注释标明 ...