Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Depending on how you want the rectangle to look you could either use OpenGL (If that's an option) or simply cv::Rectangle. Or perhaps I am misunderstanding you? so something like this:

 void rectangle(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1)

or

void rectangle(Mat& img, Rect rec, const Scalar& color, int thickness=1)