一、如何自创图片
Mat类对象一种的构造函数的输入的参数如下。可以设定图片的长宽,图片的类型如8位的RGB(CV_8SC3)类型的图片。
Mat (int rows, int cols, int type, const Scalar &s)
二、自绘画图形
1、画圆
void cv::circle ( InputOutputArray img, Point center, int radius, const Scalar & color, int thickness = 1
,int lineType = LINE_8
,int shift = 0
)
图像 | 绘制圆圈的图像。 |
中央 | 圆的中心。 |
半径 | 圆的半径。 |
颜色 | 圆圈颜色。 |
厚度 | 圆形轮廓的厚度(如果为正)。 负值,如 FILLED ,表示要绘制一个实心圆。 |
线型 | 圆边界的类型。 见 |