Decrements own reference counter (with ``release()``) and increments ptr's reference counter.
Ptr::addref
@ -1465,6 +1470,7 @@ Adds elements to the bottom of the matrix.
..ocv:function:: void Mat::push_back( const Mat& m )
:param elem:Added element(s).
:param m:Added line(s).
The methods add one or more elements to the bottom of the matrix. They emulate the corresponding method of the STL vector class. When ``elem`` is ``Mat`` , its type and the number of columns must be the same as in the container matrix.
@ -2160,7 +2166,6 @@ Various SparseMat constructors.
:param dims:Array dimensionality.
:param _sizes:Sparce matrix size on all dementions.
:param _type:Sparse matrix data type.
:param try1d:if try1d is true and matrix is a single-column matrix (Nx1), then the sparse matrix will be 1-dimensional.
@ -17,12 +17,18 @@ Finds centers of clusters and groups input samples around the clusters.
:param samples:Floating-point matrix of input samples, one row per sample.
:param data:Data for clustering.
:param cluster_count:Number of clusters to split the set by.
:param K:Number of clusters to split the set by.
:param labels:Input/output integer array that stores the cluster indices for every sample.
:param criteria:The algorithm termination criteria, that is, the maximum number of iterations and/or the desired accuracy. The accuracy is specified as ``criteria.epsilon``. As soon as each of the cluster centers moves by less than ``criteria.epsilon`` on some iteration, the algorithm stops.
:param termcrit:The algorithm termination criteria, that is, the maximum number of iterations and/or the desired accuracy.
:param attempts:Flag to specify the number of times the algorithm is executed using different initial labellings. The algorithm returns the labels that yield the best compactness (see the last function parameter).
:param rng:CvRNG state initialized by RNG().
@ -37,6 +43,8 @@ Finds centers of clusters and groups input samples around the clusters.
:param centers:Output matrix of the cluster centers, one row per each cluster center.
:param _centers:Output matrix of the cluster centers, one row per each cluster center.
:param compactness:The returned value that is described below.
The function ``kmeans`` implements a k-means algorithm that finds the
@ -173,6 +173,8 @@ Checks a condition at runtime and throws exception if it fails
..ocv:function:: CV_Assert(expr)
:param expr:Expression for check.
The macros ``CV_Assert`` (and ``CV_DbgAssert``) evaluate the specified expression. If it is 0, the macros raise an error (see :ocv:func:`error` ). The macro ``CV_Assert`` checks the condition in both Debug and Release configurations while ``CV_DbgAssert`` is only retained in the Debug configuration.
@ -188,8 +190,14 @@ Signals an error and raises an exception.
:param status:Error code. Normally, it is a negative value. The list of pre-defined error codes can be found in ``cxerror.h`` .
:param func_name:The function name where error occurs.
:param err_msg:Text of the error message.
:param file_name:The file name where error occurs.
:param line:The line number where error occurs.
:param args:``printf`` -like formatted error message in parentheses.
The function and the helper macros ``CV_Error`` and ``CV_Error_``: ::
@ -249,6 +257,7 @@ Allocates an aligned memory buffer.
..ocv:cfunction:: void* cvAlloc( size_t size )
:param size:Allocated buffer size.
:param bufSize:Allocated buffer size.
The function allocates the buffer of the specified size and returns it. When the buffer size is 16 bytes or more, the returned buffer is aligned to 16 bytes.