Ask Your Question
0

How to do alignment of image? [closed]

asked 2016-12-17 07:44:02 -0600

Allison gravatar image

updated 2017-01-22 02:12:18 -0600

I need to do the following :

moments of the ROI

I'm unable to align the contour.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Allison
close date 2017-01-18 21:26:56.510343

Comments

1

current problem is ?

berak gravatar imageberak ( 2016-12-19 10:39:28 -0600 )edit

@berak I'm not able to find out what is missing in the function alignContour

Allison gravatar imageAllison ( 2016-12-20 23:00:10 -0600 )edit

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

berak gravatar imageberak ( 2017-01-07 07:59:36 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
3

answered 2016-12-17 11:52:42 -0600

Tetragramm gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-17 07:44:02 -0600

Seen: 466 times

Last updated: Jan 22 '17