Image.Vstack#
- classmethod Image.Vstack(images: list[Any] | tuple[Any, ...], sep: int = 1, bgcolor: Any = None, return_offsets: bool = False) Any[source]#
Vertical concatenation of images
- Parameters:
images (iterable of
Image) – images to concatenate verticallysep (int, optional) – separation between images, defaults to 1
bgcolor (scalar, string, array_like, optional) – color of background, seen in the separation between images, defaults to black
return_offsets (bool, optional) – additionally return the vertical coordinates of each input image within the output image, defaults to False
- Raises:
ValueError – all images must have the same dtype
ValueError – all images must have the same color order
- Returns:
vertically stacked images
- Return type:
Create a new image by stacking the input images vertically, with a horizontal separator line of width
sepand colorbgcolor.The vertical coordinate of the first row of each image, in the composite output image, can be optionally returned if
return_offsetsis True.Example:
>>> from machinevisiontoolbox import Image >>> img = Image.Read('street.png') >>> img Image(size=(1280, 851), dtype=uint8, name='.../images/street.png') >>> Image.Vstack((img, img, img)) Image(size=(1280, 2555), dtype=uint8) >>> Image.Vstack((img, img, img), return_offsets=True) (Image(size=(1280, 2555), dtype=uint8), [0, 852, 1704])
(
Source code,png,hires.png,pdf)