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>
1
ARGSession.h
2
3
typedef NS_OPTIONS (NSInteger,ARGInferenceDebugOption) {
4
ARGInferenceOptionDebugNON = 1 << 0,
5
ARGInferenceOptionDebugFaceTracking = 1 << 1,
6
ARGInferenceOptionDebugFaceLandmark2D = 1 << 2,
7
};
Copied!
Sample code is written below.
Objective-C
Swift
1
// Sample Code. Enable and Disable Debugging Mode
2
3
ARGSession *argSession = [[ARGSession alloc] initWithARGConfig:argConfig error:&error];
4
5
6
// Enable Debugging Mode
7
[argSession setInferenceDebugOption:ARGInferenceOptionDebugFaceLandmark2D];
8
9
// Disable Debugging Mode
10
[argSession setInferenceDebugOption:ARGInferenceOptionDebugNON];
Copied!
1
// Sample Code. Enable and Disable Debugging Mode
2
3
if let session = argSession {
4
5
// Enable Debugging Mode
6
session.inferenceDebugOption = .optionDebugFaceLandmark2D
7
8
// Disable Debugging Mode
9
session.inferenceDebugOption = .optionDebugNON
10
}
Copied!
Last modified 1yr ago
Copy link