cv3.create.white_like
- cv3.create.white_like(img)[source]
Create an array filled with white pixels (255), with the same shape and type as the input array.
- Parameters:
img (numpy.ndarray) – Input array whose shape and type will be used to create the new array.
- Returns:
- Array filled with 255 (white) having the same shape and type
as the input array.
- Return type:
numpy.ndarray
Example
>>> import cv3 >>> original = cv3.zeros(50, 50, 3) >>> white_img = cv3.white_like(original) # Create white image with same shape >>> print(white_img.shape) (50, 50, 3)