Ask Your Question
0

OpenCV findContour() corners index order

asked 2014-01-16 01:26:45 -0600

kapilg gravatar image

updated 2017-11-12 06:47:19 -0600

I am working with Android OpenCV .I have a square shape marker image .I have to find out the position of four corners of marker in the live feed with their index's position. I am able to get the position of these four points in the live feed having the frame size 640*480. But the problem with the index's positions those are not fixed ,sometimes i am getting the 0th index on the top left position and sometimes 1th index at that position ... How to solve this problem or is there any alternative for findContour() method.

Your help will be appreciated...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-01-16 10:09:45 -0600

updated 2014-01-16 10:14:47 -0600

I think that findCountours indexation is done from top-down and then left-right. So, if the top right corner happens to be one pixel higher than top left corner, it would have the first index.

Try to find a way to compute the indices yourself. If this marker moves in the frame this might be a tricky problem that may need some tracking methods to be solved. If the marker is sitting still you can just index them yourself according to your criteria.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-01-16 01:26:45 -0600

Seen: 840 times

Last updated: Jan 16 '14