OpenCV: Dealing with contour vector indexing

4.4k views Asked by At

Using the function convexityDefects takes the blob from a binary image and creates a vector with all the points surrounding my hand. This vector always begins at the Point at the highest Y location on my blob which is interfering with my ability to run K-Curvature on each finger to determine accurate finger position.

I have thought about reshuffling the vector so that the beginning of the vector starts away from a location away from the fingers on my hand. The problem is that this is difficult to implement because I don't have an effective way to pick a point on the hand to start the reordering of the points. Do you have any suggestions which could provide easy methods to fix this? My goal is to have none of the fingertips within ~30 points of the beginning of this array.

0

There are 0 answers