Hello everybody, I have found the code for Discrete Fourier Transform of an image here : OpenCV: Discrete Fourier Transform
However I don’t get how they croped the spectrum when it has an odd number of columns or rows that is : magI.cols & -2 and/or magI.rows & -2 inside the Rect…
I found that the & is a bitand operator that is it compares each bits of what is before the & to the bits of what is after the & and if both are 1 it keeps it at 1. Else it puts the bit to 0.
My Question is why do we compare the bits of magI.cols and magI.rows to those of -2 and not simply 2 ? Does anyone can explain ?
Thank you for reading