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.htypedef NS_OPTIONS (NSInteger,ARGInferenceDebugOption) {ARGInferenceOptionDebugNON = 1 << 0,ARGInferenceOptionDebugFaceTracking = 1 << 1,ARGInferenceOptionDebugFaceLandmark2D = 1 << 2,};
Sample code is written below.
// Sample Code. Enable and Disable Debugging ModeARGSession *argSession = [[ARGSession alloc] initWithARGConfig:argConfig error:&error];…// Enable Debugging Mode[argSession setInferenceDebugOption:ARGInferenceOptionDebugFaceLandmark2D];// Disable Debugging Mode[argSession setInferenceDebugOption:ARGInferenceOptionDebugNON];
// Sample Code. Enable and Disable Debugging Modeif let session = argSession {// Enable Debugging Modesession.inferenceDebugOption = .optionDebugFaceLandmark2D// Disable Debugging Modesession.inferenceDebugOption = .optionDebugNON}