1
00:00:08,180 --> 00:00:14,420
Everybody this is Caleb with devs slopes dot what's going on in this video we're going to make the camera

2
00:00:14,420 --> 00:00:17,760
view work and actually display what's coming from the camera.

3
00:00:17,780 --> 00:00:22,710
We're going to add a tap gesture recognizers so that when we tap the screen it takes a photo.

4
00:00:22,880 --> 00:00:25,710
And we're going to pass that photo to our UI image view.

5
00:00:25,850 --> 00:00:27,470
It's going to be super duper cool.

6
00:00:27,620 --> 00:00:28,880
And let's get started.

7
00:00:28,940 --> 00:00:36,110
So last time we left off with this we had added some view subclasses we'd added you know nice drop shadows

8
00:00:36,110 --> 00:00:38,030
rounded corners all that stuff.

9
00:00:38,180 --> 00:00:42,460
And let's take it a bit further let's get that green view showing the camera.

10
00:00:42,560 --> 00:00:47,080
So pull open your X code project and we're going to start our work in camera AVC.

11
00:00:47,230 --> 00:00:47,870
OK.

12
00:00:48,140 --> 00:00:56,350
So in order to do that what we're going to do is first we need to import a library called A-V foundation.

13
00:00:56,520 --> 00:00:56,710
OK.

14
00:00:56,720 --> 00:01:06,230
And if you hold option or you don't let's search the documentation really quickly for a V Foundation.

15
00:01:06,320 --> 00:01:08,700
Is it.

16
00:01:08,870 --> 00:01:15,620
All right so avi foundation lets us work with audiovisual assets control device cameras process audio

17
00:01:15,890 --> 00:01:18,750
and configure system audio interactions.

18
00:01:18,860 --> 00:01:24,350
So it makes sense that we're using this to control the camera and we're going to need three separate

19
00:01:24,410 --> 00:01:31,070
elements in order to actually utilize the camera as well as to capture a photo and preview that on our

20
00:01:31,070 --> 00:01:32,180
screen.

21
00:01:32,210 --> 00:01:34,390
Those are an avi capture session.

22
00:01:34,580 --> 00:01:39,590
Avi capture photo output and an avi capture video preview layer.

23
00:01:39,620 --> 00:01:43,400
So let's go ahead and let's create three variables to hold all three of those.

24
00:01:43,410 --> 00:01:51,650
So go ahead and type var capture session and that's going to be of type avi capture session I put an

25
00:01:51,650 --> 00:01:55,760
exclamation mark because we are definitely going to use that and we know for sure that we're going to

26
00:01:55,760 --> 00:02:00,240
have a value make sure that you type capture the right way.

27
00:02:00,530 --> 00:02:00,780
All right.

28
00:02:00,800 --> 00:02:06,610
Next type of our camera output and we'll talk about what each of these are in just a second.

29
00:02:06,800 --> 00:02:11,600
This is going to be of type avi capture photo output.

30
00:02:11,880 --> 00:02:13,300
OK.

31
00:02:13,590 --> 00:02:16,930
And go ahead and put an exclamation mark at the end.

32
00:02:16,940 --> 00:02:27,350
Next we're going to do var preview layer and this is going to be of type avi capture video preview layer

33
00:02:28,660 --> 00:02:31,160
came just like that super easy.

34
00:02:31,820 --> 00:02:34,360
And yeah that looks pretty good.

35
00:02:34,370 --> 00:02:40,420
The only thing is we're going to have to conform to AVI capture photo.

36
00:02:40,430 --> 00:02:40,840
Wait a minute.

37
00:02:40,850 --> 00:02:45,140
Avi photo capture delegate and we will do that in just a moment.

38
00:02:45,140 --> 00:02:49,070
But for now let's just start with our three different elements.

39
00:02:49,070 --> 00:02:55,010
The AVI capture session if you hold option and click you can see that it is the central hub of the A-V

40
00:02:55,010 --> 00:03:02,420
foundation capture classes and it basically is just going to control our real time capture of the camera.

41
00:03:02,840 --> 00:03:10,100
The camera output of type avi capture photo output is a subclass of Avi capture output that basically

42
00:03:10,100 --> 00:03:16,070
allows us to capture a still image from an avi capture session.

43
00:03:16,280 --> 00:03:24,770
It supports live photos preview sized image delivery as well as raw and JPEG formats.

44
00:03:24,770 --> 00:03:31,620
Now the preview layer that's what's actually going to be added to our background view to show the camera.

