Skip to content

nabu.stitching.frame_composition

source module nabu.stitching.frame_composition

Classes

  • FrameComposition 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.

source dataclass FrameComposition(composed_axis: int, local_start: tuple, local_end: tuple, global_start: tuple, global_end: tuple)

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.

Attributes

  • 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)

Methods

source method FrameComposition.browse()

source method FrameComposition.compose(output_frame: numpy.ndarray, input_frames: tuple)

Raises

  • TypeError

  • ValueError

source staticmethod FrameComposition.compute_raw_frame_compositions(frames: tuple, key_lines: tuple, overlap_kernels: tuple, stitching_axis)

compute frame composition for raw data

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

source staticmethod FrameComposition.compute_stitch_frame_composition(frames, key_lines: tuple, overlap_kernels: tuple, stitching_axis: int)

Compute frame composition for stitching.

source staticmethod FrameComposition.pprint_composition(raw_composition, stitch_composition)

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