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 #74551 is a reply to message #74550] Thu, 20 January 2011 11:31 Go to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On 1/20/11 2:19 PM, Robin Wilson wrote:
> Hi,
>
> I've got a binary image and I want to clean it up a bit by removing all
> pixels (or small groups of pixels) which are surrounded by a lot of space.
>
> I can easily write code using CONVOL to tell me how many pixels were
> 'on' in that window, but I can't see an easy (and fast) way of blanking
> (as in, setting all the pixels to zero) in any windows where the CONVOL
> function has given a value greater than X.
>
> I can think of a way to do it in a loop (looping over all of the points
> that CONVOL found which were greater than X and then constructing 5x5
> windows around them), but there must be a proper 'IDL Way'. Any ideas?
>
> Robin

Hi,

Have you looked at MORPH_OPEN? I think it would be a good place to start.

Cheers,
Ben
[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 12:24:54 PDT 2025

Total time taken to generate the page: 1.59935 seconds