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