forked from opencv/opencv_contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfft.hpp
51 lines (39 loc) · 1.95 KB
/
fft.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef OPENCV_FASTCV_FFT_HPP
#define OPENCV_FASTCV_FFT_HPP
#include <opencv2/core.hpp>
namespace cv {
namespace fastcv {
/**
* @defgroup fastcv Module-wrapper for FastCV hardware accelerated functions
*/
//! @addtogroup fastcv
//! @{
/**
* @brief Computes the 1D or 2D Fast Fourier Transform of a real valued matrix.
For the 2D case, the width and height of the input and output matrix must be powers of 2.
For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.
* @param src Input array of CV_8UC1. The dimensions of the matrix must be powers of 2 for the 2D case,
and in the 1D case, the height must be 1, while the width must be a power of 2.
* @param dst The computed FFT matrix of type CV_32FC2. The FFT Re and Im coefficients are stored in different channels.
Hence the dimensions of the dst are (srcWidth, srcHeight)
*/
CV_EXPORTS_W void FFT(InputArray src, OutputArray dst);
/**
* @brief Computes the 1D or 2D Inverse Fast Fourier Transform of a complex valued matrix.
For the 2D case, The width and height of the input and output matrix must be powers of 2.
For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.
* @param src Input array of type CV_32FC2 containing FFT Re and Im coefficients stored in separate channels.
The dimensions of the matrix must be powers of 2 for the 2D case, and in the 1D case, the height must be 1,
while the width must be a power of 2.
* @param dst The computed IFFT matrix of type CV_8U. The matrix is real valued and has no imaginary components.
Hence the dimensions of the dst are (srcWidth , srcHeight)
*/
CV_EXPORTS_W void IFFT(InputArray src, OutputArray dst);
//! @}
} // fastcv::
} // cv::
#endif // OPENCV_FASTCV_FFT_HPP