Code covered by the BSD License  

Highlights from
Remove ghosts from binarized images

image thumbnail

Remove ghosts from binarized images

by

 

17 May 2013 (Updated )

This method removes speckles in the binarized images.

deghostDemo.m
% Deghost demo

image = imread('testimage.png');
image = rgb2gray(image);

bw = bradley(image, [35 35]);
bw2 = deghost(image, bw, 8, 4, 0.042);

imshow([mat2gray(image), bw, bw2]);

h=text(110 ,15 ,'Original');
set(h,'FontSize',20, 'Color', [1,0,0], 'BackgroundColor', [1 1 1])

h=text(380 ,15 ,'Bradley binarization');
set(h,'FontSize',20, 'Color', [1,0,0], 'BackgroundColor', [1 1 1])

h=text(690 ,15 ,'Without ghosts');
set(h,'FontSize',20, 'Color', [1,0,0], 'BackgroundColor', [1 1 1])

Contact us