A storage for various OpenCV dynamic data structures, such as ``CvSeq``, ``CvSet`` etc.
A storage for various OpenCV dynamic data structures, such as ``CvSeq``, ``CvSet`` etc.
..ocv:member:: CvMemBlock* bottom
..ocv:member:: CvMemBlock* bottom
the first memory block in the double-linked list of blocks
the first memory block in the double-linked list of blocks
..ocv:member:: CvMemBlock* top
..ocv:member:: CvMemBlock* top
the current partially allocated memory block in the list of blocks
the current partially allocated memory block in the list of blocks
..ocv:member:: CvMemStorage* parent
..ocv:member:: CvMemStorage* parent
the parent storage (if any) from which the new memory blocks are borrowed.
the parent storage (if any) from which the new memory blocks are borrowed.
..ocv:member:: int free_space
..ocv:member:: int free_space
number of free bytes in the ``top`` block
number of free bytes in the ``top`` block
..ocv:member:: int block_size
..ocv:member:: int block_size
the total size of the memory blocks
the total size of the memory blocks
Memory storage is a low-level structure used to store dynamically growing data structures such as sequences, contours, graphs, subdivisions, etc. It is organized as a list of memory blocks of equal size -
``bottom`` field is the beginning of the list of blocks and ``top`` is the currently used block, but not necessarily the last block of the list. All blocks between ``bottom`` and ``top``, not including the
@ -64,38 +64,38 @@ CvSeq
..ocv:struct:: CvSeq
Dynamically growing sequence.
Dynamically growing sequence.
..ocv:member:: int flags
..ocv:member:: int flags
sequence flags, including the sequence signature (CV_SEQ_MAGIC_VAL or CV_SET_MAGIC_VAL), type of the elements and some other information about the sequence.
sequence flags, including the sequence signature (CV_SEQ_MAGIC_VAL or CV_SET_MAGIC_VAL), type of the elements and some other information about the sequence.
..ocv:member:: int header_size
..ocv:member:: int header_size
size of the sequence header. It should be sizeof(CvSeq) at minimum. See :ocv:cfunc:`CreateSeq`.
size of the sequence header. It should be sizeof(CvSeq) at minimum. See :ocv:cfunc:`CreateSeq`.
..ocv:member:: CvSeq* h_prev
..ocv:member:: CvSeq* h_next
..ocv:member:: CvSeq* v_prev
..ocv:member:: CvSeq* v_next
..ocv:member:: CvSeq* h_prev
..ocv:member:: CvSeq* h_next
..ocv:member:: CvSeq* v_prev
..ocv:member:: CvSeq* v_next
pointers to another sequences in a sequence tree. Sequence trees are used to store hierarchical contour structures, retrieved by :ocv:cfunc:`FindContours`
pointers to another sequences in a sequence tree. Sequence trees are used to store hierarchical contour structures, retrieved by :ocv:cfunc:`FindContours`
..ocv:member:: int total
..ocv:member:: int total
the number of sequence elements
the number of sequence elements
..ocv:member:: int elem_size
..ocv:member:: int elem_size
size of each sequence element in bytes
size of each sequence element in bytes
..ocv:member:: CvMemStorage* storage
..ocv:member:: CvMemStorage* storage
memory storage where the sequence resides. It can be a NULL pointer.
memory storage where the sequence resides. It can be a NULL pointer.
..ocv:member:: CvSeqBlock* first
..ocv:member:: CvSeqBlock* first
pointer to the first data block
pointer to the first data block
The structure ``CvSeq`` is a base for all of OpenCV dynamic data structures.
There are two types of sequences - dense and sparse. The base type for dense
* ``CV_TERMCRIT_ITER`` - stop the algorithm after ``max_iter`` iterations at maximum.
* ``CV_TERMCRIT_ITER`` - stop the algorithm after ``max_iter`` iterations at maximum.
* ``CV_TERMCRIT_EPS`` - stop the algorithm after the achieved algorithm-dependent accuracy becomes lower than ``epsilon``.
* ``CV_TERMCRIT_EPS`` - stop the algorithm after the achieved algorithm-dependent accuracy becomes lower than ``epsilon``.
* ``CV_TERMCRIT_ITER+CV_TERMCRIT_EPS`` - stop the algorithm after ``max_iter`` iterations or when the achieved accuracy is lower than ``epsilon``, whichever comes the earliest.
* ``CV_TERMCRIT_ITER+CV_TERMCRIT_EPS`` - stop the algorithm after ``max_iter`` iterations or when the achieved accuracy is lower than ``epsilon``, whichever comes the earliest.
..ocv:member:: int max_iter
..ocv:member:: int max_iter
Maximum number of iterations
Maximum number of iterations
..ocv:member:: double epsilon
..ocv:member:: double epsilon
Required accuracy
Required accuracy
..seealso:::ocv:class:`TermCriteria`
@ -273,41 +273,41 @@ CvMat
..ocv:struct:: CvMat
A multi-channel dense matrix.
A multi-channel dense matrix.
..ocv:member:: int type
..ocv:member:: int type
``CvMat`` signature (``CV_MAT_MAGIC_VAL``) plus type of the elements. Type of the matrix elements can be retrieved using ``CV_MAT_TYPE`` macro: ::
``CvMat`` signature (``CV_MAT_MAGIC_VAL``) plus type of the elements. Type of the matrix elements can be retrieved using ``CV_MAT_TYPE`` macro: ::
int type = CV_MAT_TYPE(matrix->type);
int type = CV_MAT_TYPE(matrix->type);
For description of possible matrix elements, see :ocv:class:`Mat`.
For description of possible matrix elements, see :ocv:class:`Mat`.
..ocv:member:: int step
..ocv:member:: int step
Full row length in bytes
Full row length in bytes
..ocv:member:: int* refcount
..ocv:member:: int* refcount
Underlying data reference counter
Underlying data reference counter
..ocv:member:: union data
..ocv:member:: union data
Pointers to the actual matrix data:
Pointers to the actual matrix data:
* ptr - pointer to 8-bit unsigned elements
* s - pointer to 16-bit signed elements
* i - pointer to 32-bit signed elements
* fl - pointer to 32-bit floating-point elements
* db - pointer to 64-bit floating-point elements
* ptr - pointer to 8-bit unsigned elements
* s - pointer to 16-bit signed elements
* i - pointer to 32-bit signed elements
* fl - pointer to 32-bit floating-point elements
* db - pointer to 64-bit floating-point elements
..ocv:member:: int rows
..ocv:member:: int rows
Number of rows
Number of rows
..ocv:member:: int cols
..ocv:member:: int cols
Number of columns
Number of columns
Matrix elements are stored row by row. Element (i, j) (i - 0-based row index, j - 0-based column index) of a matrix can be retrieved or modified using ``CV_MAT_ELEM`` macro: ::
@ -323,38 +323,38 @@ CvMatND
..ocv:struct:: CvMatND
Multi-dimensional dense multi-channel array.
Multi-dimensional dense multi-channel array.
..ocv:member:: int type
..ocv:member:: int type
A ``CvMatND`` signature (``CV_MATND_MAGIC_VAL``) plus the type of elements. Type of the matrix elements can be retrieved using ``CV_MAT_TYPE`` macro: ::
A ``CvMatND`` signature (``CV_MATND_MAGIC_VAL``) plus the type of elements. Type of the matrix elements can be retrieved using ``CV_MAT_TYPE`` macro: ::
int type = CV_MAT_TYPE(ndmatrix->type);
int type = CV_MAT_TYPE(ndmatrix->type);
..ocv:member:: int dims
..ocv:member:: int dims
The number of array dimensions
The number of array dimensions
..ocv:member:: int* refcount
..ocv:member:: int* refcount
Underlying data reference counter
Underlying data reference counter
..ocv:member:: union data
..ocv:member:: union data
Pointers to the actual matrix data
Pointers to the actual matrix data
* ptr - pointer to 8-bit unsigned elements
* s - pointer to 16-bit signed elements
* i - pointer to 32-bit signed elements
* fl - pointer to 32-bit floating-point elements
* db - pointer to 64-bit floating-point elements
* ptr - pointer to 8-bit unsigned elements
* s - pointer to 16-bit signed elements
* i - pointer to 32-bit signed elements
* fl - pointer to 32-bit floating-point elements
* db - pointer to 64-bit floating-point elements
..ocv:member:: array dim
..ocv:member:: array dim
Arrays of pairs (array size along the i-th dimension, distance between neighbor elements along i-th dimension): ::
Arrays of pairs (array size along the i-th dimension, distance between neighbor elements along i-th dimension): ::
``CvMatND`` is now obsolete; consider using :ocv:class:`Mat` instead.
@ -363,138 +363,138 @@ CvSparseMat
..ocv:struct:: CvSparseMat
Multi-dimensional sparse multi-channel array.
Multi-dimensional sparse multi-channel array.
..ocv:member:: int type
..ocv:member:: int type
A ``CvSparseMat`` signature (CV_SPARSE_MAT_MAGIC_VAL) plus the type of sparse matrix elements. Similarly to ``CvMat`` and ``CvMatND``, use ``CV_MAT_TYPE()`` to retrieve type of the elements.
A ``CvSparseMat`` signature (CV_SPARSE_MAT_MAGIC_VAL) plus the type of sparse matrix elements. Similarly to ``CvMat`` and ``CvMatND``, use ``CV_MAT_TYPE()`` to retrieve type of the elements.
..ocv:member:: int dims
..ocv:member:: int dims
Number of dimensions
Number of dimensions
..ocv:member:: int* refcount
..ocv:member:: int* refcount
Underlying reference counter. Not used.
Underlying reference counter. Not used.
..ocv:member:: CvSet* heap
..ocv:member:: CvSet* heap
A pool of hash table nodes
A pool of hash table nodes
..ocv:member:: void** hashtable
..ocv:member:: void** hashtable
The hash table. Each entry is a list of nodes.
The hash table. Each entry is a list of nodes.
..ocv:member:: int hashsize
..ocv:member:: int hashsize
Size of the hash table
Size of the hash table
..ocv:member:: int[] size
..ocv:member:: int[] size
Array of dimension sizes
Array of dimension sizes
IplImage
--------
..ocv:struct:: IplImage
IPL image header
IPL image header
..ocv:member:: int nSize
..ocv:member:: int nSize
``sizeof(IplImage)``
``sizeof(IplImage)``
..ocv:member:: int ID
..ocv:member:: int ID
Version, always equals 0
Version, always equals 0
..ocv:member:: int nChannels
..ocv:member:: int nChannels
Number of channels. Most OpenCV functions support 1-4 channels.
Number of channels. Most OpenCV functions support 1-4 channels.
..ocv:member:: int alphaChannel
..ocv:member:: int alphaChannel
Ignored by OpenCV
Ignored by OpenCV
..ocv:member:: int depth
..ocv:member:: int depth
Channel depth in bits + the optional sign bit ( ``IPL_DEPTH_SIGN`` ). The supported depths are:
Channel depth in bits + the optional sign bit ( ``IPL_DEPTH_SIGN`` ). The supported depths are:
* ``IPL_DEPTH_8U`` - unsigned 8-bit integer. Equivalent to ``CV_8U`` in matrix types.
* ``IPL_DEPTH_8S`` - signed 8-bit integer. Equivalent to ``CV_8S`` in matrix types.
* ``IPL_DEPTH_16U`` - unsigned 16-bit integer. Equivalent to ``CV_16U`` in matrix types.
* ``IPL_DEPTH_16S`` - signed 8-bit integer. Equivalent to ``CV_16S`` in matrix types.
* ``IPL_DEPTH_32S`` - signed 32-bit integer. Equivalent to ``CV_32S`` in matrix types.
* ``IPL_DEPTH_32F`` - single-precision floating-point number. Equivalent to ``CV_32F`` in matrix types.
* ``IPL_DEPTH_64F`` - double-precision floating-point number. Equivalent to ``CV_64F`` in matrix types.
* ``IPL_DEPTH_8U`` - unsigned 8-bit integer. Equivalent to ``CV_8U`` in matrix types.
* ``IPL_DEPTH_8S`` - signed 8-bit integer. Equivalent to ``CV_8S`` in matrix types.
* ``IPL_DEPTH_16U`` - unsigned 16-bit integer. Equivalent to ``CV_16U`` in matrix types.
* ``IPL_DEPTH_16S`` - signed 8-bit integer. Equivalent to ``CV_16S`` in matrix types.
* ``IPL_DEPTH_32S`` - signed 32-bit integer. Equivalent to ``CV_32S`` in matrix types.
* ``IPL_DEPTH_32F`` - single-precision floating-point number. Equivalent to ``CV_32F`` in matrix types.
* ``IPL_DEPTH_64F`` - double-precision floating-point number. Equivalent to ``CV_64F`` in matrix types.
..ocv:member:: char[] colorModel
..ocv:member:: char[] colorModel
Ignored by OpenCV.
Ignored by OpenCV.
..ocv:member:: char[] channelSeq
..ocv:member:: char[] channelSeq
Ignored by OpenCV
Ignored by OpenCV
..ocv:member:: int dataOrder
..ocv:member:: int dataOrder
0 = ``IPL_DATA_ORDER_PIXEL`` - interleaved color channels, 1 - separate color channels. :ocv:cfunc:`CreateImage` only creates images with interleaved channels. For example, the usual layout of a color image is: :math:`b_{00} g_{00} r_{00} b_{10} g_{10} r_{10} ...`
0 = ``IPL_DATA_ORDER_PIXEL`` - interleaved color channels, 1 - separate color channels. :ocv:cfunc:`CreateImage` only creates images with interleaved channels. For example, the usual layout of a color image is: :math:`b_{00} g_{00} r_{00} b_{10} g_{10} r_{10} ...`
Alignment of image rows (4 or 8). OpenCV ignores this and uses widthStep instead.
Alignment of image rows (4 or 8). OpenCV ignores this and uses widthStep instead.
..ocv:member:: int width
..ocv:member:: int width
Image width in pixels
Image width in pixels
..ocv:member:: int height
..ocv:member:: int height
Image height in pixels
Image height in pixels
..ocv:member:: IplROI* roi
..ocv:member:: IplROI* roi
Region Of Interest (ROI). If not NULL, only this image region will be processed.
Region Of Interest (ROI). If not NULL, only this image region will be processed.
..ocv:member:: IplImage* maskROI
..ocv:member:: IplImage* maskROI
Must be NULL in OpenCV
Must be NULL in OpenCV
..ocv:member:: void* imageId
..ocv:member:: void* imageId
Must be NULL in OpenCV
Must be NULL in OpenCV
..ocv:member:: void* tileInfo
..ocv:member:: void* tileInfo
Must be NULL in OpenCV
Must be NULL in OpenCV
..ocv:member:: int imageSize
..ocv:member:: int imageSize
Image data size in bytes. For interleaved data, this equals :math:`\texttt{image->height} \cdot \texttt{image->widthStep}`
Image data size in bytes. For interleaved data, this equals :math:`\texttt{image->height} \cdot \texttt{image->widthStep}`
..ocv:member:: char* imageData
..ocv:member:: char* imageData
A pointer to the aligned image data. Do not assign imageData directly. Use :ocv:cfunc:`SetData`.
A pointer to the aligned image data. Do not assign imageData directly. Use :ocv:cfunc:`SetData`.
..ocv:member:: int widthStep
..ocv:member:: int widthStep
The size of an aligned image row, in bytes.
The size of an aligned image row, in bytes.
..ocv:member:: int[] BorderMode
..ocv:member:: int[] BorderMode
Border completion mode, ignored by OpenCV
Border completion mode, ignored by OpenCV
..ocv:member:: int[] BorderConst
..ocv:member:: int[] BorderConst
Constant border value, ignored by OpenCV
Constant border value, ignored by OpenCV
..ocv:member:: char* imageDataOrigin
..ocv:member:: char* imageDataOrigin
A pointer to the origin of the image data (not necessarily aligned). This is used for image deallocation.
A pointer to the origin of the image data (not necessarily aligned). This is used for image deallocation.
The ``IplImage`` is taken from the Intel Image Processing Library, in which the format is native. OpenCV only supports a subset of possible ``IplImage`` formats, as outlined in the parameter list above.
File storage node. When XML/YAML file is read, it is first parsed and stored in the memory as a hierarchical collection of nodes. Each node can be a "leaf", that is, contain a single number or a string, or be a collection of other nodes. Collections are also referenced to as "structures" in the data writing functions. There can be named collections (mappings), where each element has a name and is accessed by a name, and ordered collections (sequences), where elements do not have names, but rather accessed by index.
File storage node. When XML/YAML file is read, it is first parsed and stored in the memory as a hierarchical collection of nodes. Each node can be a "leaf", that is, contain a single number or a string, or be a collection of other nodes. Collections are also referenced to as "structures" in the data writing functions. There can be named collections (mappings), where each element has a name and is accessed by a name, and ordered collections (sequences), where elements do not have names, but rather accessed by index.
..ocv:member:: int tag
..ocv:member:: int tag
type of the file node:
type of the file node:
* CV_NODE_NONE - empty node
* CV_NODE_INT - an integer
* CV_NODE_REAL - a floating-point number
* CV_NODE_STR - text string
* CV_NODE_SEQ - a sequence
* CV_NODE_MAP - a mapping
* CV_NODE_NONE - empty node
* CV_NODE_INT - an integer
* CV_NODE_REAL - a floating-point number
* CV_NODE_STR - text string
* CV_NODE_SEQ - a sequence
* CV_NODE_MAP - a mapping
type of the node can be retrieved using ``CV_NODE_TYPE(node->tag)`` macro.
type of the node can be retrieved using ``CV_NODE_TYPE(node->tag)`` macro.
..ocv:member:: CvTypeInfo* info
..ocv:member:: CvTypeInfo* info
optional pointer to the user type information. If you look at the matrix representation in XML and YAML, shown above, you may notice ``type_id="opencv-matrix"`` or ``!!opencv-matrix`` strings. They are used to specify that the certain element of a file is a representation of a data structure of certain type ("opencv-matrix" corresponds to :ocv:struct:`CvMat`). When a file is parsed, such type identifiers are passed to :ocv:cfunc:`FindType` to find type information and the pointer to it is stored in the file node. See :ocv:struct:`CvTypeInfo` for more details.
optional pointer to the user type information. If you look at the matrix representation in XML and YAML, shown above, you may notice ``type_id="opencv-matrix"`` or ``!!opencv-matrix`` strings. They are used to specify that the certain element of a file is a representation of a data structure of certain type ("opencv-matrix" corresponds to :ocv:struct:`CvMat`). When a file is parsed, such type identifiers are passed to :ocv:cfunc:`FindType` to find type information and the pointer to it is stored in the file node. See :ocv:struct:`CvTypeInfo` for more details.
..ocv:member:: union data
..ocv:member:: union data
the node data, declared as: ::
the node data, declared as: ::
union
{
double f; /* scalar floating-point number */
int i; /* scalar integer number */
CvString str; /* text string */
CvSeq* seq; /* sequence (ordered collection of file nodes) */
struct CvMap* map; /* map (collection of named file nodes) */
} data;
union
{
double f; /* scalar floating-point number */
int i; /* scalar integer number */
CvString str; /* text string */
CvSeq* seq; /* sequence (ordered collection of file nodes) */
struct CvMap* map; /* map (collection of named file nodes) */
} data;
..
..
Primitive nodes are read using :ocv:cfunc:`ReadInt`, :ocv:cfunc:`ReadReal` and :ocv:cfunc:`ReadString`. Sequences are read by iterating through ``node->data.seq`` (see "Dynamic Data Structures" section). Mappings are read using :ocv:cfunc:`GetFileNodeByName`. Nodes with the specified type (so that ``node->info != NULL``) can be read using :ocv:cfunc:`Read`.
Primitive nodes are read using :ocv:cfunc:`ReadInt`, :ocv:cfunc:`ReadReal` and :ocv:cfunc:`ReadString`. Sequences are read by iterating through ``node->data.seq`` (see "Dynamic Data Structures" section). Mappings are read using :ocv:cfunc:`GetFileNodeByName`. Nodes with the specified type (so that ``node->info != NULL``) can be read using :ocv:cfunc:`Read`.
@ -258,7 +258,7 @@ Creates a descriptor matcher of a given type with the default parameters (using
BFMatcher
-----------------
..ocv:class::BFMatcher : public DescriptorMatcher
..ocv:class::BFMatcher : public DescriptorMatcher
Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches of descriptor sets.
There is one structure member that you can set directly:
..ocv:member:: int split_criteria
Splitting criteria used to choose optimal splits during a weak tree construction. Possible values are:
* **CvBoost::DEFAULT** Use the default for the particular boosting method, see below.
* **CvBoost::GINI** Use Gini index. This is default option for Real AdaBoost; may be also used for Discrete AdaBoost.
* **CvBoost::MISCLASS** Use misclassification rate. This is default option for Discrete AdaBoost; may be also used for Real AdaBoost.
* **CvBoost::SQERR** Use least squares criteria. This is default and the only option for LogitBoost and Gentle AdaBoost.
The structure is derived from :ocv:class:`CvDTreeParams` but not all of the decision tree parameters are supported. In particular, cross-validation is not supported.
All parameters are public. You can initialize them by a constructor and then override some of them directly if you want.
@ -96,17 +107,6 @@ The constructors.
See :ocv:func:`CvDTreeParams::CvDTreeParams` for description of other parameters.
Also there is one structure member that you can set directly:
..ocv:member:: int split_criteria
Splitting criteria used to choose optimal splits during a weak tree construction. Possible values are:
* **CvBoost::DEFAULT** Use the default for the particular boosting method, see below.
* **CvBoost::GINI** Use Gini index. This is default option for Real AdaBoost; may be also used for Discrete AdaBoost.
* **CvBoost::MISCLASS** Use misclassification rate. This is default option for Discrete AdaBoost; may be also used for Real AdaBoost.
* **CvBoost::SQERR** Use least squares criteria. This is default and the only option for LogitBoost and Gentle AdaBoost.
The structure represents a possible decision tree node split. It has public members:
The structure represents a possible decision tree node split. It has public members:
..ocv:member:: int var_idx
..ocv:member:: int var_idx
Index of variable on which the split is created.
Index of variable on which the split is created.
..ocv:member:: int inversed
..ocv:member:: int inversed
If it is not null then inverse split rule is used that is left and right branches are exchanged in the rule expressions below.
If it is not null then inverse split rule is used that is left and right branches are exchanged in the rule expressions below.
..ocv:member:: float quality
..ocv:member:: float quality
The split quality, a positive number. It is used to choose the best primary split, then to choose and sort the surrogate splits. After the tree is constructed, it is also used to compute variable importance.
The split quality, a positive number. It is used to choose the best primary split, then to choose and sort the surrogate splits. After the tree is constructed, it is also used to compute variable importance.
..ocv:member:: CvDTreeSplit* next
..ocv:member:: CvDTreeSplit* next
Pointer to the next split in the node list of splits.
Pointer to the next split in the node list of splits.
..ocv:member:: int[] subset
..ocv:member:: int[] subset
Bit array indicating the value subset in case of split on a categorical variable. The rule is: ::
Bit array indicating the value subset in case of split on a categorical variable. The rule is: ::
if var_value in subset
then next_node <- left
else next_node <- right
..ocv:member:: float ord::c
..ocv:member:: float ord::c
The threshold value in case of split on an ordered variable. The rule is: ::
The threshold value in case of split on an ordered variable. The rule is: ::
if var_value < ord.c
then next_node<-left
else next_node<-right
..ocv:member:: int ord::split_point
..ocv:member:: int ord::split_point
Used internally by the training algorithm.
Used internally by the training algorithm.
CvDTreeNode
-----------
..ocv:struct:: CvDTreeNode
The structure represents a node in a decision tree. It has public members:
The structure represents a node in a decision tree. It has public members:
..ocv:member:: int class_idx
..ocv:member:: int class_idx
Class index normalized to 0..class_count-1 range and assigned to the node. It is used internally in classification trees and tree ensembles.
..ocv:member:: int Tn
..ocv:member:: int Tn
Tree index in a ordered sequence of pruned trees. The indices are used during and after the pruning procedure. The root node has the maximum value ``Tn`` of the whole tree, child nodes have ``Tn`` less than or equal to the parent's ``Tn``, and nodes with :math:`Tn \leq CvDTree::pruned\_tree\_idx` are not used at prediction stage (the corresponding branches are considered as cut-off), even if they have not been physically deleted from the tree at the pruning stage.
..ocv:member:: double value
..ocv:member:: double value
Value at the node: a class label in case of classification or estimated function value in case of regression.
..ocv:member:: CvDTreeNode* parent
..ocv:member:: CvDTreeNode* parent
Pointer to the parent node.
..ocv:member:: CvDTreeNode* left
..ocv:member:: CvDTreeNode* left
Pointer to the left child node.
..ocv:member:: CvDTreeNode* right
..ocv:member:: CvDTreeNode* right
Pointer to the right child node.
..ocv:member:: CvDTreeSplit* split
..ocv:member:: CvDTreeSplit* split
Pointer to the first (primary) split in the node list of splits.
..ocv:member:: int sample_count
..ocv:member:: int sample_count
The number of samples that fall into the node at the training stage. It is used to resolve the difficult cases - when the variable for the primary split is missing and all the variables for other surrogate splits are missing too. In this case the sample is directed to the left if ``left->sample_count > right->sample_count`` and to the right otherwise.
..ocv:member:: int depth
..ocv:member:: int depth
Depth of the node. The root node depth is 0, the child nodes depth is the parent's depth + 1.
The class implements the Extremely randomized trees algorithm. ``CvERTrees`` is inherited from :ocv:class:`CvRTrees` and has the same interface, so see description of :ocv:class:`CvRTrees` class to get details. To set the training parameters of Extremely randomized trees the same class :ocv:class:`CvRTParams` is used.
The class implements the Extremely randomized trees algorithm. ``CvERTrees`` is inherited from :ocv:class:`CvRTrees` and has the same interface, so see description of :ocv:class:`CvRTrees` class to get details. To set the training parameters of Extremely randomized trees the same class :ocv:struct:`CvRTParams` is used.
Parameters of the MLP training algorithm. You can initialize the structure by a constructor or the individual parameters can be adjusted after the structure is created.
Parameters of the MLP training algorithm. You can initialize the structure by a constructor or the individual parameters can be adjusted after the structure is created.
The back-propagation algorithm parameters:
The back-propagation algorithm parameters:
..ocv:member:: double bp_dw_scale
..ocv:member:: double bp_dw_scale
Strength of the weight gradient term. The recommended value is about 0.1.
Strength of the weight gradient term. The recommended value is about 0.1.
..ocv:member:: double bp_moment_scale
..ocv:member:: double bp_moment_scale
Strength of the momentum term (the difference between weights on the 2 previous iterations). This parameter provides some inertia to smooth the random fluctuations of the weights. It can vary from 0 (the feature is disabled) to 1 and beyond. The value 0.1 or so is good enough
Strength of the momentum term (the difference between weights on the 2 previous iterations). This parameter provides some inertia to smooth the random fluctuations of the weights. It can vary from 0 (the feature is disabled) to 1 and beyond. The value 0.1 or so is good enough
The RPROP algorithm parameters (see [RPROP93]_ for details):
The RPROP algorithm parameters (see [RPROP93]_ for details):
..ocv:member:: double rp_dw0
..ocv:member:: double rp_dw0
Initial value :math:`\Delta_0` of update-values :math:`\Delta_{ij}`.
Initial value :math:`\Delta_0` of update-values :math:`\Delta_{ij}`.
..ocv:member:: double rp_dw_plus
..ocv:member:: double rp_dw_plus
Increase factor :math:`\eta^+`. It must be >1.
Increase factor :math:`\eta^+`. It must be >1.
..ocv:member:: double rp_dw_minus
..ocv:member:: double rp_dw_minus
Decrease factor :math:`\eta^-`. It must be <1.
Decrease factor :math:`\eta^-`. It must be <1.
..ocv:member:: double rp_dw_min
..ocv:member:: double rp_dw_min
Update-values lower limit :math:`\Delta_{min}`. It must be positive.
Update-values lower limit :math:`\Delta_{min}`. It must be positive.
..ocv:member:: double rp_dw_max
..ocv:member:: double rp_dw_max
Update-values upper limit :math:`\Delta_{max}`. It must be >1.
Update-values upper limit :math:`\Delta_{max}`. It must be >1.
The structure represents the logarithmic grid range of statmodel parameters. It is used for optimizing statmodel accuracy by varying model parameters, the accuracy estimate being computed by cross-validation.
The structure represents the logarithmic grid range of statmodel parameters. It is used for optimizing statmodel accuracy by varying model parameters, the accuracy estimate being computed by cross-validation.
..ocv:member:: double CvParamGrid::min_val
..ocv:member:: double CvParamGrid::min_val
Minimum value of the statmodel parameter.
Minimum value of the statmodel parameter.
..ocv:member:: double CvParamGrid::max_val
..ocv:member:: double CvParamGrid::max_val
Maximum value of the statmodel parameter.
Maximum value of the statmodel parameter.
..ocv:member:: double CvParamGrid::step
..ocv:member:: double CvParamGrid::step
Logarithmic step for iterating the statmodel parameter.
Logarithmic step for iterating the statmodel parameter.
The grid determines the following iteration sequence of the statmodel parameter values:
Class for extracting Speeded Up Robust Features from an image [Bay06]_. The class is derived from ``CvSURFParams`` structure, which specifies the algorithm parameters:
Class for extracting Speeded Up Robust Features from an image [Bay06]_. The class is derived from ``CvSURFParams`` structure, which specifies the algorithm parameters:
..ocv:member:: int extended
..ocv:member:: int extended
* 0 means that the basic descriptors (64 elements each) shall be computed
* 1 means that the extended descriptors (128 elements each) shall be computed
* 0 means that the basic descriptors (64 elements each) shall be computed
* 1 means that the extended descriptors (128 elements each) shall be computed
..ocv:member:: int upright
..ocv:member:: int upright
* 0 means that detector computes orientation of each feature.
* 1 means that the orientation is not computed (which is much, much faster). For example, if you match images from a stereo pair, or do image stitching, the matched features likely have very similar angles, and you can speed up feature extraction by setting ``upright=1``.
* 0 means that detector computes orientation of each feature.
* 1 means that the orientation is not computed (which is much, much faster). For example, if you match images from a stereo pair, or do image stitching, the matched features likely have very similar angles, and you can speed up feature extraction by setting ``upright=1``.
..ocv:member:: double hessianThreshold
..ocv:member:: double hessianThreshold
Threshold for the keypoint detector. Only features, whose hessian is larger than ``hessianThreshold`` are retained by the detector. Therefore, the larger the value, the less keypoints you will get. A good default value could be from 300 to 500, depending from the image contrast.
Threshold for the keypoint detector. Only features, whose hessian is larger than ``hessianThreshold`` are retained by the detector. Therefore, the larger the value, the less keypoints you will get. A good default value could be from 300 to 500, depending from the image contrast.
..ocv:member:: int nOctaves
..ocv:member:: int nOctaves
The number of a gaussian pyramid octaves that the detector uses. It is set to 4 by default. If you want to get very large features, use the larger value. If you want just small features, decrease it.
The number of a gaussian pyramid octaves that the detector uses. It is set to 4 by default. If you want to get very large features, use the larger value. If you want just small features, decrease it.
..ocv:member:: int nOctaveLayers
..ocv:member:: int nOctaveLayers
The number of images within each octave of a gaussian pyramid. It is set to 2 by default.
The number of images within each octave of a gaussian pyramid. It is set to 2 by default.
..[Bay06] Bay, H. and Tuytelaars, T. and Van Gool, L. "SURF: Speeded Up Robust Features", 9th European Conference on Computer Vision, 2006