Closed epitalon closed 1 year ago
Which version of OpenCV does this against ? This master branch originally only builds against OpenCV 3.0 as of now. There is a OpenCV 4.0 branch that I'll push to main now.
I have merged a version of this bug fix into the update master branch that now builds against OpenCV 4.
Line 157 in butterworth_lowpass.cpp we read
Mat toMerge[] = { tmp, tmp };
I believe that we should readMat toMerge[] = { tmp, Mat::zeros(tmp.size(), CV_32F) };
as when one multiplies a DFT image by a filter, this filter should be real only, otherwise the multiplication changes the phase along with the magnitude of each pixel in the DFT. In the current case, multiplying by {tmp, tmp} adds pi/4 to the phase in each pixel of the DFT and multiplies its magnitude by sqrt(2)*tmp.