Re: Remove speckles in bilevel (bw) image
- From: "Jens Dierks" <me@xxxxxxxxxxx>
- Date: Wed, 17 Jun 2009 17:52:20 +0200
Laurent S. wrote:
Thanks for the 'heads-up'. Turkel offers a wealth of
material in .../notes/...
Yes, thanks for the hint.
I do not understand exactly what Turkel is proposing here. Is the group 'a' the pixels in the 'X shaped' subarea
And is group 'b' similarly the '+ shaped' subarea?
Thats what i think.
If so, we
presumably are required to take the median value of group 'a'
and also that of of group 'b'. But then what's to do?
And then the median from this two values plus the center value
becomes the new value, but i am also not really shure.
This way, the result for bw_04 would be:
Because it erases very much, here is a version with a center weight
of 3 for Group A and B:
Sounds like the features we want.
Maybe i misinterprated the paper, because it is somewhat unclear,
but i made also a very easy function, that looks in the 8 directions
from the center pixel and counts how many pixels have the same
value as the center and if so, one more pixel in this direction is taken
If the amount is at least 3, including the center pixel, the value stays,
otherwise it changes (so this function makes only sense for 2 level
http://freenet-homepage.de/JDierks/tmp/bw_04_least3.png And 2 iterations of it:
For comparison here are the results for a 3x3 Median with a center
weight of 5, that should come close to the gaussian07 weighted
And 2 iterations:
It erases more values from the tips of the letters.
Is this (once understood) trivial to program within MATLAB? As ImageAnalyst's recipe is!
Cant tell you really, because i dont use matlab. But it should be
not very complicated.