45
00:03:31,840 --> 00:03:34,020
OK so those are the three things we're working with.

46
00:03:34,250 --> 00:03:37,110
Let's go ahead and let's get started.

47
00:03:37,130 --> 00:03:41,930
So inside of you did appear couldn't type.

48
00:03:41,930 --> 00:03:47,900
You did appear we're going to override it really quickly and then call superdad view did appear passen

49
00:03:48,020 --> 00:03:54,350
animated and inside of here what we're going to do is we're going to set up the preview layer and we're

50
00:03:54,350 --> 00:03:55,550
going to give it a frame.

51
00:03:55,550 --> 00:04:01,460
Now of course if you remember this camera view that is our green view in the simulator so we're going

52
00:04:01,460 --> 00:04:05,750
to set it to be the same as camera view bounce.

53
00:04:05,930 --> 00:04:11,380
OK so our our preview layer is going to fit inside the bounds of our camera view.

54
00:04:11,510 --> 00:04:12,750
OK that's pretty easy.

55
00:04:12,980 --> 00:04:17,610
And that's all we need to do to get the frame to fit the way that we want it.

56
00:04:17,630 --> 00:04:22,800
Now what we need to do though is we need to set up some things in view will appear.

57
00:04:23,090 --> 00:04:26,100
So go ahead and call and override a view will appear.

58
00:04:26,450 --> 00:04:30,830
And you know what I'm going to actually tab down so you can see this more centrally in the screen.

59
00:04:30,830 --> 00:04:31,760
There we go.

60
00:04:31,760 --> 00:04:32,000
All right.

61
00:04:32,000 --> 00:04:33,080
So you will appear.

62
00:04:33,080 --> 00:04:35,040
Go ahead and call super dot view.

63
00:04:35,060 --> 00:04:39,710
Will appear pass in animated there for that boolean value.

64
00:04:39,830 --> 00:04:41,410
And inside a view will appear.

65
00:04:41,410 --> 00:04:44,780
This is where we're going to instantiate our capture session.

66
00:04:44,780 --> 00:04:50,340
If you remember from up here our camera output as well as our preview layer.

67
00:04:50,420 --> 00:04:57,140
So go ahead and we're going to just type capture session and we're going to instantiate this as an avi

68
00:04:57,140 --> 00:05:02,870
capture session just like we did and we're going to instantiate that with some parentheses.

69
00:05:02,870 --> 00:05:03,490
All right.

70
00:05:04,010 --> 00:05:08,810
So now what we're going to do is we're going to set it up so that the capture session captures the full

71
00:05:09,250 --> 00:05:11,820
10 ATP's size of the screen.

72
00:05:11,840 --> 00:05:19,040
So go ahead and type capture session daat session preset and in order to find the session preset you'll

73
00:05:19,040 --> 00:05:20,120
notice that

74
00:05:23,710 --> 00:05:25,240
looks like it's still thinking here.

75
00:05:25,270 --> 00:05:27,750
I've got to get rid of this for a moment.

76
00:05:27,760 --> 00:05:31,010
OK so you see that it is part of A-V capture session.

77
00:05:31,120 --> 00:05:34,060
Preset So we're going to set that value here.

78
00:05:34,060 --> 00:05:37,000
Capture session datt preset.

79
00:05:37,210 --> 00:05:41,110
And if we put another period there you can see we have all kinds of different presets.

80
00:05:41,110 --> 00:05:43,760
You notice 10:8 right here 1920 by 10:8.

81
00:05:43,780 --> 00:05:48,900
So select that and now we're set up to capture the full size of the screen.

82
00:05:49,060 --> 00:05:50,840
Pretty easy.

83
00:05:50,950 --> 00:05:55,540
Now we're going to do is we're basically going to set up our input which is our camera.

84
00:05:55,630 --> 00:05:58,130
So the the information will come into the camera.

85
00:05:58,180 --> 00:06:03,210
We'll save that as input and we want to export or have an output of a photo.

86
00:06:03,280 --> 00:06:07,820
So we're going to create a constant that's going to be our back camera.

87
00:06:07,900 --> 00:06:20,380
So go ahead type let back camera equals a V capture device which you can see here and the avi capture

88
00:06:20,380 --> 00:06:25,590
device what we need to do is we need to go head and we need to set up the media type.

89
00:06:25,680 --> 00:06:26,270
OK.

90
00:06:26,320 --> 00:06:29,350
Now you might be a little confused by this but I'll explain it in a second.

91
00:06:29,350 --> 00:06:38,470
We're going to type A-V media type and we're going to select a video.

