Created
June 20, 2019 02:35
-
-
Save smzn/193c42f55f1096f0de416a5da5fb680f to your computer and use it in GitHub Desktop.
DeepLearning Camera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
camera = webcam; % Connect to the camera | |
%preview(camera); | |
net = alexnet; % Load the neural networ k | |
im = snapshot(camera); % Take a picture | |
image(im) % Show the picture | |
im = imresize(im,[227 227]); % Resize the picture for alexnet | |
label = classify(net,im); % Classify the picture | |
title(char(label),'FontSize',50) % Show the class label | |
drawnow | |
clear camera |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment