How to Fix World Frame for Older Scan DatasetsLink
Goal: Correct the world‑frame metadata of image poses in a PlantDB/FSDB scan dataset so that:
- every image has a negative z coordinate (preserving magnitude), and
- all pan angles start at 0° (the first image’s pan becomes the reference).
The guide assumes you have a local copy of the dataset and the fix_world_frame.py script installed.
Step‑by‑step instructionsLink
-
Open a terminal and navigate to the directory containing
fix_world_frame.py.cd ~/Projects/plant-3d-vision/scripts/ -
Run the script on the whole dataset (default behavior) or subset of scans.
python fix_world_frame.py /data/ROMI/ --no-auth--no-authtells the script to connect to the DB as the built‑inadminuser (useful for local or test datasets).To apply the fix only on a subset of scans, e.g only March 2023 scans:
python fix_world_frame.py /data/ROMI/ --scan "2023-03-*" --no-authThe
--scanoption accepts glob patterns; multiple patterns can be supplied and are OR‑combined. -
Review the script output. The CLI prints each processed scan and, after completion, lists scans whose
pipeline.tomlbackup was found. For those scans, if you intend to reprocess them using thepipeline.tomlbackup to reuse the specific combination of parameters, you must manually adjust theVoxels.bounding_boxZ limits in the backed‑uppipeline.tomlfile.Processing scan: scan001 Processing scan: scan002 Processing scan: scan003 ... All done! If you intend to reuse them, remember to edit the `Voxels.bounding_box` z‑axis values in the backed‑up `pipeline.toml` file for these scans: 0, scan003 -
Verify the changes (optional).
Open a sample image file and inspect itsapproximate_posemetadata; you should see a negative z and a pan value starting from 0°.
Tips & common pitfallsLink
| Situation | Guidance |
|---|---|
| No scans match the pattern | Ensure the pattern matches the scan IDs exactly (case‑sensitive). Use * as a wildcard. |
pipeline.toml not found |
The script only warns about scans that already have a backup. If the file is missing, you may need to create one manually before re‑running downstream pipelines. |
| Authentication errors | Verify that the username/password are correct, or use --no‑auth for local databases. |
| Unexpected pan values | The script normalises pan with % 360. If you see values outside 0‑359°, the scan may contain corrupted metadata; re‑run the script after fixing the original pose. |
When to stopLink
You have successfully normalized the world frame when:
- All scans report “All done!” without error messages.
- The
approximate_poseof every image shows a negative z and pan angles that start at 0°. - The
pipeline.tomlbackup files (if any) have been inspected and their bounding‑box Z limits updated.
You can now feed the dataset into downstream analysis pipelines that assume a standard world‑axis orientation.
For a full reference of all CLI options, see the script’s --help output.