Skip to Main Content
Machine Learning with Core ML
book

Machine Learning with Core ML

by Joshua Newnham
June 2018
Intermediate to advanced content levelIntermediate to advanced
378 pages
8h 43m
English
Packt Publishing
Content preview from Machine Learning with Core ML

Preprocessing the data

At this stage, we have the app rendering the frames from the camera, but we are not yet receiving any frames. To do this, we will assign ourselves to receive these frames, as implemented in the previous section. The existing ViewController class already has an extension implementing the VideoCaptureDelegate protocol. What's left to do is to assign ourselves as the delegate of the VideoCapture instance and implement the details of the callback method; the following is the code for extension:

extension ViewController : VideoCaptureDelegate{    func onFrameCaptured(videoCapture: VideoCapture,     pixelBuffer:CVPixelBuffer?,     timestamp:CMTime){     } }
Depending on your coding style, you can just as easily implement the protocols inside ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Machine Learning with ML.NET

Hands-On Machine Learning with ML.NET

Jarred Capellman

Publisher Resources

ISBN: 9781788838290Supplemental Content