車牌識別matlab源程序.doc

車牌識別matlab源程序.doc

ID:57429906

大小:26.00 KB

頁數(shù):5頁

時間:2020-08-17

車牌識別matlab源程序.doc_第1頁
車牌識別matlab源程序.doc_第2頁
車牌識別matlab源程序.doc_第3頁
車牌識別matlab源程序.doc_第4頁
車牌識別matlab源程序.doc_第5頁
資源描述:

《車牌識別matlab源程序.doc》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫

1、車牌識別matlab源程序基于顏色的車牌定位和分割技術(shù)研究與實現(xiàn)function[seg]=character_segmentation(bw);%character_segmentation:Returnsthedigitsegmentsinthesuppliedbinaryimage.%Thefunctionusesthe"segment"function,keepingonlytheseven%segmentsintheresultwithlargestarea,andincaselessthanseven

2、%segmentswerefound,itattemptstorecallthefunction,makingthe%separationbetweenthealreadyfoundsegmentsclearer(bycleaningthe%bitswhicharethere.DIGIT_WIDTH=18;MIN_AREA=250;loadglobal_var.mat;plot_vector(sum(bw),4,CharacterSegmentation-ColumnsSumGraph:,debug2);seg=

3、segment(bw,DIGIT_WIDTH,MIN_AREA);[xy]=size(seg);%Ifwegotlessthan7digits,wetrytomaketheseprationbetweenthem%clearerbycleaningthebitsbetweenthem,andwecallthe"segment"%functionagain:ifx<7fori=1:xbw(:,seg(i,2))=0;end;seg=segment(bw,DIGIT_WIDTH,MIN_AREA);end;%Keep

4、ingintheresultsthesevensegmentswiththelargestarea:area=[];fori=1:xpic=bw(:,seg(i,1):seg(i,2),:);area(i)=bwarea(pic);end;area1=sort(area);seg=seg;forj=1:(length(area1)-7)i=find(area==area1(j));len=length(area);ifi==1area=[area(2:len)];seg=[seg(:,2:len)];elseif

5、i==lenarea=[area(1:i-1)];seg=[seg(:,1:i-1)];elsearea=[area(1:i-1)area(i+1:len)];seg=[seg(:,1:i-1)seg(:,i+1:len)];end;end;seg=seg;return;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function[segmentation]=segment(im,digit_width,min

6、_area);%segment:Segmentthepicturesindigitimagesaccordingtothevariable%"digit_width"andreturnsamatrixcontainingthetwoboundsoftheeach%digitsegment.Thefunctionkeepsintheresultonlysegmentwhose%"rectangular"areasismorethan"min_area".segmentation=[];%Summingthecolu

7、msofthepic:t=sum(im);%Gettingthesegmentsinthepic:seg=clean(find_valleys(t,2,1,digit_width),3);%Keepingintheresultonlythesegmentswhoserectangularareasismorethanmin_area:j=1;fori=1:(length(seg)-1)band_width=seg(i+1)-seg(i);maxi=max(t(1,seg(i):seg(i+1)));if(maxi

8、*band_width>min_area)segmentation(j,1)=seg(i);segmentation(j,2)=seg(i+1);j=j+1;end;end;return;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function[s]=find_va

當前文檔最多預(yù)覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當前文檔最多預(yù)覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學公式或PPT動畫的文件,查看預(yù)覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負責整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時聯(lián)系客服。
3. 下載前請仔細閱讀文檔內(nèi)容,確認文檔內(nèi)容符合您的需求后進行下載,若出現(xiàn)內(nèi)容與標題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡(luò)波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。