Commit 5a333bff authored by Alexander Alekhin's avatar Alexander Alekhin

ocl: update documentation

parent f2241e3d
......@@ -86,8 +86,6 @@ Enables the stereo correspondence operator that finds the disparity for the spec
:param disparity: Output disparity map. It is a ``CV_8UC1`` image with the same size as the input images.
:param stream: Stream for the asynchronous version.
ocl::StereoBM_OCL::checkIfGpuCallReasonable
-----------------------------------------------
......@@ -218,8 +216,6 @@ Enables the stereo correspondence operator that finds the disparity for the spec
:param disparity: Output disparity map. If ``disparity`` is empty, the output type is ``CV_16SC1`` . Otherwise, the type is retained.
:param stream: Stream for the asynchronous version.
ocl::StereoConstantSpaceBP
------------------------------
.. ocv:class:: ocl::StereoConstantSpaceBP
......@@ -330,5 +326,3 @@ Enables the stereo correspondence operator that finds the disparity for the spec
:param right: Right image with the same size and the same type as the left one.
:param disparity: Output disparity map. If ``disparity`` is empty, the output type is ``CV_16SC1`` . Otherwise, the output type is ``disparity.type()`` .
:param stream: Stream for the asynchronous version.
\ No newline at end of file
This diff is collapsed.
......@@ -146,7 +146,7 @@ Returns void
.. ocv:function:: void ocl::remap(const oclMat &src, oclMat &dst, oclMat &map1, oclMat &map2, int interpolation, int bordertype, const Scalar &value = Scalar())
:param src: Source image. Only CV_8UC1 and CV_32FC1 images are supported now.
:param src: Source image.
:param dst: Destination image containing cornerness values. It has the same size as src and CV_32FC1 type.
......@@ -156,11 +156,11 @@ Returns void
:param interpolation: The interpolation method
:param bordertype: Pixel extrapolation method. Only BORDER_CONSTANT are supported now.
:param bordertype: Pixel extrapolation method.
:param value: The border value if borderType==BORDER CONSTANT
The function remap transforms the source image using the specified map: dst (x ,y) = src (map1(x , y) , map2(x , y)) where values of pixels with non-integer coordinates are computed using one of available interpolation methods. map1 and map2 can be encoded as separate floating-point maps in map1 and map2 respectively, or interleaved floating-point maps of (x,y) in map1. Supports CV_8UC1, CV_8UC3, CV_8UC4, CV_32FC1 , CV_32FC3 and CV_32FC4 data types.
The function remap transforms the source image using the specified map: dst (x ,y) = src (map1(x , y) , map2(x , y)) where values of pixels with non-integer coordinates are computed using one of available interpolation methods. map1 and map2 can be encoded as separate floating-point maps in map1 and map2 respectively, or interleaved floating-point maps of (x,y) in map1.
ocl::resize
------------------
......@@ -222,7 +222,7 @@ ocl::cvtColor
------------------
Returns void
.. ocv:function:: void ocl::cvtColor(const oclMat &src, oclMat &dst, int code , int dcn = 0)
.. ocv:function:: void ocl::cvtColor(const oclMat &src, oclMat &dst, int code, int dcn = 0)
:param src: Source image.
......@@ -250,7 +250,7 @@ Returns Threshold value
:param type: Thresholding type
The function applies fixed-level thresholding to a single-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image or for removing a noise, i.e. filtering out pixels with too small or too large values. There are several types of thresholding that the function supports that are determined by thresholdType. Supports only CV_32FC1 and CV_8UC1 data type.
The function applies fixed-level thresholding to a single-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image or for removing a noise, i.e. filtering out pixels with too small or too large values. There are several types of thresholding that the function supports that are determined by thresholdType.
ocl::buildWarpPlaneMaps
-----------------------
......@@ -311,4 +311,4 @@ Builds transformation maps for affine transformation.
:param ymap: Y values with ``CV_32FC1`` type.
.. seealso:: :ocv:func:`ocl::warpAffine` , :ocv:func:`ocl::remap`
\ No newline at end of file
.. seealso:: :ocv:func:`ocl::warpAffine` , :ocv:func:`ocl::remap`
This diff is collapsed.
......@@ -117,7 +117,6 @@ Computes a dense optical flow using the Gunnar Farneback's algorithm.
:param frame1: Second 8-bit gray-scale input image
:param flowx: Flow horizontal component
:param flowy: Flow vertical component
:param s: Stream
.. seealso:: :ocv:func:`calcOpticalFlowFarneback`
......@@ -230,8 +229,6 @@ Interpolates frames (images) using provided optical flow (displacement field).
:param buf: Temporary buffer, will have width x 6*height size, CV_32FC1 type and contain 6 oclMat: occlusion masks for first frame, occlusion masks for second, interpolated forward horizontal flow, interpolated forward vertical flow, interpolated backward horizontal flow, interpolated backward vertical flow.
:param stream: Stream for the asynchronous version.
ocl::KalmanFilter
--------------------
.. ocv:class:: ocl::KalmanFilter
......@@ -418,8 +415,6 @@ Updates the background model and returns the foreground mask.
:param fgmask: The output foreground mask as an 8-bit binary image.
:param stream: Stream for the asynchronous version.
ocl::MOG::getBackgroundImage
--------------------------------
......@@ -429,8 +424,6 @@ Computes a background image.
:param backgroundImage: The output background image.
:param stream: Stream for the asynchronous version.
ocl::MOG::release
---------------------
......@@ -443,7 +436,9 @@ ocl::MOG2
-------------
.. ocv:class:: ocl::MOG2 : public ocl::BackgroundSubtractor
Gaussian Mixture-based Background/Foreground Segmentation Algorithm. ::
Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [MOG2004]_. ::
class CV_EXPORTS MOG2: public cv::ocl::BackgroundSubtractor
{
......@@ -485,45 +480,42 @@ Gaussian Mixture-based Background/Foreground Segmentation Algorithm. ::
/* hidden */
};
The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [MOG2004]_.
.. ocv:member:: float backgroundRatio
Here are important members of the class that control the algorithm, which you can set after constructing the class instance:
Threshold defining whether the component is significant enough to be included into the background model. ``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:: float backgroundRatio
.. ocv:member:: float varThreshold
Threshold defining whether the component is significant enough to be included into the background model. ``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 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:: float varThreshold
.. ocv:member:: float fVarInit
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.
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:: float fVarInit
.. ocv:member:: float fVarMin
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.
Parameter used to further control the variance.
.. ocv:member:: float fVarMin
.. ocv:member:: float fVarMax
Parameter used to further control the variance.
Parameter used to further control the variance.
.. ocv:member:: float fVarMax
.. ocv:member:: float fCT
Parameter used to further control the variance.
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.
.. ocv:member:: float fCT
.. ocv:member:: uchar nShadowDetection
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.
The value for marking shadow pixels in the output foreground mask. Default value is 127.
.. ocv:member:: uchar nShadowDetection
.. ocv:member:: float fTau
The value for marking shadow pixels in the output foreground mask. Default value is 127.
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 [ShadowDetect2003]_.
.. ocv:member:: float fTau
.. ocv:member:: bool bShadowDetection
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 [ShadowDetect2003]_.
Parameter defining whether shadow detection should be enabled.
.. ocv:member:: bool bShadowDetection
Parameter defining whether shadow detection should be enabled.
.. seealso:: :ocv:class:`BackgroundSubtractorMOG2`
......@@ -549,8 +541,6 @@ Updates the background model and returns the foreground mask.
:param fgmask: The output foreground mask as an 8-bit binary image.
:param stream: Stream for the asynchronous version.
ocl::MOG2::getBackgroundImage
---------------------------------
......@@ -560,11 +550,9 @@ Computes a background image.
:param backgroundImage: The output background image.
:param stream: Stream for the asynchronous version.
ocl::MOG2::release
----------------------
Releases all inner buffer's memory.
.. ocv:function:: void ocl::MOG2::release()
\ No newline at end of file
.. ocv:function:: void ocl::MOG2::release()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment