2013-06-04 17:32:35 +08:00
Core Operations on Matrices
===========================
.. highlight :: cpp
2013-08-20 19:05:49 +08:00
cuda::merge
-----------
2013-06-04 17:32:35 +08:00
Makes a multi-channel matrix out of several single-channel matrices.
2013-08-20 19:05:49 +08:00
.. ocv:function :: void cuda::merge(const GpuMat* src, size_t n, OutputArray dst, Stream& stream = Stream::Null())
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function :: void cuda::merge(const std::vector<GpuMat>& src, OutputArray dst, Stream& stream = Stream::Null())
2013-06-04 17:32:35 +08:00
:param src: Array/vector of source matrices.
:param n: Number of source matrices.
:param dst: Destination matrix.
:param stream: Stream for the asynchronous version.
.. seealso :: :ocv:func: `merge`
2013-08-20 19:05:49 +08:00
cuda::split
-----------
2013-06-04 17:32:35 +08:00
Copies each plane of a multi-channel matrix into an array.
2013-08-20 19:05:49 +08:00
.. ocv:function :: void cuda::split(InputArray src, GpuMat* dst, Stream& stream = Stream::Null())
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function :: void cuda::split(InputArray src, vector<GpuMat>& dst, Stream& stream = Stream::Null())
2013-06-04 17:32:35 +08:00
:param src: Source matrix.
:param dst: Destination array/vector of single-channel matrices.
:param stream: Stream for the asynchronous version.
.. seealso :: :ocv:func: `split`
2013-08-20 19:05:49 +08:00
cuda::transpose
---------------
2013-06-11 19:45:04 +08:00
Transposes a matrix.
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function :: void cuda::transpose(InputArray src1, OutputArray dst, Stream& stream = Stream::Null())
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param src1: Source matrix. 1-, 4-, 8-byte element sizes are supported for now.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param dst: Destination matrix.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param stream: Stream for the asynchronous version.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
.. seealso :: :ocv:func: `transpose`
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
cuda::flip
----------
2013-06-11 19:45:04 +08:00
Flips a 2D matrix around vertical, horizontal, or both axes.
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function :: void cuda::flip(InputArray src, OutputArray dst, int flipCode, Stream& stream = Stream::Null())
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param src: Source matrix. Supports 1, 3 and 4 channels images with ``CV_8U``, ``CV_16U``, ``CV_32S`` or ``CV_32F`` depth.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param dst: Destination matrix.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param flipCode: Flip mode for the source:
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
* `` 0 `` Flips around x-axis.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
* `` > 0 `` Flips around y-axis.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
* `` < 0 `` Flips around both axes.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param stream: Stream for the asynchronous version.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
.. seealso :: :ocv:func: `flip`
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
cuda::LookUpTable
-----------------
.. ocv:class :: cuda::LookUpTable : public Algorithm
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
Base class for transform using lookup table. ::
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
class CV_EXPORTS LookUpTable : public Algorithm
{
public:
virtual void transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) = 0;
};
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
.. seealso :: :ocv:func: `LUT`
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
cuda::LookUpTable::transform
----------------------------
2013-06-11 19:45:04 +08:00
Transforms the source matrix into the destination matrix using the given look-up table: `` dst(I) = lut(src(I)) `` .
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
.. ocv:function :: void cuda::LookUpTable::transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param src: Source matrix. ``CV_8UC1`` and ``CV_8UC3`` matrices are supported for now.
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param dst: Destination matrix.
2013-06-04 17:32:35 +08:00
:param stream: Stream for the asynchronous version.
2013-08-20 19:05:49 +08:00
cuda::createLookUpTable
-----------------------
Creates implementation for :ocv:class: `cuda::LookUpTable` .
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
.. ocv:function :: Ptr<LookUpTable> createLookUpTable(InputArray lut)
2013-06-04 17:32:35 +08:00
2013-06-11 19:45:04 +08:00
:param lut: Look-up table of 256 elements. It is a continuous ``CV_8U`` matrix.
2013-06-04 17:32:35 +08:00
2013-08-20 19:05:49 +08:00
cuda::copyMakeBorder
--------------------
2013-06-11 19:45:04 +08:00
Forms a border around an image.
2013-08-20 19:05:49 +08:00
.. ocv:function :: void cuda::copyMakeBorder(InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, Scalar value = Scalar(), Stream& stream = Stream::Null())
2013-06-11 19:45:04 +08:00
: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.
2013-06-04 17:32:35 +08:00
:param stream: Stream for the asynchronous version.
2013-06-11 19:45:04 +08:00
.. seealso :: :ocv:func: `copyMakeBorder`