OpenCV
3.4.12
Open Source Computer Vision
|
Classes | |
class | cv::cuda::Convolution |
Base class for convolution (or cross-correlation) operator. : More... | |
class | cv::cuda::DFT |
Base class for DFT operator as a cv::Algorithm. : More... | |
Functions | |
Ptr< Convolution > | cv::cuda::createConvolution (Size user_block_size=Size()) |
Creates implementation for cuda::Convolution . More... | |
Ptr< DFT > | cv::cuda::createDFT (Size dft_size, int flags) |
Creates implementation for cuda::DFT. More... | |
void | cv::cuda::dft (InputArray src, OutputArray dst, Size dft_size, int flags=0, Stream &stream=Stream::Null()) |
Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix. More... | |
void | cv::cuda::gemm (InputArray src1, InputArray src2, double alpha, InputArray src3, double beta, OutputArray dst, int flags=0, Stream &stream=Stream::Null()) |
Performs generalized matrix multiplication. More... | |
void | cv::cuda::mulAndScaleSpectrums (InputArray src1, InputArray src2, OutputArray dst, int flags, float scale, bool conjB=false, Stream &stream=Stream::Null()) |
Performs a per-element multiplication of two Fourier spectrums and scales the result. More... | |
void | cv::cuda::mulSpectrums (InputArray src1, InputArray src2, OutputArray dst, int flags, bool conjB=false, Stream &stream=Stream::Null()) |
Performs a per-element multiplication of two Fourier spectrums. More... | |
Ptr<Convolution> cv::cuda::createConvolution | ( | Size | user_block_size = Size() | ) |
#include <opencv2/cudaarithm.hpp>
Creates implementation for cuda::Convolution .
user_block_size | Block size. If you leave 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. |
#include <opencv2/cudaarithm.hpp>
Creates implementation for cuda::DFT.
dft_size | The image size. |
flags | Optional flags:
|
void cv::cuda::dft | ( | InputArray | src, |
OutputArray | dst, | ||
Size | dft_size, | ||
int | flags = 0 , |
||
Stream & | stream = Stream::Null() |
||
) |
#include <opencv2/cudaarithm.hpp>
Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix.
src | Source matrix (real or complex). |
dst | Destination matrix (real or complex). |
dft_size | Size of a discrete Fourier transform. |
flags | Optional flags:
|
stream | Stream for the asynchronous version. |
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:
void cv::cuda::gemm | ( | InputArray | src1, |
InputArray | src2, | ||
double | alpha, | ||
InputArray | src3, | ||
double | beta, | ||
OutputArray | dst, | ||
int | flags = 0 , |
||
Stream & | stream = Stream::Null() |
||
) |
#include <opencv2/cudaarithm.hpp>
Performs generalized matrix multiplication.
src1 | First multiplied input matrix that should have CV_32FC1 , CV_64FC1 , CV_32FC2 , or CV_64FC2 type. |
src2 | Second multiplied input matrix of the same type as src1 . |
alpha | Weight of the matrix product. |
src3 | Third optional delta matrix added to the matrix product. It should have the same type as src1 and src2 . |
beta | Weight of src3 . |
dst | Destination matrix. It has the proper size and the same type as input matrices. |
flags | Operation flags:
|
stream | Stream for the asynchronous version. |
The function performs generalized matrix multiplication similar to the gemm functions in BLAS level
For example, gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T) corresponds to
\[\texttt{dst} = \texttt{alpha} \cdot \texttt{src1} ^T \cdot \texttt{src2} + \texttt{beta} \cdot \texttt{src3} ^T\]
void cv::cuda::mulAndScaleSpectrums | ( | InputArray | src1, |
InputArray | src2, | ||
OutputArray | dst, | ||
int | flags, | ||
float | scale, | ||
bool | conjB = false , |
||
Stream & | stream = Stream::Null() |
||
) |
#include <opencv2/cudaarithm.hpp>
Performs a per-element multiplication of two Fourier spectrums and scales the result.
src1 | First spectrum. |
src2 | Second spectrum with the same size and type as a . |
dst | Destination spectrum. |
flags | Mock parameter used for CPU/CUDA interfaces similarity, simply add a 0 value. |
scale | Scale constant. |
conjB | Optional flag to specify if the second spectrum needs to be conjugated before the multiplication. |
stream | Stream for the asynchronous version. |
Only full (not packed) CV_32FC2 complex spectrums in the interleaved format are supported for now.
void cv::cuda::mulSpectrums | ( | InputArray | src1, |
InputArray | src2, | ||
OutputArray | dst, | ||
int | flags, | ||
bool | conjB = false , |
||
Stream & | stream = Stream::Null() |
||
) |
#include <opencv2/cudaarithm.hpp>
Performs a per-element multiplication of two Fourier spectrums.
src1 | First spectrum. |
src2 | Second spectrum with the same size and type as a . |
dst | Destination spectrum. |
flags | Mock parameter used for CPU/CUDA interfaces similarity. |
conjB | Optional flag to specify if the second spectrum needs to be conjugated before the multiplication. |
stream | Stream for the asynchronous version. |
Only full (not packed) CV_32FC2 complex spectrums in the interleaved format are supported for now.