org.opencv.core
public class TermCriteria extends java.lang.Object
class CV_EXPORTS TermCriteria
// C++ code:
public:
enum
COUNT=1, //!< the maximum number of iterations or elements to compute
MAX_ITER=COUNT, //!< ditto
EPS=2 //!< the desired accuracy or change in parameters at which the iterative algorithm stops
};
//! default constructor
TermCriteria();
//! full constructor
TermCriteria(int type, int maxCount, double epsilon);
//! conversion from CvTermCriteria
TermCriteria(const CvTermCriteria& criteria);
//! conversion to CvTermCriteria
operator CvTermCriteria() const;
int type; //!< the type of termination criteria: COUNT, EPS or COUNT + EPS
int maxCount; // the maximum number of iterations/elements
double epsilon; // the desired accuracy
};
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.
Modifier and Type | Field and Description |
---|---|
static int |
COUNT
The maximum number of iterations or elements to compute
|
static int |
EPS
The desired accuracy threshold or change in parameters at which the iterative algorithm is terminated.
|
double |
epsilon |
static int |
MAX_ITER
The maximum number of iterations or elements to compute
|
int |
maxCount |
int |
type |
Constructor and Description |
---|
TermCriteria()
Termination criteria for iterative algorithms.
|
TermCriteria(double[] vals) |
TermCriteria(int type,
int maxCount,
double epsilon)
Termination criteria for iterative algorithms.
|
public static final int COUNT
public static final int EPS
public double epsilon
public static final int MAX_ITER
public int maxCount
public int type
public TermCriteria()
public TermCriteria(double[] vals)
public TermCriteria(int type, int maxCount, double epsilon)
type
- the type of termination criteria: COUNT, EPS or COUNT + EPS.maxCount
- the maximum number of iterations/elements.epsilon
- the desired accuracy.public TermCriteria clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void set(double[] vals)
public java.lang.String toString()
toString
in class java.lang.Object