cv3.create.full_like
- cv3.create.full_like(img, value)[source]
Create an array filled with a specified value, 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.
value – The value to fill the array with.
- Returns:
- Array filled with the specified value having the same shape and type
as the input array.
- Return type:
numpy.ndarray
Example
>>> import cv3 >>> original = cv3.zeros(50, 50, 3) >>> new_img = cv3.full_like(original, value=255) # Create array with same shape, filled with 255 >>> print(new_img.shape) (50, 50, 3)