91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

matlab車牌識別程序,對采集到的車牌圖像進行預處理,車牌定位,字符分割,字符識別并最終輸出匹配車牌字符

資源截圖

代碼片段和文件信息

clear
close?all;??%Step1?獲取圖像???裝入待處理彩色圖像并顯示原始圖像
Scolor?=?imread(‘car.jpg‘);%imread函數讀取圖像文件?%將彩色圖像轉換為黑白并顯示
Sgray?=?rgb2gray(Scolor);%rgb2gray轉換成灰度圖
figureimshow(Scolor)title(‘原始彩色圖像‘);%figure命令同時顯示兩幅圖
figureimshow(Sgray)title(‘原始黑白圖像‘);??%Step2?圖像預處理???對Sgray?原始黑白圖像進行開操作得到圖像背景
s=strel(‘disk‘15);%strel函數
Bgray=imopen(Sgrays);%打開sgray?s圖像
figureimshow(Bgray);title(‘背景圖像‘);%輸出背景圖像?%用原始圖像與背景圖像作減法,增強圖像
Egray=imsubtract(SgrayBgray);%兩幅圖相減
figureimshow(Egray);title(‘增強黑白圖像‘);%輸出黑白圖像?%Step3?取得最佳閾值,將圖像二值化
fmax1=double(max(max(Egray)));%egray的最大值并輸出雙精度型
fmin1=double(min(min(Egray)));%egray的最小值并輸出雙精度型
level=(fmax1-(fmax1-fmin1)/3)/255;%獲得最佳閾值
bw22=im2bw(Egraylevel);%轉換圖像為二進制圖像
bw2=double(bw22);??%Step4?對得到二值圖像作開閉操作進行濾波
figureimshow(bw2);
title(‘圖像二值化‘);%得到二值圖像
grd=edge(bw2‘canny‘)%用canny算子識別強度圖像中的邊界
figureimshow(grd);
title(‘圖像邊緣提取‘);%輸出圖像邊緣
bg1=imclose(grdstrel(‘rectangle‘[519]));%取矩形框的閉運算
figureimshow(bg1);
title(‘圖像閉運算[519]‘);%輸出閉運算的圖像
%?bg3=imopen(bg1strel(‘rectangle‘[519]));%取矩形框的開運算
%?figureimshow(bg3);
%?title(‘圖像開運算[519]‘);%輸出開運算的圖像
%?bg2=imopen(bg3strel(‘rectangle‘[191]));%取矩形框的開運算
%?figureimshow(bg2);
%?title(‘圖像開運算[191]‘);%輸出開運算的圖像?%Step5?對二值圖像進行區域提取,并計算區域特征參數。進行區域特征參數比較,提取車牌區域
[Lnum]?=?bwlabel(bg18);%標注二進制圖像中已連接的部分
Feastats?=?regionprops(L‘basic‘);%計算圖像區域的特征尺寸
Area=[Feastats.Area];%區域面積
BoundingBox=[Feastats.BoundingBox];%[x?y?width?height]車牌框架大小
RGB?=?label2rgb(L?‘spring‘?‘k‘?‘shuffle‘);?%標志圖像向RGB圖像轉換
figureimshow(RGB);title(‘圖像彩色標記‘);%輸出框架的彩色圖像
lx=0;?
for?l=1:num
????width=BoundingBox((l-1)*4+3);%框架寬度的計算
????hight=BoundingBox((l-1)*4+4);%框架高度的計算
????if?(width>50?&?width<160?&?hight>25?&?hight<50)%框架的寬度和高度的范圍??????????
????????lx=lx+1;
????????Getok(lx)=l;
????end
end
for?k=?1:lx
????l=Getok(k);
????startcol=BoundingBox((l-1)*4+1)-2;%開始列
????startrow=BoundingBox((l-1)*4+2)-2;%開始行
????width=BoundingBox((l-1)*4+3)+8;%車牌寬
????hight=BoundingBox((l-1)*4+4)+2;%車牌高
????rato=width/hight;%計算車牌長寬比
????if?rato>2?&?rato<4
????????break;
????end
end
sbw1=bw2(startrow:startrow+hightstartcol:startcol+width-1);?%獲取車牌二值子圖
subcol1=Sgray(startrow:startrow+hightstartcol:startcol+width-1);%獲取車牌灰度子圖??figuresubplot(211)imshow(subcol1);
title(‘車牌灰度子圖‘);%輸出灰度圖
subplot(212)imshow(sbw1);
title(‘車牌二值子圖‘);%輸出車牌的二值圖??%Step6?計算車牌水平投影,并對水平投影進行峰谷分析
histcol1=sum(sbw1);??????%計算垂直投影
histrow=sum(sbw1‘);??????%計算水平投影
figuresubplot(211)bar(histcol1);
title(‘垂直投影(含邊框)‘);%輸出垂直投影
subplot(212)bar(histrow);
title(‘水平投影(含邊框)‘);%輸出水平投影
figuresubplot(211)bar(histrow);
title(‘水平投影(含邊框)‘);%輸出水平投影
subplot(212)imshow(sbw1);
title(‘車牌二值子圖‘);%輸出二值圖?%對水平投影進行峰谷分析
meanrow=mean(histrow);%求水平投影的平均值
minrow=min(histrow);%求水平投影的最小值
levelrow=(meanrow+minrow)/2;%求水平投影的平均值
count1=0;?l=1;
for?k=1:hight
????if?histrow(k)<=levelrow
????????count1=count1+1;
????else?if?count1>=1
????????????markrow(l)=k;%上升點
????????????markrow1(l)=count1;%谷寬度(下降點至下一個上升點)
????????????l=l+1;

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????834??2015-05-29?13:06??CarLicenseDetection\1.jpg

