Skip to main content

Module layers

Module layers 

Source
Expand description

Region learning over a whole recording: the core’s per-frame evidence accumulators (crate::kernels::layers::Learner), the last informative native frame kept for appearance evidence, and the one-shot region construction at the end — the automatic layout (crate::kernels::regions::finish) or a hand-placed one (manual regions, plus the “unassigned” region when they leave pixels uncovered).

The scan session owns one of these; the web page’s LayerLearner (src/core/layers.ts) drives one directly through rust/wasm/src/layers.rs for the layer-learning unit and parity tests.

Structs§

ManualRegion
One hand-placed region from the run’s settings.
RegionLearner
Layer-learning state for one run: accumulators plus the last informative native frame.

Constants§

UNASSIGNED_NAME
Name of the region that owns whatever native pixels a hand-placed layout leaves uncovered. Region names are a fixed zh vocabulary, translated only for display (src/i18n/names.ts).

Functions§

label_atlas
The native-resolution label plane for regions (0 = no region, otherwise index + 1; the first region that contains a pixel owns it) and the per-code pixel counts, or None past 254 regions. Regions are described the way the page’s region rows carry them: an automatic region always has a crop (its own rect when it has none), and a solid region’s mask is not consulted.
manual_uncovered
Whether some native pixel of a native_width × native_height frame lies in none of rects. An empty list covers nothing.