Re: [SIP-devel] images fft + contrib mkfftfilter
Advanced image processing toolbox for Scilab on Unix/Linux/Mac OS
Status: Beta
Brought to you by:
ricardofabbri
From: DRUEL J. <joc...@li...> - 2003-09-05 09:38:53
|
Le Jeudi 4 Septembre 2003 14:17, vous avez écrit : > On Tue, 2 Sep 2003, DRUEL Jocelyn wrote: > > > spectrum = abs(IM).*conj(IM) > > > > I suppose you mean: spectrum=real(IM.*conj(IM)) > > OPS, sorry, > not even "real" is needed. > spectrum=IM.*conj(IM) already gives a real power spectrum > In theory...but Scilab still considers the spectrum matrix as imaginary: imshow(spectrum,[]) does not work. So, I think that the "real" is compulsory. I suggest the following contribution which is named mkfftfilter: in order to ease this type of spectrum filtering, the function returns commonly used transfert functions. The filtering is made in 3 or 4 lines: image=gray_imread(SIPDIR+'images/ararauna.jpg'); IM=fft(image,-1); h=mkfftfilter(image,'butterworth',20); IM2=IM.*fftshift(h);//spectrum modification im2=real(fft(IM2,1)); Done... I hope it could be a good introduction to spectrum filtering. Best regards Jocelyn -- Powered by Linux |