cv::TermCriteria Class Reference 核心功能 » 基本结构


The class defining termination criteria for iterative algorithms. 更多...

#include <opencv2/core/types.hpp>

公共类型

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

Public Member Functions

  TermCriteria ()
  default constructor 更多...
 
  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 更多...
 

详细描述

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.

范例:
samples/cpp/camshiftdemo.cpp , samples/cpp/image_alignment.cpp , samples/cpp/kmeans.cpp , samples/cpp/lkdemo.cpp ,和 samples/cpp/train_HOG.cpp .

Member Enumeration Documentation

◆  Type

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

枚举器
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/2]

cv::TermCriteria::TermCriteria ( )

default constructor

◆  TermCriteria() [2/2]

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

成员函数文档编制

◆  isValid()

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

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: