OpenCV  4.1.0
Open Source Computer Vision
Public Types | Public Member Functions | Public Attributes | List of all members
cv::TermCriteria Class Reference

The class defining termination criteria for iterative algorithms. More...

#include <opencv2/core/types.hpp>

Public Types

enum  Type {
  COUNT =1,
  MAX_ITER =COUNT,
  EPS =2
}
 

Public Member Functions

 TermCriteria ()
 default constructor More...
 
 TermCriteria (int type, int maxCount, double epsilon)
 
bool isValid () const
 

Public Attributes

double epsilon
 the desired accuracy More...
 
int maxCount
 the maximum number of iterations/elements More...
 
int type
 the type of termination criteria: COUNT, EPS or COUNT + EPS More...
 

Detailed Description

The class defining termination criteria for iterative algorithms.

You can initialize it by default constructor and then override any parameters, or the structure may be fully initialized using the advanced variant of the constructor.

Examples:
samples/cpp/camshiftdemo.cpp, samples/cpp/image_alignment.cpp, samples/cpp/kmeans.cpp, samples/cpp/lkdemo.cpp, and samples/cpp/train_HOG.cpp.

Constructor & Destructor Documentation

cv::TermCriteria::TermCriteria ( )

default constructor

cv::TermCriteria::TermCriteria ( int  type,
int  maxCount,
double  epsilon 
)
Parameters
typeThe type of termination criteria, one of TermCriteria::Type
maxCountThe maximum number of iterations or elements to compute.
epsilonThe desired accuracy or change in parameters at which the iterative algorithm stops.

Member Function Documentation

bool cv::TermCriteria::isValid ( ) const
inline

Member Data Documentation

double cv::TermCriteria::epsilon

the desired accuracy

int cv::TermCriteria::maxCount

the maximum number of iterations/elements

int cv::TermCriteria::type

the type of termination criteria: COUNT, EPS or COUNT + EPS


The documentation for this class was generated from the following file: