Sorry, this content is no longer available

Ask Your Question
1

Оverlapping rectangles

asked Aug 5 '13

updated Aug 5 '13

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 ;)

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Aug 5 '13

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.

Preview: (hide)

Comments

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

Spas Hristov gravatar imageSpas Hristov (Aug 5 '13)edit

Question Tools

1 follower

Stats

Asked: Aug 5 '13

Seen: 1,450 times

Last updated: Aug 05 '13