Repository navigation
Conversation
…era JPEGs Renders each ARW with the embedded correction on and off and compares it with the camera's own JPEG: residual offsets by radius after a similarity fit, checkerboard line straightness, and the ratio of the camera's correction to LightCraft's. Checked on synthetic boards with known radial distortion (corrected: 0.04 px median, ratio 1.000; 80 % corrected: ratio 1.26, expected about 1.25-1.28). Needs numpy, scipy and opencv-python-headless. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
…ection The A7 III's raw-IFD 0x7037 tables were refused until their geometry was checked. Measured against the camera's own JPEG of the same exposure (Lens Comp. Distortion: Auto) on 27 RAW+JPEG pairs from one body with the FE 16-35 F4 ZA, FE 28-70 and FE 50 F1.8 (strong barrel to strong pincushion, compressed and uncompressed, TV and monitor checkerboards): corrected board corners sit 0.06-0.44 px (median, 6000 px frame) from the JPEG's, against 0.8-26 px uncorrected; LightCraft applies the camera's amount of correction within 2 %; corrected rows and columns are as straight as the JPEG's. Sony's crop and the default crop agree on this body, so the warp is centred on the image. A unit test pins the warp from three of these tables to the camera's fitted geometry; the model boundary tests now accept ILCE-7M3 and still refuse its neighbours. RENDER_CACHE_VERSION is bumped. The measurement script handles screen moiré (X-corner check, duplicate corners, consensus lattice vectors). The corpus test's two ILCE-7M3 samples now expect one warp; raw.pixls.us is not reachable from this environment, so that test was skipped here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
Not for upstream. Same steps as release.yml's Windows job, unsigned, published as a pre-release of alvarohn/lightcraft. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
…on tools Moves it to tools/ with a pinned requirements file, as tools/spectral_camera_table.py does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
Reverts ed68b2e; the installer it built stays in alvarohn/lightcraft's releases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
Conflict in docs/whats-new.md (both added entries at the top). Main also bumped RENDER_CACHE_VERSION to 62 for its own pipeline change, the number this branch had taken: now 63, so thumbnails rendered by main's 62 without the ILCE-7M3 warp are rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gRtdWF1E9358FfzhzYqCS
deunderscorepaul
pushed a commit
to deunderscorepaul/lightcraft-classic
that referenced
this pull request
Oct 17, 2026
…d distortion correction Applied by hand on top of the fork's newer Sony lens-correction decoder (DISTORTION_MODELS); the PR's Python check tool is left out. Thanks @alvarohn Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
elrumo
pushed a commit
to elrumo/lightcraft
that referenced
this pull request
Oct 19, 2026
# Conflicts: # docs/whats-new.md
elrumo
pushed a commit
to elrumo/lightcraft
that referenced
this pull request
Oct 19, 2026
…DNG black levels per plane storytold#1069); cargo fmt
Merged
4 tasks done
Contributor
|
Thanks @alvarohn for the validation work. This branch conflicts with current |
FredApps
added a commit
that referenced
this pull request
Nov 4, 2026
LR-EDIT-OPTICS-PROFILE: enable Sony ILCE-7M3 embedded distortion correction (rebase of #1384)
This was referenced Nov 7, 2026
emmertex
pushed a commit
to emmertex/chromaforge
that referenced
this pull request
Nov 7, 2026
…ch up The isolation guard reads 4 pixels around a candidate, one more than detection's 3-pixel margin, so on a raw whose active area starts at the frame's edge (Sony A7C II lossless L) a neighbour position wrapped and the sample index overflowed. Neighbours now go through a checked step that skips anything outside the active area, and sample indexes are checked. The A7 III's lens-record test allows its applied distortion, enabled by the port of storytold/lightcraft#1384. The DRO test's 5 % points compare with the fit before smoothing, which they were measured against. Sources: own design. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The A7 III's raw-IFD
0x7037distortion tables have been read since #498 but refused by the model check, becausetheir corner warp was unverified in review. This validates them against the camera's own JPEG of the same exposure
and enables the body. One line in
arw_lens.rschanges; everything else is tests, docs and the measurement tool.Validation
27 RAW+JPEG pairs from one ILCE-7M3 (Lens Comp. ▸ Distortion Comp.: Auto, so the JPEG is the camera's corrected
render): a checkerboard filling the frame on a TV (handheld) and a desktop monitor (tripod), compressed and
uncompressed raws, wide open to f/8, plus one textured wall. Lenses: FE 16–35mm F4 ZA OSS (16, 20, 35 mm),
FE 28–70mm F3.5–5.6 OSS (28, 33, 50, 70 mm), FE 50mm F1.8. Tables range from strong barrel (16 mm, −690 at the
corner) to strong pincushion (70 mm, +1161).
LightCraft renders each ARW with the profile correction on and off; sub-pixel board corners are matched with the
JPEG's and a similarity (zoom, rotation, shift) is fitted, since the camera fills its frame with its own zoom. No lens
coefficient is fitted.
0.02–0.17 px and the p95 at most 0.46 px.
α·(corrected − uncorrected), radially). What remains is about 1.5 px at the 16 mm corners, of a 35 px correction.
on the image; fitted against the camera, the centre is within 0.3 px.
Full method and per-shot notes:
docs/sony-lens-corrections.md→ ILCE-7M3 validation. The photographs are notcommitted.
Changes
crates/raw/src/vendor/arw_lens.rs: the model check acceptsILCE-7M3(still exact;ILCE-7M3andILCE-7SM3stay refused). New testilce_7m3_matches_the_cameras_own_jpeg_geometry: the warp from three of thesetables (16, 35, 70 mm) stays within 0.0008 of the half diagonal of the camera's fitted geometry, and the
uncorrected frame is at least 10× further off. The DNG round-trip test now expects a warp for ILCE-7M3.
crates/raw/tests/corpus.rs: the two ILCE-7M3 corpus samples now expect one warp. Not run here: raw.pixls.usisn't reachable from my environment, so this corpus test skipped. The doc lists both samples with 16-sample tables
and 3:2 framing, so one warp each is expected, but please run
cargo xtask corpus --downloadfirst.crates/engine/src/media.rs:RENDER_CACHE_VERSION61 → 62.tools/sony_distortion_check.py(+tools/requirements-sony-distortion-check.txt): the measurement tool, soanother body can be validated the same way. It was checked on synthetic boards with known radial distortion
(corrected: 0.04 px; 80 % corrected: ratio 1.26 vs 1.25–1.28 expected).
sony-lens-corrections.md(validation section, coverage table), parity checklist rowLR-EDIT-OPTICS-PROFILE,
gaps.md,raw-parity.md,whats-new.md.contributors/people.toml: my own entry (Álvaro HN), committed as me.The branch also adds and then reverts a fork-only workflow (
.github/workflows/fork-windows-x64.yml) that builtan unsigned Windows installer in my fork; it is not in the diff.
cargo xtask ciis green (fmt, clippy, heif, test, parity, layers, assets, wasm).🤖 Generated with Claude Code