-
Notifications
You must be signed in to change notification settings - Fork 0
/
WebcamNN.m
34 lines (25 loc) · 878 Bytes
/
WebcamNN.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
clc
clear all
close all
fclose all
mycam = webcam(1);
%kitti.h5 for outdoors
%nyu.h5 for indoors
if isfile('kitti.h5')
% File exists.
else
display("Downloading pretrained neural network...")
urlwrite('https://drive.google.com/uc?id=1QbtiWELDE_oL7f4p7dlBT9g-B2XvvGOI&export=download&confirm=t&uuid=ccc7770d-3e98-49f4-ad1f-9a454dab6a60&at=ALAFpqxNvK_-evp_ehhc4UUJkBik:1666640389270','kitti.h5')
end
if isfile('nyu.h5')
% File exists.
else
display("Downloading pretrained neural network...")
urlwrite('https://drive.google.com/u/1/uc?id=1O1wwfmGJDJN9WYEKjCG6ekfYEBLC9N0x&export=download&confirm=t&uuid=18cf8d36-4e68-4b22-8492-32432704d94d&at=ALAFpqwnnKrp4Gaz25iftfe_kmh_:1666640715553','nyu.h5')
end
while 1
image = snapshot(mycam);
coder.extrinsic('NNextrinsic2');
y = NNextrinsic2(image);
imshow(y,[])
end