How It Works
ArUco markers are square patterns with a black border and a unique binary pattern inside. The tracker detects these markers in the camera image and calculates the 6DOF (position and orientation) pose based on the marker’s size and appearance.ArUco tracking is based on the ArUco library from OpenCV, which provides robust marker detection even in challenging lighting conditions.
Requirements
Hardware
- Webcam: Any standard webcam (640x480 or higher recommended)
- Printed marker: ArUco marker printed on paper or cardboard
- Mounting: Way to attach marker to head (hat, headband, cap)
Printing the Marker
You can generate ArUco markers using:- Online generators: Search for “ArUco marker generator”
- OpenCV’s ArUco module
- The marker should be printed at actual size (typically 5-10cm square)
Setup Instructions
Print and Mount Marker
- Print an ArUco marker (recommend 7x7cm or larger)
- Mount on stiff backing if using regular paper
- Attach to hat, headband, or cap brim
- Ensure marker faces the camera and stays flat
Larger markers are detected more reliably at greater distances. Use at least 5x5cm for desktop use.
Configure Field of View
Set the camera’s field of view to match your webcam:If unknown, you can measure it:
- Place an object of known width at a known distance
- Measure when object fills frame width
- Calculate: FOV = 2 * arctan(object_width / (2 * distance))
Set Head Position Offset
Configure the offset from the marker to your head’s rotation center:You can also use the calibration tool:
- Click Calibrate in tracker settings
- Rotate your head while keeping shoulders still
- The offset will be calculated automatically
Test Tracking
- Start tracking in OpenTrack
- View the video preview
- The detected marker should be highlighted with a green outline
- Check that head movements are tracked smoothly
- Ensure good lighting (avoid shadows on marker)
- Check marker is flat and not warped
- Move closer to camera
- Try different camera angle
Configuration Options
Camera Settings
| Option | Default | Description |
|---|---|---|
| Camera Name | - | Select your webcam |
| Force Resolution | 0 (auto) | Set specific resolution (640x480, 1280x720, etc.) |
| Field of View | 56° | Camera horizontal FOV in degrees |
| Force FPS | Default | Lock framerate (30, 60, 120, etc.) |
| Use MJPEG | false | Enable MJPEG compression |
Available Resolutions
Available Resolutions
- 320x240 - Low quality, high FPS
- 640x480 - Standard, good balance
- 1280x720 - HD, better accuracy
- 1920x1080 - Full HD, best accuracy
Head Position Offset
| Option | Default | Description |
|---|---|---|
| Head Position X | 0 | Left/right offset in millimeters |
| Head Position Y | 0 | Up/down offset in millimeters |
| Head Position Z | 0 | Forward/back offset in millimeters |
Advanced Features
Adaptive Threshold
The ArUco tracker uses adaptive thresholding to handle varying lighting conditions. The algorithm automatically adjusts detection parameters based on the scene.Region of Interest (ROI)
Once the marker is detected, the tracker uses a region of interest search to improve performance:- Reduces computational load
- Increases framerate
- Makes detection more robust
- Automatically resets to full-frame search if marker is lost
Automatic Recovery
If the marker is lost for more than 0.35 seconds, the tracker automatically:- Resets to full-frame detection
- Cycles through different detection parameters
- Adjusts threshold adaptively
- Returns to ROI mode once marker is reacquired
Troubleshooting
Marker not detected
Marker not detected
Lighting issues:
- Ensure even lighting on marker
- Avoid shadows or reflections on marker
- Don’t place marker in direct sunlight
- Avoid low-light conditions
- Reprint marker with higher quality printer
- Ensure marker is perfectly flat
- Check for smudges or damage on marker
- Use stiff backing to prevent warping
- Move closer to camera
- Use larger marker
- Increase camera resolution
Jittery or unstable tracking
Jittery or unstable tracking
- Use larger marker for more stable detection
- Increase camera resolution
- Improve lighting conditions
- Use higher framerate camera
- Enable filtering in OpenTrack filter settings
- Ensure marker is rigidly mounted
Tracking loses marker easily
Tracking loses marker easily
- Increase marker size
- Improve contrast (check printer settings)
- Mount marker more perpendicular to camera
- Reduce head rotation range
- Check for camera auto-exposure issues
Wrong pose orientation
Wrong pose orientation
- Verify head position offset is correct
- Re-run calibration procedure
- Check marker is mounted right-side up
- Ensure marker isn’t mirrored or flipped
Low framerate
Low framerate
- Reduce camera resolution
- Enable MJPEG compression
- Close unnecessary applications
- Use USB 3.0 port for camera
- Disable video preview when not needed
Advantages and Limitations
Advantages
- No special hardware required
- Easy to set up
- Works with any webcam
- Reliable marker detection
- Low cost (just print a marker)
- Good accuracy for gaming
Limitations
- Marker must be visible to camera
- Limited head rotation range (~±60°)
- Marker can be uncomfortable to wear
- Affected by lighting conditions
- Less accurate than IR point tracking
- Paper markers can warp over time
Tips for Best Results
- Print Quality: Use a laser printer for crisp, high-contrast markers
- Marker Size: Larger markers (8-10cm) work better for desktop distances
- Mounting: Mount marker on cap brim or headband, keep it flat and rigid
- Lighting: Use diffuse, even lighting - avoid harsh shadows
- Camera Position: Mount camera at eye level, about 50-80cm away
- Background: Keep background uncluttered to help detection algorithm
Comparison with Other Trackers
| Feature | ArUco | PointTracker | NeuralNet |
|---|---|---|---|
| Setup difficulty | Easy | Medium | Very Easy |
| Hardware cost | Very Low | Medium | Very Low |
| Accuracy | Good | Excellent | Good |
| Latency | Low | Very Low | Medium |
| Marker required | Yes | Yes (IR LEDs) | No |
| Rotation range | ±60° | ±90° | ±70° |
See Also
- PointTracker - Higher precision IR LED tracking
- NeuralNet Tracker - No marker required, AI-based
- Hardware Guide - General hardware setup information