How to do alignment of image? [closed]
I need to do the following :
moments of the ROI
I'm unable to align the contour.
I need to do the following :
moments of the ROI
I'm unable to align the contour.
I'm going to go out on a limb here and guess it's because you don't have any code that even attempts to find the center of gravity. Fortunately for you, OpenCV has a function for just that. Moments. As a matter of fact, just about everything you need should be on that page.
Asked: 2016-12-17 07:44:02 -0600
Seen: 466 times
Last updated: Jan 22 '17
current problem is ?
@berak I'm not able to find out what is missing in the function alignContour
maybe the center-of-gravity is the wrong measure here ?
imagine a spoon, the COG will be somewhere in the bowl, with a large handle protruding from that.
unsure, if i misunderstand you, but i'd rather try with the "geometric center" (the center of the contour's boundingBox) here