Common functions and classes#

Detailed Description#

Classes#

Name

Description

class cv::SimilarRects

This class is used for grouping object candidates detected by Cascade Classifier, HOG etc. View details

Function Documentation#

groupRectangles()#

void cv::groupRectangles(
std::vector< Rect > & rectList,
int groupThreshold,
double eps,
std::vector< int > * weights,
std::vector< double > * levelWeights )

#include <opencv2/xobjdetect.hpp>

Python:

cv.groupRectangles(rectList, groupThreshold[, eps]) -> rectList, weights

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

groupRectangles()#

void cv::groupRectangles(
std::vector< Rect > & rectList,
int groupThreshold,
double eps = 0.2 )

#include <opencv2/xobjdetect.hpp>

Python:

cv.groupRectangles(rectList, groupThreshold[, eps]) -> rectList, weights

Groups the object candidate rectangles.

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 \(\texttt{eps}\rightarrow +\inf\) , 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.

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.

groupRectangles()#

void cv::groupRectangles(
std::vector< Rect > & rectList,
std::vector< int > & rejectLevels,
std::vector< double > & levelWeights,
int groupThreshold,
double eps = 0.2 )

#include <opencv2/xobjdetect.hpp>

Python:

cv.groupRectangles(rectList, groupThreshold[, eps]) -> rectList, weights

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

groupRectangles()#

void cv::groupRectangles(
std::vector< Rect > & rectList,
std::vector< int > & weights,
int groupThreshold,
double eps = 0.2 )

#include <opencv2/xobjdetect.hpp>

Python:

cv.groupRectangles(rectList, groupThreshold[, eps]) -> rectList, weights

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

groupRectangles_meanshift()#

void cv::groupRectangles_meanshift(
std::vector< Rect > & rectList,
std::vector< double > & foundWeights,
std::vector< double > & foundScales,
double detectThreshold = 0.0,
Size winDetSize = Size(64, 128) )

#include <opencv2/xobjdetect.hpp>

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.