Commit fafc2f37 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

corrected grammar (done by Elena)

parent 57195e96
......@@ -3,7 +3,7 @@ gpu. GPU-accelerated Computer Vision
************************************
.. toctree::
:maxdepth: 2
:maxdepth: 1
introduction
initalization_and_information
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,133 +3,109 @@ Matrix Reductions
.. highlight:: cpp
.. index:: gpu::meanStdDev
gpu::meanStdDev
-------------------
.. cpp:function:: void gpu::meanStdDev(const GpuMat& mtx, Scalar& mean, Scalar& stddev)
.. cpp:function:: void gpu::meanStdDev(const GpuMat\& mtx, Scalar\& mean, Scalar\& stddev)
Computes mean value and standard deviation of matrix elements.
Computes a mean value and a standard deviation of matrix elements.
:param mtx: Source matrix. ``CV_8UC1`` matrices are supported for now.
:param mtx: Source matrix. ``CV_8UC1`` matrices are supported for now.
:param mean: Mean value.
:param stddev: Standard deviation value.
See also: :c:func:`meanStdDev`.
See Also: :c:func:`meanStdDev` .
.. index:: gpu::norm
gpu::norm
-------------
.. cpp:function:: double gpu::norm(const GpuMat& src, int normType=NORM_L2)
Returns norm of matrix (or of two matrices difference).
:param src: Source matrix. Any matrices except 64F are supported.
:param normType: Norm type. ``NORM_L1``, ``NORM_L2`` and ``NORM_INF`` are supported for now.
.. cpp:function:: double gpu::norm(const GpuMat& src, int normType, GpuMat& buf)
:param src: Source matrix. Any matrices except 64F are supported.
:param normType: Norm type. ``NORM_L1``, ``NORM_L2`` and ``NORM_INF`` are supported for now.
:param buf: Optional buffer to avoid extra memory allocations. It's resized automatically.
.. cpp:function:: double gpu::norm(const GpuMat& src1, const GpuMat& src2, int normType=NORM_L2)
.. cpp:function:: double gpu::norm(const GpuMat\& src1, int normType=NORM_L2)
.. cpp:function:: double gpu::norm(const GpuMat\& src1, int normType, GpuMat\& buf)
.. cpp:function:: double norm(const GpuMat\& src1, const GpuMat\& src2, int normType=NORM_L2)
:param src1: First source matrix. ``CV_8UC1`` matrices are supported for now.
Returns the norm of matrix (or difference of two matrices).
:param src2: Second source matrix. Must have the same size and type as ``src1``.
:param src1: The source matrix. Any matrices except 64F are supported.
:param normType: Norm type. ``NORM_L1``, ``NORM_L2`` and ``NORM_INF`` are supported for now.
:param src2: The second source matrix (if any). The size and type is the same as ``src1``.
See also: :c:func:`norm`.
:param normType: Norm type. ``NORM_L1`` , ``NORM_L2`` , and ``NORM_INF`` are supported for now.
:param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
See Also: :c:func:`norm`.
.. index:: gpu::sum
gpu::sum
------------
.. cpp:function:: Scalar gpu::sum(const GpuMat& src)
.. cpp:function:: Scalar gpu::sum(const GpuMat\& src)
.. cpp:function:: Scalar gpu::sum(const GpuMat& src, GpuMat& buf)
.. cpp:function:: Scalar gpu::sum(const GpuMat\& src, GpuMat\& buf)
Returns sum of matrix elements.
Returns the sum of matrix elements.
:param src: Source image of any depth except ``CV_64F``.
:param buf: Optional buffer to avoid extra memory allocations. It's resized automatically.
See also: :c:func:`sum`.
:param src: Source image of any depth except for ``CV_64F`` .
:param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
See Also: :c:func:`sum` .
.. index:: gpu::absSum
gpu::absSum
---------------
.. cpp:function:: Scalar gpu::absSum(const GpuMat& src)
.. cpp:function:: Scalar gpu::absSum(const GpuMat& src, GpuMat\& buf)
.. cpp:function:: Scalar gpu::absSum(const GpuMat\& src)
Returns sum of matrix elements absolute values.
.. cpp:function:: Scalar gpu::absSum(const GpuMat\& src, GpuMat\& buf)
:param src: Source image of any depth except ``CV_64F``.
:param buf: Optional buffer to avoid extra memory allocations. It's resized automatically.
Returns the sum of absolute values for matrix elements.
:param src: Source image of any depth except for ``CV_64F`` .
:param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
.. index:: gpu::sqrSum
gpu::sqrSum
---------------
.. cpp:function:: Scalar gpu::sqrSum(const GpuMat& src)
.. cpp:function:: Scalar gpu::sqrSum(const GpuMat& src, GpuMat\& buf)
Returns squared sum of matrix elements.
.. cpp:function:: Scalar gpu::sqrSum(const GpuMat\& src)
:param src: Source image of any depth except ``CV_64F``.
.. cpp:function:: Scalar gpu::sqrSum(const GpuMat\& src, GpuMat\& buf)
:param buf: Optional buffer to avoid extra memory allocations. It's resized automatically.
Returns the squared sum of matrix elements.
:param src: Source image of any depth except for ``CV_64F`` .
:param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
.. index:: gpu::minMax
gpu::minMax
---------------
.. cpp:function:: void gpu::minMax(const GpuMat& src, double* minVal, double* maxVal=0, const GpuMat& mask=GpuMat())
.. cpp:function:: void gpu::minMax(const GpuMat\& src, double* minVal, double* maxVal=0, const GpuMat\& mask=GpuMat())
.. cpp:function:: void gpu::minMax(const GpuMat& src, double* minVal, double* maxVal, const GpuMat& mask, GpuMat& buf)
.. cpp:function:: void gpu::minMax(const GpuMat\& src, double* minVal, double* maxVal, const GpuMat\& mask, GpuMat\& buf)
Finds global minimum and maximum matrix elements and returns their values.
:param src: Single-channel source image.
:param minVal: Pointer to returned minimum value. ``NULL`` if not required.
:param minVal: Pointer to the returned minimum value. Use ``NULL`` if not required.
:param maxVal: Pointer to returned maximum value. ``NULL`` if not required.
:param maxVal: Pointer to the returned maximum value. Use ``NULL`` if not required.
:param mask: Optional mask to select a sub-matrix.
:param buf: Optional buffer to avoid extra memory allocations. It's resized automatically.
Function doesn't work with ``CV_64F`` images on GPU with compute capability :math:`<` 1.3.
See also: :c:func:`minMaxLoc`.
:param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
The Function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3.
See Also: :c:func:`minMaxLoc` .
.. index:: gpu::minMaxLoc
......@@ -143,40 +119,38 @@ gpu::minMaxLoc
:param src: Single-channel source image.
:param minVal: Pointer to returned minimum value. ``NULL`` if not required.
:param minVal: Pointer to the returned minimum value. Use ``NULL`` if not required.
:param maxVal: Pointer to returned maximum value. ``NULL`` if not required.
:param maxVal: Pointer to the returned maximum value. Use ``NULL`` if not required.
:param minValLoc: Pointer to returned minimum location. ``NULL`` if not required.
:param minValLoc: Pointer to the returned minimum location. Use ``NULL`` if not required.
:param maxValLoc: Pointer to returned maximum location. ``NULL`` if not required.
:param maxValLoc: Pointer to the returned maximum location. Use ``NULL`` if not required.
:param mask: Optional mask to select a sub-matrix.
:param valbuf: Optional values buffer to avoid extra memory allocations. It's resized automatically.
:param valbuf: Optional values buffer to avoid extra memory allocations. It is resized automatically.
:param locbuf: Optional locations buffer to avoid extra memory allocations. It's resized automatically.
Function doesn't work with ``CV_64F`` images on GPU with compute capability :math:`<` 1.3.
See also: :c:func:`minMaxLoc`.
:param locbuf: Optional locations buffer to avoid extra memory allocations. It is resized automatically.
The function does not work with ``CV_64F`` images on GPU with the compute capability < 1.3.
See Also: :c:func:`minMaxLoc` .
.. index:: gpu::countNonZero
gpu::countNonZero
---------------------
.. cpp:function:: int gpu::countNonZero(const GpuMat& src)
.. cpp:function:: int gpu::countNonZero(const GpuMat\& src)
.. cpp:function:: int gpu::countNonZero(const GpuMat& src, GpuMat& buf)
.. cpp:function:: int gpu::countNonZero(const GpuMat\& src, GpuMat\& buf)
Counts non-zero matrix elements.
:param src: Single-channel source image.
:param buf: Optional buffer to avoid extra memory allocations. It's resized automatically.
Function doesn't work with ``CV_64F`` images on GPU with compute capability :math:`<` 1.3.
:param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
See also: :c:func:`countNonZero`.
The function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3.
See Also: :c:func:`countNonZero` .
This diff is collapsed.
......@@ -3,8 +3,6 @@ Operations on Matrices
.. highlight:: cpp
.. index:: gpu::transpose
gpu::transpose
......@@ -17,56 +15,49 @@ gpu::transpose
:param dst: Destination matrix.
See also: :c:func:`transpose`.
See Also:
:c:func:`transpose` .
.. index:: gpu::flip
gpu::flip
-------------
.. cpp:function:: void gpu::flip(const GpuMat& a, GpuMat& b, int flipCode)
.. cpp:function:: void gpu::flip(const GpuMat& src, GpuMat& dst, int flipCode)
Flips a 2D matrix around vertical, horizontal or both axes.
Flips a 2D matrix around vertical, horizontal, or both axes.
:param a: Source matrix. Only ``CV_8UC1`` and ``CV_8UC4`` matrices are supported for now.
:param src: Source matrix. Only ``CV_8UC1`` and ``CV_8UC4`` matrices are supported for now.
:param b: Destination matrix.
:param dst: Destination matrix.
:param flipCode: Specifies how to flip the source:
:param flipCode: Flip mode for the source:
* **0** Flip around x-axis.
* ``0`` Flips around x-axis.
* **:math:`>`0** Flip around y-axis.
* ``>0`` Flips around y-axis.
* ``<0`` Flips around both axes.
* **:math:`<`0** Flip around both axes.
See also: :c:func:`flip`.
See Also:
:c:func:`flip` .
.. index:: gpu::LUT
gpu::LUT
------------
.. cpp:function:: void gpu::LUT(const GpuMat& src, const Mat& lut, GpuMat& dst)
Transforms the source matrix into the destination matrix using given look-up table:
Transforms the source matrix into the destination matrix using the given look-up table: ``dst(I) = lut(src(I))``
.. math::
:param src: Source matrix. ``CV_8UC1`` and ``CV_8UC3`` matrices are supported for now.
dst(I) = lut(src(I))
:param src: Source matrix. ``CV_8UC1`` and ``CV_8UC3`` matrixes are supported for now.
:param lut: Look-up table. Must be continuous, ``CV_8U`` depth matrix. Its area must satisfy to ``lut.rows`` :math:`\times` ``lut.cols`` = 256 condition.
:param dst: Destination matrix. Will have the same depth as ``lut`` and the same number of channels as ``src``.
See also: :c:func:`LUT`.
:param lut: Look-up table of 256 elements. Must be continuous, ``CV_8U`` matrix.
:param dst: Destination matrix with the same depth as ``lut`` and the same number of channels as ``src`` .
See Also: :c:func:`LUT` .
.. index:: gpu::merge
......@@ -76,29 +67,21 @@ gpu::merge
.. cpp:function:: void gpu::merge(const GpuMat* src, size_t n, GpuMat& dst, const Stream& stream)
Makes a multi-channel matrix out of several single-channel matrices.
:param src: Pointer to array of the source matrices.
:param n: Number of source matrices.
:param dst: Destination matrix.
:param stream: Stream for the asynchronous version.
.. cpp:function:: void gpu::merge(const vector<GpuMat>& src, GpuMat& dst)
.. cpp:function:: void gpu::merge(const vector<GpuMat>& src, GpuMat& dst, const Stream& stream)
:param src: Vector of the source matrices.
Makes a multi-channel matrix out of several single-channel matrices.
:param dst: Destination matrix.
:param src: Array/vector of source matrices.
:param stream: Stream for the asynchronous version.
:param n: Number of source matrices.
See also: :c:func:`merge`.
:param dst: Destination matrix.
:param stream: Stream for the asynchronous version.
See Also: :c:func:`merge` .
.. index:: gpu::split
......@@ -108,44 +91,34 @@ gpu::split
.. cpp:function:: void gpu::split(const GpuMat& src, GpuMat* dst, const Stream& stream)
Copies each plane of a multi-channel matrix into an array.
:param src: Source matrix.
:param dst: Pointer to array of single-channel matrices.
:param stream: Stream for the asynchronous version.
.. cpp:function:: void gpu::split(const GpuMat& src, vector<GpuMat>& dst)
.. cpp:function:: void gpu::split(const GpuMat& src, vector<GpuMat>& dst, const Stream& stream)
Copies each plane of a multi-channel matrix into an array.
:param src: Source matrix.
:param dst: Destination vector of single-channel matrices.
:param dst: The destination array/vector of single-channel matrices.
:param stream: Stream for the asynchronous version.
See also: :c:func:`split`.
See Also: :c:func:`split`.
.. index:: gpu::magnitude
gpu::magnitude
------------------
.. cpp:function:: void gpu::magnitude(const GpuMat& x, GpuMat& magnitude)
Computes magnitudes of complex matrix elements.
:param x: Source complex matrix in the interleaved format (``CV_32FC2``).
:param magnitude: Destination matrix of float magnitudes (``CV_32FC1``).
.. cpp:function:: void gpu::magnitude(const GpuMat& xy, GpuMat& magnitude)
.. cpp:function:: void gpu::magnitude(const GpuMat& x, const GpuMat& y, GpuMat& magnitude)
.. cpp:function:: void gpu::magnitude(const GpuMat& x, const GpuMat& y, GpuMat& magnitude, const Stream& stream)
Computes magnitudes of complex matrix elements.
:param xy: Source complex matrix in the interleaved format (``CV_32FC2``).
:param x: Source matrix, containing real components (``CV_32FC1``).
:param y: Source matrix, containing imaginary components (``CV_32FC1``).
......@@ -154,26 +127,23 @@ gpu::magnitude
:param stream: Stream for the asynchronous version.
See also: :c:func:`magnitude`.
See Also:
:c:func:`magnitude` .
.. index:: gpu::magnitudeSqr
gpu::magnitudeSqr
---------------------
.. cpp:function:: void gpu::magnitudeSqr(const GpuMat& x, GpuMat& magnitude)
Computes squared magnitudes of complex matrix elements.
:param x: Source complex matrix in the interleaved format (``CV_32FC2``).
:param magnitude: Destination matrix of float magnitude squares (``CV_32FC1``).
.. cpp:function:: void gpu::magnitudeSqr(const GpuMat& xy, GpuMat& magnitude)
.. cpp:function:: void gpu::magnitudeSqr(const GpuMat& x, const GpuMat& y, GpuMat& magnitude)
.. cpp:function:: void gpu::magnitudeSqr(const GpuMat& x, const GpuMat& y, GpuMat& magnitude, const Stream& stream)
Computes squared magnitudes of complex matrix elements.
:param xy: Source complex matrix in the interleaved format (``CV_32FC2``).
:param x: Source matrix, containing real components (``CV_32FC1``).
:param y: Source matrix, containing imaginary components (``CV_32FC1``).
......@@ -182,8 +152,6 @@ gpu::magnitudeSqr
:param stream: Stream for the asynchronous version.
.. index:: gpu::phase
gpu::phase
......@@ -194,19 +162,18 @@ gpu::phase
Computes polar angles of complex matrix elements.
:param x: Source matrix, containing real components (``CV_32FC1``).
:param x: Source matrix containing real components (``CV_32FC1``).
:param y: Source matrix, containing imaginary components (``CV_32FC1``).
:param y: Source matrix containing imaginary components (``CV_32FC1``).
:param angle: Destionation matrix of angles (``CV_32FC1``).
:param angleInDegress: Flag which indicates angles must be evaluated in degress.
:param angleInDegress: Flag for angles that must be evaluated in degress.
:param stream: Stream for the asynchronous version.
See also: :c:func:`phase`.
See Also:
:c:func:`phase` .
.. index:: gpu::cartToPolar
......@@ -218,21 +185,20 @@ gpu::cartToPolar
Converts Cartesian coordinates into polar.
:param x: Source matrix, containing real components (``CV_32FC1``).
:param x: Source matrix containing real components (``CV_32FC1``).
:param y: Source matrix, containing imaginary components (``CV_32FC1``).
:param y: Source matrix containing imaginary components (``CV_32FC1``).
:param magnitude: Destination matrix of float magnituds (``CV_32FC1``).
:param magnitude: Destination matrix of float magnitudes (``CV_32FC1``).
:param angle: Destionation matrix of angles (``CV_32FC1``).
:param angleInDegress: Flag which indicates angles must be evaluated in degress.
:param angleInDegress: Flag for angles that must be evaluated in degress.
:param stream: Stream for the asynchronous version.
See also: :c:func:`cartToPolar`.
See Also:
:c:func:`cartToPolar` .
.. index:: gpu::polarToCart
......@@ -244,16 +210,17 @@ gpu::polarToCart
Converts polar coordinates into Cartesian.
:param magnitude: Source matrix, containing magnitudes (``CV_32FC1``).
:param magnitude: Source matrix containing magnitudes (``CV_32FC1``).
:param angle: Source matrix, containing angles (``CV_32FC1``).
:param angle: Source matrix containing angles (``CV_32FC1``).
:param x: Destination matrix of real components (``CV_32FC1``).
:param y: Destination matrix of imaginary components (``CV_32FC1``).
:param angleInDegress: Flag which indicates angles are in degress.
:param angleInDegress: Flag that indicates angles in degress.
:param stream: Stream for the asynchronous version.
See also: :c:func:`polarToCart`.
See Also:
:c:func:`polarToCart` .
This diff is collapsed.
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