Ask Your Question
0

Need help creating a static rectangle in middle of video window for open cv

asked 2018-12-03 03:55:25 -0600

ojxsdd gravatar image

updated 2018-12-04 01:58:06 -0600

Akhil Patel gravatar image

Have created a face detection application using open cv, but i have to make a rectangle in the middle of the screen that doesnt move so user can look at it(its for a android application). But i have no idea how to make it. pls help

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2018-12-03 17:28:07 -0600

Qvintus gravatar image

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)
edit flag offensive delete link more

Comments

1

all is not working T.T most of the code i find is something like this so i doubt that this is wrong, but im stuck with the 'incomplete type is not allowed'

ojxsdd gravatar imageojxsdd ( 2018-12-03 19:23:50 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-12-03 03:55:25 -0600

Seen: 222 times

Last updated: Dec 03 '18