How to perform a per-element multiplication of two Fourier spectrums using VPI

Hello,
I’ve read the sample_fft and got the Fourier spectrums of the two graphs with cuda.
CHECK_STATUS(vpiSubmitFFT(stream, backend, fft, imageF32_1, spectrum1, 0));
CHECK_STATUS(vpiSubmitFFT(stream, backend, fft, imageF32_2, spectrum2, 0));
How to perform a per-element multiplication of two Fourier spectrums using VPI like cv::cuda::mulSpectrums(), or how to convert spectrum1 and spectrum2 to cv::cuda::GpuMat to use cv::cuda::mulSpectrums() ?
My VPI version is 2.2.7.

Hi,

We don’t have pixelwise product for VPIImage but you can implement it on your own:
https://docs.nvidia.com/vpi/2.2/group__VPI__HostFunction.html

Then you can export data to OpenCV with the following command (cvmat rather than GpuMat)
https://docs.nvidia.com/vpi/2.2/group__VPI__OpenCVInterop.html#ga77e9792fae58a64bceb61b7a0b3e770f

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.