Ask Your Question

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

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

Karanbeer Kaur gravatar image

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

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

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

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


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

Seen: 705 times

Last updated: Nov 02 '16