Can 2D FFT Convolution Be Performed Without Padding Images?

In summary, The conversation is about FFT convolution using the FFTW3 library for image processing. The speaker encountered a problem with the dimensions of the image, and found that the pixel values were incorrect when the width and height were not equal. They then ask if it is possible to perform 2D FFT convolution without padding the image and if the issue could be related to the way the kernel is padded. They also mention using an NVIDIA paper as a guide. The expert responds that it is possible to perform 2D FFT convolution without padding, and provides a link to further information on the topic.
  • #1
engcon
12
0
I'm trying to do FFT convolution via the FFTW3 library for image processing purposes. Basically I have a kernel and I am convolving it with an image.

A problem I encountered has to do with the dimensions of the image. When the width is not equal to the height, the pixel values I get, seem to be at the wrong x,y coords. With the width and height being equal I get the correct results.

My questions are:
Is it possible to perform 2D FFT convolution with width not equal to height, without having to pad the image?
Could it have to do with the way I'm padding the kernel to match the image size?

I'm using an NVIDIA paper, available http://developer.download.nvidia.com/compute/cuda/2_2/sdk/website/projects/convolutionFFT2D/doc/convolutionFFT2D.pdf" on the subject as a guide.
 
Last edited by a moderator:
Mathematics news on Phys.org
  • #2
engcon said:
My questions are:
Is it possible to perform 2D FFT convolution with width not equal to height, without having to pad the image?
Could it have to do with the way I'm padding the kernel to match the image size?

Yes, it is...take a look http://www.cs.cf.ac.uk/Dave/Multimedia/node228.html" to see how the 2D discrete Fourier transform is defined on a rectangular grid. Padding with zeros gives you a result which is probably different than what you want in your application.
 
Last edited by a moderator:

FAQ: Can 2D FFT Convolution Be Performed Without Padding Images?

What is 2D FFT Convolution?

2D FFT Convolution is a mathematical operation used in signal processing to analyze the frequency components of a two-dimensional signal. It involves taking the Fast Fourier Transform (FFT) of both the signal and a kernel, multiplying them together, and then taking the inverse FFT to obtain the convolved signal.

How is 2D FFT Convolution different from 1D FFT Convolution?

2D FFT Convolution is an extension of 1D FFT Convolution, which is used for one-dimensional signals. In 2D FFT Convolution, both the signal and kernel are two-dimensional, allowing for a more detailed analysis of frequency components in images or other two-dimensional data.

What are the applications of 2D FFT Convolution?

2D FFT Convolution has many applications in image and video processing, such as edge detection, noise reduction, and image enhancement. It is also used in radar and sonar signal processing, medical imaging, and seismic data analysis.

What is the advantage of using 2D FFT Convolution over traditional convolution?

2D FFT Convolution is faster than traditional convolution because it utilizes the FFT algorithm, which has a lower computational complexity. This makes it more efficient for processing large amounts of data, such as images or video frames.

Are there any limitations or drawbacks to using 2D FFT Convolution?

One limitation of 2D FFT Convolution is that it assumes the signal and kernel are infinite in size, which is not always the case in real-world data. Additionally, it is sensitive to boundary effects and can produce artifacts in the convolved signal. Careful preprocessing and padding can help mitigate these issues.

Back
Top