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

資源簡介

車牌識別(基于模板匹配和神經網絡),壓縮包里包含神經網絡的車牌識別算法、模板匹配的車牌識別算法、車牌字符模板、神經網絡訓練字符、參考文獻

資源截圖

代碼片段和文件信息

%%?圖像預處理
clear?all;
image=imread(‘chepai2.jpg‘);
figure(1)subplot(331)imshow(image);title(‘原圖‘);
I1=rgb2gray(image);
figure(1)subplot(332)imshow(I1);title(‘灰度圖‘);
figure(1)subplot(333)imhist(I1);title(‘灰度圖直方圖‘);
I2=edge(I1‘sobel‘0.15‘both‘);
figure(1)subplot(334)imshow(I2);title(‘算子邊緣檢測‘);
se=[1;1;1];
I3=imerode(I2se);
figure(1)subplot(335)imshow(I3);title(‘腐蝕后圖像‘);
se=strel(‘rectangle‘[2020]);
I4=imclose(I3se);
figure(1)subplot(336)imshow(I4);title(‘閉運算后‘);
I5=bwareaopen(I42000);
figure(1)subplot(337)imshow(I5);title(‘從對象中移除小對象‘);
se?=?strel(‘rectangle‘[50?80]);
I6?=?imdilate(I5se);
figure(1)subplot(338);imshow(I6);title(‘膨脹處理‘);
%%

%%?定位車牌

