Skip to content

0.4.0

Latest

Choose a tag to compare

@shinf1x shinf1x released this 03 Sep 21:51
· 2 commits to main since this release
e548d74

Depth-Aware Fusion and Resolution Reconstruction

Chiaro 0.4.0 is somewhat of a major update to the computational photography pipeline, adding dense depth-aware multi-camera alignment, locally verified resolution reconstruction, improved RAW recovery, and expanded use of the L16's factory calibration data.

Depth-aware multi-camera fusion

Fusion is no longer limited to a single refined homography for each camera module.

Chiaro now builds a calibrated multi-camera inverse-depth field after global alignment:

  • semi-global matching provides coarse depth hypotheses;
  • finite depth is accepted only when supported by independent camera evidence;
  • accepted hypotheses are remeasured at finer resolution with edge-aware support;
  • each camera can continuously refine the shared depth and a bounded local residual;
  • unsupported, distant, or ambiguous regions safely fall back to the global alignment rather than receiving invented depth;
  • likely occlusions and contradictory edge samples are suppressed.

This substantially improves reconstruction of scenes containing objects at different distances and reduces the double edges and ghosting caused by parallax.

Focus-aware detail ownership

Fusion now considers the captured focus state of each physical camera when deciding which module should contribute fine detail.

A magnified camera that was focused behind a nearby subject is suppressed where its parallax and focus state disagree with that foreground surface.

At the same time, a sharper telephoto module can take ownership of fine structure when it genuinely reproduces the same scene detail.

Thin structures such as branches and wires receive additional protection against being erased by many individually weak background samples.

True multi-camera resolution reconstruction

0.4.0 introduces a new reconstruction stage that uses the physical samples from multiple camera modules rather than simply resampling the fused image.

The pipeline:

  • aligns contributing modules at a common bandwidth;
  • determines the finest locally verified optical tier;
  • measures whether the available cameras provide useful sub-pixel sampling diversity;
  • combines compatible multiscale detail while retaining the reference camera's tone and colour;
  • allows a denser telephoto observation to transfer genuine additional detail where alignment is trustworthy.

Maximum-mode fusion can produce images up to 82 MP by default.

Both Gallery and the command-line tools allow switching between conventional resampling and multi-camera reconstruction.

Improved RAW highlight recovery

Highlight reconstruction now begins before demosaicing in the RAW Bayer domain.

Available recovery strategies include:

  • local edge-aware Bayer reconstruction;
  • multiscale Bayer reconstruction;
  • multi-camera recovery.

Multi-camera recovery can borrow radiance from another module only when multiple aligned, unclipped observations agree.

Each reconstructed sample carries confidence information, and clipped samples retain the sensor-white lower bound.

The existing smooth display highlight shoulder remains as a final safeguard for display-ready output.

Adaptive RAW crosstalk correction

Chiaro now uses the L16's factory 17×13 four-phase crosstalk mesh directly and can optionally refine it for the current capture.

The default adaptive mode:

  • keeps the factory calibration as the prior;
  • estimates only a small white-balance-aware residual from smooth aligned overlap;
  • validates the correction against held-out image regions;
  • falls back to the original factory calibration when the capture-specific model does not improve the measurement.

This improves inter-module colour consistency without replacing the camera's factory calibration with an unconstrained scene-derived fit.

Factory colour-profile interpolation (somewhat WIP)

Colour conversion now makes fuller use of the L16's factory colour calibration.

Instead of forcing the D65 profile, Chiaro interpolates the camera's A, F11, and D65 profiles according to the capture white balance in reciprocal-temperature space.

A new chiaro-color-profile diagnostic tool can inspect and export:

  • ColorMatrix and ForwardMatrix records;
  • grey ratios;
  • Macbeth chart measurements;
  • illuminant and sensor spectra;
  • gold_cc calibration records;
  • interpolation weights and confidence.

Experimental Macbeth-derived refits are evaluated using held-out colour accuracy and inter-camera consistency and are only promoted when they outperform the supplied factory matrices.

Camera-specific cleanup profiles

Fusion and night stacking can now apply optional .chiaro-cleanup profiles generated by Chiaro Hotpixel.

These profiles learn camera-specific, temperature-, exposure-, and gain-dependent:

  • persistent sensor defects;
  • row artifacts;
  • column artifacts.

Correction is performed on RAW frames before highlight recovery, alignment, and synthesis.

Cleanup profiles are tied to the exact factory hotpixel.rec used during training to prevent accidental use with a different physical camera.

Better night-mode processing

Night stacking now uses the L16's calibrated signal-dependent sensor noise models when evaluating temporal samples.

Noise models are interpolated for the recorded sensor gain, with capture-embedded calibration taking priority and device calibration filling missing entries.

Monochrome modules use their factory panchromatic noise characterization rather than being treated as a Bayer colour channel.

Night processing also gains the new depth reconstruction, resolution reconstruction, RAW highlight recovery, adaptive crosstalk, cleanup-profile, and colour-calibration improvements used by normal fusion.

Faster demosaicing

AMaZE and LMMSE now include runtime-selected AVX2 implementations on supported x86-64 processors.

The same portable binaries continue to run on CPUs without AVX2 and on non-x86 platforms using the scalar implementations.

No AVX2-specific build is required.

Diagnostics

Fusion reports and debug output now expose substantially more information, including:

  • quantitative inverse depth;
  • depth visualization and provenance;
  • per-camera depth/alignment statistics;
  • luminance and colour source ownership;
  • resolution-reconstruction coverage and confidence;
  • sub-pixel phase support;
  • cleanup-profile correction statistics;
  • factory colour-profile interpolation data;
  • RAW highlight-recovery confidence.