Update LTM and fusion exposure pipelines - #163
Draft
RealJohnGalt wants to merge 1 commit into
Draft
Conversation
More Wronski inspired, with tweaks along the way: - Redesign the low-res LTM gain map in fusionmap with range gates over the clena base brightness and notch spatial kernel, eliminating upsampling artifacts while keeping gain edges on one side of transitions across synthetic exposures. - Apply fused/base gain at full res via guided filter, with a luminance range gate and dark/bright gain caps to remove halos around high contrast edges and avoid lifting/exacerbating shadow noise. - Normalize bayer planes before expo weighting and clamp expo channels to improve stability and prevent overly bright expo weights. - Make Laplacian contrast measures and expo fusion detail reads robust to phase patterns by clamping texel positions and pre-filtering detail with a 3x3 kernel (slightly modified after starting with Nyquist). Also restrict fine scale dehaze boosts to limit LTM strengthening dehaze-induced transition artifacts. - Improve texture leak protection with simple ownership tracking. Additionally, ensure we close all GLTexture resources if processing fails midway. - Ensure AE skips cleanly when imputs are ever incorrect, to not replace the working WorkingTexture. - If using PyramidMerging, release frame buffers once uploaded, to keep the footprint n+1 rather than holding all frames for entire range. - Fix shadow curve interpolation and expo fusion tuning by using dedicated shadow splines, improve with additional fusion tuning capabilities, and introduce scale-dependent dehazing factors. Also attempt to minimize upscaling unit differences. TODO in the future: - Attempt using four or five synthetic exposures opposed to three as reference. - Further improve edge and halo mitigations (I have tried to avoid severe smoothing). However, it is better than untouched upstream state currently as far as haloing goes. Assisted-by: Deepseek V4 Pro Assisted-by: Deepseek V4 Flash Assisted-by: Kimi K3
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.
More Wronski inspired, with tweaks along the way:
Redesign the low-res LTM gain map in fusionmap with range gates over the clena base brightness and notch spatial kernel, eliminating upsampling artifacts while keeping gain edges on one side of transitions across synthetic exposures.
Apply fused/base gain at full res via guided filter, with a luminance range gate and dark/bright gain caps to remove halos around high contrast edges and avoid lifting/exacerbating shadow noise.
Normalize bayer planes before expo weighting and clamp expo channels to improve stability and prevent overly bright expo weights.
Make Laplacian contrast measures and expo fusion detail reads robust to phase patterns by clamping texel positions and pre-filtering detail with a 3x3 kernel (slightly modified after starting with Nyquist). Also restrict fine scale dehaze boosts to limit LTM strengthening dehaze-induced transition artifacts.
Improve texture leak protection with simple ownership tracking. Additionally, ensure we close all GLTexture resources if processing fails midway.
Ensure AE skips cleanly when imputs are ever incorrect, to not replace the working WorkingTexture.
If using PyramidMerging, release frame buffers once uploaded, to keep the footprint n+1 rather than holding all frames for entire range.
Fix shadow curve interpolation and expo fusion tuning by using dedicated shadow splines, improve with additional fusion tuning capabilities, and introduce scale-dependent dehazing factors. Also attempt to minimize upscaling unit differences.
TODO in the future:
Assisted-by: Deepseek V4 Pro
Assisted-by: Deepseek V4 Flash
Assisted-by: Kimi K3