您好,欢迎访问三七文档
当前位置:首页 > 机械/制造/汽车 > 汽车理论 > 基于matlab的字母识别系统
说明:A1.bmp图片为手写B的图片,其余为26个字母标准图片;draw_outline.m,Feature_Building.m,fsd.m,outline.m为主程序所调用的子程序。字母识别顺序结构程序如下:clcclearRGB1=imread('D:A1.bmp');RGB2=imread('D:A.bmp');RGB3=imread('D:B.bmp');RGB4=imread('D:C.bmp');RGB5=imread('D:D.bmp');RGB6=imread('D:E.bmp');RGB7=imread('D:F.bmp');RGB8=imread('D:G.bmp');RGB9=imread('D:H.bmp');RGB10=imread('D:I.bmp');RGB11=imread('D:J.bmp');RGB12=imread('D:K.bmp');RGB13=imread('D:L.bmp');RGB14=imread('D:M.bmp');RGB15=imread('D:N.bmp');RGB16=imread('D:O.bmp');RGB17=imread('D:P.bmp');RGB18=imread('D:Q.bmp');RGB19=imread('D:R.bmp');RGB20=imread('D:S.bmp');RGB21=imread('D:T.bmp');RGB22=imread('D:U.bmp');RGB23=imread('D:V.bmp');RGB24=imread('D:W.bmp');RGB25=imread('D:X.bmp');RGB26=imread('D:Y.bmp');RGB27=imread('D:Z.bmp');FD1=Feature_Building(RGB1);FD2=Feature_Building(RGB2);FD3=Feature_Building(RGB3);FD4=Feature_Building(RGB4);FD5=Feature_Building(RGB5);FD6=Feature_Building(RGB6);FD7=Feature_Building(RGB7);FD8=Feature_Building(RGB8);FD9=Feature_Building(RGB9);FD10=Feature_Building(RGB10);FD11=Feature_Building(RGB11);FD12=Feature_Building(RGB12);FD13=Feature_Building(RGB13);FD14=Feature_Building(RGB14);FD15=Feature_Building(RGB15);FD16=Feature_Building(RGB16);FD17=Feature_Building(RGB17);FD18=Feature_Building(RGB18);FD19=Feature_Building(RGB19);FD20=Feature_Building(RGB20);FD21=Feature_Building(RGB21);FD22=Feature_Building(RGB22);FD23=Feature_Building(RGB23);FD24=Feature_Building(RGB24);FD25=Feature_Building(RGB25);FD26=Feature_Building(RGB26);FD27=Feature_Building(RGB27);FD1=reshape(FD1,1,120);FD2=reshape(FD2,1,120);FD3=reshape(FD3,1,120);FD4=reshape(FD4,1,120);FD5=reshape(FD5,1,120);FD6=reshape(FD6,1,120);FD7=reshape(FD7,1,120);FD8=reshape(FD8,1,120);FD9=reshape(FD9,1,120);FD10=reshape(FD10,1,120);FD11=reshape(FD11,1,120);FD12=reshape(FD12,1,120);FD13=reshape(FD13,1,120);FD14=reshape(FD14,1,120);FD15=reshape(FD15,1,120);FD16=reshape(FD16,1,120);FD17=reshape(FD17,1,120);FD18=reshape(FD18,1,120);FD19=reshape(FD19,1,120);FD20=reshape(FD20,1,120);FD21=reshape(FD21,1,120);FD22=reshape(FD22,1,120);FD23=reshape(FD23,1,120);FD24=reshape(FD24,1,120);FD25=reshape(FD25,1,120);FD26=reshape(FD26,1,120);FD27=reshape(FD27,1,120);d1=norm(FD1-FD1);d2=norm(FD1-FD2);d3=norm(FD1-FD3);d4=norm(FD1-FD4);d5=norm(FD1-FD5);d6=norm(FD1-FD6);d7=norm(FD1-FD7);d8=norm(FD1-FD8);d9=norm(FD1-FD9);d10=norm(FD1-FD10);d11=norm(FD1-FD11);d12=norm(FD1-FD12);d13=norm(FD1-FD13);d14=norm(FD1-FD14);d15=norm(FD1-FD15);d16=norm(FD1-FD16);d17=norm(FD1-FD17);d18=norm(FD1-FD18);d19=norm(FD1-FD19);d20=norm(FD1-FD20);d21=norm(FD1-FD21);d22=norm(FD1-FD22);d23=norm(FD1-FD23);d24=norm(FD1-FD24);d25=norm(FD1-FD25);d26=norm(FD1-FD26);d27=norm(FD1-FD27);运行结果如下:从图中可以看出d3的值最小,从而识别正确。附录使用循环结构编写程序:clcclearload('D:\ProgramFiles\MATLAB71\work\index.mat')fori=1:27RGB{i}=imread('D:\ProgramFiles\MATLAB71\work\index{i}');FD{i}=Feature_Building(RGB{i});FD{i}=reshape(FD{i},1,120);endfori=1:27d(i)=norm(FD{1}-FD{i});end[labeld]=sort(d)通过运行也能正确的识别字母。数据融合作业姓名:耿振科班级:S1304005学号:1304210298学院:电子信息工程学院数据融合作业姓名:耿振科班级:S1304005学号:1304210298学院:电子信息工程学院
本文标题:基于matlab的字母识别系统
链接地址:https://www.777doc.com/doc-2570629 .html