Hello tlm,
pour dessiner un rectangle dans opencv, on utilise :
mais pour dessiner un CvBox2D, on fait comment,svp?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 void cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int line_type=8, int shift=0 );
un CvBox2D est un rectangle mais avec un angle de rotation.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 typedef struct CvBox2D { CvPoint2D32f center; /* center of the box */ CvSize2D32f size; /* box width and length */ float angle; /* angle between the horizontal axis and the first side (i.e. length) in degrees */ } CvBox2D;
Partager