Login  Register

Re: Convolution of Arrays

Posted by ctrueden on Nov 17, 2014; 11:12pm
URL: http://imagej.273.s1.nabble.com/Convolution-of-Arrays-tp5010371p5010506.html

Hi Greg,

> Does anyone have any bright ideas as to how I can convolve two
> functions together?

You might also find the ImgLib2 library useful. See the ImgLib2 Tutorials
for relevant examples.

http://imagej.net/ImgLib2_Examples
http://imagej.net/ImgLib2_Examples#Example_6b_-_Convolution_in_Fourier_space

Regards,
Curtis

On Tue, Nov 11, 2014 at 5:10 AM, Michael Schmid <[hidden email]>
wrote:

> Hi Greg,
>
> hmm, having the full FFT/FD math functionality for 1D arrays would be
> quite a bit of work.
>
> Why not do the convolution without the FFT, point by point?
>   http://en.wikipedia.org/wiki/Convolution#Discrete_convolution
>
> Typically, 1D arrays don't have millions of points, so the computing time
> is not as much an issue as for 2D images.
> Also, when doing it directly without FFT, you have more choices for how to
> treat the boundaries; having periodic repetition or not, dividing by the
> length of the overlap in case of no periodic boundary conditions, using
> windowing functions for the overlap area, etc. If desired, you can easily
> have periodic boundary conditions with an array length that is not a power
> of 2. Just a lot of flexibility that you will never get from the FFT
> approach.
>
> Michael
> ________________________________________________________________
> On Nov 11, 2014, at 11:59, Gregory James wrote:
>
> > Dear ImageJ community,
> >
> > I would like to convolve two functions together. My data are in two 1-D
> arrays. I was very excited with the recent introduction of the
> 'Array.fourier' function. Thank you to the ImageJ administrators for this.
> >
> > The problem I'm having is that I can perform the multiplication in
> Fourier space to do the convolution but then I can not transform the result
> back into real space. Are there any plans to introduce an inverse function
> to 'Array.fourier'?
> >
> > I've also tried representing my 1-D arrays as images then using the FFT
> functionality, but this doesn't seem to be working.
> >
> > Does anyone have any bright ideas as to how I can convolve two functions
> together?
> >
> > Thank you very much,
> >
> > Greg.
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html