Ask Your Question
1

Percentage of overlap

asked 2015-04-11 04:32:30 -0600

bjorn89 gravatar image

updated 2016-06-14 08:40:59 -0600

Hi all, how can I calculate the percentage of 2 overlapping images? If the result is 100 the 2 images are completely overlapped, if 0 they're completely disjoined.

PS: Because I'm doing stitch of images, I'm calculating the orb features,I don't know if it helps!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2015-04-11 14:22:21 -0600

Eduardo gravatar image

updated 2015-05-02 00:32:00 -0600

Hi.

The percentage of overlapping is: area_of_intersection / area_of_union * 100.

To get the intersection rectangle and thus the area of intersection (from this link) with an origin point at the top left:

left = max(r1.left, r2.left)
right = min(r1.right, r2.right)
bottom = min(r1.bottom, r2.bottom)
top = max(r1.top, r2.top)

Verify that the intersection is not empty:

left < right && bottom > top

A picture to show the problem: image description

edit flag offensive delete link more

Comments

Thanks for the answer, I misunderstood the problem. I need to check the percentage of similarity between two images. How can I proceed? For now I'm extracting features with orb!

bjorn89 gravatar imagebjorn89 ( 2015-04-14 02:31:15 -0600 )edit

Maybe you check could this link.

Eduardo gravatar imageEduardo ( 2015-04-14 13:09:57 -0600 )edit

thanks man,I'll give a try and let you know!

bjorn89 gravatar imagebjorn89 ( 2015-04-15 02:10:05 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-04-11 04:32:30 -0600

Seen: 8,133 times

Last updated: May 02 '15