Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

deleting noise from eye retina

I have a gray image with noise. I am new in deleting noise from an image so I don't know the type of noise and how I can remove it from image. My aim is to convert image to binary mode by using local threshold after removing the noise.

Is there anybody who has any idea about type of noise and has a method to remove this noise?

The image:

enter image description here

like image 978
ffttyy Avatar asked Dec 15 '22 18:12

ffttyy


1 Answers

Typically in microscopy noise comes from 2 sources:

1) Gaussian/electronic noise

This type of noise come from the fluctuations in the detector due to quantum effects in the electronics. It is randomly generated and follows a gaussian distribution. Therefore in that case using a gaussian filter might be optimal to remove it.

2) Shot noise

Photons arriving at the detector are converted to electric signal through the photoelectric effect, and the fluctuations in the number of photons arriving at the detector create shot noise, which you can hardly eliminate and is usually predominant during acquisition. It follows a Poisson distribution which looks like a Gaussian, so in this case a gaussian filter might be the appropriate as well.

So to come back to your question, it does look like a gaussian filter would be the most intuitive choice, although an average filter could be used as well. Here is a sample code that you could try and play around with:

clear
close all
clc

A = imread('http://i.stack.imgur.com/IlqAi.jpg');

BW = im2bw(A,.9); %//Treshold image

h = fspecial('gaussian', [5 5],.8); %// Create gaussian filter

BW2 = imfilter(BW,h); %// Apply filter

imshow(BW2); %// Display image

which results in the following:

enter image description here

You can change the filter parameters (i.e. the size of the kernel and the sigma value) and see how they affect the outcome. Here are other filters you can use as well:

Median:

    BW2 = medfilt2(BW,[3 3]); %// Median filter

or average:

    h = fspecial('average', 3) %//average filter
   BW2 = imfilter(BW,h);

You might be interested in this link on the Mathworks website that talks about removing noise in images. Hope that helps!

like image 59
Benoit_11 Avatar answered Dec 26 '22 13:12

Benoit_11