Ask Your Question
1

Оverlapping rectangles

asked 2013-08-05 02:38:19 -0600

updated 2013-08-05 02:40:04 -0600

I have a set of rectangles with weights, but some of them are overlapping in some region or entirely. I have make a function return the bounding rectangle, but in that case that the result is not so accurate and the result rectangle is way too big:

image description (something like that)

Now i have the weight of every rectangle. My question is whether is in opencv something, that can make the decision "Which rectangle is more important ?" and return something like that:

image description

p.p. Now I'm reading about NMS (Non Maximum Suppression) but if there is something already implemented, why not to use it ;)

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2013-08-05 06:29:31 -0600

Notas gravatar image

I doubt there's something in OpenCV for that, but why don't you do it yourself? It's fairly trivial:

Find overlapping rectangles and for each overlap, select the one with the higher weight.

edit flag offensive delete link more

Comments

Tonight I will think about it (with a beer or two) and tomorrow will try to implement it. ;]

Spas Hristov gravatar imageSpas Hristov ( 2013-08-05 07:58:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-08-05 02:38:19 -0600

Seen: 1,423 times

Last updated: Aug 05 '13