11. Enable Debugging Mode

For the debugging purpose, ARGear provides displaying AR information functions, which shows face landmark, face rect, and face axes. Debugging function can be enabled or disabled in real time.

By using setInferenceDebugOption function, you can set options for ARGSession. ARGInferenceDebugOption is defined in ARGSession.h.

<Definition. ARGInferenceDebugOption>
ARGSession.h
typedef NS_OPTIONS (NSInteger,ARGInferenceDebugOption) {
ARGInferenceOptionDebugNON = 1 << 0,
ARGInferenceOptionDebugFaceTracking = 1 << 1,
ARGInferenceOptionDebugFaceLandmark2D = 1 << 2,
};

A sample code is written below.

Objective-C
Swift
Objective-C
// Sample Code. Enable and Disable Debugging Mode
ARGSession *argSession = [[ARGSession alloc] initWithARGConfig:argConfig error:&error];
// Enable Debugging Mode
[argSession setInferenceDebugOption:ARGInferenceOptionDebugFaceLandmark2D];
// Disable Debugging Mode
[argSession setInferenceDebugOption:ARGInferenceOptionDebugNON];
Swift
// Sample Code. Enable and Disable Debugging Mode
if let session = argSession {
// Enable Debugging Mode
session.inferenceDebugOption = .optionDebugFaceLandmark2D
// Disable Debugging Mode
session.inferenceDebugOption = .optionDebugNON
}