Re: filling in gaps in an image [message #77924] |
Mon, 17 October 2011 23:25  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
On Oct 18, 3:30 am, David Fanning <n...@dfanning.com> wrote:
> desertdryad writes:
>> I'm working on some image processing, and I have a problem I'm a bit
>> stumped on what is the best way to solve it. I'm working on masking
>> images that have both clouds and shadows. I can mostly mask both,
>> using some automated methods, but my methods leave gaps of several
>> pixels between where the cloud ends and its shadow begins that I want
>> to make be part of the mask; also, there are some small holes within
>> the clouds that I would like to become mask pixels. If I try using
>> anything like DILATE or MORPH_CLOSE, it seems to wreck havoc on my
>> entire image overall; an effect I do not want, no matter if I use a
>> small (or large) kernel. I really only want to perform the filling
>> operation on certain regions of the image (where the clouds are!) but
>> I can't seem to use these built in IDL functions in that manner.
>> Any other ideas for me?
>
> You need to try something like MORPH_CLOSE, which performs
> a closing, followed by a dilation and shouldn't affect
> the overall features in the image. It will simply close
> these small holes.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Look at Mort Canty's book you will find good solution for that!
Cheers,
Dave
|
|
|