Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1005 Bytes

Text_Noise_Morphology.md

File metadata and controls

49 lines (33 loc) · 1005 Bytes

Text Denoising using Morphology in MatLab

This answer for this Question in StackOverflow.


How to Denoise text in Matlab

Morhpological Closing Theory Link

Input Image

Morpho closing Image source


Matlab Code

% Read Image
img = imread('Noisy_Text.jpg');

% Structuring Element
SE=zeros(3,3);
SE(1,1)=1;
SE(1,3)=1;
SE(2,2)=1;
SE(3,1)=1;
SE(3,3)=1;

% Morphological Closing
Imdilte=imclose(img,SE);

% Plot the Results
figure();
subplot(1,2,1);
imshow(Imdilte)
subplot(1,2,2);
imshow(img);

Result

Input Image

Result Image