machinevisiontoolbox.Image.Zeros
- classmethod Image.Zeros(w, h=None, colororder=None, dtype='uint8')
Create image with zero value pixels
- Parameters:
w (int, (int, int)) – width, or (width, height)
h (int, optional) – height, defaults to None
colororder (str) – color plane names, defaults to None
dtype (str, optional) – NumPy datatype, defaults to ‘uint8’
- Returns:
image of zero values
- Return type:
Image
Create a greyscale image of zero-valued pixels. If only one dimension is given the image is square.
Example:
>>> from machinevisiontoolbox import Image >>> Image.Zeros(20) Image: 20 x 20 (uint8) >>> Image.Zeros(10,20) Image: 10 x 20 (uint8) >>> Image.Zeros(20, dtype='float', colororder="RGB") # create color image, all black Image: 20 x 20 (float64), R:G:B
- Seealso: