Camera & Pose Detection
Fine-tune the camera and pose detection system.
| Parameter | Type | Default | Description | Effect |
| shouldAskCamera | boolean | true | Prompt for camera permission | Shows camera permission dialog before starting |
| shouldShowCameraSelector | boolean | false | Show camera selection UI | Allows user to choose between available cameras |
| shouldShowOpenCameraSettings | boolean | false | Show settings button | Displays button to open device camera settings |
| cameraId | string | - | Specific camera device ID | Forces use of a specific camera |
| cameraLabel | string | - | Camera label for display | Shows custom label for the selected camera |
| minPoseDetectionConfidence | number | 0.5 | Minimum detection confidence (0-1) | Lower values detect poses more easily but may be less accurate |
| minTrackingConfidence | number | 0.5 | Minimum tracking confidence (0-1) | Affects how persistently poses are tracked between frames |
| minPosePresenceConfidence | number | 0.5 | Minimum presence confidence (0-1) | Threshold for determining if a person is in frame |
| mediapipeModel | "full" "heavy" "light" | "full" | MediaPipe model variant | light: Faster, less accurate. full: Balanced. heavy: Most accurate, slower |
| defaultDelegate | "GPU" "CPU" | Auto | Processing delegate | Forces GPU or CPU processing for pose detection |
| landmarkColor | string | "#14FF00" | Pose landmark color | Changes the color of skeleton overlay (hex color) |
| showSilhouette | boolean | true | Show body silhouette | Displays silhouette guide overlay during exercises |
| includePoseData | boolean | - | Include raw pose data | Sends pose landmark data in postMessage events |
| includePoseBorders | boolean | true | Show pose boundary guides | Displays borders indicating optimal pose positioning |
| includeRealtimeAccuracy | boolean | - | Send real-time accuracy | Broadcasts accuracy scores in real-time via postMessage |
| videoFit | "contain" | "cover" | Camera feed display mode | When set to "contain", shows the full camera frame instead of zooming in to fill the area. Useful for maximizing available space for motion tracking |
Note: defaultDelegate can also be set via URL parameter ?delegate=GPU or ?delegate=CPU
Camera & Pose Detection Settings
1// Via customParams
2kinestex.createCameraView(
3 exercises: exerciseList,
4 currentExercise: $currentExercise,
5 customParams: [
6 "landmarkColor": "#FF5500",
7 "showSilhouette": true,
8 "mediapipeModel": "heavy",
9 "defaultDelegate": "GPU",
10 "includePoseData": true,
11 "includeRealtimeAccuracy": true,
12 "shouldShowCameraSelector": true,
13 "videoFit": "contain" // show full camera frame
14 ]
15)