?????文件????????750??2015-05-29?13:06??CarLicenseDetection\2.jpg

?????文件????????684??2015-05-29?13:06??CarLicenseDetection\3.jpg

?????文件???????8953??2015-04-24?15:45??CarLicenseDetection\33.jpg

?????文件????????697??2015-05-29?13:06??CarLicenseDetection\4.jpg

?????文件????????825??2015-05-29?13:06??CarLicenseDetection\5.jpg

?????文件????????864??2015-05-29?13:06??CarLicenseDetection\6.jpg

?????文件????????835??2015-05-29?13:06??CarLicenseDetection\7.jpg

?????文件???????6042??2015-05-29?13:06??CarLicenseDetection\after?average?licence?plate.jpg

?????文件???????5921??2015-05-29?13:06??CarLicenseDetection\binary?licence?plate.jpg

?????文件??????69102??2015-04-29?21:32??CarLicenseDetection\car.jpg

?????文件??????56599??2015-03-29?10:13??CarLicenseDetection\CarLicense.jpg

?????文件??????10472??2015-05-03?21:20??CarLicenseDetection\CarLicenseRecognition_new.m

?????文件???????6035??2015-05-25?08:48??CarLicenseDetection\CarReader.m

?????文件???????1465??2015-05-25?08:56??CarLicenseDetection\CharRecognition.m

?????文件???????5894??2015-05-29?13:06??CarLicenseDetection\dw.jpg

?????文件???????6042??2015-05-29?13:06??CarLicenseDetection\expansion?or?corrosion?the?licence?plate.jpg

?????文件???????4673??2015-05-29?13:06??CarLicenseDetection\gray?licence?plate.jpg

?????文件????2835475??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0698.JPG

?????文件????2640641??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0699.JPG

?????文件????2257641??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0700.JPG

?????文件????2372937??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0701.JPG

?????文件????1934420??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0702.JPG

?????文件????2316434??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0703.JPG

?????文件????2676147??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0704.JPG

?????文件????2604666??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0706.JPG

?????文件????2197167??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0710.JPG

?????文件????2714320??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0715.JPG

?????文件????2800311??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0717.JPG

?????文件????2022388??2015-04-24?14:38??CarLicenseDetection\Images\IMG_0718.JPG

............此處省略30個文件信息

評論

共有 條評論