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