Image.__mod__#
- Image.__mod__(other) Image[source][source]#
Overloaded
%operator- Returns:
image with stacked planes
- Return type:
img1 % img2results in an image with the planes ofimg1followed by the planes ofimg2. The two images must have the same number of rows and columns and data type. The color order of the resulting image is the color order ofimg1followed by the color order ofimg2.The operation also supports stacking a scalar as a plane onto an image, in which case the resulting image has one more plane than the original image and the new plane is filled with the scalar value.
Example:
>>> from machinevisiontoolbox import Image >>> img = Image([[1, 2], [3, 4]]) >>> z = img % Image([[5, 6], [7, 8]]) >>> print(z.nplanes) 2 >>> z = img % 0 >>> print(z.nplanes) 2
- Seealso: