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 功能 ...
随机推荐
- MySQL八:视图、触发器、事物、存储过程、函数
阅读目录 一 视图 二 触发器 三 事务 四 储存过程 五 函数 六 流程控制 一 视图 视图是一个虚拟表(非真实存在),其本质是[根据SQL语句获取动态的数据集,并为其命名],用户使用时只需使用[名 ...
- 一个可以模拟GET,POST,PUT,DELET请求的HTTP在线工具
一个简陋的HTTP请求工具,UI比较丑陋.0.0,可以用于接口调试. 之前在调试公司的远程接口的时候用的是curl,后来也在网上找到几种Http请求模拟的客户端程序.当时后来发现google app ...
- android开发中遇到的问题汇总【九】
244.http请求的url含有中字符时.须要Uri编码.Uri.encoder() 245.使用androidstudio时,不知道什么原因svn不见了 Android Studio missing ...
- 【Python+selenium Wendriver API】之下拉框定位
上代码: # coding:utf-8 from selenium import webdriver from selenium.webdriver.common.action_chains impo ...
- Windows找出占用端口的进程
第一步:找出监听指定端口的进程号: C:\> netstat -ao | findstr 443 TCP 0.0.0.0:443 Sean-NotePC:0 ...
- 利用freemarker生成带fusioncharts图片的word简报
/** * 利用freemarker生成带fusioncharts图片的word简报 * 烟台海颐软件技术论坛 * 作者 牟云飞 新建 * 毕业 ...
- onCreate中获得控件的大小
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setC ...
- 在Linux先显示文件
cat:从第一行开始显示文件内容. tac:从最后一行开始显示内容. nl:显示的时候带行号. more:一页一页显示. less:同more,可以向上翻页. head:显示文件前几行. head - ...
- poj1135
Domino Effect Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10454 Accepted: 2590 De ...
- CAFFE学习笔记(四)将自己的jpg数据转成lmdb格式
1 引言 1-1 以example_mnist为例,如何加载属于自己的测试集? 首先抛出一个问题:在example_mnist这个例子中,测试集是人家给好了的.那么如果我们想自己试着手写几个数字然后验 ...