[][src]Function opencv::objdetect::group_rectangles_levelweights

pub fn group_rectangles_levelweights(
    rect_list: &mut VectorOfRect,
    group_threshold: i32,
    eps: f64,
    weights: &mut VectorOfint,
    level_weights: &mut VectorOfdouble
) -> Result<()>

Groups the object candidate rectangles.

Parameters

  • rectList: Input/output vector of rectangles. Output vector includes retained and grouped rectangles. (The Python list is not modified in place.)
  • groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
  • eps: Relative difference between sides of the rectangles to merge them into a group.

The function is a wrapper for the generic function partition . It clusters all the input rectangles using the rectangle equivalence criteria that combines rectangles with similar sizes and similar locations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If inline formula , all the rectangles are put in one cluster. Then, the small clusters containing less than or equal to groupThreshold rectangles are rejected. In each other cluster, the average rectangle is computed and put into the output rectangle list.

Overloaded parameters