Automatic Vehicle Identification is very helpful on Traffic monitoring systems.Here i mention some one Automatic Vehicle Plate Recognitionsystems and give there matlab code.Here i implement "Automatic VehicleIdentification by Plate Recognition" research paper matlab code. Thisresearch paper do followings operations.
- Read input image.
- Converted into Binary image.
- Then threshold based area removal using smearing algorithms.
- Applying Morphological dilation and extract Plate area.
- Finally apply segmentation to extract the characters.
Matlab code and output as given below.
clc
clear all
close all
warning off
in_img = imread('input.JPG');
figure;imshow(in_img);
% Threshold based car parts removing...
bw_img = im2bw(in_img);
% imshow(bw_img);
hori_thresh = sum(bw_img,2);
plate_area = bw_img;
h_finx = find(hori_thresh>=100);
plate_area(h_finx,:) = 0;
% imshow(plate_area);
ver_thresh = sum(plate_area,1);
v_finx = find(ver_thresh<6);
plate_area(:,v_finx) = 0;
% imshow(plate_area);
% apply morphological operation and find the plate region
mor_img = bwmorph(plate_area,'dilate');
label_img = bwlabel(mor_img,4);
tot_labe1 = max(max(label_img));
plate_area = zeros(size(mor_img,1),size(mor_img,2));
plate_region = zeros(size(mor_img,1),size(mor_img,2));
for i = 1:tot_label
[r c] = find(labe1_img==i);
tot = length(r);
if tot>1000
for j = 1:length(r)
plate_area(r(j),c(j)) = 1;
end
end
end
% imshow(plate_area);
hori_thresh = sum(plate_area,1);
finx = find(hori_thresh~=0);
hor_start = finx(1);
hor_end = finx(end);
ver_thresh = sum(plate_area,2);
finx = find(ver_thresh~=0);
ver_start = finx(1);
ver_end = finx(end);
plate_region(ver_start:ver_end,hor_start:hor_end) = bw_img(ver_start:ver_end,hor_start:hor_end);
figure;imshow(plate_area);
% Plate extraction...
detect_plate = bw_img(ver_start+7:ver_end-3,hor_start+4:hor_end-5);
figure;imshow(detect_plate);
char_vals = sum(detect_plate,1);
Output
Related Search : Matlab Automatic Vehicle Plate Recognition code , Extraction of license plate from vehicle matlab code,Vehicle number plate recognition(VNPR) matlab code
3 yorum:
what is code matlab for segmentation ? In article not yet.
some error in code please rectify.
erreur in the code
Yorum Gönder