help-octave
[Top][All Lists]

## Re: Convolve and Deconvolve not working right??

 From: Robert A. Macy Subject: Re: Convolve and Deconvolve not working right?? Date: Mon, 26 Mar 2007 11:58:47 -0700

```I didn't say that gt should have an area equal to 1.  It
should have an area equal to its area, and being an impulse
function [area==1] convolved with a 'spreading' function
will ALWAYS produce an area larger than 1.

I said that the 'magical' function that is used to convolve
with a smoothed function, removing the smoothing, should
have an area of 1.  Just a weird shape.

Robert

On Mon, 26 Mar 2007 19:24:39 +0200
> Well, I can answer the normalization question:
>
> No, it shouldnt. sum(gt)~25, 1/sum(gt) ~ 0.4. Normalize
> the gaussian  first. Other than that, the problem is
> probably what miroslav said:  deconvolution gets unstable
> under circumstances, which is not so  surprising,
> otherwise sharpening of blured signals would be a piece
>  of cake given the right blur model. When you do fft
> division like  that you will have lots of division by
> near-zero where the spectrum  is near empty. Yout can
> avoid that by making your response function  not a dirac
> pulse but a gaussian again, trading stability to a bit of
>  blur.
>
> Daniel
>
> Am 26.03.2007 um 06:58 schrieb Robert A. Macy:
>
> > for gaussian curve...
> >>> x=(-50:50);
> >>> gt=exp( -(x.*x/200) );
> > which makes a nice shape
> >>> gf=fft(gt);
> >
> > and for dirac
> >>> dt=zeros(1,101);dt(51)=1;
> >>> df=fft(dt);
> >
> > then the spectrum of my magical form should be
> >>> rf=df./gf;rt=ifft(rf);
> > note rt comes back only real terms as expected
> > inspection looks about right.
> >
> > but I think sum(rt) should equal 1, but is always
> .03...
> > so that's not right.
>

```