Current app reconstruction

How Tensei turns live camera frames into replayable photographic looks.

The app feels like a camera: pick a look, watch the live preview, take the shot. Under that simple surface, Tensei gathers multiple protected frames, reconstructs scene light, keeps headroom as a debug-visible gain map, and renders the result through DSLR, Analog, or Magic Eye response.

Image purpose: the background is the ordinary selected source frame, so the page starts from the same unstyled photograph the algorithm starts from.

Start with the current app state

Where the app is now

The user sees one camera. The engineering path keeps a replayable record of how each image was made.

First principle: a camera app should not ask the user to understand reconstruction. The primary surface is a live viewfinder with look selection, zoom, flash, photo/video mode, shutter, and the most recent capture.

The deeper pipeline exists so each capture can be tuned and trusted. The current app can save a normal JPEG while debug bundles preserve the selected frames, alignment, merged HDR reference, LDR image, gain map, preview output, and final render.

Surface

Live styled preview

The viewfinder is responsive and already carries the chosen look family, so the user is not shooting blind.

Modes

Photo and filtered video

The same camera surface can take stills or record filtered video; the explanation below focuses on still reconstruction.

Looks

DSLR, Analog, Magic Eye

The capture assembly is shared. Each look interprets the same reconstructed scene with a different optical and color response.

Debug

Replay bundles

When tuning is needed, the app can keep enough intermediate evidence to rerender the same moment without recapturing it.

Why no screenshot here: this section is about the product contract, not the visual result. A camera UI screenshot would show controls and chrome; it would not demonstrate how one capture becomes replayable evidence.

Step 1

A Tensei still is built from an adaptive frame buffer, not from one JPEG.

The shutter uses recent camera frames as source material. Scene assessment decides whether the shot should merge 8, 12, 16, 24, or 32 frames, how aggressively to protect highlights, and what exposure context the renderer needs later.

That matters because the looks depend on light behavior. Clipped highlights cannot produce believable glow or rolloff, and a single display-encoded image cannot tell the renderer where there was real headroom.

Input

32-frame buffer

The app keeps a rolling buffer of live frames that can be selected when the shutter fires.

Metering

Scene profile

Histogram and exposure state estimate highlight pressure, shadow noise, and useful merge depth.

Selection

8 to 32 usable frames

The capture path chooses frames that can actually contribute instead of blindly stacking everything.

Alignment

Motion handling

Selected frames are aligned before fusion so handheld capture does not turn detail into blur.

Why no extra capture image here: the selected frame and aligned frame appear once in the replay artifact gallery below. Repeating them here would decorate the page without teaching a new operation.

Step 2

The selected frames are fused into scene-light products.

The fusion step produces several linked artifacts. The renderers need them because no single display image contains enough information to model highlight rolloff, glow, color response, and texture.

LDR means the normal image a screen or JPEG can show. HDR means the reconstructed scene still has brightness beyond that display range. A gain map is the bridge: a separate image that says where extra brightness was available before tone mapping hid it.

Replay bundle 20260530-163339-318-EC56DB87

These are actual files from one captured shot.

This purple rhododendron capture was taken on May 30, 2026. The app had 32 buffered frames available, and scene assessment chose an 8-frame merge for this close flower shot. The raw linear HDR reference is stored as replay/merged_hdr.rgba16f; the current user-facing save is a reliable JPEG, while replay keeps the LDR, gain map, preview output, and final render for inspection.

This is the one complete image set on the page. Every image below is a distinct artifact with a different diagnostic job.

Selected purple rhododendron source frame from Tensei
01 Selected source frame Purpose: show the ordinary phone frame the pipeline starts from, before alignment, fusion, or styling.
Aligned purple rhododendron source frame from Tensei
02 Aligned source frame Purpose: make handheld registration visible; the flower has shifted into merge coordinates before stacking.
Display preview generated from the linear HDR half-float buffer
03 Linear HDR preview Purpose: expose the reconstructed light buffer as a displayable proxy, not as the styled photograph.
Fused LDR output from Tensei replay
04 Fused LDR Purpose: show the normal display base that will be paired with hidden headroom.
Inverted headroom map for the purple rhododendron capture
05 Inverted headroom map Purpose: show where replay says extra brightness existed before tone mapping; inverted so the map reads clearly in this layout.
Preview render output from Tensei replay
06 Preview output Purpose: prove the live-look replay path agrees with the final render for this bundle.
Final analog output from Tensei replay
07 Final analog render Purpose: show the user-facing JPEG after the Analog look is applied.

