Skip to content

Multiple addition to camera calibration and raw viewer - #642

Merged
JanuszBedkowski merged 22 commits into
mainfrom
mp/calib_tool_impr
Nov 19, 2026
Merged

JanuszBedkowski merged 22 commits into
mainfrom
mp/calib_tool_impr

Conversation

@michalpelka

Copy link
Copy Markdown
Contributor

Raw viewer:

  • prety timeline
  • static detection
  • Gannt for imu /csv

Claibration

  • UX fixes
  • Intrinsics and extrinsics calibration with Mei model, CAD priors.

@JanuszBedkowski

Copy link
Copy Markdown
Member

Please resolve conflicts

michalpelka and others added 22 commits November 17, 2026 11:27
Next to Lock translation in the Extrinsics panel: "Solve Extrinsics from
Pairs" keeps om/fi/ka and solves tx/ty/tz only, and the om/fi/ka sliders are
disabled. Reset Extrinsics resets only the unlocked half; with both locks on,
it and Solve are disabled.

Both solvers take fixRotation after fixTranslation (default off) and fail
when both are set. The Pinhole solver had no tests: now all six recovered,
each lock solving the rest, and a wrong locked value held rather than pulled
to the truth. The Ceres solver gets the same for fixRotation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A simplified, real-size Livox Mid-360 at the LiDAR origin (connector on -x)
and Insta360 X5 at the camera pose, with the lens the extrinsics describe
ringed in the frustum's yellow. Dimensions, and where the optical centre sits
in the body, are from the rig's CAD. "Lidar model" / "Camera model" in
Visualization, both on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mage

While Shift+Alt is held the Image View shows the LiDAR intensity image
instead of the photo: the cloud projected through the current calibration,
nearest point on top. A click there picks the LiDAR point drawn at that
pixel (else the closest within 8 px) as the pending cloud point. It is the
photo's pixel frame, so tapping Alt compares the two; the LiDAR side of each
pair is marked there (cyan).

The projection shader now writes depth, tested only for that image. Alt's
RGB/intensity toggle fires on release, and not when Shift joined the chord.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Camera body" in Visualization picks what is drawn at the camera pose: the
Insta360 X5 as before, or a bare board camera in the Raspberry Pi camera
format (25 x 24 mm board, 8.5 mm lens module ~4.3 mm ahead of the sensor,
ribbon connector at the bottom of the image), as the IMX519 on CAMERA_0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The flyover bar's scrubbable time ruler (ticks, labels, playhead) becomes
raylib_widgets::timeline() so other apps can use it. It now returns whether
the user moved the playhead. No change to the trajectory viewer's behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Play/Pause (Space), playhead time, a 0.1-50x speed, the chunk index and its
timestamp (as UTC when it is a Unix-epoch time) above a scrubbable timeline.
While playing or scrubbing, the shown chunk follows the playhead; the arrow
keys, the index field and Rebin move the playhead to the chunk they pick.
The Index slider and timestamp leave the top menu bar.

drawCompassRuler takes a bottom inset, so the compass stays above the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rame

Console tool with the same inputs as camera_lidar_trajectory_viewer (--mjs,
--calib, --camera_dir). One frame every --every seconds: every point within
--window seconds of it is moved into the lidar frame at the frame time and
projected with calib::projectPoint, the nearest point winning each pixel.
Writes a 16-bit depth image (mm) and an intensity image the size of the
camera image (or --scale), optionally with previews.

calib_core gains Session.h/.cpp: a session's .mjs manifest (poses, chunk
list) and its chunks' trajectories.

Not in the build yet: the top-level CMakeLists does not add the app, and
calib_core's CMakeLists does not list Session.cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Michal Pelka <michalpelka@gmail.com>
Points the 3D view at the midpoint of the LiDAR origin and the camera
position, close enough to fit both sensor models but no closer than the
0.5 m wheel-zoom limit, keeping the viewing angle. In the View menu, as a
button under the sensor models in Visualization, and on F.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Save pairs..." / "Load pairs..." under the pair list and in the File
menu, or drop a saved .json on the window. The file holds each pair's
pixel and LiDAR point, and the size and rectification of the image they
were picked in. Loading replaces the pairs, rescales the pixels to a
loaded image of another size, and warns when the shown image is raw and
the pairs were picked rectified, or the other way round.

