![]() You will see this convention utilized in all PyImageSearch tutorials that leverage NumPy (and in fact, you will commonly see this convention in the Python community as well!) Lines 2 and 3 import the packages we will be using.Īs a shortcut, we will create an alias for numpy as np. # (Red, Green, and Blue) with a black backgroundĬanvas = np.zeros((300, 300, 3), dtype="uint8") # initialize our canvas as a 300x300 pixel image with 3 channels Open the basic_drawing.py file in your project directory structure, and let’s get to work. We are now ready to get started! Implementing basic drawing functions with OpenCVīefore we draw on actual images, let’s first learn how to initialize an empty NumPy array/image and draw on it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |