📄 ceshi.m
字号:
% test one image
clear
clc
str1=input('please enter the testing number: ');
%str1='0';
str1=int2str(str1);
%ceshituname=imread('0-9.bmp');
str2=input('please enter the testing picture: ');
%ceshituname=imread('0-9.bmp');
str2=int2str(str2);
ceshituname=imread(strcat(str1,'-',str2,'.bmp'));
ceshitu2bw=im2bw(ceshituname);
ceshituvector=getfeature(ceshitu2bw);
wkj=load('wkj2(2).dat');
wji=load('wji2(2).dat');
netj=wji*ceshituvector; %netj is 14*1
yj=f(netj); %yj is 14*1
netk=wkj*yj; %netk is 10*1
z=f(netk) %z is 1*10
ceshitu=find(z==max(z));
ceshitu=int2str(ceshitu);
if ceshitu=='10'
ceshitu='0';
end
if ceshitu==str1
figure(1);
imshow(ceshituname);
ceshitunamestr=strcat(ceshitu,'.jpg');
figure(2);
imshow(ceshitunamestr);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -