vojirt / kcf

Kernelized Correlation Filter tracker
408 stars 174 forks source link

How to replace dft with fftw #18

Open someonelikeypp opened 6 years ago

someonelikeypp commented 6 years ago

Had anyone used fftw to replace dft experience? thanks for help.

someonelikeypp commented 6 years ago

I am writing some test code here: ComplexMat KCF_Tracker::fft2(const cv::Mat &input) { ... cv:Mat input_8U; cv:Mat input_32F;

input.convertTo(input_32F, CV_32F);             //    first

input.convertTo(input_8U, CV_8U);
input_8U.convertTo(input_32F, CV_32F);      //    second

...

} the first input_32F will equals the input, but the second input_32F won't equals input.

Because I need the correct input convert into CV_8U for my fftw's input, what should I do.

@vojirt

qq297110281 commented 5 years ago

Do you figure out how to do it?