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

Home » Public Forums » archive » Re: Blanking all 5x5 windows with less than X 'on' pixels in them
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: Blanking all 5x5 windows with less than X 'on' pixels in them [message #74541 is a reply to message #74540] Fri, 21 January 2011 02:41 Go to previous messageGo to previous message
Axel Martínez is currently offline  Axel Martínez
Messages: 22
Registered: June 2010
Junior Member
On Jan 21, 10:02 am, Robin Wilson <ro...@rtwilson.com> wrote:
> Hi Chris,
>
> That's great. Yes, your description is correct - that's exactly what I
> want to do.
>
> Cheers,
>
> Robin
>
>> Hi Robin,
>> i have such a vectorised function. Please give more details. Do you
>> want to clean all pixels including the center pixel in a moving
>> window, if the center pixel is below a threshold?
>
>> Cheers
>
>> CR

Hi Robin,

You described the problem in two different ways:
(1) clean the pixel neighborhood if the center pixel is below a
threshold
(2) clean the pixel if the number of neighbors on is below a threshold

I understand that you actually mean case (2). You can try that (I did
not test the code):
kernel_size = 9
threshold = 3.0 / (kernel_size*kernel_size) ;3 pixels on out of a 9x9
neighborhood
Image[WHERE(SMOOTH(image, [kernel_size,kernel_size], /EDGE_TRUNCATE)
LT threshold)] = 0
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FSC_contour & NaN
Next Topic: Making a 64 bit DLM

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

Current Time: Fri Oct 10 01:41:58 PDT 2025

Total time taken to generate the page: 0.79853 seconds