:param dft_size: Size of a discrete Fourier transform.
:param flags: Optional flags:
* **DFT_ROWS** transforms each individual row of the source matrix.
* **DFT_SCALE** scales the result: divide it by the number of elements in the transform (obtained from ``dft_size`` ).
* **DFT_INVERSE** inverts DFT. Use for complex-complex cases (real-complex and complex-real cases are always forward and inverse, respectively).
* **DFT_REAL_OUTPUT** specifies the output as real. The source matrix is the result of real-complex transform, so the destination matrix must be real.
Use to handle real matrices ( ``CV32FC1`` ) and complex matrices in the interleaved format ( ``CV32FC2`` ).
The source matrix should be continuous, otherwise reallocation and data copying is performed. The function chooses an operation mode depending on the flags, size, and channel count of the source matrix:
* If the source matrix is complex and the output is not specified as real, the destination matrix is complex and has the ``dft_size`` size and ``CV_32FC2`` type. The destination matrix contains a full result of the DFT (forward or inverse).
* If the source matrix is complex and the output is specified as real, the function assumes that its input is the result of the forward transform (see the next item). The destination matrix has the ``dft_size`` size and ``CV_32FC1`` type. It contains the result of the inverse DFT.
* If the source matrix is real (its type is ``CV_32FC1`` ), forward DFT is performed. The result of the DFT is packed into complex ( ``CV_32FC2`` ) matrix. So, the width of the destination matrix is ``dft_size.width / 2 + 1`` . But if the source is a single column, the height is reduced instead of the width.
.. seealso:: :ocv:func:`dft`
gpu::ConvolveBuf
----------------
.. ocv:struct:: gpu::ConvolveBuf
Class providing a memory buffer for :ocv:func:`gpu::convolve` function, plus it allows to adjust some specific parameters. ::
You can use field `user_block_size` to set specific block size for :ocv:func:`gpu::convolve` function. If you leave its default value `Size(0,0)` then automatic estimation of block size will be used (which is optimized for speed). By varying `user_block_size` you can reduce memory requirements at the cost of speed.
:param image: Source image. Only ``CV_32FC1`` images are supported for now.
:param templ: Template image. The size is not greater than the ``image`` size. The type is the same as ``image`` .
:param result: Result image. If ``image`` is *W x H* and ``templ`` is *w x h*, then ``result`` must be *W-w+1 x H-h+1*.
:param ccorr: Flags to evaluate cross-correlation instead of convolution.
:param buf: Optional buffer to avoid extra memory allocations and to adjust some specific parameters. See :ocv:struct:`gpu::ConvolveBuf`.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`gpu::filter2D`
gpu::copyMakeBorder
-----------------------
Forms a border around an image.
.. ocv:function:: void gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom, int left, int right, int borderType, const Scalar& value = Scalar(), Stream& stream = Stream::Null())
:param src: Source image. ``CV_8UC1`` , ``CV_8UC4`` , ``CV_32SC1`` , and ``CV_32FC1`` types are supported.
:param dst: Destination image with the same type as ``src``. The size is ``Size(src.cols+left+right, src.rows+top+bottom)`` .
:param top:
:param bottom:
:param left:
:param right: Number of pixels in each direction from the source image rectangle to extrapolate. For example: ``top=1, bottom=1, left=1, right=1`` mean that 1 pixel-wide border needs to be built.
:param borderType: Border type. See :ocv:func:`borderInterpolate` for details. ``BORDER_REFLECT101`` , ``BORDER_REPLICATE`` , ``BORDER_CONSTANT`` , ``BORDER_REFLECT`` and ``BORDER_WRAP`` are supported for now.
:param value: Border value.
:param stream: Stream for the asynchronous version.
:param dft_size: Size of a discrete Fourier transform.
:param flags: Optional flags:
* **DFT_ROWS** transforms each individual row of the source matrix.
* **DFT_SCALE** scales the result: divide it by the number of elements in the transform (obtained from ``dft_size`` ).
* **DFT_INVERSE** inverts DFT. Use for complex-complex cases (real-complex and complex-real cases are always forward and inverse, respectively).
* **DFT_REAL_OUTPUT** specifies the output as real. The source matrix is the result of real-complex transform, so the destination matrix must be real.
Use to handle real matrices ( ``CV32FC1`` ) and complex matrices in the interleaved format ( ``CV32FC2`` ).
The source matrix should be continuous, otherwise reallocation and data copying is performed. The function chooses an operation mode depending on the flags, size, and channel count of the source matrix:
* If the source matrix is complex and the output is not specified as real, the destination matrix is complex and has the ``dft_size`` size and ``CV_32FC2`` type. The destination matrix contains a full result of the DFT (forward or inverse).
* If the source matrix is complex and the output is specified as real, the function assumes that its input is the result of the forward transform (see the next item). The destination matrix has the ``dft_size`` size and ``CV_32FC1`` type. It contains the result of the inverse DFT.
* If the source matrix is real (its type is ``CV_32FC1`` ), forward DFT is performed. The result of the DFT is packed into complex ( ``CV_32FC2`` ) matrix. So, the width of the destination matrix is ``dft_size.width / 2 + 1`` . But if the source is a single column, the height is reduced instead of the width.
.. seealso:: :ocv:func:`dft`
gpu::ConvolveBuf
----------------
.. ocv:struct:: gpu::ConvolveBuf
Class providing a memory buffer for :ocv:func:`gpu::convolve` function, plus it allows to adjust some specific parameters. ::
You can use field `user_block_size` to set specific block size for :ocv:func:`gpu::convolve` function. If you leave its default value `Size(0,0)` then automatic estimation of block size will be used (which is optimized for speed). By varying `user_block_size` you can reduce memory requirements at the cost of speed.
:param image: Source image. Only ``CV_32FC1`` images are supported for now.
:param templ: Template image. The size is not greater than the ``image`` size. The type is the same as ``image`` .
:param result: Result image. If ``image`` is *W x H* and ``templ`` is *w x h*, then ``result`` must be *W-w+1 x H-h+1*.
:param ccorr: Flags to evaluate cross-correlation instead of convolution.
:param buf: Optional buffer to avoid extra memory allocations and to adjust some specific parameters. See :ocv:struct:`gpu::ConvolveBuf`.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`gpu::filter2D`
gpu::MatchTemplateBuf
gpu::MatchTemplateBuf
---------------------
---------------------
.. ocv:struct:: gpu::MatchTemplateBuf
.. ocv:struct:: gpu::MatchTemplateBuf
...
@@ -305,6 +160,8 @@ Class providing memory buffers for :ocv:func:`gpu::matchTemplate` function, plus
...
@@ -305,6 +160,8 @@ Class providing memory buffers for :ocv:func:`gpu::matchTemplate` function, plus
You can use field `user_block_size` to set specific block size for :ocv:func:`gpu::matchTemplate` function. If you leave its default value `Size(0,0)` then automatic estimation of block size will be used (which is optimized for speed). By varying `user_block_size` you can reduce memory requirements at the cost of speed.
You can use field `user_block_size` to set specific block size for :ocv:func:`gpu::matchTemplate` function. If you leave its default value `Size(0,0)` then automatic estimation of block size will be used (which is optimized for speed). By varying `user_block_size` you can reduce memory requirements at the cost of speed.
gpu::matchTemplate
gpu::matchTemplate
----------------------
----------------------
Computes a proximity map for a raster template and an image where the template is searched for.
Computes a proximity map for a raster template and an image where the template is searched for.
...
@@ -342,39 +199,6 @@ Computes a proximity map for a raster template and an image where the template i
...
@@ -342,39 +199,6 @@ Computes a proximity map for a raster template and an image where the template i
.. seealso:: :ocv:func:`matchTemplate`
.. seealso:: :ocv:func:`matchTemplate`
gpu::remap
--------------
Applies a generic geometrical transformation to an image.
:param dst: Destination image with the same type as ``src`` . The size is ``dsize`` (when it is non-zero) or the size is computed from ``src.size()`` , ``fx`` , and ``fy`` .
:param dsize: Destination image size. If it is zero, it is computed as:
Either ``dsize`` or both ``fx`` and ``fy`` must be non-zero.
:param fx: Scale factor along the horizontal axis. If it is zero, it is computed as:
.. math::
\texttt{(double)dsize.width/src.cols}
:param fy: Scale factor along the vertical axis. If it is zero, it is computed as:
.. math::
\texttt{(double)dsize.height/src.rows}
:param interpolation: Interpolation method. ``INTER_NEAREST`` , ``INTER_LINEAR`` and ``INTER_CUBIC`` are supported for now.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`resize`
gpu::warpAffine
-------------------
Applies an affine transformation to an image.
.. ocv:function:: void gpu::warpAffine( const GpuMat& src, GpuMat& dst, const Mat& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, Scalar borderValue=Scalar(), Stream& stream=Stream::Null() )
:param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or ``CV_32F`` depth and 1, 3, or 4 channels are supported.
:param dst: Destination image with the same type as ``src`` . The size is ``dsize`` .
:param M: *2x3* transformation matrix.
:param dsize: Size of the destination image.
:param flags: Combination of interpolation methods (see :ocv:func:`resize`) and the optional flag ``WARP_INVERSE_MAP`` specifying that ``M`` is an inverse transformation ( ``dst=>src`` ). Only ``INTER_NEAREST`` , ``INTER_LINEAR`` , and ``INTER_CUBIC`` interpolation methods are supported.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`warpAffine`
gpu::buildWarpAffineMaps
------------------------
Builds transformation maps for affine transformation.
.. ocv:function:: void gpu::warpPerspective( const GpuMat& src, GpuMat& dst, const Mat& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, Scalar borderValue=Scalar(), Stream& stream=Stream::Null() )
:param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or ``CV_32F`` depth and 1, 3, or 4 channels are supported.
:param dst: Destination image with the same type as ``src`` . The size is ``dsize`` .
:param M: *3x3* transformation matrix.
:param dsize: Size of the destination image.
:param flags: Combination of interpolation methods (see :ocv:func:`resize` ) and the optional flag ``WARP_INVERSE_MAP`` specifying that ``M`` is the inverse transformation ( ``dst => src`` ). Only ``INTER_NEAREST`` , ``INTER_LINEAR`` , and ``INTER_CUBIC`` interpolation methods are supported.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`warpPerspective`
gpu::buildWarpPerspectiveMaps
-----------------------------
Builds transformation maps for perspective transformation.
:param src: Source image. Supports 1, 3 or 4 channels images with ``CV_8U`` , ``CV_16U`` or ``CV_32F`` depth.
:param dst: Destination image with the same type as ``src`` . The size is ``dsize`` .
:param dsize: Size of the destination image.
:param angle: Angle of rotation in degrees.
:param xShift: Shift along the horizontal axis.
:param yShift: Shift along the vertical axis.
:param interpolation: Interpolation method. Only ``INTER_NEAREST`` , ``INTER_LINEAR`` , and ``INTER_CUBIC`` are supported.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`gpu::warpAffine`
gpu::copyMakeBorder
-----------------------
Forms a border around an image.
.. ocv:function:: void gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom, int left, int right, int borderType, const Scalar& value = Scalar(), Stream& stream = Stream::Null())
:param src: Source image. ``CV_8UC1`` , ``CV_8UC4`` , ``CV_32SC1`` , and ``CV_32FC1`` types are supported.
:param dst: Destination image with the same type as ``src``. The size is ``Size(src.cols+left+right, src.rows+top+bottom)`` .
:param top:
:param bottom:
:param left:
:param right: Number of pixels in each direction from the source image rectangle to extrapolate. For example: ``top=1, bottom=1, left=1, right=1`` mean that 1 pixel-wide border needs to be built.
:param borderType: Border type. See :ocv:func:`borderInterpolate` for details. ``BORDER_REFLECT101`` , ``BORDER_REPLICATE`` , ``BORDER_CONSTANT`` , ``BORDER_REFLECT`` and ``BORDER_WRAP`` are supported for now.
:param value: Border value.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`copyMakeBorder`
gpu::rectStdDev
gpu::rectStdDev
-------------------
-------------------
Computes a standard deviation of integral images.
Computes a standard deviation of integral images.
...
@@ -711,68 +356,6 @@ Equalizes the histogram of a grayscale image.
...
@@ -711,68 +356,6 @@ Equalizes the histogram of a grayscale image.
gpu::buildWarpPlaneMaps
-----------------------
Builds plane warping maps.
.. ocv:function:: void gpu::buildWarpPlaneMaps( Size src_size, Rect dst_roi, const Mat & K, const Mat& R, const Mat & T, float scale, GpuMat& map_x, GpuMat& map_y, Stream& stream=Stream::Null() )
:param stream: Stream for the asynchronous version.
The class implements fast approximate Non Local Means Denoising algorithm.
The class implements fast approximate Non Local Means Denoising algorithm.
gpu::FastNonLocalMeansDenoising::simpleMethod()
gpu::FastNonLocalMeansDenoising::simpleMethod()
-----------------------------------------------
-----------------------------------------------
Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising with several computational optimizations. Noise expected to be a gaussian white noise
Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising with several computational optimizations. Noise expected to be a gaussian white noise
...
@@ -882,6 +469,8 @@ This function expected to be applied to grayscale images. For colored images loo
...
@@ -882,6 +469,8 @@ This function expected to be applied to grayscale images. For colored images loo
:ocv:func:`fastNlMeansDenoising`
:ocv:func:`fastNlMeansDenoising`
gpu::FastNonLocalMeansDenoising::labMethod()
gpu::FastNonLocalMeansDenoising::labMethod()
--------------------------------------------
--------------------------------------------
Modification of ``FastNonLocalMeansDenoising::simpleMethod`` for color images
Modification of ``FastNonLocalMeansDenoising::simpleMethod`` for color images
...
@@ -908,6 +497,8 @@ The function converts image to CIELAB colorspace and then separately denoise L a
...
@@ -908,6 +497,8 @@ The function converts image to CIELAB colorspace and then separately denoise L a
:ocv:func:`fastNlMeansDenoisingColored`
:ocv:func:`fastNlMeansDenoisingColored`
gpu::alphaComp
gpu::alphaComp
-------------------
-------------------
Composites two images using alpha opacity values contained in each image.
Composites two images using alpha opacity values contained in each image.
:param dst: Destination image with the same type as ``src`` . The size is ``dsize`` (when it is non-zero) or the size is computed from ``src.size()`` , ``fx`` , and ``fy`` .
:param dsize: Destination image size. If it is zero, it is computed as:
Either ``dsize`` or both ``fx`` and ``fy`` must be non-zero.
:param fx: Scale factor along the horizontal axis. If it is zero, it is computed as:
.. math::
\texttt{(double)dsize.width/src.cols}
:param fy: Scale factor along the vertical axis. If it is zero, it is computed as:
.. math::
\texttt{(double)dsize.height/src.rows}
:param interpolation: Interpolation method. ``INTER_NEAREST`` , ``INTER_LINEAR`` and ``INTER_CUBIC`` are supported for now.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`resize`
gpu::warpAffine
-------------------
Applies an affine transformation to an image.
.. ocv:function:: void gpu::warpAffine( const GpuMat& src, GpuMat& dst, const Mat& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, Scalar borderValue=Scalar(), Stream& stream=Stream::Null() )
:param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or ``CV_32F`` depth and 1, 3, or 4 channels are supported.
:param dst: Destination image with the same type as ``src`` . The size is ``dsize`` .
:param M: *2x3* transformation matrix.
:param dsize: Size of the destination image.
:param flags: Combination of interpolation methods (see :ocv:func:`resize`) and the optional flag ``WARP_INVERSE_MAP`` specifying that ``M`` is an inverse transformation ( ``dst=>src`` ). Only ``INTER_NEAREST`` , ``INTER_LINEAR`` , and ``INTER_CUBIC`` interpolation methods are supported.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`warpAffine`
gpu::buildWarpAffineMaps
------------------------
Builds transformation maps for affine transformation.
.. ocv:function:: void gpu::warpPerspective( const GpuMat& src, GpuMat& dst, const Mat& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, Scalar borderValue=Scalar(), Stream& stream=Stream::Null() )
:param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or ``CV_32F`` depth and 1, 3, or 4 channels are supported.
:param dst: Destination image with the same type as ``src`` . The size is ``dsize`` .
:param M: *3x3* transformation matrix.
:param dsize: Size of the destination image.
:param flags: Combination of interpolation methods (see :ocv:func:`resize` ) and the optional flag ``WARP_INVERSE_MAP`` specifying that ``M`` is the inverse transformation ( ``dst => src`` ). Only ``INTER_NEAREST`` , ``INTER_LINEAR`` , and ``INTER_CUBIC`` interpolation methods are supported.
:param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`warpPerspective`
gpu::buildWarpPerspectiveMaps
-----------------------------
Builds transformation maps for perspective transformation.