美文网首页
基础绘画

基础绘画

作者: 看风景的人_21744 | 来源:发表于2017-10-21 19:07 被阅读0次

数据结构

1. Point

Point pt;
pt.x = 10;
pt.y = 8;

Point pt =  Point(10, 8);

Point represents a 2D point, specified by its image coordinates

2. Scalar

Scalar( a, b, c )
  • Represents a 4-element vector. The type Scalar is widely used in OpenCV for passing pixel values.
  • we will use it extensively to represent BGR color values (3 parameters). It is not necessary to define the last argument if it is not going to be used.

椭圆


void cv::ellipse    (
InputOutputArray    img,
Point   center,
Size    axes,
double  angle,
double  startAngle,
double  endAngle,
const Scalar &  color,
int     thickness = 1,
int     lineType = LINE_8,
int     shift = 0 
)   


void cv::circle (   
InputOutputArray    img,
Point   center,
int     radius,
const Scalar &  color,
int     thickness = 1,
int     lineType = LINE_8,
int     shift = 0 
)   

新tip

  imshow( atom_window, atom_image );
  moveWindow( atom_window, 0, 200 );
  imshow( rook_window, rook_image );
  moveWindow( rook_window, w, 200 );
  • moveWindow可以移动窗口到屏幕指定位置

相关文章

网友评论

      本文标题:基础绘画

      本文链接:https://www.haomeiwen.com/subject/zdfbuxtx.html