How to remove lines as noises from license plate without disturbing the attributes of character and perform vertical projection.

3 views (last 30 days)
Hello Everyone,
I am newbie here and working on character recognition of license plate. For my initial case I am using a simple image having less amount of distortion or noises. I want to detect peaks of each characters for my further work. I have done some pre-processing methods and here I am attaching two binary images. In 1st there are few lines remaining as noise but the characters appearance is safe while in the 2nd picture these lines are removed but also disturbed the attributes of characters ( I have given explanation in the code for both the pictures)
I need some help so that I can remove all those lines as noises without disturbing the body of every character. Secondly I need suggestions that how can I apply vertical projection on complicated images ( also attached here)
Thanks in advance. Kind Regards.
clc
<<
>>
close all
cd('C:\Users\WAQAR-xjtu\Desktop\work\my international plate on going'); %-----
myFolder = 'C:\Users\WAQAR-xjtu\Desktop\work\my international plate on going'; %------
[file,path]=uigetfile({'*.jpg;*.bmp;*.png;*.tif'},'Choose an image'); %-----
I= imread(fullfile(path,file)); imshow(I) impixelregion title('Original Image')
[m,n,z]=size(I); if z==3 I2=rgb2gray(I); %I2=im2bw(I,0.9) else I2=I; end figure imshow(I2) impixelregion title('BINARIZED'); %% to perform canny edge detection---- I4=edge(I2,'canny'); figure imshow(I4) impixelregion title('canny edge detection'); %-----
picture1=bwareaopen(BW3,500); %those things that have less than 500 pixels are removed ie excluding nmbr plate-----
figure imshow(picture1) title('THIS PART WILL BE subtracted'); %------
picture2=I4-picture1; figure imshow(picture2) title('after subtraction') %-----
picture2=bwareaopen(picture2,100); % numbers are alright but there are few lines remaining as noise---
figure imshow(picture2) title('numbers are alright but there are few lines') %----
picture3=bwareaopen(picture2,200); %Lines are removed but '0' and '6' are disturbed-----
figure imshow(picture3) title('Lines are removed but 0 and 6 are disturbed')

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!