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