-
class
ImageStitching
[source] -
make_weight_matrix
(height1, width1, height2, width2, overlap, side)[source] Generate a linear-ramp weighting matrix for image stitching.
- Parameters
height1 (int) – Size of the 1st image.
width1 (int) – Size of the 1st image.
height2 (int) – Size of the 2nd image.
width2 (int) – Size of the 2nd image.
overlap (int) – Width of the overlap area between two images.
side ({0, 1}) – Only two options: 0 or 1. It is used to indicate the overlap side respects to image 1. “0” corresponds to the left side. “1” corresponds to the right side.
-
pre_process
()[source] This method is called immediately after base_pre_process().
-
process_frames
(data)[source] This method is called after the plugin has been created by the pipeline framework and forms the main processing step
- Parameters
data (list(np.array)) – A list of numpy arrays for each input dataset.
-
setup
()[source] This method is first to be called after the plugin has been created. It determines input/output datasets and plugin specific dataset information such as the pattern (e.g. sinogram/projection).
-
stitch_image
(mat1, mat2, overlap, side, wei_mat1, wei_mat2, norm)[source] Stitch projection images or sinogram images using a linear ramp.
- Parameters
mat1 (array_like) – 2D array. Projection image or sinogram image.
mat2 (array_like) – 2D array. Projection image or sinogram image.
overlap (float) – Width of the overlap area between two images.
side ({0, 1}) – Only two options: 0 or 1. It is used to indicate the overlap side respects to image 1. “0” corresponds to the left side. “1” corresponds to the right side.
wei_mat1 (array_like) – Weighting matrix used for image 1.
wei_mat2 (array_like) – Weighting matrix used for image 2.
norm (bool, optional) – Enable/disable normalization before stitching.
- Returns
Stitched image.
- Return type
array_like
-