## 前言

CV_EXPORTS_W void circle(CV_IN_OUT Mat& img, Point center, int radius,const Scalar& color,
int thickness=1,int lineType=8, int shift=0);

## 分析

//(a)图
circle(imgSrc, Point(c, r),3*round(dvecSigma[i])*,Scalar(0, 255, 0);

//(b)图
circle(imgSrc, Point(c*(1<<4), r*(1<<4)),
3*round(dvecSigma[i])*(1<<4), Scalar(0, 255, 0), 1,CV_AA,4);

//就是这个变量
const int draw_shift_bits = 4;
const int draw_multiplier = 1 << draw_shift_bits;

namespace cv
{

/*
* Functions to draw keypoints and matches.
*/
static inline void _drawKeypoint( Mat& img, const KeyPoint& p,
const Scalar& color, int flags )
{
CV_Assert( !img.empty() );
//中心点*(1<<4)
Point center( cvRound(p.pt.x * draw_multiplier), cvRound(p.pt.y * draw_multiplier) );

if( flags & DrawMatchesFlags::DRAW_RICH_KEYPOINTS )
{
//半径*(1<<4)
int radius = cvRound(p.size/2 * draw_multiplier); // KeyPoint::size is a diameter

// 画圆
circle( img, center, radius, color, 1, CV_AA, draw_shift_bits );

// draw orientation of the keypoint, if it is applicable
if( p.angle != -1 )
{
);
line( img, center, center+orient, color, 1, CV_AA, draw_shift_bits );
}
...

#### opencv中的Circle函数

2016-10-09 17:31:20

#### 我的OpenCV学习笔记（七）：绘图操作

2012-04-30 14:08:13

#### 【OpenCV笔记 06】OpenCV中绘制基本几何图形【矩形rectangle()、椭圆ellipse() 、圆circle() 】

2016-07-14 20:30:03

#### OpenCv学习笔记(七)---OpenCv中的基本绘图函数,圆，椭圆，线段，矩形，多边形的绘制(1)

2016-04-26 11:43:03

#### OpenCV之基本绘图

2014-04-24 16:39:19

#### opencv2.4.7.2画圆，画十字，画矩形

2014-01-07 12:06:12

#### Python-opencv划线/画圆/椭圆/添加文字

2017-10-24 17:30:58

#### opencv画圆

2014年06月02日 1.51MB 下载

#### opencv中使用中点画圆算法

2017-10-23 14:37:12

#### opencv各种画图 直线 矩形 圆 椭圆

2015-07-02 11:38:20

## 不良信息举报

OpenCV的circle函数画圆的小技巧