Matlab机器学习之自动识别

 十一行代码实现自动识别功能

clear
camera=webcam;%%打开摄像头信息
nnet=alexnet;%%获取神经网络模型数据
while true%%死循环,不断显示
    picture=camera.snapshot;%%获取摄像头信息
    picture=imresize(picture,[227,227]);%%设置图片大小
    label=classify(nnet,picture);%%匹配图片信息
    image(picture);%%显示图片
    title(char(label));%%显示匹配内容
    drawnow;
end

猜你喜欢

转载自blog.csdn.net/seek97/article/details/82823180
今日推荐