Let us see how to create a white image using NumPy and cv2. A white image has all its pixels as 255.
Method 1: Using np.full() method :
Method 2: By creating an array using np.zeroes() :
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course