[Insight-users] Morphology filters
Nirupam Sarkar
nirupam_us at yahoo.com
Wed Nov 3 20:45:09 EDT 2010
First of all you should not use .png image. A binary image should be binary (not
gray), even if you find the image have gray values at the boundary you might do
a thresholding or adaptive binarization. That will give a clear and good binary
image.
Binary morphology operations philosophically different from grayscale
morphology. You would get a disastrous output if you intention does not match
technology used.
I have used binary erosion in MATLAB, wrote own C/C++ code, I never had problem.
Thank you,
Nirupam
----- Original Message ----
From: Richard Beare <richard.beare at gmail.com>
To: David Doria <daviddoria at gmail.com>
Cc: ITK <insight-users at itk.org>
Sent: Wed, November 3, 2010 7:58:36 PM
Subject: Re: [Insight-users] Morphology filters
If there was a standard definition of what was binary then maybe. I
try to stick to 1 and 0, but plenty of people use 255 and 0. The
filter is set up to erode a mask defined by the foreground value you
set and treat everything else as background. This is handy in some
situations, but obviously causes problems in others.
On Thu, Nov 4, 2010 at 10:52 AM, David Doria <daviddoria at gmail.com> wrote:
> On Wed, Nov 3, 2010 at 7:40 PM, Richard Beare <richard.beare at gmail.com>
> wrote:
>>
>> That image isn't a "pure" binary one (at least plotting profiles
>> across the edge suggests that there are other values), so there is
>> probably some antialiasing going on around the edges. You could verify
>> this by thresholding.
>>
>> You could do a greyscale erosion instead - it should look more natural.
>>
>> At the moment the values that are close to 255 are being left
>> untouched, leaving the speckle.
>
> Ah, I see it now. I thought (assumed) it was actually a binary image.
> Another case of "you know what happens when you assume...". Should the
> filter report an error (or at least a warning) if the input image is not
> binary?
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list