Ask Your Question
0

How knows if the contour passed on line?

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

Guilherme gravatar image

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

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
2

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

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

Question Tools

2 followers

Stats

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

Seen: 197 times

Last updated: Dec 06 '15