Re: Question on despckle relative big speckle in grayscale image



On Aug 25, 8:39 pm, ImageAnalyst <imageanal...@xxxxxxxxxxxxxx> wrote:
On Aug 25, 10:58 am, xhm <xhm2...@xxxxxxxxxxx> wrote:

On Aug 25, 10:39 am, aruzinsky <aruzin...@xxxxxxxxxxxxxxxxxxxx> wrote:

On Aug 24, 9:17 pm, xhm <xhm2...@xxxxxxxxxxx> wrote:

Hi:

I have a grayscale image that need to be de-noised. The image has
small yet relatively big dark circular noise and bright speckles that
need to be removed. Please see one sample noise image below:

http://picasaweb.google.com/xhm2001/UntitledAlbum#

Notice that the dark relatively big spot on the image and the white
small speckle are noise are like to be removed.

I have tried to use median filter (many times with varies window size
from 5x5 and up to 21x21) to remove them, and it worked fine on
removing the bright speckle but not the relatively big dark spot
noise.

I then tried to apply erosion first, and then dilation 3 times to
remove both of them using a disk structure element of size 5. It looks
like the bright speckle and dark noise spots were removed after those
steps, but unfortunately, the processed image shown disk shaped
structure across the image. If I then used an average filter to smooth
it, the image was blurred.

I also tried to apply dilation first, and then use that as a marker
and the original image as mask for morphological reconstruction, but
Matlab's imreconstruct returned me errors; and it can only allow image
after erosion rather than dilation as a marker. If I used erosion
image as marker for the imreconstruct, then the dark spot noise is
still presented after the reconstruction.

By the way, close operation alone didn't work either.

Any help on this either on how to remove the big dark noise; and/or
how to smooth the disk structure shaped image after erosion and
dilation; and or suggestions on a more suitable structure element and
its sizes will be greatly appreciated;.

xhm

I see no signal in your image.  Usually the goal is to maximize signal
to noise ratio, but since you have no signal, just set the luminance
of all pixels to the average of the entire image.

Thanks for the help, Aruzinsky. I have signal (object) which will be
big dark spot, but it just didn't shown on the sample image.

Can you suggest me how to remove the relatively big dark spot  or how
to remove the effect of structure element shown on the processed
image  like I've mentioned in my first post?

Thanks again.-

---------------------------------------------------------------------------------------------------------
So is there any reason why you decided to give us only an image of
background and bright & dark noise, and not give us an image with
actual dark signal spots in it?

I tackled a problem like this a few years ago.  Like Martin said,
practically no matter what you do, you're going to get artifacts.  But
what I was doing was to try to get rid of scratched and smudges in
what was supposed to be a uniform white background image (of a
uniformly white Macbeth ***).  The only fall off was due to
vignetting, as you'd expect, and that was very slowly varying.  Any
small noise was due to video noise (which a median filter could have
handled) or due to smudges and scratches.  The smudges and scratches
could be any size so doing some kind of windowing type of operation
(spatial filtering, morphology) wouldn't work without horrible
artifacts (which occurred if you would use a window large enough to
get the very large smudges).  What I did was to do modeling of the
background with a smooth function.  I fit the background to a
biquadratic or something like that.  You could do some preprocessing
if you wanted so that you aren't including the obvious big dark
smudges in the points used to do the quadratic regression and that
might improve the model somewhat.  But then if you subtract the actual
image from the smooth modeled synthetic image I created, you'd get
just the "noise" -- the video noise and the scratches/smudges.  It
worked for a great range of dark smudge sizes.  The modeled image was
what I defined as my "perfect background."  It might work for you.
Good luck,
ImageAnalyst

Thanks a lot again for the help, ImageAnalyst.

I understand majority of your answer which is very helpful, but not so
clear on the below:

But then if you subtract the actual
image from the smooth modeled synthetic image I created, you'd get
just the "noise" -- the video noise and the scratches/smudges. It
worked for a great range of dark smudge sizes.

What I want to remove is the small dark spot and bright speckle, like
the video noise and the scratches/smudges, but I also like to keep the
big dark spot which is the object. If I do modeling on the background,
and then subtract the modeled perfect background from the actual
image, then what I will get will be the noise i.e., small dark spot,
bright speckle, and the object i.e. big dark spot. How can I keep the
object (in my case big dark spot, in your case, objects different from
video noise and the scratches/smudges) but remove the noise by
background modeling? because the "perfect" model background is a
smooth background?

Can you please help clarify again?

Thanks again.


.


Quantcast