1.Circles
void circle(Mat& img, Point center, int radius, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
Parameters: |
- img – Image where the circle is drawn.
- center – Center of the circle.
- radius – Radius of the circle.
- color – Circle color.
- thickness – Thickness of the circle outline, if positive. Negative thickness means that a filled circle is to be drawn.
- lineType – Type of the circle boundary. See the line() description.
- shift – Number of fractional bits in the coordinates of the center and in the radius value.(偏移量)
|
2.clipLine
bool clipLine(Size imgSize, Point& pt1, Point& pt2)
bool clipLine(Rect imgRect, Point& pt1, Point& pt2)
判断线段是否在矩形内
Parameters: |
- imgSize – Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) .
|