-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example application for FFT code usage #600
Comments
Hello @ihhub |
Hi @theoniko , surely you can take this issue. Please be free to ask any questions for clarification of the task requirements. |
Hello @ihhub |
We could use FFT to make Gaussian blur: std::vector<float> filter;
Image_Function::GetGaussianKernel( filter, input.width(), input.height(), 5, 2 );
FFT::ComplexData imageFFT( image );
FFT::ComplexData filterFFT;
filterFFT.resize( input.width(), input.height() );
filterFFT.set( filter );
FFT::FFTExecutor fftExecutor( input.width(), input.height() );
fftExecutor.directTransform( imageFFT );
fftExecutor.directTransform( filterFFT );
fftExecutor.complexMultiplication( imageFFT, filterFFT, imageFFT );
fftExecutor.inverseTransform( imageFFT );
const penguinV::Image output = imageFFT.get(); I think it should work. |
@theoniko I've created a pull request to simplify above code from: FFT::ComplexData filterFFT;
filterFFT.resize( input.width(), input.height() );
filterFFT.set( filter ); into: FFT::ComplexData filterFFT( filter, input.width(), input.height() ); |
I will apply those changes at the weekend. |
We would like to add an example for FFT code usage like. As a reference we could use Gaussian filtering.
We need to do these steps:
examples/fft
src/fft.cpp
,src/fft.h
,src/filtering.h
,src/filtering.cpp
andsrc/thirdparty/kissfft
header files into the projectexamples/blob_detection
folder for exampleexamples/CMakeLists.txt
file to include new projectexamples/makefile
file to include new projectYou could refer to any of existing example projects as a reference.
The code for this example project should include file loading, filter usage and file saving.
The text was updated successfully, but these errors were encountered: