matlab学习之实现深度学习辨识物体

clear;
camera=webcam; %打开摄像头
nnet=alexnet;%load neural network,alexnet is a CNN,artist train it as millison of picture
%make a circle to reload frame from camera
while true 
    picture=camera.snapshot;%将摄像头图片信息幅值给picture
    picture=imresize(picture,[227,227]);%改变图片尺寸大小
    label=classify(nnet,picture);%图片与nnet对比,寻找匹配结果
    image(picture);%显示图片
    title(char(label));%显示标签
    drawnow;
end
 

猜你喜欢

转载自blog.csdn.net/seek97/article/details/90144204