@@ -184,7 +184,7 @@ The function returns the final re-projection error.
...
@@ -184,7 +184,7 @@ The function returns the final re-projection error.
.. seealso::
.. seealso::
:ocv:func:`FindChessboardCorners`,
:ocv:func:`findChessboardCorners`,
:ocv:func:`solvePnP`,
:ocv:func:`solvePnP`,
:ocv:func:`initCameraMatrix2D`,
:ocv:func:`initCameraMatrix2D`,
:ocv:func:`stereoCalibrate`,
:ocv:func:`stereoCalibrate`,
...
@@ -272,7 +272,7 @@ For points in an image of a stereo pair, computes the corresponding epilines in
...
@@ -272,7 +272,7 @@ For points in an image of a stereo pair, computes the corresponding epilines in
:param whichImage: Index of the image (1 or 2) that contains the ``points`` .
:param whichImage: Index of the image (1 or 2) that contains the ``points`` .
:param F: Fundamental matrix that can be estimated using :ocv:func:`findFundamentalMat` or :ocv:func:`StereoRectify` .
:param F: Fundamental matrix that can be estimated using :ocv:func:`findFundamentalMat` or :ocv:func:`stereoRectify` .
:param lines: Output vector of the epipolar lines corresponding to the points in the other image. Each line :math:`ax + by + c=0` is encoded by 3 numbers :math:`(a, b, c)` .
:param lines: Output vector of the epipolar lines corresponding to the points in the other image. Each line :math:`ax + by + c=0` is encoded by 3 numbers :math:`(a, b, c)` .
...
@@ -435,7 +435,7 @@ Finds the positions of internal corners of the chessboard.
...
@@ -435,7 +435,7 @@ Finds the positions of internal corners of the chessboard.
* **CV_CALIB_CB_ADAPTIVE_THRESH** Use adaptive thresholding to convert the image to black and white, rather than a fixed threshold level (computed from the average image brightness).
* **CV_CALIB_CB_ADAPTIVE_THRESH** Use adaptive thresholding to convert the image to black and white, rather than a fixed threshold level (computed from the average image brightness).
* **CV_CALIB_CB_NORMALIZE_IMAGE** Normalize the image gamma with :ocv:func:`EqualizeHist` before applying fixed or adaptive thresholding.
* **CV_CALIB_CB_NORMALIZE_IMAGE** Normalize the image gamma with :ocv:func:`equalizeHist` before applying fixed or adaptive thresholding.
* **CV_CALIB_CB_FILTER_QUADS** Use additional criteria (like contour area, perimeter, square-like shape) to filter out false quads extracted at the contour retrieval stage.
* **CV_CALIB_CB_FILTER_QUADS** Use additional criteria (like contour area, perimeter, square-like shape) to filter out false quads extracted at the contour retrieval stage.
...
@@ -628,9 +628,9 @@ the found fundamental matrix. Normally just one matrix is found. But in case of
...
@@ -628,9 +628,9 @@ the found fundamental matrix. Normally just one matrix is found. But in case of
:math:`9 \times 3` matrix that stores all 3 matrices sequentially).
:math:`9 \times 3` matrix that stores all 3 matrices sequentially).
The calculated fundamental matrix may be passed further to
The calculated fundamental matrix may be passed further to
:ocv:func:`ComputeCorrespondEpilines` that finds the epipolar lines
:ocv:func:`computeCorrespondEpilines` that finds the epipolar lines
corresponding to the specified points. It can also be passed to
corresponding to the specified points. It can also be passed to
:ocv:func:`StereoRectifyUncalibrated` to compute the rectification transformation. ::
:ocv:func:`stereoRectifyUncalibrated` to compute the rectification transformation. ::
// Example. Estimation of fundamental matrix using the RANSAC algorithm
// Example. Estimation of fundamental matrix using the RANSAC algorithm
int point_count = 100;
int point_count = 100;
...
@@ -726,11 +726,11 @@ Homography matrix is determined up to a scale. Thus, it is normalized so that
...
@@ -726,11 +726,11 @@ Homography matrix is determined up to a scale. Thus, it is normalized so that
.. seealso::
.. seealso::
:ocv:func:`GetAffineTransform`,
:ocv:func:`getAffineTransform`,
:ocv:func:`GetPerspectiveTransform`,
:ocv:func:`getPerspectiveTransform`,
:ocv:func:`EstimateRigidMotion`,
:ocv:func:`estimateRigidTransform`,
:ocv:func:`WarpPerspective`,
:ocv:func:`warpPerspective`,
:ocv:func:`PerspectiveTransform`
:ocv:func:`perspectiveTransform`
estimateAffine3D
estimateAffine3D
...
@@ -800,7 +800,7 @@ Returns the new camera matrix based on the free scaling parameter.
...
@@ -800,7 +800,7 @@ Returns the new camera matrix based on the free scaling parameter.
:param newImageSize: Image size after rectification. By default,it is set to ``imageSize`` .
:param newImageSize: Image size after rectification. By default,it is set to ``imageSize`` .
:param validPixROI: Optional output rectangle that outlines all-good-pixels region in the undistorted image. See ``roi1, roi2`` description in :ocv:func:`StereoRectify` .
:param validPixROI: Optional output rectangle that outlines all-good-pixels region in the undistorted image. See ``roi1, roi2`` description in :ocv:func:`stereoRectify` .
:param centerPrincipalPoint: Optional flag that indicates whether in the new camera matrix the principal point should be at the image center or not. By default, the principal point is chosen to best fit a subset of the source image (determined by ``alpha``) to the corrected image.
:param centerPrincipalPoint: Optional flag that indicates whether in the new camera matrix the principal point should be at the image center or not. By default, the principal point is chosen to best fit a subset of the source image (determined by ``alpha``) to the corrected image.
...
@@ -919,9 +919,9 @@ Reprojects a disparity image to 3D space.
...
@@ -919,9 +919,9 @@ Reprojects a disparity image to 3D space.
:param _3dImage: Output 3-channel floating-point image of the same size as ``disparity`` . Each element of ``_3dImage(x,y)`` contains 3D coordinates of the point ``(x,y)`` computed from the disparity map.
:param _3dImage: Output 3-channel floating-point image of the same size as ``disparity`` . Each element of ``_3dImage(x,y)`` contains 3D coordinates of the point ``(x,y)`` computed from the disparity map.
:param Q: :math:`4 \times 4` perspective transformation matrix that can be obtained with :ocv:func:`StereoRectify` .
:param Q: :math:`4 \times 4` perspective transformation matrix that can be obtained with :ocv:func:`stereoRectify`.
:param handleMissingValues: Indicates, whether the function should handle missing values (i.e. points where the disparity was not computed). If ``handleMissingValues=true``, then pixels with the minimal disparity that corresponds to the outliers (see :ocv:func:`StereoBM::operator()` ) are transformed to 3D points with a very large Z value (currently set to 10000).
:param handleMissingValues: Indicates, whether the function should handle missing values (i.e. points where the disparity was not computed). If ``handleMissingValues=true``, then pixels with the minimal disparity that corresponds to the outliers (see :ocv:funcx:`StereoBM::operator()` ) are transformed to 3D points with a very large Z value (currently set to 10000).
:param ddepth: The optional output array depth. If it is ``-1``, the output image will have ``CV_32F`` depth. ``ddepth`` can also be set to ``CV_16S``, ``CV_32S`` or ``CV_32F``.
:param ddepth: The optional output array depth. If it is ``-1``, the output image will have ``CV_32F`` depth. ``ddepth`` can also be set to ``CV_16S``, ``CV_32S`` or ``CV_32F``.
...
@@ -933,8 +933,8 @@ The function transforms a single-channel disparity map to a 3-channel image repr
...
@@ -933,8 +933,8 @@ The function transforms a single-channel disparity map to a 3-channel image repr
The matrix ``Q`` can be an arbitrary
The matrix ``Q`` can be an arbitrary
:math:`4 \times 4` matrix (for example, the one computed by
:math:`4 \times 4` matrix (for example, the one computed by
:ocv:func:`StereoRectify`). To reproject a sparse set of points {(x,y,d),...} to 3D space, use
:ocv:func:`stereoRectify`). To reproject a sparse set of points {(x,y,d),...} to 3D space, use
:ocv:func:`PerspectiveTransform` .
:ocv:func:`perspectiveTransform` .
...
@@ -962,7 +962,7 @@ Computes an RQ decomposition of 3x3 matrices.
...
@@ -962,7 +962,7 @@ Computes an RQ decomposition of 3x3 matrices.
:param Qz: Optional output 3x3 rotation matrix around z-axis.
:param Qz: Optional output 3x3 rotation matrix around z-axis.
The function computes a RQ decomposition using the given rotations. This function is used in
The function computes a RQ decomposition using the given rotations. This function is used in
:ocv:func:`DecomposeProjectionMatrix` to decompose the left 3x3 submatrix of a projection matrix into a camera and a rotation matrix.
:ocv:func:`decomposeProjectionMatrix` to decompose the left 3x3 submatrix of a projection matrix into a camera and a rotation matrix.
It optionally returns three rotation matrices, one for each axis, and the three Euler angles
It optionally returns three rotation matrices, one for each axis, and the three Euler angles
(as the return value)
(as the return value)
...
@@ -1036,12 +1036,12 @@ Class for computing stereo correspondence using the block matching algorithm. ::
...
@@ -1036,12 +1036,12 @@ Class for computing stereo correspondence using the block matching algorithm. ::
Ptr<CvStereoBMState> state;
Ptr<CvStereoBMState> state;
};
};
The class is a C++ wrapper for the associated functions. In particular, ``StereoBM::operator()`` is the wrapper for
The class is a C++ wrapper for the associated functions. In particular, :ocv:funcx:`StereoBM::operator()` is the wrapper for
:ocv:func:`StereoBM::operator()`.
:ocv:cfunc:`cvFindStereoCorrespondenceBM`.
StereoBM::StereoBM
StereoBM::StereoBM
---------------------
------------------
The constructors.
The constructors.
.. ocv:function:: StereoBM::StereoBM()
.. ocv:function:: StereoBM::StereoBM()
...
@@ -1137,7 +1137,7 @@ The class implements the modified H. Hirschmuller algorithm HH08 that differs fr
...
@@ -1137,7 +1137,7 @@ The class implements the modified H. Hirschmuller algorithm HH08 that differs fr
* Mutual information cost function is not implemented. Instead, a simpler Birchfield-Tomasi sub-pixel metric from BT96 is used. Though, the color images are supported as well.
* Mutual information cost function is not implemented. Instead, a simpler Birchfield-Tomasi sub-pixel metric from BT96 is used. Though, the color images are supported as well.
* Some pre- and post- processing steps from K. Konolige algorithm :ocv:func:`StereoBM::operator()` are included, for example: pre-filtering (``CV_STEREO_BM_XSOBEL`` type) and post-filtering (uniqueness check, quadratic interpolation and speckle filtering).
* Some pre- and post- processing steps from K. Konolige algorithm :ocv:funcx:`StereoBM::operator()` are included, for example: pre-filtering (``CV_STEREO_BM_XSOBEL`` type) and post-filtering (uniqueness check, quadratic interpolation and speckle filtering).
...
@@ -1401,7 +1401,7 @@ Computes a rectification transform for an uncalibrated stereo camera.
...
@@ -1401,7 +1401,7 @@ Computes a rectification transform for an uncalibrated stereo camera.
:param threshold: Optional threshold used to filter out the outliers. If the parameter is greater than zero, all the point pairs that do not comply with the epipolar geometry (that is, the points for which :math:`|\texttt{points2[i]}^T*\texttt{F}*\texttt{points1[i]}|>\texttt{threshold}` ) are rejected prior to computing the homographies. Otherwise,all the points are considered inliers.
:param threshold: Optional threshold used to filter out the outliers. If the parameter is greater than zero, all the point pairs that do not comply with the epipolar geometry (that is, the points for which :math:`|\texttt{points2[i]}^T*\texttt{F}*\texttt{points1[i]}|>\texttt{threshold}` ) are rejected prior to computing the homographies. Otherwise,all the points are considered inliers.
The function computes the rectification transformations without knowing intrinsic parameters of the cameras and their relative position in the space, which explains the suffix "uncalibrated". Another related difference from
The function computes the rectification transformations without knowing intrinsic parameters of the cameras and their relative position in the space, which explains the suffix "uncalibrated". Another related difference from
:ocv:func:`StereoRectify` is that the function outputs not the rectification transformations in the object (3D) space, but the planar perspective transformations encoded by the homography matrices ``H1`` and ``H2`` . The function implements the algorithm
:ocv:func:`stereoRectify` is that the function outputs not the rectification transformations in the object (3D) space, but the planar perspective transformations encoded by the homography matrices ``H1`` and ``H2`` . The function implements the algorithm
@@ -246,7 +246,7 @@ Template class for short numerical vectors, a partial case of :ocv:class:`Matx`:
...
@@ -246,7 +246,7 @@ Template class for short numerical vectors, a partial case of :ocv:class:`Matx`:
typedef Vec<double, 4> Vec4d;
typedef Vec<double, 4> Vec4d;
typedef Vec<double, 6> Vec6d;
typedef Vec<double, 6> Vec6d;
It is possible to convert ``Vec<T,2>`` to/from ``Point_``, ``Vec<T,3>`` to/from ``Point3_`` , and ``Vec<T,4>`` to ``CvScalar`` or :ocv:class:`Scalar`. Use ``operator[]`` to access the elements of ``Vec``.
It is possible to convert ``Vec<T,2>`` to/from ``Point_``, ``Vec<T,3>`` to/from ``Point3_`` , and ``Vec<T,4>`` to :ocv:struct:`CvScalar` or :ocv:class:`Scalar_`. Use ``operator[]`` to access the elements of ``Vec``.
All the expected vector operations are also implemented:
All the expected vector operations are also implemented:
...
@@ -1517,11 +1517,11 @@ The method is used in quite a few of OpenCV functions. The point is that element
...
@@ -1517,11 +1517,11 @@ The method is used in quite a few of OpenCV functions. The point is that element
This approach, while being very simple, can boost the performance of a simple element-operation by 10-20 percents, especially if the image is rather small and the operation is quite simple.
This approach, while being very simple, can boost the performance of a simple element-operation by 10-20 percents, especially if the image is rather small and the operation is quite simple.
Another OpenCV idiom in this function, a call of
Another OpenCV idiom in this function, a call of
:ocv:func:`Mat::create` for the destination array, that allocates the destination array unless it already has the proper size and type. And while the newly allocated arrays are always continuous, you still need to check the destination array because :ocv:func:`create` does not always allocate a new matrix.
:ocv:func:`Mat::create` for the destination array, that allocates the destination array unless it already has the proper size and type. And while the newly allocated arrays are always continuous, you still need to check the destination array because :ocv:func:`Mat::create` does not always allocate a new matrix.
Mat::elemSize
Mat::elemSize
-----------------
-------------
Returns the matrix element size in bytes.
Returns the matrix element size in bytes.
.. ocv:function:: size_t Mat::elemSize() const
.. ocv:function:: size_t Mat::elemSize() const
...
@@ -1530,7 +1530,7 @@ The method returns the matrix element size in bytes. For example, if the matrix
...
@@ -1530,7 +1530,7 @@ The method returns the matrix element size in bytes. For example, if the matrix
Mat::elemSize1
Mat::elemSize1
------------------
--------------
Returns the size of each matrix element channel in bytes.
Returns the size of each matrix element channel in bytes.
.. ocv:function:: size_t Mat::elemSize1() const
.. ocv:function:: size_t Mat::elemSize1() const
...
@@ -1539,7 +1539,7 @@ The method returns the matrix element channel size in bytes, that is, it ignores
...
@@ -1539,7 +1539,7 @@ The method returns the matrix element channel size in bytes, that is, it ignores
Mat::type
Mat::type
-------------
---------
Returns the type of a matrix element.
Returns the type of a matrix element.
.. ocv:function:: int Mat::type() const
.. ocv:function:: int Mat::type() const
...
@@ -1622,7 +1622,7 @@ Returns a pointer to the specified matrix row.
...
@@ -1622,7 +1622,7 @@ Returns a pointer to the specified matrix row.
:param i: A 0-based row index.
:param i: A 0-based row index.
The methods return ``uchar*`` or typed pointer to the specified matrix row. See the sample in
The methods return ``uchar*`` or typed pointer to the specified matrix row. See the sample in
:ocv:func:`Mat::isContinuous` () to know how to use these methods.
:ocv:func:`Mat::isContinuous` to know how to use these methods.
@@ -43,7 +43,7 @@ The buffer is put in the end of already allocated space in the ``top`` memory bl
...
@@ -43,7 +43,7 @@ The buffer is put in the end of already allocated space in the ``top`` memory bl
If there are no more free blocks, a new block is allocated (or borrowed from the parent, see :ocv:cfunc:`CreateChildMemStorage`) and added to the end of list. Thus, the storage behaves as a stack with ``bottom`` indicating bottom of the stack and the pair (``top``, ``free_space``)
If there are no more free blocks, a new block is allocated (or borrowed from the parent, see :ocv:cfunc:`CreateChildMemStorage`) and added to the end of list. Thus, the storage behaves as a stack with ``bottom`` indicating bottom of the stack and the pair (``top``, ``free_space``)
indicating top of the stack. The stack top may be saved via :ocv:cfunc:`SaveMemStoragePos`, restored via
indicating top of the stack. The stack top may be saved via :ocv:cfunc:`SaveMemStoragePos`, restored via
:ocv:cfunc:`RestoreMemStoragePos`, or reset via :ocv:cfunc:`ClearStorage`.
:ocv:cfunc:`RestoreMemStoragePos`, or reset via :ocv:cfunc:`ClearMemStorage`.
CvMemBlock
CvMemBlock
----------
----------
...
@@ -112,27 +112,31 @@ CvSlice
...
@@ -112,27 +112,31 @@ CvSlice
.. ocv:struct:: CvSlice
.. ocv:struct:: CvSlice
A sequence slice. In C++ interface the class :ocv:class:`Range` should be used instead.
A sequence slice. In C++ interface the class :ocv:class:`Range` should be used instead.
.. ocv:member: int start_index
.. ocv:member:: int start_index
inclusive start index of the sequence slice
inclusive start index of the sequence slice
.. ocv:member: int end_index
.. ocv:member:: int end_index
exclusive end index of the sequence slice
exclusive end index of the sequence slice
There are helper functions to construct the slice and to compute its length:
.. ocv:cfunction:: CvSlice cvSlice( int start, int end )
::
There are helper functions to construct the slice and to compute its length: ::
int cvSliceLength( CvSlice slice, const CvSeq* seq );
..
..
.. ocv:cfunction:: int cvSliceLength( CvSlice slice, const CvSeq* seq )
Calculates the sequence slice length
Some of functions that operate on sequences take a ``CvSlice slice`` parameter that is often set to the whole sequence (CV_WHOLE_SEQ) by default. Either of the ``start_index`` and ``end_index`` may be negative or exceed the sequence length. If they are equal, the slice is considered empty (i.e., contains no elements). Because sequences are treated as circular structures, the slice may select a
Some of functions that operate on sequences take a ``CvSlice slice`` parameter that is often set to the whole sequence (CV_WHOLE_SEQ) by default. Either of the ``start_index`` and ``end_index`` may be negative or exceed the sequence length. If they are equal, the slice is considered empty (i.e., contains no elements). Because sequences are treated as circular structures, the slice may select a
few elements in the end of a sequence followed by a few elements at the beginning of the sequence. For example, ``cvSlice(-2, 3)`` in the case of a 10-element sequence will select a 5-element slice, containing the pre-last (8th), last (9th), the very first (0th), second (1th) and third (2nd)
few elements in the end of a sequence followed by a few elements at the beginning of the sequence. For example, ``cvSlice(-2, 3)`` in the case of a 10-element sequence will select a 5-element slice, containing the pre-last (8th), last (9th), the very first (0th), second (1th) and third (2nd)
elements. The functions normalize the slice argument in the following way:
elements. The functions normalize the slice argument in the following way:
...
@@ -452,17 +456,17 @@ Finds an edge in a graph.
...
@@ -452,17 +456,17 @@ Finds an edge in a graph.
.. ocv:cfunction:: CvGraphEdge* cvFindGraphEdge( const CvGraph* graph, int start_idx, int end_idx )
.. ocv:cfunction:: CvGraphEdge* cvFindGraphEdge( const CvGraph* graph, int start_idx, int end_idx )
::
#define cvGraphFindEdge cvFindGraphEdge
..
:param graph: Graph
:param graph: Graph
:param start_idx: Index of the starting vertex of the edge
:param start_idx: Index of the starting vertex of the edge
:param end_idx: Index of the ending vertex of the edge. For an unoriented graph, the order of the vertex parameters does not matter.
:param end_idx: Index of the ending vertex of the edge. For an unoriented graph, the order of the vertex parameters does not matter.
::
#define cvGraphFindEdge cvFindGraphEdge
..
The function finds the graph edge connecting two specified vertices and returns a pointer to it or NULL if the edge does not exist.
The function finds the graph edge connecting two specified vertices and returns a pointer to it or NULL if the edge does not exist.
...
@@ -472,17 +476,17 @@ Finds an edge in a graph by using its pointer.
...
@@ -472,17 +476,17 @@ Finds an edge in a graph by using its pointer.
:param func: The comparison function that returns a negative, zero, or positive value depending on the relationships among the elements (see the above declaration and the example below) - a similar function is used by ``qsort`` from C runline except that in the latter, ``userdata`` is not used
:param userdata: The user parameter passed to the compasion function; helps to avoid global variables in some cases
::
::
/* a < b ? -1 : a > b ? 1 : 0 */
/* a < b ? -1 : a > b ? 1 : 0 */
...
@@ -1263,12 +1274,6 @@ Sorts sequence element using the specified comparison function.
...
@@ -1263,12 +1274,6 @@ Sorts sequence element using the specified comparison function.
..
..
:param seq: The sequence to sort
:param func: The comparison function that returns a negative, zero, or positive value depending on the relationships among the elements (see the above declaration and the example below) - a similar function is used by ``qsort`` from C runline except that in the latter, ``userdata`` is not used
:param userdata: The user parameter passed to the compasion function; helps to avoid global variables in some cases
The function sorts the sequence in-place using the specified criteria. Below is an example of using this function:
The function sorts the sequence in-place using the specified criteria. Below is an example of using this function:
@@ -671,7 +671,7 @@ Creates a matrix header but does not allocate the matrix data.
...
@@ -671,7 +671,7 @@ Creates a matrix header but does not allocate the matrix data.
:param type: Type of the matrix elements, see :ocv:cfunc:`CreateMat`
:param type: Type of the matrix elements, see :ocv:cfunc:`CreateMat`
The function allocates a new matrix header and returns a pointer to it. The matrix data can then be allocated using :ocv:cfunc:`CreateData` or set explicitly to user-allocated data via :ocv:func:`SetData`.
The function allocates a new matrix header and returns a pointer to it. The matrix data can then be allocated using :ocv:cfunc:`CreateData` or set explicitly to user-allocated data via :ocv:cfunc:`SetData`.
CreateMatND
CreateMatND
-----------
-----------
...
@@ -719,7 +719,7 @@ Creates sparse array.
...
@@ -719,7 +719,7 @@ Creates sparse array.
:param type: Type of array elements. The same as for CvMat
:param type: Type of array elements. The same as for CvMat
The function allocates a multi-dimensional sparse array. Initially the array contain no elements, that is
The function allocates a multi-dimensional sparse array. Initially the array contain no elements, that is
:ocv:cfunc:`GetPtrND` and other related functions will return 0 for every index.
:ocv:cfunc:`PtrND` and other related functions will return 0 for every index.
CrossProduct
CrossProduct
...
@@ -935,7 +935,7 @@ The function returns a matrix header for the input array that can be a matrix -
...
@@ -935,7 +935,7 @@ The function returns a matrix header for the input array that can be a matrix -
The function provides an easy way to handle both types of arrays - ``IplImage`` and ``CvMat`` using the same code. Input array must have non-zero data pointer, otherwise the function will report an error.
The function provides an easy way to handle both types of arrays - ``IplImage`` and ``CvMat`` using the same code. Input array must have non-zero data pointer, otherwise the function will report an error.
.. note:: If the input array is ``IplImage`` with planar data layout and COI set, the function returns the pointer to the selected plane and ``COI == 0``. This feature allows user to process ``IplImage`` strctures with planar data layout, even though OpenCV does not support such images.
.. note:: If the input array is ``IplImage`` with planar data layout and COI set, the function returns the pointer to the selected plane and ``COI == 0``. This feature allows user to process ``IplImage`` strctures with planar data layout, even though OpenCV does not support such images.
...
@@ -1250,13 +1250,15 @@ The functions return a pointer to a specific array element. Number of array dime
...
@@ -1250,13 +1250,15 @@ The functions return a pointer to a specific array element. Number of array dime
The functions can be used for sparse arrays as well - if the requested node does not exist they create it and set it to zero.
The functions can be used for sparse arrays as well - if the requested node does not exist they create it and set it to zero.
All these as well as other functions accessing array elements (
All these as well as other functions accessing array elements (
:ocv:cfunc:`Get`
:ocv:cfunc:`GetND`
,
,
:ocv:cfunc:`GetReal`
:ocv:cfunc:`GetRealND`
,
,
:ocv:cfunc:`Set`
:ocv:cfunc:`Set`
,
,
:ocv:cfunc:`SetReal`
:ocv:cfunc:`SetND`
,
:ocv:cfunc:`SetRealND`
) raise an error in case if the element index is out of range.
) raise an error in case if the element index is out of range.
@@ -695,18 +695,17 @@ Normally, the function is used to convert an old-style 2D array (
...
@@ -695,18 +695,17 @@ Normally, the function is used to convert an old-style 2D array (
``CvMatND`` using an arbitrary element-wise function.
``CvMatND`` using an arbitrary element-wise function.
The last parameter, ``coiMode`` , specifies how to deal with an image with COI set. By default, it is 0 and the function reports an error when an image with COI comes in. And ``coiMode=1`` means that no error is signalled. You have to check COI presence and handle it manually. The modern structures, such as
The last parameter, ``coiMode`` , specifies how to deal with an image with COI set. By default, it is 0 and the function reports an error when an image with COI comes in. And ``coiMode=1`` means that no error is signalled. You have to check COI presence and handle it manually. The modern structures, such as
:ocv:func:`Mat` and
:ocv:class:`Mat` and
:ocv:func:`MatND` do not support COI natively. To process an individual channel of a new-style array, you need either to organize a loop over the array (for example, using matrix iterators) where the channel of interest will be processed, or extract the COI using
``MatND`` do not support COI natively. To process an individual channel of a new-style array, you need either to organize a loop over the array (for example, using matrix iterators) where the channel of interest will be processed, or extract the COI using
:ocv:func:`mixChannels` (for new-style arrays) or
:ocv:func:`mixChannels` (for new-style arrays) or
:ocv:func:`extractImageCOI` (for old-style arrays), process this individual channel, and insert it back to the destination array if needed (using
:ocv:func:`extractImageCOI` (for old-style arrays), process this individual channel, and insert it back to the destination array if needed (using
:ocv:func:`mixChannel` or
:ocv:func:`mixChannels` or
:ocv:func:`insertImageCOI` , respectively).
:ocv:func:`insertImageCOI` , respectively).
.. seealso::
.. seealso::
:c:func:`cvGetImage`,
:ocv:cfunc:`cvGetImage`,
:c:func:`cvGetMat`,
:ocv:cfunc:`cvGetMat`,
:c:func:`cvGetMatND`,
:ocv:func:`extractImageCOI`,
:ocv:func:`extractImageCOI`,
:ocv:func:`insertImageCOI`,
:ocv:func:`insertImageCOI`,
:ocv:func:`mixChannels`
:ocv:func:`mixChannels`
...
@@ -1606,7 +1605,7 @@ Calculates an average (mean) of array elements.
...
@@ -1606,7 +1605,7 @@ Calculates an average (mean) of array elements.
:param src: Source array that should have from 1 to 4 channels so that the results can be stored in :ocv:func:`Scalar` 's.
:param src: Source array that should have from 1 to 4 channels so that the results can be stored in :ocv:class:`Scalar_` 's.
:param mean: Output parameter: computed mean value.
:param mean: Output parameter: computed mean value.
...
@@ -1786,11 +1785,11 @@ Finds the global minimum and maximum in a whole array or sub-array.
...
@@ -1786,11 +1785,11 @@ Finds the global minimum and maximum in a whole array or sub-array.
:param mask: Optional mask used to select a sub-array.
:param mask: Optional mask used to select a sub-array.
The functions ``ninMaxLoc`` find the minimum and maximum element values and their positions. The extremums are searched across the whole array or,
The functions ``minMaxLoc`` find the minimum and maximum element values and their positions. The extremums are searched across the whole array or,
if ``mask`` is not an empty array, in the specified array region.
if ``mask`` is not an empty array, in the specified array region.
The functions do not work with multi-channel arrays. If you need to find minimum or maximum elements across all the channels, use
The functions do not work with multi-channel arrays. If you need to find minimum or maximum elements across all the channels, use
:ocv:func:`reshape` first to reinterpret the array as single-channel. Or you may extract the particular channel using either
:ocv:func:`Mat::reshape` first to reinterpret the array as single-channel. Or you may extract the particular channel using either
:ocv:func:`extractImageCOI` , or
:ocv:func:`extractImageCOI` , or
:ocv:func:`mixChannels` , or
:ocv:func:`mixChannels` , or
:ocv:func:`split` .
:ocv:func:`split` .
...
@@ -1806,7 +1805,7 @@ In case of a sparse matrix, the minimum is found among non-zero elements only.
...
@@ -1806,7 +1805,7 @@ In case of a sparse matrix, the minimum is found among non-zero elements only.
:ocv:func:`extractImageCOI`,
:ocv:func:`extractImageCOI`,
:ocv:func:`mixChannels`,
:ocv:func:`mixChannels`,
:ocv:func:`split`,
:ocv:func:`split`,
:ocv:func:`reshape`
:ocv:func:`Mat::reshape`
...
@@ -1931,7 +1930,7 @@ For a not-per-element matrix product, see
...
@@ -1931,7 +1930,7 @@ For a not-per-element matrix product, see
.. seealso::
.. seealso::
:ocv:func:`add`,
:ocv:func:`add`,
:ocv:func:`substract`,
:ocv:func:`subtract`,
:ocv:func:`divide`,
:ocv:func:`divide`,
:ref:`MatrixExpressions`,
:ref:`MatrixExpressions`,
:ocv:func:`scaleAdd`,
:ocv:func:`scaleAdd`,
...
@@ -2174,7 +2173,7 @@ PCA constructors
...
@@ -2174,7 +2173,7 @@ PCA constructors
:param maxComponents: Maximum number of components that PCA should retain. By default, all the components are retained.
:param maxComponents: Maximum number of components that PCA should retain. By default, all the components are retained.
The default constructor initializes an empty PCA structure. The second constructor initializes the structure and calls
The default constructor initializes an empty PCA structure. The second constructor initializes the structure and calls
:ocv:func:`PCA::operator()` .
:ocv:funcx:`PCA::operator()` .
...
@@ -2530,7 +2529,7 @@ Fills arrays with random numbers.
...
@@ -2530,7 +2529,7 @@ Fills arrays with random numbers.
.. ocv:function:: void RNG::fill( InputOutputArray mat, int distType, InputArray a, InputArray b )
.. ocv:function:: void RNG::fill( InputOutputArray mat, int distType, InputArray a, InputArray b )
:param mat: 2D or N-dimensional matrix. Currently matrices with more than 4 channels are not supported by the methods. Use :ocv:func:`reshape` as a possible workaround.
:param mat: 2D or N-dimensional matrix. Currently matrices with more than 4 channels are not supported by the methods. Use :ocv:func:`Mat::reshape` as a possible workaround.
:param distType: Distribution type, ``RNG::UNIFORM`` or ``RNG::NORMAL`` .
:param distType: Distribution type, ``RNG::UNIFORM`` or ``RNG::NORMAL`` .
...
@@ -3116,7 +3115,7 @@ The constructors.
...
@@ -3116,7 +3115,7 @@ The constructors.
* **SVD::FULL_UV** When the matrix is not square, by default the algorithm produces ``u`` and ``vt`` matrices of sufficiently large size for the further ``A`` reconstruction. If, however, ``FULL_UV`` flag is specified, ``u`` and ``vt`` will be full-size square orthogonal matrices.
* **SVD::FULL_UV** When the matrix is not square, by default the algorithm produces ``u`` and ``vt`` matrices of sufficiently large size for the further ``A`` reconstruction. If, however, ``FULL_UV`` flag is specified, ``u`` and ``vt`` will be full-size square orthogonal matrices.
The first constructor initializes an empty ``SVD`` structure. The second constructor initializes an empty ``SVD`` structure and then calls
The first constructor initializes an empty ``SVD`` structure. The second constructor initializes an empty ``SVD`` structure and then calls
@@ -10,7 +10,7 @@ You can store and then restore various OpenCV data structures to/from XML (http:
...
@@ -10,7 +10,7 @@ You can store and then restore various OpenCV data structures to/from XML (http:
(http://www.yaml.org) formats. Also, it is possible store and load arbitrarily complex data structures, which include OpenCV data structures, as well as primitive data types (integer and floating-point numbers and text strings) as their elements.
(http://www.yaml.org) formats. Also, it is possible store and load arbitrarily complex data structures, which include OpenCV data structures, as well as primitive data types (integer and floating-point numbers and text strings) as their elements.
Use the following procedure to write something to XML or YAML:
Use the following procedure to write something to XML or YAML:
#. Create new :ocv:class:`FileStorage` and open it for writing. It can be done with a single call to :ocv:func:`FileStorage::FileStorage` constructor that takes a filename, or you can use the default constructor and then call :ocv:class:`FileStorage::open`. Format of the file (XML or YAML) is determined from the filename extension (".xml" and ".yml"/".yaml", respectively)
#. Create new :ocv:class:`FileStorage` and open it for writing. It can be done with a single call to :ocv:func:`FileStorage::FileStorage` constructor that takes a filename, or you can use the default constructor and then call :ocv:func:`FileStorage::open`. Format of the file (XML or YAML) is determined from the filename extension (".xml" and ".yml"/".yaml", respectively)
#. Write all the data you want using the streaming operator ``>>``, just like in the case of STL streams.
#. Write all the data you want using the streaming operator ``>>``, just like in the case of STL streams.
#. Close the file using :ocv:func:`FileStorage::release`. ``FileStorage`` destructor also closes the file.
#. Close the file using :ocv:func:`FileStorage::release`. ``FileStorage`` destructor also closes the file.
Flann-based descriptor matcher. This matcher trains :ocv:func:`flann::Index` on a train descriptor collection and calls its nearest search methods to find the best matches. So, this matcher may be faster when matching a large train collection than the brute force matcher. ``FlannBasedMatcher`` does not support masking permissible matches of descriptor sets because ``flann::Index`` does not support this. ::
Flann-based descriptor matcher. This matcher trains :ocv:class:`flann::Index_` on a train descriptor collection and calls its nearest search methods to find the best matches. So, this matcher may be faster when matching a large train collection than the brute force matcher. ``FlannBasedMatcher`` does not support masking permissible matches of descriptor sets because ``flann::Index`` does not support this. ::
class FlannBasedMatcher : public DescriptorMatcher
class FlannBasedMatcher : public DescriptorMatcher
By default, :ocv:class:`StereoBeliefPropagation` uses floating-point arithmetics and the ``CV_32FC1`` type for messages. But it can also use fixed-point arithmetics and the ``CV_16SC1`` message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement:
By default, :ocv:class:`gpu::StereoBeliefPropagation` uses floating-point arithmetics and the ``CV_32FC1`` type for messages. But it can also use fixed-point arithmetics and the ``CV_16SC1`` message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement:
:ocv:class:`DevMem2D_` but containing only a pointer and row step. Width and height fields are excluded due to performance reasons. The structure is intended for internal use or for users who write device code.
:ocv:class:`gpu::DevMem2D_` but containing only a pointer and row step. Width and height fields are excluded due to performance reasons. The structure is intended for internal use or for users who write device code.
::
::
template<typename T> struct PtrStep_
template<typename T> struct PtrStep_
...
@@ -79,7 +79,7 @@ gpu::PtrElemStrp\_
...
@@ -79,7 +79,7 @@ gpu::PtrElemStrp\_
.. ocv:class:: gpu::PtrElemStrp\_
.. ocv:class:: gpu::PtrElemStrp\_
Structure similar to
Structure similar to
:ocv:class:`DevMem2D_` but containing only a pointer and a row step in elements. Width and height fields are excluded due to performance reasons. This class can only be constructed if ``sizeof(T)`` is a multiple of 256. The structure is intended for internal use or for users who write device code.
:ocv:class:`gpu::DevMem2D_` but containing only a pointer and a row step in elements. Width and height fields are excluded due to performance reasons. This class can only be constructed if ``sizeof(T)`` is a multiple of 256. The structure is intended for internal use or for users who write device code.
::
::
template<typename T> struct PtrElemStep_ : public PtrStep_<T>
template<typename T> struct PtrElemStep_ : public PtrStep_<T>
...
@@ -97,7 +97,7 @@ gpu::GpuMat
...
@@ -97,7 +97,7 @@ gpu::GpuMat
.. ocv:class:: gpu::GpuMat
.. ocv:class:: gpu::GpuMat
Base storage class for GPU memory with reference counting. Its interface matches the
Base storage class for GPU memory with reference counting. Its interface matches the
:c:type:`Mat` interface with the following limitations:
:ocv:class:`Mat` interface with the following limitations:
:param anchor: Anchor point. The default value ``Point(-1, -1)`` means that the anchor is at the kernel center.
:param anchor: Anchor point. The default value ``Point(-1, -1)`` means that the anchor is at the kernel center.
.. note:: This filter does not check out-of-border accesses, so only a proper sub-matrix of a bigger matrix has to be passed to it.
.. note:: This filter does not check out-of-border accesses, so only a proper sub-matrix of a bigger matrix has to be passed to it.
.. seealso:: :ocv:func:`boxFilter`
.. seealso:: :ocv:func:`boxFilter`
...
@@ -541,7 +541,7 @@ gpu::sepFilter2D
...
@@ -541,7 +541,7 @@ gpu::sepFilter2D
gpu::createDerivFilter_GPU
gpu::createDerivFilter_GPU
------------------------------
------------------------------
.. ocv:function:: Ptr<FilterEngine_GPU> createDerivFilter_GPU(int srcType, int dstType, int dx, int dy, int ksize, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
.. ocv:function:: Ptr<FilterEngine_GPU> gpu::createDerivFilter_GPU(int srcType, int dstType, int dx, int dy, int ksize, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
Creates a filter engine for the generalized Sobel operator.
Creates a filter engine for the generalized Sobel operator.
.. ocv:function:: int gpu::getCudaEnabledDeviceCount()
Returns the number of installed CUDA-enabled devices. Use this function before any other GPU functions calls. If OpenCV is compiled without GPU support, this function returns 0.
Returns the number of installed CUDA-enabled devices. Use this function before any other GPU functions calls. If OpenCV is compiled without GPU support, this function returns 0.
...
@@ -15,7 +15,7 @@ gpu::getCudaEnabledDeviceCount
...
@@ -15,7 +15,7 @@ gpu::getCudaEnabledDeviceCount
gpu::setDevice
gpu::setDevice
------------------
------------------
.. ocv:function:: void setDevice(int device)
.. ocv:function:: void gpu::setDevice(int device)
Sets a device and initializes it for the current thread. If the call of this function is omitted, a default device is initialized at the fist GPU usage.
Sets a device and initializes it for the current thread. If the call of this function is omitted, a default device is initialized at the fist GPU usage.
...
@@ -25,7 +25,7 @@ gpu::setDevice
...
@@ -25,7 +25,7 @@ gpu::setDevice
gpu::getDevice
gpu::getDevice
------------------
------------------
.. ocv:function:: int getDevice()
.. ocv:function:: int gpu::getDevice()
Returns the current device index set by ``{gpu::getDevice}`` or initialized by default.
Returns the current device index set by ``{gpu::getDevice}`` or initialized by default.
@@ -15,7 +15,7 @@ The GPU module depends on the CUDA Toolkit and NVIDIA Performance Primitives lib
...
@@ -15,7 +15,7 @@ The GPU module depends on the CUDA Toolkit and NVIDIA Performance Primitives lib
The OpenCV GPU module is designed for ease of use and does not require any knowledge of CUDA. Though, such a knowledge will certainly be useful to handle non-trivial cases or achieve the highest performance. It is helpful to understand the cost of various operations, what the GPU does, what the preferred data formats are, and so on. The GPU module is an effective instrument for quick implementation of GPU-accelerated computer vision algorithms. However, if your algorithm involves many simple operations, then, for the best possible performance, you may still need to write your own kernels to avoid extra write and read operations on the intermediate results.
The OpenCV GPU module is designed for ease of use and does not require any knowledge of CUDA. Though, such a knowledge will certainly be useful to handle non-trivial cases or achieve the highest performance. It is helpful to understand the cost of various operations, what the GPU does, what the preferred data formats are, and so on. The GPU module is an effective instrument for quick implementation of GPU-accelerated computer vision algorithms. However, if your algorithm involves many simple operations, then, for the best possible performance, you may still need to write your own kernels to avoid extra write and read operations on the intermediate results.
To enable CUDA support, configure OpenCV using ``CMake`` with ``WITH_CUDA=ON`` . When the flag is set and if CUDA is installed, the full-featured OpenCV GPU module is built. Otherwise, the module is still built but at runtime all functions from the module throw
To enable CUDA support, configure OpenCV using ``CMake`` with ``WITH_CUDA=ON`` . When the flag is set and if CUDA is installed, the full-featured OpenCV GPU module is built. Otherwise, the module is still built but at runtime all functions from the module throw
:ocv:func:`Exception` with ``CV_GpuNotSupported`` error code, except for
:ocv:class:`Exception` with ``CV_GpuNotSupported`` error code, except for
:ocv:func:`gpu::getCudaEnabledDeviceCount()`. The latter function returns zero GPU count in this case. Building OpenCV without CUDA support does not perform device code compilation, so it does not require the CUDA Toolkit installed. Therefore, using the
:ocv:func:`gpu::getCudaEnabledDeviceCount()`. The latter function returns zero GPU count in this case. Building OpenCV without CUDA support does not perform device code compilation, so it does not require the CUDA Toolkit installed. Therefore, using the
:ocv:func:`gpu::getCudaEnabledDeviceCount()` function, you can implement a high-level algorithm that will detect GPU presence at runtime and choose an appropriate implementation (CPU or GPU) accordingly.
:ocv:func:`gpu::getCudaEnabledDeviceCount()` function, you can implement a high-level algorithm that will detect GPU presence at runtime and choose an appropriate implementation (CPU or GPU) accordingly.
@@ -143,7 +143,7 @@ The functions ``calcBackProject`` calculate the back project of the histogram. T
...
@@ -143,7 +143,7 @@ The functions ``calcBackProject`` calculate the back project of the histogram. T
Find connected components in the resulting picture and choose, for example, the largest component.
Find connected components in the resulting picture and choose, for example, the largest component.
This is an approximate algorithm of the
This is an approximate algorithm of the
:ocv:func:`CAMShift` color object tracker.
:ocv:func:`CamShift` color object tracker.
.. seealso:: :ocv:func:`calcHist`
.. seealso:: :ocv:func:`calcHist`
.. _compareHist:
.. _compareHist:
...
@@ -315,7 +315,7 @@ Locates a template within an image by using a histogram comparison.
...
@@ -315,7 +315,7 @@ Locates a template within an image by using a histogram comparison.
:param factor: Normalization factor for histograms that affects the normalization scale of the destination image. Pass 1 if not sure.
:param factor: Normalization factor for histograms that affects the normalization scale of the destination image. Pass 1 if not sure.
The function calculates the back projection by comparing histograms of the source image patches with the given histogram. The function is similar to :ocv:func:`MatchTemplate`, but instead of comparing the raster patch with all its possible positions within the search window, the function ``CalcBackProjectPatch`` compares histograms. See the algorithm diagram below:
The function calculates the back projection by comparing histograms of the source image patches with the given histogram. The function is similar to :ocv:func:`matchTemplate`, but instead of comparing the raster patch with all its possible positions within the search window, the function ``CalcBackProjectPatch`` compares histograms. See the algorithm diagram below:
The method returns the sequence of weak classifiers. Each element of the sequence is a pointer to the :ocv:class:`CvBoostTree` class or to some of its derivatives.
The method returns the sequence of weak classifiers. Each element of the sequence is a pointer to the :ocv:class:`CvBoostTree` class or to some of its derivatives.
...
@@ -232,5 +232,5 @@ CvBoost::get_data
...
@@ -232,5 +232,5 @@ CvBoost::get_data
-----------------
-----------------
Returns used train data of the boosted tree classifier.
Returns used train data of the boosted tree classifier.
:param updateBase: Specifies whether the model is trained from scratch (``update_base=false``), or it is updated using the new training data (``update_base=true``). In the latter case, the parameter ``maxK`` must not be larger than the original value.
:param updateBase: Specifies whether the model is trained from scratch (``update_base=false``), or it is updated using the new training data (``update_base=true``). In the latter case, the parameter ``maxK`` must not be larger than the original value.
The method trains the K-Nearest model. It follows the conventions of the generic :ocv:func:`CvStataModel::train` approach with the following limitations:
The method trains the K-Nearest model. It follows the conventions of the generic :ocv:func:`CvStatModel::train` approach with the following limitations:
* Only ``CV_ROW_SAMPLE`` data layout is supported.
* Only ``CV_ROW_SAMPLE`` data layout is supported.
* Input variables are all ordered.
* Input variables are all ordered.
...
@@ -54,7 +54,7 @@ Finds the neighbors and predicts responses for input vectors.
...
@@ -54,7 +54,7 @@ Finds the neighbors and predicts responses for input vectors.
:ocv:func:`phase` are used so that the computed angle is measured in degrees and covers the full range 0..360. Also, the ``mask`` is filled to indicate pixels where the computed angle is valid.
:ocv:func:`phase` are used so that the computed angle is measured in degrees and covers the full range 0..360. Also, the ``mask`` is filled to indicate pixels where the computed angle is valid.
...
@@ -562,7 +562,7 @@ Updates the background model and returns the foreground mask
...
@@ -562,7 +562,7 @@ Updates the background model and returns the foreground mask
Here are important members of the class that control the algorithm, which you can set after constructing the class instance:
Here are important members of the class that control the algorithm, which you can set after constructing the class instance:
:ocv:member:: nmixtures
.. ocv:member:: int nmixtures
Maximum allowed number of mixture comonents. Actual number is determined dynamically per pixel.
Maximum allowed number of mixture comonents. Actual number is determined dynamically per pixel.
:ocv:member:: backgroundRatio
.. ocv:member:: float backgroundRatio
Threshold defining whether the component is significant enough to be included into the background model ( corresponds to ``TB=1-cf`` from the paper??which paper??). ``cf=0.1 => TB=0.9`` is default. For ``alpha=0.001``, it means that the mode should exist for approximately 105 frames before it is considered foreground.
Threshold defining whether the component is significant enough to be included into the background model ( corresponds to ``TB=1-cf`` from the paper??which paper??). ``cf=0.1 => TB=0.9`` is default. For ``alpha=0.001``, it means that the mode should exist for approximately 105 frames before it is considered foreground.
:ocv:member:: varThresholdGen
.. ocv:member:: float varThresholdGen
Threshold for the squared Mahalanobis distance that helps decide when a sample is close to the existing components (corresponds to ``Tg``). If it is not close to any component, a new component is generated. ``3 sigma => Tg=3*3=9`` is default. A smaller ``Tg`` value generates more components. A higher ``Tg`` value may result in a small number of components but they can grow too large.
Threshold for the squared Mahalanobis distance that helps decide when a sample is close to the existing components (corresponds to ``Tg``). If it is not close to any component, a new component is generated. ``3 sigma => Tg=3*3=9`` is default. A smaller ``Tg`` value generates more components. A higher ``Tg`` value may result in a small number of components but they can grow too large.
:ocv:member:: fVarInit
.. ocv:member:: float fVarInit
Initial variance for the newly generated components. It affects the speed of adaptation. The parameter value is based on your estimate of the typical standard deviation from the images. OpenCV uses 15 as a reasonable value.
Initial variance for the newly generated components. It affects the speed of adaptation. The parameter value is based on your estimate of the typical standard deviation from the images. OpenCV uses 15 as a reasonable value.
:ocv:member::
.. ocv:member:: float fVarMin
fVarMin Parameter used to further control the variance.
Parameter used to further control the variance.
:ocv:member::
.. ocv:member:: float fVarMax
fVarMax Parameter used to further control the variance.
Parameter used to further control the variance.
:ocv:member:: fCT
.. ocv:member:: float fCT
Complexity reduction parameter. This parameter defines the number of samples needed to accept to prove the component exists. ``CT=0.05`` is a default value for all the samples. By setting ``CT=0`` you get an algorithm very similar to the standard Stauffer&Grimson algorithm.
Complexity reduction parameter. This parameter defines the number of samples needed to accept to prove the component exists. ``CT=0.05`` is a default value for all the samples. By setting ``CT=0`` you get an algorithm very similar to the standard Stauffer&Grimson algorithm.
:param nShadowDetection
.. ocv:member:: uchar nShadowDetection
The value for marking shadow pixels in the output foreground mask. Default value is 127.
The value for marking shadow pixels in the output foreground mask. Default value is 127.
:param fTau
.. ocv:member:: float fTau
Shadow threshold. The shadow is detected if the pixel is a darker version of the background. ``Tau`` is a threshold defining how much darker the shadow can be. ``Tau= 0.5`` means that if a pixel is more than twice darker then it is not shadow. See Prati,Mikic,Trivedi,Cucchiarra, *Detecting Moving Shadows...*, IEEE PAMI,2003.
Shadow threshold. The shadow is detected if the pixel is a darker version of the background. ``Tau`` is a threshold defining how much darker the shadow can be. ``Tau= 0.5`` means that if a pixel is more than twice darker then it is not shadow. See Prati,Mikic,Trivedi,Cucchiarra, *Detecting Moving Shadows...*, IEEE PAMI,2003.
...
@@ -639,7 +639,7 @@ Updates the background model and computes the foreground mask
...
@@ -639,7 +639,7 @@ Updates the background model and computes the foreground mask