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 #83342 is a reply to message #77215] Wed, 20 February 2013 11:30 Go to previous message
orifox2003 is currently offline  orifox2003
Messages: 2
Registered: February 2013
Junior Member
On Wednesday, 20 February 2013 14:26:32 UTC-5, orifo...@gmail.com wrote:
> 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

Sorry, no success with adding the pictures. Doesn't seem to work.
[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: Fri Oct 10 10:24:16 PDT 2025

Total time taken to generate the page: 0.08484 seconds