reprojection 3D data into 2D camera views

16 views
Skip to first unread message

Floris van Breugel

unread,
Nov 18, 2024, 1:42:21 PM11/18/24
to multi-camera software from the Straw Lab
Hi Andrew,

Do you have an example code snippet somewhere for projecting a 3D braid trajectory into each of the camera views using a calibration xml? 

Thanks!

- Floris

Andrew Straw

unread,
Nov 18, 2024, 3:41:27 PM11/18/24
to Floris van Breugel, multi-camera software from the Straw Lab
Hi Floris,

The `braidz-export-rrd` program will export braidz files to .rrd files, the rerun viewer format. In the rerun viewer you can select which time range to show, and it loads up the camera calibrations and projects the 3d points into 2d. So this could most do what you are asking “out of the box”. However, our docs for this do not yet exist. So you’d have to play around. And while this is good for interactive data analysis, you may be asking for a “final plot for publication” which this doesn’t really address. For that I cannot immediately think of a short snippet at hand.

(One can also export Strand-Cam saved videos to .rrd files with our `video2rrd` program and the rerun viewer will line all the data up in time and then the projections will be overlaid on the video. In rerun 0.20, just released a couple days ago, they just added more video support and I have not yet had a chance to dig in and see if we can take advantage of this new functionality.)

Hope that helps,
Andrew

--
You received this message because you are subscribed to the Google Groups "multi-camera software from the Straw Lab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to multicams+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/multicams/684f84e8-8e66-4a10-aeb5-f88313588082n%40googlegroups.com.

Floris van Breugel

unread,
Feb 6, 2026, 3:18:02 PMFeb 6
to multi-camera software from the Straw Lab
Reviving this to pose a related question. I'm realizing it would be nice to periodically run a reprojection error analysis to see if we need to do a recalibration. The code to do this is obviously embedded in the gocal routing, but I'm wondering if perchance you have a standalone script that can provide a reprojection error report given a braidz file? Or if not, any tips on how to build such a tool quickly from existing source code? (backup plan: ask Claude Code to help me extract that from gocal and build a python version)

- Floris

Andrew Straw

unread,
Feb 6, 2026, 3:31:21 PMFeb 6
to Floris van Breugel, multi-camera software from the Straw Lab
Hi Floris,

The `braidz-cli` program should print a histogram of reprojection errors:

braidz-cli 20250630_160133.braidz

Will print near the bottom something like (this is yaml):

reprojection_distance_100x_pixels_summary:
  len: 6395
  mean: 196.4265832681781
  min: 1
  max: 1199

This means 100x the mean reprojection error is 196.4, so the mean reprojection error was 1.96. (The 100x thing arises from some detail, which I have forgotten, about storing such values efficiently.)

Hope that helps. Of course reprojection error can be computed for specific cameras, regions in 3D space, and so on.

Best,
Andrew

Reply all
Reply to author
Forward
0 new messages