5. Camera
Camera configuration information and video related data should be provided in the form of CMSampleBufferRef to ARGear. Using the data, ARGear provides Face Tracking features.
Using AVCaptureSession, set up your camera first. Video frames and related face information can be obtained from AVCaptureVideoDataOutputSampleBufferDelegate and AVCaptureMetadataOutputObjectsDelegate in AVCaptureVideoDataOutput and AVCaptureMetadataOutput classes respectively.
Then, pass sampleBuffer and connection, or metadataObjects and connection received from Delegate functions above to updateSampleBuffer and updateMetadataObjects in ARGSession Interface.
The sample code below describes an example of camera configuration and how to feed video frames to ARGear.
Last updated