How can I have a Noise Reduction code that works in Signature Images??

Hi! Below are the following codes which goes from Image Acquisition upto Noise Reduction. However, the code/process in which I remove the unwanted pixels seems to be changing every time a different image is fed as an input. As you may know Signature Verification System should accept images of Signatures and does not care whether it is in good quality or not. Can anyone help me to have my code to be more robust? Thanks in advance!
a = imread('sample.jpg');
b = rgb2gray(a);
c = imcomplement(imbinarize(b,'adaptive','ForegroundPolarity','dark','Sensitivity',0.5));
d = bwlabel(c,8);
stats = regionprops(d,'Orientation','Area','PixelIdxList');
count = [stats(:).Area] ; % a vector with count for each region
sel = count>10000 & count<100000; %find the optimum %grain filter
e = false( size( d ) );
e( vertcat( stats(sel).PixelIdxList ) ) = true;
figure,imshow(a)
figure,imshow(b)
figure,imshow(c)
figure,imshow(e)

Risposte (1)

use weighted median filter
https://in.mathworks.com/matlabcentral/fileexchange/56682-weighted-median-filt-image-

Richiesto:

il 4 Nov 2017

Risposto:

il 11 Nov 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by