%%%%%%%%%%%%%%%%%%%%%%%%%%%%?找出長寬比在2~4的區域?%%%%%%%%%%%%%%%%%%%%%%%%%%
ed=edge(I6);
L?=?bwlabel(I6);%標記連通域
L1?=?bwlabel(ed);
p=zeros(1max(L1(:)));
for?i=1:max(L(:))%得到連通域的長寬比
????p(i)=sum(ed(L==i));
????[yx]=find(L==i);
????x0=min(x(:));
????x1=max(x(:));
????y0=min(y(:));
????y1=max(y(:));
????bl=(x1-x0)/(y1-y0);
????if?bl>2&&bl<4
????????X0?=?x0;
????????X1?=?x1;
????????Y0?=?y0;
????????Y1?=?y1;
????end
end
I7=imcrop(image[X0Y0X1-X0Y1-Y0]);
figure(1)subplot(339);imshow(I7);title(‘裁剪后圖像‘);
?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%?根據藍色像素點定位車牌位置%%%%%%%%%%%%%%%%%%%%%
[xyz]=size(I7);
%?以下為找車牌Y方向藍色的范圍
Blue_y=zeros(y1);%?zeros(MN)?表示的是M行*N列的全0矩陣
for?i=1:x????
????for?j=1:y?????????
????????if(I7(ij3)>(I7(ij1)+I7(ij2))&&(I7(ij3)>128))%%?判斷藍色像素???????????
????????????Blue_y(j1)=?Blue_y(j1)+1;%?藍色像素點統計??????????
????????end???????
????end???????
end
PY1=1;?
while?((Blue_y(PY11)<10)&&(PY1????PY1=PY1+1;??%PY1是Y坐標方向藍色范圍的下限
end???
PY2=y;?
while?((Blue_y(PY21)<10)&&(PY2>PY1))????????
????PY2=PY2-1;?%PY2是Y坐標方向藍色范圍的上限
end???

%?以下為找車牌X方向藍色的范圍
Blue_x=zeros(1x);
for?i=1:x?????
????for?j=1:y??%?只需掃描的行?????????
????????if(I7(ij3)>(I7(ij1)+I7(ij2))&&(I7(ij3)>128))?%%?判斷藍色像素????????????
????????????Blue_x(1i)=?Blue_x(1i)+1;?%?藍色像素點統計??????????????????????
????????end??????
????end???
end
PX1=1;
while?((Blue_x(1PX1)<5)&&(PX1???????PX1=PX1+1;?%PX1是X坐標方向藍色范圍的下限
end????
PX2=x;
while?((Blue_x(1PX2)<3)&&(PX2>PX1))?
???????PX2=PX2-1;?%PX2是X坐標方向藍色范圍的上限
end????
I8=I7(PX1:PX2PY1:PY2:);%?裁剪圖像
figure(2);imshow(I8)title(‘定位剪切后的彩色車牌圖像‘);
%%?

%%?傾斜矯正

I9=rgb2gray(I8);
figure(4)subplot(221);imshow(I9);title(‘灰度圖‘);
I10=edge(I9);
figure(4)subplot(222);imshow(I10);title(‘邊緣檢測‘);
theta=1:180;????
[Rxp]=radon(?I10theta);
[I0J]=find(R>=max(max(R)));%找傾斜角
qxj=90-J;
I11=imrotate(I8qxj‘bilinear‘‘crop‘);
figure(4)subplot(223);imshow(I8);title(‘原圖‘);
figure(4)subplot(224);imshow(I11);title(‘傾斜矯正‘);
thresh?=?graythresh(I9);?????%自動確定二值化閾值;
I12?=?im2bw(I9thresh);?
figure(5)subplot(121);imshow(I12);title(‘二值化‘);
I13=imrotate(I12qxj‘bilinear‘‘crop‘);
figure(5)subplot(122);imshow(I13);t

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-12-07?16:44??周鵬-2019250068-機電學院-車牌識別\
?????目錄???????????0??2019-12-07?16:29??周鵬-2019250068-機電學院-車牌識別\charSamples\
?????目錄???????????0??2019-12-07?16:29??周鵬-2019250068-機電學院-車牌識別\charSamples\0\
?????文件?????????376??2013-11-07?08:35??周鵬-2019250068-機電學院-車牌識別\charSamples\0\10_0.792674_gray_14967_5950_step5_recog_4_0_0.890217_0.705652.png
?????文件?????????413??2013-11-10?08:12??周鵬-2019250068-機電學院-車牌識別\charSamples\0\11_0.971377_gray_20751_8531_step5_recog_4_0_0.996446_0.967925.png
?????文件?????????413??2013-11-09?08:47??周鵬-2019250068-機電學院-車牌識別\charSamples\0\12_0.953826_gray_975_407_step5_recog_5_0_0.987086_0.941508.png
?????文件?????????376??2013-11-06?07:31??周鵬-2019250068-機電學院-車牌識別\charSamples\0\13_0.924615_gray_5457_2092_step5_recog_6_0_0.987233_0.912810.png
?????文件?????????413??2013-11-07?10:29??周鵬-2019250068-機電學院-車牌識別\charSamples\0\14_0.749970_gray_17934_7138_step5_recog_4_0_0.787806_0.590831.png
?????文件?????????398??2013-11-07?01:38??周鵬-2019250068-機電學院-車牌識別\charSamples\0\15_0.877296_gray_8040_2899_step5_recog_4_0_0.969689_0.850704.png
?????文件?????????390??2013-11-09?16:11??周鵬-2019250068-機電學院-車牌識別\charSamples\0\16_0.949891_gray_12542_5631_step5_recog_5_0_0.989526_0.939942.png
?????文件?????????413??2013-11-05?23:09??周鵬-2019250068-機電學院-車牌識別\charSamples\0\17_0.906434_gray_1645_517_step5_recog_3_0_0.985269_0.893081.png
?????文件?????????413??2013-11-04?07:38??周鵬-2019250068-機電學院-車牌識別\charSamples\0\18_0.494551_gray_4696_2106_step5_recog_5_D_0.340885_0.168585.png
?????文件?????????413??2013-11-10?17:49??周鵬-2019250068-機電學院-車牌識別\charSamples\0\19_0.968513_gray_35240_14963_step5_recog_4_0_0.994962_0.963633.png
?????文件?????????390??2013-11-05?11:37??周鵬-2019250068-機電學院-車牌識別\charSamples\0\1_0.822474_gray_13564_5332_step5_recog_2_0_0.891312_0.733081.png
?????文件?????????452??2013-11-07?09:17??周鵬-2019250068-機電學院-車牌識別\charSamples\0\20_0.737201_gray_16436_6504_step5_recog_3_0_0.828133_0.610500.png
?????文件?????????328??2013-11-09?09:13??周鵬-2019250068-機電學院-車牌識別\charSamples\0\21_0.750968_gray_1741_702_step5_recog_5_0_0.724394_0.543997.png
?????文件?????????578??2013-11-06?07:23??周鵬-2019250068-機電學院-車牌識別\charSamples\0\22_0.610848_gray_4813_1822_step5_recog_6_0_0.772820_0.472076.png
?????文件?????????429??2013-11-08?21:58??周鵬-2019250068-機電學院-車牌識別\charSamples\0\23_0.976079_gray_9338_3994_step5_recog_4_0_0.996512_0.972675.png
?????文件?????????404??2013-11-05?10:21??周鵬-2019250068-機電學院-車牌識別\charSamples\0\24_0.876098_gray_12240_4810_step5_recog_6_0_0.960593_0.841573.png
?????文件?????????398??2013-11-10?13:17??周鵬-2019250068-機電學院-車牌識別\charSamples\0\25_0.978677_gray_28271_11796_step5_recog_3_0_0.997614_0.976341.png
?????文件?????????845??2013-11-07?07:07??周鵬-2019250068-機電學院-車牌識別\charSamples\0\26_0.915550_gray_9737_3597_step5_recog_6_0_0.984816_0.901648.png
?????文件?????????413??2013-11-06?16:41??周鵬-2019250068-機電學院-車牌識別\charSamples\0\27_0.942230_gray_2943_1159_step5_recog_4_0_0.982740_0.925967.png
?????文件?????????390??2013-11-06?07:09??周鵬-2019250068-機電學院-車牌識別\charSamples\0\28_0.845480_gray_4035_1484_step5_recog_2_0_0.902136_0.762738.png
?????文件?????????436??2013-11-07?08:11??周鵬-2019250068-機電學院-車牌識別\charSamples\0\29_0.736003_gray_13772_5440_step5_recog_4_0_0.816986_0.601304.png
?????文件?????????413??2013-11-04?17:45??周鵬-2019250068-機電學院-車牌識別\charSamples\0\2_0.734930_gray_10773_4652_step5_recog_6_0_0.932386_0.685239.png
?????文件?????????595??2013-11-08?12:21??周鵬-2019250068-機電學院-車牌識別\charSamples\0\30_0.669019_gray_4754_2801_step5_recog_4_0_0.669949_0.448209.png
?????文件?????????443??2013-11-04?11:41??周鵬-2019250068-機電學院-車牌識別\charSamples\0\31_0.941303_gray_3574_1589_step5_recog_5_0_0.991813_0.933597.png
?????文件?????????390??2013-11-10?14:35??周鵬-2019250068-機電學院-車牌識別\charSamples\0\32_0.910823_gray_30504_12844_step5_recog_2_0_0.938536_0.854839.png
?????文件?????????413??2013-11-09?00:43??周鵬-2019250068-機電學院-車牌識別\charSamples\0\33_0.944410_gray_10675_4406_step5_recog_5_0_0.977869_0.923509.png
?????文件?????????443??2013-11-04?10:34??周鵬-2019250068-機電學院-車牌識別\charSamples\0\34_0.913401_gray_2467_1090_step5_recog_3_0_0.986072_0.900679.png
?????文件?????????376??2013-11-05?07:53??周鵬-2019250068-機電學院-車牌識別\charSamples\0\35_0.908210_gray_6976_2539_step5_recog_4_0_0.974391_0.884952.png
............此處省略1795個文件信息

評論

共有 條評論