ALeclerc commited on
Commit
e2e676d
·
verified ·
1 Parent(s): 8934e79

Document the geometry files

Browse files
Files changed (1) hide show
  1. geometry/README.md +71 -0
geometry/README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Geometry: fitted calibration and part poses
2
+
3
+ No camera calibration was recorded and the rig no longer exists. These two files were
4
+ recovered afterwards from objects of known size in every frame: the conveyor chain (103 mm
5
+ wide) and the connector, matched against the manufacturer's CAD model of Harting
6
+ 09 20 010 3101. That model matches the part closely but is not certified to be its exact
7
+ reference. Both files are **fits, not measurements**. The method and its checks are in the
8
+ paper's appendix; the scripts are `scripts/geometry/` in
9
+ <https://github.com/AlexLeclerc102/ConveyorAD>.
10
+
11
+ The CAD model is not redistributed here. Download the 3D model of 09 20 010 3101 from
12
+ Harting, export it as OBJ in millimetres, and apply the seating below.
13
+
14
+ ## Coordinate frame
15
+
16
+ One world frame for all three cameras: the belt frame of `camera_1`, in millimetres.
17
+ `z` points up from the belt surface (`z = 0` on the belt), `y` points along the direction
18
+ of travel.
19
+
20
+ ## `calibration.json`
21
+
22
+ ```
23
+ {
24
+ "frame": "...",
25
+ "focals_px": {"camera_0": 7270.0, "camera_1": 4650.0, "camera_2": 7270.0},
26
+ "cameras": {
27
+ "camera_k": {
28
+ "K": 3x3, "R": 3x3, "t": [3], # pinhole, full-resolution pixels (2456 x 1842)
29
+ "centre_mm": [3], # camera centre in the world frame
30
+ "belt_frame_rotation_deg", "belt_frame_scale",
31
+ "pose_residual_mm", "yaw_residual_deg" # agreement with camera_1 (0 for camera_1)
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ A world point `X` (mm) projects to pixel `(u, v)` by `x = K (R X + t)`, `(u, v) = x[:2] / x[2]`.
38
+ No lens distortion is modelled. The principal point is the image centre. `camera_1`'s
39
+ focal length is not well determined by the fit alone; 4 650 px is the value at which the
40
+ three cameras' belt-plane scales agree (see the paper).
41
+
42
+ ## `poses.json`
43
+
44
+ Keyed by passage, one entry per passage (46). The key is `{item}/{label}/{condition}/{part_id}/{passage_id}`;
45
+ for a normal passage, which has no `part_id` level on disk, `part_id` is `-`:
46
+
47
+ - `connector/NOK/closed_shutter/2/exp_20250812_154632` is the folder of the same name;
48
+ - `connector/OK/with_background_objects/-/exp_20250812_152432` is the folder
49
+ `connector/OK/with_background_objects/exp_20250812_152432`.
50
+
51
+ ```
52
+ {
53
+ "x": float, # mm, across the belt, constant over the passage
54
+ "yaw": float, # rad, about z, constant over the passage
55
+ "y": {"27": float, ...}, # mm, along the belt, per global frame index
56
+ "iou": {"camera_0": float, "camera_1": float, "camera_2": float},
57
+ "measured_disp": bool # false: belt advance not measured, nominal speed assumed
58
+ }
59
+ ```
60
+
61
+ The pose of the part at frame `t` maps CAD vertices `v` (mm, as in the OBJ file) to the
62
+ world frame in two steps:
63
+
64
+ 1. Seat the part, mating face down: `s = (v_x, -v_y, -v_z + max_z)`, where `max_z` is the
65
+ largest `v_z` over the mesh.
66
+ 2. Place it: `X = Rz(yaw) s + (x, y[t], 0)`.
67
+
68
+ `iou` is the silhouette IoU between the rendered CAD and the object masks of each camera,
69
+ averaged over the passage's frames (on subsampled frames, at reduced resolution). `camera_1` was used for the fit; `camera_0` and `camera_2`
70
+ are an independent check of pose and calibration together. The three
71
+ `with_background_objects` passages have `measured_disp: false`.