Home »
Public Forums »
archive »
Blanking all 5x5 windows with less than X 'on' pixels in them
Blanking all 5x5 windows with less than X 'on' pixels in them [message #74554] |
Thu, 20 January 2011 11:19 |
Robin Wilson
Messages: 40 Registered: August 2010
|
Member |
|
|
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
|
|
|
Current Time: Wed Oct 08 19:36:23 PDT 2025
Total time taken to generate the page: 0.00449 seconds