Ask Your Question

How knows if the contour passed on line?

asked 2015-12-05 10:48:12 -0500

Guilherme gravatar image

updated 2015-12-05 10:49:58 -0500

Hello there! I like to count the number of peoples or cars. I make a line on center of image. Ex.: image description

But, how can I know that he has passed and not cont again while the contour be on the line? The contours has a ID?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-12-06 19:36:55 -0500

diegomoreira gravatar image

You can use the minimum and maximum values of the rectangle to know. If the contour has passed, then the initial coordinate (x0, y0) and the end coordinate (x0 + x.width, y0 + y.height) rectangle, will be to the left side of the line you marked in the image.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2015-12-05 10:48:12 -0500

Seen: 81 times

Last updated: Dec 06 '15