nabu.stitching.overlap module¶
- class nabu.stitching.overlap.OverlapStitchingStrategy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
- MEAN = 'mean'¶
- COSINUS_WEIGHTS = 'cosinus weights'¶
- LINEAR_WEIGHTS = 'linear weights'¶
- CLOSEST = 'closest'¶
- IMAGE_MINIMUM_DIVERGENCE = 'image minimum divergence'¶
- HIGHER_SIGNAL = 'higher signal'¶
- class nabu.stitching.overlap.ZStichOverlapKernel(frame_width: int, stitching_strategy: OverlapStitchingStrategy = OverlapStitchingStrategy.COSINUS_WEIGHTS, overlap_size: int = None, extra_params: dict | None = None)[source]¶
Bases:
OverlapKernelBase
class used to define overlap between two scans and create stitch between frames (stitch function)
- DEFAULT_HIGH_FREQUENCY_THRESHOLD = 2¶
- property overlap_size: int¶
- property img_2: ndarray¶
- property weights_img_1: ndarray | None¶
- property weights_img_2: ndarray | None¶
- property stitching_strategy: OverlapStitchingStrategy¶
- nabu.stitching.overlap.compute_image_minimum_divergence(img_1: ndarray, img_2: ndarray, high_frequency_threshold)[source]¶
Algorithm to improve treatment of high frequency.
It split the two images into two parts: high frequency and low frequency.
The two low frequency part will be stitched using a ‘sinusoidal’ / cosinus weights approach. When the two high frequency part will be stitched by taking the lower divergent pixels
- nabu.stitching.overlap.compute_image_higher_signal(img_1: ndarray, img_2: ndarray)[source]¶
the higher signal will pick pixel on the image have the higher signal. A use case is that if there is some artefacts on images which creates stripes (from scintillator artefacts for example) it could be removed from this method