92
00:06:38,640 --> 00:06:44,080
And the reason for that is we want to capture the full frame of the screen if we were to do a photo.

93
00:06:44,220 --> 00:06:49,800
It would capture it would capture a normal sized photo but we're using the whole screen so we may as

94
00:06:49,800 --> 00:06:53,610
well capture the entire 20 piece size of the screen.

95
00:06:54,030 --> 00:06:55,470
So we just created a constant.

96
00:06:55,470 --> 00:07:01,920
This is basically just going to be utilizing the default camera which by default is the back camera

97
00:07:01,920 --> 00:07:04,450
and we're recording a video sized frame.

98
00:07:04,890 --> 00:07:11,460
So now what we need to do is we need to basically set up an input to pass to the avi capture session

99
00:07:11,460 --> 00:07:14,310
so that it knows to start recording from our camera.

100
00:07:14,460 --> 00:07:20,060
And in order to do this we need to put this inside of a do catch block so that we can use try.

101
00:07:20,070 --> 00:07:24,990
Because when you're using the camera you need to be able to catch any errors because it it can have

102
00:07:24,990 --> 00:07:26,250
lots of errors that can occur.

103
00:07:26,250 --> 00:07:32,040
So let's go ahead and put all of this adding the input and capturing the photo session inside of a do

104
00:07:32,040 --> 00:07:32,980
catch block.

105
00:07:33,150 --> 00:07:35,100
So to do that go ahead untyped do.

106
00:07:35,520 --> 00:07:40,590
And then inside of here we're going to create an input and we're going to pass in the camera as that

107
00:07:40,590 --> 00:07:41,200
input.

108
00:07:41,220 --> 00:07:50,190
So go ahead and type let input equals try avi capture device input already and we're going to go ahead

109
00:07:50,190 --> 00:07:51,260
and pass it.

110
00:07:51,360 --> 00:07:55,040
The device which is the back camera we just created that device.

111
00:07:55,110 --> 00:07:56,950
Now we're using try.

112
00:07:57,090 --> 00:08:01,200
Which means that it definitely could have errors.

113
00:08:01,200 --> 00:08:04,000
And so we're going to handle that in the catch block in just a moment.

114
00:08:04,050 --> 00:08:08,070
But right now you can see it's giving me an error saying that it is an optional type and we need to

115
00:08:08,070 --> 00:08:10,340
unwrap it to just fix that.

116
00:08:10,380 --> 00:08:14,650
It's going to add an exclamation mark to force unwrap the camera but that's fine.

117
00:08:14,670 --> 00:08:20,640
So what we're going to do now is we're going to check to see if our capture session can even add an

118
00:08:20,640 --> 00:08:21,370
input.

119
00:08:21,590 --> 00:08:26,130
And this is actually the reason why this app won't work on the simulator and you're going to have to

120
00:08:26,130 --> 00:08:29,860
build it onto a physical device because the simulator does not have a camera.

121
00:08:30,240 --> 00:08:36,190
So to check that go and type if capture session can add input.

122
00:08:36,660 --> 00:08:42,050
And of course the input we're going to type in Pook's we just created that constant right above.

123
00:08:42,090 --> 00:08:49,470
If that is true what we're going to do is we're going to type capture session and input and we're going

124
00:08:49,480 --> 00:08:50,580
to give it our input.

125
00:08:50,730 --> 00:08:51,140
OK.

126
00:08:51,150 --> 00:08:52,720
Easy is that.

127
00:08:52,800 --> 00:08:54,180
So we're going to check do we.

128
00:08:54,210 --> 00:08:57,710
Can we add an input if yes add that input.

129
00:08:58,050 --> 00:09:03,770
OK so our input is done now we have a way to pass in what the camera sees to the capture session.

130
00:09:03,780 --> 00:09:07,260
Now we need to do is to determine what we do with it.

131
00:09:07,260 --> 00:09:09,700
Do we turn it into a photoed we turn it into a video.

132
00:09:09,810 --> 00:09:10,890
What do we do.

133
00:09:10,950 --> 00:09:14,970
So to do that what we're going to do is we're going to instantiate our camera output and we're going

134
00:09:14,970 --> 00:09:16,830
to pass the data to that.

135
00:09:16,830 --> 00:09:24,000
So go ahead and type camera output right here and we're going to set that up to be an instance of a

136
00:09:24,000 --> 00:09:24,790
b.

137
00:09:25,050 --> 00:09:25,810
I can't talk.

