Ask Your Question
0

How to compare contour 2 Objects are matching or not in images

asked 2016-11-02 01:19:57 -0600

Karanbeer Kaur gravatar image

updated 2016-11-02 01:20:33 -0600

I have two array of MatOfPoint and want to compare position of objects and how I can implement this , which method i have to to use to check object at position are same or not.

    ArrayList<MatOfPoint> contours1 = new ArrayList<MatOfPoint>();
    ArrayList<MatOfPoint> contours2 = new ArrayList<MatOfPoint>();
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-11-02 01:48:01 -0600

berak gravatar image

to compare the shape, have a look at matchShapes()

just know, that it's not rotation-invariant (an arrow up is not considered same as an arrow down)

moments() will give you the center-of-mass for the contours

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-11-02 01:19:57 -0600

Seen: 877 times

Last updated: Nov 02 '16