全文预览

车牌识别系统设计报告

上传者:梦溪 |  格式:doc  |  页数:18 |  大小:1091KB

文档介绍
ic(i,:)=double(reshape(img,1,[]));Р endР TrainSamples=pic';РendРfunction [Name,wchy]=Recognition()Рpath='.\字符模板\';Р[TrainSamples,dir1]=Tra_img_processing(path);Р[W_PCA]=PCA(TrainSamples);Рtra = W_PCA'*TrainSamples;Р Рstr=[];Рfor i=1:7Рimg=imread(['save\',num2str(i),'.jpg']);Рimg=imresize(img,[40,20]);Рtest=double(reshape(img,1,[]));Рtest=test';Р Рtes = W_PCA'*test;Р Р[I]=Min(tra,tes);Рstr=[str,I];Р РendРwchy=[];РName=[];Рfor i=1:7Р wchy=[wchy,dir1(str(i)).name(1)];Р Name=[Name;{dir1(str(i)).name}];РendРfunction e=qiege(d)Р[m,n]=size(d);Рtop=1;bottom=m;left=1;right=n; % initРwhile sum(d(top,:))==0 && top<=mР top=top+1;РendРwhile sum(d(bottom,:))==0 && bottom>=1Р bottom=bottom-1;РendРwhile sum(d(:,left))==0 && left<=nР left=left+1;РendРwhile sum(d(:,right))==0 && right>=1Р right=right-1;Рend

收藏

分享

举报
下载此文档