# Circular convolution to Linear convolution.

Started by April 2, 2008
```Hi,
I am new to this programming world, and i really need some serious help.
I have done a program in which i design a filter in frequency domain, then
i take a CT image, which is a 3d image, read each voxel and make a 1d
array. then i equal the number of samples for both the data set. so i have
equal samples. then i do convolution using fftw3 library. but what happens
is that i am doing circular convolution, I want help to do this as a
any other data you need please let me know.

thank you.

```
```usual process of getting the effect of linear convolution.

if x is data and h is filter

M = data length
N = filter length

then zero pad x with N-1 zeros
zero pad h with M-1 zeros

perform FFT of both x and h with length >= M+N-1

do multiplication in complex domain to get the effect of filter.

perform IFFT and get back y(n)

hope this helps,

regards
bharat pathak

Arithos Designs
www.Arithos.com

%--- DSP design consultancy and training company ------------

>Hi,
> I am new to this programming world, and i really need some serious
help.
>I have done a program in which i design a filter in frequency domain,
then
>i take a CT image, which is a 3d image, read each voxel and make a 1d
>array. then i equal the number of samples for both the data set. so i
have
>equal samples. then i do convolution using fftw3 library. but what
happens
>is that i am doing circular convolution, I want help to do this as a