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

Home » Public Forums » archive » Re: kernel convolution?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: kernel convolution? [message #49512] Mon, 31 July 2006 08:45
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
edward.s.meinel@aero.org wrote:
> No, a high-cut filter won't work. If you look at the FFT of a single
> star (star-->point-spread function, FFT(star)--> modulation transfer
> function), you will see that it contains information in ALL
> frequencies.

True; the best you can do by that method is to signficantly reduce and
spread out the brightness of the stars, not eliminate them entirely.

> Here's a couple of ways to remove stars:
>
> 1) determine the centroid of each star and subtract the appropriately
> weighted point-spread function.

Small statistical variations between the image and the best-fit
point-spread function will remain after performing such a subtraction.
Because the star is a bright source against a dark background, those
small residuals might be much brighter than the remaining background,
and unlike the low-frequency components left over from the high-cut
filter, they will be tightly centered around the original location of
the star. I can't say from personal experience whether those residuals
are a bigger problem than the residual low-frequency terms after using
a high-cut filter.

> or
> 2) apply a median window filter with a width of about twice the width
> of the star.

That sounds like it should work. You'll still pick up any long tails of
the PSF, but with a sufficiently large window, that should be a very
small effect.
Re: kernel convolution? [message #49513 is a reply to message #49512] Mon, 31 July 2006 07:51 Go to previous message
edward.s.meinel@aero. is currently offline  edward.s.meinel@aero.
Messages: 52
Registered: February 2005
Member
No, a high-cut filter won't work. If you look at the FFT of a single
star (star-->point-spread function, FFT(star)--> modulation transfer
function), you will see that it contains information in ALL
frequencies.

Here's a couple of ways to remove stars:

1) determine the centroid of each star and subtract the appropriately
weighted point-spread function.
or
2) apply a median window filter with a width of about twice the width
of the star.
Re: kernel convolution? [message #49527 is a reply to message #49513] Fri, 28 July 2006 14:09 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
adisn123@yahoo.com wrote:
> Hello,
>
> I tried FFT(discrete fast fourier transform) on my spcial image and
> used several different kinds of filtering application.
>
> What I wanted FFT to do was that FFT removes both very low frequency
> and high frequencies.
>
> I thought if I do this filtering with FFT, that I could get rid of
> stars in my images, but
> actually it turned out to be it does not, but rather reduce the
> intensity.
>
> In my understanding, it is because FFT does fourier transform pixel by
> pixel, thus if a star
> lies on several pixels, say 5 x 5, FFT of this would give both medium
> high freuqency around the star
> edge and very high frequency at the center of the star. Thus, removing
> low and high frequencies using filter would reduce the center intensity
> of the star, but still it would give me the residuals of the star.

I can't see any benefit from removing the low frequencies. However,
removing the high frequencies should do the job quite nicely, if you do
it right. If your imaging system spreads a point source like a star
over an 5x5 pixel area, and your images are 500x500, the ratio of those
two size scales is 100. Therefore, removing all frequency components
above 50 should do the job. I would guess that you weren't filtering
the right frequencies; the frequencies you're removing with the low
frequency portion of your filter may in fact be the only ones you want
to keep.

> So, I'm thinking some other method such as kernel convolution (CONV
> function in IDL).
> I'm not sure how this works exatly. If some one know about this or
> other possible method that I can choose, please reply me.

Convolution can be used to smooth out an image, but that would replace
each star with a smeared-out version of itself. Re-binning to a lower
resolution would achieve a similar result, and would be significantly
faster. If you want to actually remove the stars, filtering out the
high frequencies should work better.
Re: kernel convolution? [message #49528 is a reply to message #49527] Fri, 28 July 2006 13:07 Go to previous message
adisn123 is currently offline  adisn123
Messages: 44
Registered: July 2006
Member
Thanks Tom.

It sounds terrific. I didn't know what function in IDL does the job.
If that function does a fair job fining the stars, then problems are
solved!

Tom S. wrote:
> I'm not sure if this is applicable to your particular image, but you
> might find this useful:
>
> You may be able to use the MORPH_HITORMISS function to identify all of
> the stars. See the example in IDL's help entitled "selecting specific
> image objects." There's also a demo that does this.
>
> Once you've identified all of the stars you can probably remove them
> fairly easily by dilating the resulting binary hit structure image and
> then setting the corresponding regions in the original image to zero or
> some average of the neighboring pixels.
>
> Regards,
> Tom
Re: kernel convolution? [message #49529 is a reply to message #49528] Fri, 28 July 2006 12:54 Go to previous message
Tom S. is currently offline  Tom S.
Messages: 9
Registered: June 2006
Junior Member
I'm not sure if this is applicable to your particular image, but you
might find this useful:

You may be able to use the MORPH_HITORMISS function to identify all of
the stars. See the example in IDL's help entitled "selecting specific
image objects." There's also a demo that does this.

Once you've identified all of the stars you can probably remove them
fairly easily by dilating the resulting binary hit structure image and
then setting the corresponding regions in the original image to zero or
some average of the neighboring pixels.

Regards,
Tom
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Which event model?
Next Topic: Re: rotation matching of 2D images

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

Current Time: Wed Oct 08 11:36:05 PDT 2025

Total time taken to generate the page: 0.00768 seconds