138
00:09:25,900 --> 00:09:31,710
Avi capture photo output OK instantiate that with some parentheses.

139
00:09:31,710 --> 00:09:33,750
And we're sort of going to do the same thing as above.

140
00:09:33,750 --> 00:09:37,560
We're going to check if it can add an output and if it can then we're going to add it.

141
00:09:37,560 --> 00:09:38,780
So to do that.

142
00:09:38,780 --> 00:09:42,860
Go ahead and type if camera output can add.

143
00:09:42,960 --> 00:09:44,660
Whoops.

144
00:09:44,760 --> 00:09:45,440
Sorry.

145
00:09:45,510 --> 00:09:46,950
This is for the capture session.

146
00:09:46,950 --> 00:09:56,590
If the capture session can add output and of course that output is CAMRA output if that's true then

147
00:09:56,590 --> 00:10:03,310
we're going to call capture session add output and we're going to give it the capture output.

148
00:10:03,460 --> 00:10:06,580
Whoopsies camera output.

149
00:10:07,330 --> 00:10:11,520
And of course you need to force unwrap it just like we needed to unwrap the camera.

150
00:10:11,540 --> 00:10:13,670
We're going to force unwrap the camera output as well.

151
00:10:13,930 --> 00:10:15,150
OK very cool.

152
00:10:15,550 --> 00:10:19,850
So we have now successfully put in an input.

153
00:10:19,990 --> 00:10:25,110
We've successfully created an output but now we need to do something with that output.

154
00:10:25,120 --> 00:10:31,050
And that is to actually convert it into a layer that can be displayed on the screen.

155
00:10:31,180 --> 00:10:36,460
OK because we need to be able to see what the camera is doing and that you see right here errors thrown

156
00:10:36,460 --> 00:10:37,280
are not handled.

157
00:10:37,420 --> 00:10:38,310
We can just kept.

158
00:10:38,320 --> 00:10:43,580
We can fix that really quickly by simply calling catch.

159
00:10:43,580 --> 00:10:47,830
So sort of like an if else but we're basically doing this.

160
00:10:47,830 --> 00:10:51,300
And if we can't do this then we're going to catch errors and we're going to use Debug.

161
00:10:51,300 --> 00:10:55,890
Print and we're going to pass in the air.

162
00:10:56,040 --> 00:11:02,430
Now we can just call error because basically what we're saying is do this and try when we called Try

163
00:11:03,090 --> 00:11:08,980
any errors that come from this are going to be caught and then debug printed right there debug print.

164
00:11:09,000 --> 00:11:14,430
If you don't know basically it writes the textual representation of the given items most suitable for

165
00:11:14,430 --> 00:11:15,140
debugging.

166
00:11:15,150 --> 00:11:17,700
So it gives extra information that you might not get.

167
00:11:17,700 --> 00:11:20,250
Just from a standard print which is really helpful.

168
00:11:20,250 --> 00:11:22,150
So let's move on.

169
00:11:22,320 --> 00:11:27,780
We have now instantiated our capture session we've instantiated our camera output and now we're going

170
00:11:27,780 --> 00:11:33,090
to actually use our preview layer so that we can display the camera.

171
00:11:33,090 --> 00:11:38,220
So now that we've added the output go Hedden type preview layer and we're going to go ahead and set

172
00:11:38,220 --> 00:11:45,510
it to be equal to an AVI capture preview layer avi capture video preview layer.

173
00:11:45,510 --> 00:11:46,500
Sorry.

174
00:11:46,500 --> 00:11:50,240
Now in order to do this we need to pass it an avi capture session.

175
00:11:50,250 --> 00:11:52,470
Well you know what we've got one of those.

176
00:11:52,530 --> 00:11:53,430
So let's pass it.

177
00:11:53,430 --> 00:11:57,780
Our capture session and we're going to need to force unwrap it just like that.

178
00:11:57,810 --> 00:12:02,770
So now our preview session sorry our preview layer is properly instantiated.

179
00:12:02,790 --> 00:12:04,050
That looks great.

180
00:12:04,080 --> 00:12:09,430
Now we're going to do is we're going to go ahead and type preview layer video gravity and we're going

181
00:12:09,430 --> 00:12:14,220
to set this to AVI video gravity right there.

182
00:12:14,220 --> 00:12:16,340
Avi léa video gravity.

183
00:12:16,350 --> 00:12:22,860
And basically what this allows us to do is it allows us to set kind of like the content mode in a UI

184
00:12:23,110 --> 00:12:24,140
image of you.

