DFT function can be found in the dxt.cpp source file. This is located in $opencv2.3$\opencv\modules\core\src
If you save it as the same function you will Overwrite that function and wont be able to use the original function. If you only want your new function then just change the code, if you want the original functionality save it as something else, dft2 would surfice but i suggest saving it as something more meaningfull like dft"whathaveIdone"
Either create some new files etc or just save it as a new function with dxt.cpp, you will need to create function definitions etc
In order to find this information I opened the OpenCV solution in Visual Studio and did a solution wide search for DFT
How to modify dft function in opencv?
Question
I need to modify some of the variables inside the dft function in OpenCV to make it suitable for my application.
- Where can I find the dft source code?
I've tried
C:\opencv243\build\include\opencv2\core.hpp
but it only gives me the description of dft://! performs forward or inverse 1D or 2D Discrete Fourier Transformation CV_EXPORTS_W void dft(InputArray src, OutputArray dst, int flags=0, int nonzeroRows=0);
What is the procedure after source code modification? Do I have to give it a different name such as
dft2()
?Where to save the new function?
In MATLAB I could simply right-click on the function and see the source file (for the open source functions only).
Thanks
Payam
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow