12. Enable Debugging Mode

For debugging purposes, ARGear provides functions for displaying AR information such as showing face landmark, face rect, and face axes. The debugging function can be enabled or disabled in real time.

By using the setInferenceDebugOption function, you can set debug 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,
};

Sample code is written below.

// 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];

Last updated