The following picture is amplitude and phase of an image filtered using Gabor filter in the frequency domain. I'm trying to reproduce the results, I'm getting valid results for the amplitude I think, but I'm struggling with the the phase, I'm just getting a noisy image that does not resemble the picture. I'm referencing this paper 2
My code looks roughly like this (Python + OpenCV):
# DFT of the source image dft = cv2.dft(...) # DFT of the Gabor filter kernel_dft = cv2.dft(...) filtered = dft * kernel_dft # using cv2.mulSpectrums() image = cv2.idft(filtered)
image is then complex array so i use
cv2.cartToPolar() to extract magnitude and phase.
But I'm struggling what the following paragraph exactly means (from the paper):
The resulting spatial frequency band is localized in space, scale and orientation (see [Portilla and Simoncelli 2000] for filter design steps). The transfer functions of a complex steerable pyramid only contain the positive frequencies of the corresponding real steerable pyramid’s filter. That is, the response of 2 cos(!x) = e^(iwx) + e^(iwx) is e^(iwx) so that there is a notion of both amplitude and phase.
I'm not sure how to proceed, as I'm not an expert in this matter, so if anybody could offer some clarification I'd be very happy.