comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » creating a 2D mask for image filtering
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: creating a 2D mask for image filtering [message #83343 is a reply to message #77290] Wed, 20 February 2013 11:26 Go to previous messageGo to previous message
orifox2003 is currently offline  orifox2003
Messages: 2
Registered: February 2013
Junior Member
On Thursday, 18 August 2011 10:50:18 UTC-4, Dave Higgins wrote:
> Yes, you're right of course.
> I am actually already working in the frequency domain, but have named my test data set badly!
>
> image = DIST(512)
> ought to have been defined
> test_k_data = DIST(512)
>
> and so on from there.
>
> Dave Higgins

Hi guys,

Not sure if this post is still active, but I have a couple follow-up questions.
I'm trying to deconvolve an astronomical image by the telescope's PSF (PSF_tele) and then convolve by a gaussian (PSF_gauss). This is all done in fourier space, so the code looks something like this:

xx = fft(psf_guass)
yy = fft(psf_tele)
fftratio=xx/yy
s = Size(fftratio, /Dimensions)
hf = Hanning(s[0], s[1], ALPHA=0.5)
maxRadius = Min(s)/2
TVCircle, maxRadius*0.8, s[0]/2-1., s[1]/2-1., COLOR=1, /FILL
circleMask = TVRD()
indices = Where(circleMask EQ 1)
hf[indices] = 1
hf=smooth(hf,50,/edge_truncate)
kernel = fft(xx/yy*hf,/inverse)

The problem is that the resulting image has significant ringing to it. I will try to attach some images of the original PSF's and resulting image below. The images are named accordingly.

/Users/ofox/Desktop/before_after.jpg
/Users/ofox/Desktop/xx_divide_yy_times_hfilter.tiff
/Users/ofox/Desktop/hfilter.tiff
/Users/ofox/Desktop/xx_divide_yy.tiff

Thanks,
Ori
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Integration
Next Topic: Storing data in an array inside a structure MUCH slower in IDL 8.2.2

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 10:38:26 PDT 2025

Total time taken to generate the page: 0.00551 seconds