185
00:12:24,200 --> 00:12:26,840
Going to set it to be resized aspect.

186
00:12:26,850 --> 00:12:32,610
So basically what it does is it just forces it to preserve the aspect ratio it's not going to get squished

187
00:12:32,610 --> 00:12:34,270
or stretched or anything like that.

188
00:12:34,430 --> 00:12:37,770
Okay that's just the way that we maintain our aspect ratio.

189
00:12:37,770 --> 00:12:44,340
Next we're going to go ahead and type preview layer dot connection and we're going to say the video

190
00:12:44,340 --> 00:12:45,320
orientation.

191
00:12:45,510 --> 00:12:51,000
And basically what this is doing is it's pulling into loops because we can't get any information on

192
00:12:51,540 --> 00:12:52,180
these yet.

193
00:12:52,280 --> 00:12:54,550
Must I get rid of the exclamation mark.

194
00:12:54,810 --> 00:12:55,300
OK.

195
00:12:55,560 --> 00:13:02,820
So the avi capture connection is basically where it is taking the input and we're going to say what

196
00:13:02,880 --> 00:13:05,490
is the video orientation coming in.

197
00:13:05,490 --> 00:13:11,580
Because if it's rotated we might want to pass in landscape video but our app uses portrait mode only.

198
00:13:11,610 --> 00:13:18,510
So to do that we're basically going to say avi capture video orientation and we're going to just pass

199
00:13:18,510 --> 00:13:21,960
in portrait video pretty easy.

200
00:13:22,190 --> 00:13:26,150
Now this is the exciting part we're going to add this whole session to our camera view.

201
00:13:26,160 --> 00:13:35,580
So go ahead and type camera view lips camera view layer add sub layer and guess what subcellar we're

202
00:13:35,580 --> 00:13:38,470
going to pass in our preview layer.

203
00:13:38,550 --> 00:13:43,700
Go ahead and force unwrap it and then we're going to go ahead and start the session.

204
00:13:43,700 --> 00:13:47,100
OK now that it's all added We can properly start the session and show the camera.

205
00:13:47,100 --> 00:13:57,900
So go ahead and type capture session start running and that's it it'll start running just like that.

206
00:13:57,910 --> 00:13:58,210
All right.

207
00:13:58,210 --> 00:14:03,750
So we should probably stop at this moment and we should go ahead and check to see if this actually works.

208
00:14:03,760 --> 00:14:07,940
So I'm going to choose my physical device and I'm going to click build and run.

209
00:14:07,960 --> 00:14:13,210
And let's go ahead and let's see if it can properly build and run and show the camera.

210
00:14:13,210 --> 00:14:14,230
Let's give it a shot.

211
00:14:19,370 --> 00:14:21,370
Hey hey look at that.

212
00:14:21,440 --> 00:14:21,810
All right.

213
00:14:21,810 --> 00:14:22,740
That looks pretty good.

214
00:14:22,740 --> 00:14:25,470
So it looks like our camera is properly showing up.

215
00:14:25,470 --> 00:14:29,890
I just kind of set up a little photography studio here later when we're taking photos of things.

216
00:14:29,970 --> 00:14:31,130
But you know what I noticed.

217
00:14:31,130 --> 00:14:31,700
Are you.

218
00:14:31,730 --> 00:14:32,420
Disappeared.

219
00:14:32,430 --> 00:14:36,330
All of those views the button the image of you all disappeared.

220
00:14:36,330 --> 00:14:38,580
And you know what I'm going to show you why.

221
00:14:38,630 --> 00:14:41,320
So I'm going to quit that and stop it from running.

222
00:14:41,460 --> 00:14:45,410
And let's go and make that storyboard really quickly and let's take a look.

223
00:14:45,630 --> 00:14:53,170
So as you can see here camera view contains all of these three UI elements.

224
00:14:53,170 --> 00:14:57,910
Now we just added a sub layer on top of camera view so it's basically covering up everything that we

225
00:14:57,910 --> 00:14:58,780
already have.

226
00:14:59,010 --> 00:15:02,180
What we're going to do to fix that is select all three of these.

227
00:15:02,290 --> 00:15:03,960
We're going to pull them out.

228
00:15:05,380 --> 00:15:08,800
And we're going to remove them from being inside of that camera view.

229
00:15:08,800 --> 00:15:15,460
Now we need to redo the constraints but it's ok it's easier to do this once than to have to do a lot

230
00:15:15,460 --> 00:15:16,360
of it over again.

