nabu.stitching.frame_composition module

class nabu.stitching.frame_composition.FrameComposition(composed_axis: int, local_start: tuple, local_end: tuple, global_start: tuple, global_end: tuple)[source]

Bases: object

class used to define intervals to know where to dump raw data or stitched data according to requested policy. The idea is to create this once for all for one stitching operation and reuse it for each frame.

composed_axis: int

axis along which the composition is done

local_start: tuple

tuple of indices on the input frames ref to know where each region start (along the composed axis)

local_end: tuple

tuple of indices on the input frames ref to know where each region end (along the composed axis)

global_start: tuple

tuple of indices on the output frame ref to know where each region start (along the composed axis)

global_end: tuple

tuple of indices on the output frame ref to know where each region end (along the composed axis)

browse()[source]
compose(output_frame: ndarray, input_frames: tuple)[source]
static compute_raw_frame_compositions(frames: tuple, key_lines: tuple, overlap_kernels: tuple, stitching_axis)[source]

compute frame composition for raw data

warning: we expect frames to be ordered y downward and the frame order to keep this ordering

static compute_stitch_frame_composition(frames, key_lines: tuple, overlap_kernels: tuple, stitching_axis: int)[source]

compute frame composition for stiching.

static pprint_composition(raw_composition, stitch_composition)[source]

util to display what the output of the composition will looks like from composition