OpenCV  5.0.0-pre
Open Source Computer Vision
Loading...
Searching...
No Matches
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>

Collaboration diagram for cv::TermCriteria:

Public Types

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

Public Member Functions

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

Public Attributes

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

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/image_alignment.cpp, samples/cpp/lkdemo.cpp, samples/cpp/snippets/camshiftdemo.cpp, and samples/cpp/snippets/kmeans.cpp.

Member Enumeration Documentation

◆ Type

Criteria type, can be one of: COUNT, EPS or COUNT + EPS

Enumerator
COUNT 

the maximum number of iterations or elements to compute

MAX_ITER 

ditto

EPS 

the desired accuracy or change in parameters at which the iterative algorithm stops

Constructor & Destructor Documentation

◆ TermCriteria() [1/3]

cv::TermCriteria::TermCriteria ( )

default constructor

◆ TermCriteria() [2/3]

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.

◆ TermCriteria() [3/3]

cv::TermCriteria::TermCriteria ( int  maxCount,
double  epsilon 
)

Member Function Documentation

◆ isValid()

bool cv::TermCriteria::isValid ( ) const
inline
Here is the call graph for this function:

Member Data Documentation

◆ epsilon

double cv::TermCriteria::epsilon

the desired accuracy

◆ maxCount

int cv::TermCriteria::maxCount

the maximum number of iterations/elements

◆ type

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: