Matlab deeplearning 智能识别

camera = webcam; % 需要下载webcam插件,在弹出错误后,之间会打开摄像头的
nnet = alexnet;  %需要连接alexnet网络

while true

    picture = camera.snapshot;
    picture = imresize(picture,[227,227]);
    label = classify(nnet, picture);
    image(picture);
    title(char(label));
    drawnow;
end