First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Оverlapping rectangles

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

click to hide/show revision 2
No.2 Revision

Оverlapping rectangles

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