A dropped .json with a "pairs" array loads as pairs, after the rest of
the drop so the image and calibration dropped with it are in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drag the panel's left edge to change its width, between 260 px and
leaving the 3D view 400 px; it stays pinned to the right at full height.
The 3D view's viewport follows the width instead of a fixed 340 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
calib_core gains solveExtrinsicsAndIntrinsicsCeres: the Mei intrinsics a
MeiIntrinsicsRefinement selects (fx/fy, cx/cy, xi kept >= 0, k1-k3/p1/p2)
become Ceres parameter blocks solved with the extrinsics; the others stay
constant. Refining a fisheye is refused, and the solve needs half as many
pairs as free parameters. solveExtrinsicsCeres now calls it with nothing
to refine.

In the app, checkboxes under the Mei intrinsics pick the groups. With any
picked, the solve also runs with both translation and rotation locked,
and the status line names the refined intrinsics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PointCloud::load cast gps_time straight into Point3D::ts_ns. Mandeye
writes gps_time in seconds, so ts_ns held whole seconds and lost the
fraction. Seconds are now scaled to nanoseconds; values already in
nanoseconds (core's export_laz.h writes those) are kept, told apart by
magnitude: epoch seconds stay below 1e14, epoch nanoseconds don't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e clouds

With --camera_dir <dir>, --closest_to_laz loads, once the clouds are in,
the image taken closest to the middle of their point times instead of
the alphabetically first one. The status line and stdout say which image
and how far from that middle it is; with no times in the clouds or the
images, the first image stays.

calib_core gains imageTimestampNs (the .meta.json sidecar's
FRAME_WALL_CLOCK, else the digits after the file name's last '_') and
closestImage(dir, t).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timeline() takes optional bands marked over the track, and lanes of bars
between the track and the tick labels, each lane kTimelineLaneHeight
tall. Hovering a band or bar adds its label to the tooltip; hovering
between two bars of a lane shows the gap. Gaps narrower than a pixel are
drawn closed. Existing callers are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An optional InputFileSpans* receives every LAZ file's first and last
point time and point count (the first file's too, before its points are
dropped), and every IMU file's sample span: imu****.csv, or MURATA_IMU's
files when those are used. Default null, so step 1 is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Motionless segments come from the VQF pass the viewer already runs: runs
of samples it flags as rest, each moved restMinT earlier since VQF flags
rest only after that long. They show as green bands on the playback
timeline.

Under the track, LAZ and IMU csv files are Gantt-style lanes, one bar
per file; hovering names the file with its span and count, or shows the
gap between two files. "Show files on the timeline" in View hides them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While the pointer is on a pair's Remove button, that pair gets a red
cross and ring in the image view and a red cross and sphere in the 3D
view, so it is clear which pair the click removes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--pairs <file.json> loads the picked pairs when the file exists, and is
where Ctrl+S saves them either way, without a dialog. Without --pairs,
Ctrl+S saves to the last pairs file loaded or saved, else asks for one;
a file that failed to load never becomes the target. A pairs .json given
as a plain argument now loads as pairs instead of as a calibration.

Save Calibration moves to Ctrl+Shift+S. The File menu gains "Save Pairs
As...", and the Correspondences panel names the pairs file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The "xi" refine checkbox shared its ImGui ID with the xi drag field
above it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The colour mode starts at "Jet (intensity)" instead of "Jet (depth)", in
the 3D view and in the overlay on the image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Michał Pełka <michalpelka@gmail.com>
@JanuszBedkowski
JanuszBedkowski merged commit b557766 into main Nov 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants