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 功能 ...
随机推荐
- eclipse 开发 scala
(环境:jdk1.7,scala插件scala-2.1.1.2-site.zip) 1:下载scala插件 http://download.scala-ide.org/sdk/helium/e38/s ...
- openWRT自学---对官方的开发指导文档的解读和理解 记录2:如何控制内核模块的编译
openwrt对于kernel module的处理分两类:随内核主线而来的kernel module 和 其他作为独立project的kernel module.而这两种,openwrt将采用相同的模 ...
- /var/log目录下的Linux日志文件功能详解_转
摘自:http://www.niaoyun.com/help/application/386.html 学习linux应该知道日志文件的所在位置以及它们包含的内容,在系统运行正常的情况下学习了解这些不 ...
- python学习 05 函数switch功能
1.python没有switch功能,利用字典实现 如果用if else,可行但是效率不高
- Photoshop经常使用快捷键(2)
51.自由变换外框右键属性:ESC 取消 斜切:能够依照该调节边角点所引导出的两条边的角度进行移动.ctrl+shift 扭曲:随意点的调节. ctrl 透视:模拟近大远小的关系.ctrl+shif ...
- VB.NET的前世今生
[前言]初次见到这个强大的东西.一看名字就没有了陌生感,由于它和我曾经见过的VB肯定有非常多的联系. 俗话说,看人看相,了解看感觉(O(∩_∩)O~~几乎相同这个意思吧). 要想了解VB.net就要从 ...
- 基于react-native android的新闻app的开发
使用平台:android 代码获取地址:https://github.com/wuwanyu/ReactNative-Android-MovieDemo 项目展示: 结构图: SpalashScree ...
- Python一些基础练习题
可变的数据类型:list, dict, set(可修改其中的元素) 不可变的数据类型:str, tuple 重点:str, list, dict (1).推导式练习 # 利用列表推导式: 找出100以 ...
- 【BZOJ3689】异或之 堆+可持久化Trie树
[BZOJ3689]异或之 Description 给定n个非负整数A[1], A[2], ……, A[n].对于每对(i, j)满足1 <= i < j <= n,得到一个新的数A ...
- mac上好用的软件
1 newfile menu for Mac 右键创建文件.