freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于matlab的數(shù)字識別系統(tǒng)設(shè)計論文-資料下載頁

2025-06-18 17:13本頁面
  

【正文】 。 if ((WordW=*Width)amp。amp。(WordW=*Width)) % 選定切分的區(qū)域 PX1=Concave(k)。 PX2=PX1。 while ((TopD(PX2)==0)amp。amp。(PX2x)) PX2=PX2+1。 % 凹右邊的列位置 end i=fix((PX1+PX2)/2)。 if (Top(i)==1) % 無粘連 PXR1=[PXR1 i]。 PXR2=[PXR2 i]。 else j=y+1Top(i)。 % PY為實際的y坐標值,此處已為黑色像素點 Mark=0。 while((jy)amp。amp。(Mark2)) if (I(j,i)==0) Black(i)=Black(i)+1。 % 記錄黑色象素點數(shù) Si=i。 while ((Si1)amp。amp。(I(j,Si)==0)) % 左筆劃寬度 Si=Si1。 SegSoke(1,i)=SegSoke(1,i)+1。 end Si=i。 while ((Six)amp。amp。(I(j,Si)==0)) % 右筆劃寬度 Si=Si+1。 SegSoke(2,i)=SegSoke(2,i)+1。 end end Mark=Mark+abs(I(j+1,i)I(j,i))。 % 檢測是否通過筆劃 j=j+1。 end SegY=[SegY j1]。 % 第一次切分截止處 if (j==38) PXR1=[PXR1 i]。 PXR2=[PXR2 i]。 else % 單點粘連 SLi=i。 while ((SLi1)amp。amp。(I(j1,SLi)==1)) % 選定區(qū)域左邊界 SLi=SLi1。 end SRi=i。 while ((SRix)amp。amp。(I(j1,SRi)==1)) % 選定區(qū)域右邊界 SRi=SRi+1。 end [Mytemp PX2]=max(Bottom(SLi:SRi))。 PXR2=[PXR2 PX2+SLi1]。 PXR1=[PXR1 i]。 end end else if (WordW*Width) PX=fix((Concave(k)+Concave(k1))/2)。 % 避免水平“橫”的粘連 k=k1。 end % 如果寬度過小,則不切分 end end %==== Segment ===%for i=2:n WI=I(:,fix((PXR1(i1)+PXR2(i1))/2):fix((PXR1(i)+PXR2(i))/2))。 figure(10+i)。imshow(WI)。endWI=I(:,fix((PXR1(i)+PXR2(i))/2):x)。figure(10+i+1)。imshow(WI)。 %=== 圖像顯示 ===% px=(1:x)。 % X軸坐標 figure(1)。imshow(I)。 figure(2)。plot(Top)。hold onplot(px,y,39。red39。)。gridtitle(39。上輪廓39。)。 figure(3)。plot(Bottom)。hold onplot(px,y,39。red39。)。gridtitle(39。下輪廓39。)。 figure(4)。plot(Height)。grid 附錄D單個字符識別代碼(字符‘3’的識別):I0=imread(39。39。)。% 必須為二值圖像I=im2bw(I0,)。[y0 x0]=size(I)。Range=sum((~I)39。)。Hy=0。for j=1:y0 if (Range(j)=1) Hy=Hy+1。 endendRangeX=sum((~I))。Wx=0。for i=1:x0 if (RangeX(i)=1) Wx=Wx+1。 endendAmp=24/Hy。 % 將文字圖像歸一化到24像素點的高度。I=imresize(I,Amp)。[y x]=size(I)。%I=bwmorph(~I,39。skel39。,Inf)。%I=~I。tic%====== 基本結(jié)構(gòu) =======%% 第一類:豎(V);左斜(L);右斜(R);突變(P)% 第二類:左半圓?。–);右半圓弧(Q)% 的三類:結(jié)構(gòu)待定(T);%=====================================%Left=zeros(1,y)。 % 左端輪廓檢測for j=1:y i=1。 while ((i=x)amp。amp。(I(j,i)==1)) i=i+1。 end if (i=x) Left(j)=i。 end endfor j=1:y1 LeftD(j)=Left(j+1)Left(j)。end%========== 結(jié)構(gòu)特征提取 =============%j=1。while ((Left(j)1)amp。amp。(jy)) j=j+1。 end Y1=j。 j=y。while ((Left(j)1)amp。amp。(j1)) j=j1。end Y2=j1。 % 去掉急劇變化的兩端 %============== 右邊 ==================%Right=zeros(1,y)。 % 左端輪廓檢測for j=1:y i=x。 while ((i=1)amp。amp。(I(j,i)==1)) i=i1。 end if (i=1) Right(j)=i。 end endfor j=1:y1 RightD(j)=Right(j+1)Right(j)。end %=====================================%Top=zeros(1,x)。 % 頂端輪廓檢測for i=1:x j=1。 while ((j=y)amp。amp。(I(j,i)==1)) j=j+1。 end if (j=y) Top(i)=j。 end endfor i=1:x1 TopD(i)=Top(i+1)Top(i)。end%==============================%i=1。while ((Top(i)1)amp。amp。(ix)) i=i+1。 end X1=i。 i=x。while ((Top(i)1)amp。amp。(i1)) i=i1。end X2=i1。 % 去掉急劇變化的兩端 %===================================%Bottom=zeros(1,x)。 % 底部輪廓檢測for i=1:x j=y。 while ((j=1)amp。amp。(I(j,i)==1)) j=j1。 end if (j=1) Bottom(i)=j。 end endfor i=1:x1 BottomD(i)=Bottom(i+1)Bottom(i)。end %========== 數(shù)字 1 的寬度特征 =========%Width=zeros(1,y)。for j=1:y Width(j)=Right(j)Left(j)。end W=max(Width)。 Po=0。 % 用于檢測筆劃Ne=0。NS=0。%筆劃數(shù)for i=X1+4:X24 for j=1:y1 if ((I(j+1,i)I(j,i))0) % 由黑到白 Po=Po+1。 if ((Po=2)amp。amp。(j=fix(*y))) Po=3。 end else if ((I(j+1,i)I(j,i))0) % 由白到黑 Ne=Ne+1。 if ((Ne=2)amp。amp。(j=fix(*y))) Ne=3。 end end end end NS=[NS max(Po,Ne)]。 Po=0。 Ne=0。 end Comp=max(NS)。 %========== 輪廓結(jié)構(gòu)特征提取 ==========%if (min(W,Wx)10) StrokeT=StrDetect01(TopD,X1,X2,3,6)。 % 頂部基本結(jié)構(gòu)檢測 StrokeL=StrDetect01(LeftD,Y1,Y2,3,5)。 % 左邊基本結(jié)構(gòu)檢測 StrokeR=StrDetect01(RightD,Y1,Y2,3,5)。 % 右邊基本結(jié)構(gòu)檢測 StrokeB=StrDetect01(BottomD,X1,X2,3,6)。 % 底部基本結(jié)構(gòu)檢測 %========== 識別 ==========% Digit=Recognition(StrokeT,StrokeL,StrokeR,StrokeB,Comp)else Digit=39。139。end t=toc%======= 顯示 ======%px=(1:x)。py=(1:y)。 figure(1)。imshow(I)。 figure(2)。plot(Left)。gridtitle(39。左輪廓39。)。 figure(3)。plot(Top)。gridtitle(39。上輪廓39。)。 figure(4)。plot(Right)。gridtitle(39。右輪廓39。)。 figure(5)。plot
點擊復制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1