Skip to content

Commit f93508a

Browse files
committed
Starting to update auto-calibration documentation.
1 parent 24c3e66 commit f93508a

File tree

2 files changed

+27
-17
lines changed

2 files changed

+27
-17
lines changed
204 KB
Loading

docs/camera/auto-calibration.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ last_modified_date: 2025-01-04
1111

1212
# Auto-Calibration
1313

14-
Auto-calibration is the recommended way to calibrate PiTrac cameras. It automatically determines focal lengths and camera angles through a 4-step web wizard - no tape measures, no manual JSON editing, no shell scripts.
14+
Auto-calibration is the recommended way to calibrate PiTrac cameras. It automatically determines focal lengths and camera angles through a 4-step web wizard - no tape measures, no manual JSON editing, no shell scripts. These measurements are used by PiTrac during operation to determine the location of the ball in real space relative to the unit.
1515

1616
## What Auto-Calibration Does
1717

@@ -28,13 +28,13 @@ Auto-calibration is the recommended way to calibrate PiTrac cameras. It automati
2828

2929
## Physical Setup
3030

31-
Before you can run auto-calibration in the web UI, you need a calibration rig with golf balls at known positions.
31+
Before you can run auto-calibration in the web UI, you need a calibration rig to hold golf balls at known positions.
3232

3333
### 1. Print the Calibration Rig
3434

3535
**Files**: [GitHub - Calibration Rig STL files](https://github.com/PiTracLM/PiTrac/tree/main/3D%20Printed%20Parts/Enclosure%20Version%202/Calibration%20Rig)
3636

37-
The rig works with both V1.0 and V2.0 enclosures. Only difference is the measurement values you'll configure.
37+
The rig works with both V1.0 and V2.0 enclosures, though V1 is not as well-supported and may need custom measurements (ask on Discord). Only difference is the measurement values you'll configure.
3838

3939
**Print Settings**:
4040
- Material: PETG preferred (less warping), PLA works fine
@@ -43,17 +43,22 @@ The rig works with both V1.0 and V2.0 enclosures. Only difference is the measure
4343
- Filament: < 100 grams
4444

4545
**Assembly**:
46+
- The assembly process will depend on whether your PiTrac has both cameras pointed straight forward, or if Camera 1 (the "Teed Ball Camera") is angled over to the side to accomodate faster shots.
47+
- The skewed version looks like this:
48+
- [Skewed Camera Calibration Rig]({{ '/assets/images/enclosure_assembly/Autocalibration_Skewed_Cam1_Option.jpeg' | relative_url }}){: width="300"}
49+
- The cameras-straight-out version replaces the long arm with two short pieces and looks like this:
50+
- [Straight-out Camera Calibration Rig]({{ '/assets/images/enclosure_assembly/Autocalibration_Straight-Out_Option.jpeg' | relative_url }}){: width="300"}
4651
- Push pieces together snugly (can be tight - that's normal)
4752
- Make sure connections are fully seated for accurate dimensions
48-
- Ball 1 (right-most) sits on floor, Ball 2 (mid-air)
53+
- Ball 1 (right-most) sits on floor, Ball 2 (mid-air). NOTE - only place one ball at a time during calibration or the system will get confused.
4954

5055
### 2. Position the Rig
5156

5257
**Version 2.0 Enclosure**:
53-
- Insert tab into square hole in bottom front of enclosure
54-
- Check that rig is square to the enclosure
58+
- Insert the square tab into the square hole in bottom front of enclosure. You may need to nudge the LED light strip to get at the hole.
59+
- Check that rig is square to the enclosure and that the arm for the ball on the floor is 90° to the other leg. Also ensure the ball in the air is held straight up.
5560

56-
**Version 1.0 Enclosure**:
61+
**Version 1.0 Enclosure (Deprecated)**:
5762
- Center tab underneath lowest camera
5863
- Place tab on diagonal part of enclosure
5964
- Align end edge of rear part with outside of lower enclosure section
@@ -63,9 +68,8 @@ The rig works with both V1.0 and V2.0 enclosures. Only difference is the measure
6368
### 3. Aim the Cameras
6469

6570
**Camera 1** (Tee Camera):
66-
- Point directly at Ball 1 (on floor)
67-
- Doesn't need to be perfect - calibration figures out exact angle
68-
- Just get it close
71+
- Point directly at Ball 1 (on floor). For straight-out camera, then move the camera slightly so it is still aimed down, but is aimed straight out along the leg of the rig that attachs to the PiTrac.
72+
- Doesn't need to be perfect - calibration figures out exact angle. Just get it close.
6973

7074
**Camera 2** (Flight Camera):
7175
- Point straight out from monitor
@@ -76,7 +80,9 @@ The rig works with both V1.0 and V2.0 enclosures. Only difference is the measure
7680

7781
### 4. Configure Ball Positions
7882

79-
The calibration wizard needs to know where the balls are relative to the cameras. These measurements are in the Configuration page under "Calibration" settings.
83+
The calibration wizard needs to know where the balls are relative to the cameras. These measurements (for each of the "standard" rig setups) are already store in the system settings for each camera, and can be selected (or modified) in the Configuration page under "Calibration" settings.
84+
85+
Use the UI to select one of the three calibration rig options:
8086

8187
**For Version 1.0 Enclosure** (with standard rig):
8288

@@ -108,14 +114,16 @@ If you built your own rig, measure from camera lens center to ball center and en
108114

109115
### Step 1: Open Calibration Wizard
110116

111-
1. Navigate to web dashboard (usually `http://raspberrypi.local:8080`)
112-
2. Click menu (3 dots) → **Calibration**
113-
3. Select which camera(s) to calibrate:
117+
1. Select the type of calibration rig you will be using (depending on the camera arrangement and enclosure version) in Configuration → Calibration → kCalibrationRigType:
118+
[Calibration Rig Selection]({{ '/assets/images/enclosure_assembly/AutoCalibration_Rig_Type_Selection.png' | relative_url }}){: width="300"}
119+
3. Navigate to the PiTrac web dashboard (usually `http://raspberrypi.local:8080`) where raspberrypi is the name of your pi on the network.
120+
4. Click menu (3 dots) → **Calibration**
121+
5. Select which camera(s) to calibrate:
114122
- **Camera 1** - Recommended starting point (~30 seconds)
115123
- **Camera 2** - Do this second (~2 minutes, yes really)
116124
- **Both** - Only after you've done each individually
117125

118-
**Always calibrate Camera 1 first.** It's faster and gives you immediate feedback if something's wrong.
126+
**Calibrate Camera 1 first.** It's faster and gives you immediate feedback if something's wrong.
119127

120128
Click **Next**.
121129

@@ -130,12 +138,14 @@ This step confirms PiTrac can actually see the ball before trying to calibrate.
130138
- Red X = Ball not detected
131139

132140
2. Click **Capture Still Image**
133-
- Shows what camera sees
141+
- Shows what camera sees (not quite finished yet)
134142
- Ball should be visible and roughly centered
135143
- Focus should be good (twist M12 lens if not)
136144

137145
**If ball detection fails**:
138-
- Check lighting (turn on strobes, adjust camera gain in Configuration)
146+
- Check the images that the process captures (usually at ~/LM_Shares/Images)
147+
- Check the latest log files for errors (~/.pitrac/logs)
148+
- - Check lighting (turn on strobes, adjust camera gain in Configuration)
139149
- Verify ball is actually on the rig
140150
- Make sure camera is aimed at ball
141151
- Check focus

0 commit comments

Comments
 (0)