231
00:15:16,360 --> 00:15:21,310
So let's select our rounded label view and here's a little secret I don't know if you know this but

232
00:15:21,340 --> 00:15:27,190
in order to keep things from dropping onto the wrong view you can just hold the Command key.

233
00:15:27,280 --> 00:15:33,910
The ones a little swirly hash tag sign and you can drag and let it go that way and it keeps it from

234
00:15:34,000 --> 00:15:35,980
going inside the camera view.

235
00:15:35,980 --> 00:15:40,860
Once it's there go ahead and kind of give it the same constraints before 20 from the top 20 from though

236
00:15:41,110 --> 00:15:45,180
or sorry 20 from the left 20 from the right and 30 from the top.

237
00:15:45,370 --> 00:15:48,140
Keep it at the same height and add those four constraints.

238
00:15:48,140 --> 00:15:50,860
Now I think that there were some residual constraints there.

239
00:15:50,980 --> 00:15:55,830
Yes so this height constraint we can get rid of but everything else looks great.

240
00:15:55,840 --> 00:15:58,200
Let's go ahead and drag our image view.

241
00:15:58,270 --> 00:16:03,050
Hold command so that it does not stick to the other camera view.

242
00:16:03,310 --> 00:16:09,280
And let's go ahead and give it constraints again of 20 to the right 20 from the bottom and a width and

243
00:16:09,280 --> 00:16:10,890
height constraint.

244
00:16:11,340 --> 00:16:15,820
And as you can see we have some residual constraints here the greater than or equal 2s we can get rid

245
00:16:15,820 --> 00:16:16,730
of those.

246
00:16:16,910 --> 00:16:18,820
And that looks great.

247
00:16:18,820 --> 00:16:25,000
Now to the same thing with the flash button hold command and drag it down looks like that's already

248
00:16:25,000 --> 00:16:26,140
in 2020.

249
00:16:26,160 --> 00:16:29,280
Perfect it's showing zero because we're constraining margins.

250
00:16:29,300 --> 00:16:30,530
That's fine.

251
00:16:30,730 --> 00:16:38,140
And let's go ahead and give it a fixed height and a fixed width add four constraints and get rid of

252
00:16:38,140 --> 00:16:39,630
that greater than or equal to.

253
00:16:39,640 --> 00:16:42,040
I guess I didn't need to add the width constraints.

254
00:16:42,040 --> 00:16:42,790
I knew it was going to be there.

255
00:16:42,790 --> 00:16:46,860
But anyway let's let's actually make this a little bit wider.

256
00:16:47,650 --> 00:16:50,300
It maybe even bigger maybe 100.

257
00:16:50,310 --> 00:16:50,820
There we go.

258
00:16:51,670 --> 00:16:52,130
Cool.

259
00:16:52,150 --> 00:16:52,690
OK.

260
00:16:52,840 --> 00:16:53,650
So that looks great.

261
00:16:53,650 --> 00:16:58,470
Let's try building and running one more time and let's see if our user interface shows up.

262
00:16:58,480 --> 00:17:04,900
It should because we've just pulled it out from being covered up by our camera view.

263
00:17:04,990 --> 00:17:08,490
So let's just double check Yeah there we go.

264
00:17:08,490 --> 00:17:09,000
Awesome.

265
00:17:09,000 --> 00:17:10,570
So our button is here.

266
00:17:10,630 --> 00:17:16,050
Our view is here and our image view is here but we haven't passed that an image yet.

267
00:17:16,050 --> 00:17:21,480
Now I did say at the beginning of this video that we were going to set it up so that we could take a

268
00:17:21,480 --> 00:17:23,360
photo and save it to the image view.

269
00:17:23,370 --> 00:17:27,900
But this video is getting a little long so let's go ahead and in the next video we'll do that.

270
00:17:27,900 --> 00:17:28,860
But for now.

271
00:17:28,980 --> 00:17:29,880
Awesome job guys.

272
00:17:29,880 --> 00:17:34,800
We just got the camera showing up successfully and capturing an image.

273
00:17:34,800 --> 00:17:40,350
We're going to set it up so that we can actually take a photo pass it to our image view and then in

274
00:17:40,350 --> 00:17:46,230
the video following that we're going to get into the cool core M-L stuff where we get to actually pass

275
00:17:46,230 --> 00:17:50,700
our image in through our trained M-L model so that it can make some predictions.

276
00:17:50,700 --> 00:17:51,810
Very very cool.

277
00:17:51,960 --> 00:17:54,640
Awesome Job Guys let's go ahead and move on to the next video.
