Ask Your Question

Revision history [back]

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

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