Why the steps below do not repeat images: the gallery already shows the actual files. The remaining value is conceptual: what each operation means, why it exists, and what mistake it prevents.

  1. 01

    Normalize the selected frames.

    Each chosen frame enters the merge path with exposure context. The goal is to compare light, not arbitrary display brightness.

  2. 02

    Align and weight them.

    Motion-aware alignment decides which pixels are trustworthy. Strong frames contribute more; unstable regions contribute less.

  3. 03

    Merge in linear light.

    The fused image represents scene light before styling. In linear light, doubling the stored value means doubling the light, so averaging frames is meaningful instead of being screen-brightness math.

  4. 04

    Create the display LDR image.

    The LDR is the normal visible version of the fused scene. It is not the whole truth; it is the base layer for display.

  5. 05

    Keep replay headroom separately.

    The HDR reference and gain map record where the LDR had hidden headroom. On this site the map is inverted for readability; darker regions carry more retained reserve.

Step 3

The gain map is what makes the looks more than filters.

A flat JPEG only says what a pixel became after tone mapping. The gain map says how much brightness reserve was still available in the reconstructed scene. That distinction is why highlight handling can be local instead of a global contrast trick.

Tensei uses that headroom for three visible behaviors: protecting highlights from hard clipping, deciding where glow or halation is eligible, and changing how color and texture react across shadows, midtones, and bright areas.

Rolloff

Highlights bend, not clip

The print and film shoulder compress bright values while trying to keep white areas from becoming flat blocks.

Scatter

Only real highlights halate

Headroom gates the warm scatter source so halation follows bright scene energy instead of every pale surface.

Texture

Grain follows density

Grain is applied in density space so dark areas, midtones, and bright areas do not all receive the same texture.

Why no additional image here: artifact 05 above is the actual inverted headroom map. This section explains how to read that map; a second copy of it would not add evidence.

Step 4

The current app has three looks; Analog is the most physically staged one.

DSLR is the cleaner camera standard, Magic Eye is the prismatic expressive look, and Analog targets a new disposable camera: fresh color, plastic-lens softness, visible film texture, and believable highlight behavior. Not an aged, yellow, damaged preset.

Optics

Disposable lens profile

Soft edges, mild barrel distortion, vignette, and chromatic aberration make the image feel captured through simple plastic optics.

Linear HDR

Energy-preserving halation

Bright source energy is scattered before the film response. The kernel redistributes light rather than simply adding glow on top.

Negative

Film density response

Toe, shoulder, gamma, channel sensitivity, dye crossover, and reciprocity response shape color as if light passed through film layers.

Print

Paper and highlight shoulder

Print density sets black point, paper white, contrast, toe lift, and highlight compression so whites look photographic rather than digital.

Color

Fresh consumer palette

Saturation, warm/cool balance, green response, skin protection, and highlight chroma protection keep the result pleasing without looking like a generic preset.

Texture

Density-space grain

Static blue-noise-driven grain is rotated per shot and weighted by density so it reads as film texture instead of animated digital noise.

Why the stage cards are text-only: optics, halation, negative response, print response, color, and texture all operate on the same capture. Separate stills would imply separate scenes; the useful image evidence is the before/after comparison.

Pre-filter fused LDR before analog chain
Before analog chain. Purpose: isolate the neutral fused display base so the Analog look is not confused with capture or merge.
Final analog render after optics, halation, film response, and grain
After analog chain. Purpose: show the same flower after optics, halation, film response, print response, and grain.

Step 5

Each capture can be replayed from the frames that made it.

A saved photo is only the final result. For tuning, Tensei can keep the parts behind it: chosen frames, exposure data, alignment weights, fused LDR image, gain map, HDR reference, preview, and final render.

That makes the look replayable. We can open one capture, compare old and new renders, and look for failures that matter in a photograph: clipped whites, dull shadows, weak glow, fake color, or texture that feels pasted on.

Why no proof image here

Proof is the relationship between files in the replay bundle: the same source capture can be rendered through different versions of the look pipeline. Repeating the LDR, preview, and final images here would look evidentiary without adding a new visual fact.