Core Operations on Matrices
cuda::merge
Makes a multi-channel matrix out of several single-channel matrices.
-
C++: void cuda::merge(const GpuMat* src, size_t n, OutputArray dst, Stream& stream=Stream::Null())
-
C++: void cuda::merge(const std::vector<GpuMat>& src, OutputArray dst, Stream& stream=Stream::Null())
Parameters: |
- src – Array/vector of source matrices.
- n – Number of source matrices.
- dst – Destination matrix.
- stream – Stream for the asynchronous version.
|
cuda::split
Copies each plane of a multi-channel matrix into an array.
-
C++: void cuda::split(InputArray src, GpuMat* dst, Stream& stream=Stream::Null())
-
C++: void cuda::split(InputArray src, vector<GpuMat>& dst, Stream& stream=Stream::Null())
Parameters: |
- src – Source matrix.
- dst – Destination array/vector of single-channel matrices.
- stream – Stream for the asynchronous version.
|
cuda::transpose
Transposes a matrix.
-
C++: void cuda::transpose(InputArray src1, OutputArray dst, Stream& stream=Stream::Null())
Parameters: |
- src1 – Source matrix. 1-, 4-, 8-byte element sizes are supported for now.
- dst – Destination matrix.
- stream – Stream for the asynchronous version.
|
cuda::flip
Flips a 2D matrix around vertical, horizontal, or both axes.
-
C++: void cuda::flip(InputArray src, OutputArray dst, int flipCode, Stream& stream=Stream::Null())
-
cuda::LookUpTable
-
class cuda::LookUpTable : public Algorithm
Base class for transform using lookup table.
class CV_EXPORTS LookUpTable : public Algorithm
{
public:
virtual void transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) = 0;
};
cuda::createLookUpTable
Creates implementation for cuda::LookUpTable .
-
C++: Ptr<LookUpTable> createLookUpTable(InputArray lut)
Parameters: |
- lut – Look-up table of 256 elements. It is a continuous CV_8U matrix.
|
cuda::copyMakeBorder
Forms a border around an image.
-
C++: void cuda::copyMakeBorder(InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, Scalar value=Scalar(), Stream& stream=Stream::Null())
Parameters: |
- src – Source image. CV_8UC1 , CV_8UC4 , CV_32SC1 , and CV_32FC1 types are supported.
- dst – Destination image with the same type as src. The size is Size(src.cols+left+right, src.rows+top+bottom) .
- top –
- bottom –
- left –
- 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.
- borderType – Border type. See borderInterpolate() for details. BORDER_REFLECT101 , BORDER_REPLICATE , BORDER_CONSTANT , BORDER_REFLECT and BORDER_WRAP are supported for now.
- value – Border value.
- stream – Stream for the asynchronous version.
|
Help and Feedback
You did not find what you were looking for?
- Ask a question on the Q&A forum.
- If you think something is missing or wrong in the documentation,
please file a bug report.