Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

How does np.zeros() create a black background?

$
0
0
I am creating a very simple line drawing program. The problem is that i am still in the learning stage and I jsut stumbled across a problem. import numpy as np import cv2 img = np.zeros((512,512,3), np.uint8) img = cv2.line(img,(0,0),(511,511),(255,0,0),5) how does np.zeros((512,512,3), np.uint8) create a black back ground? What if i want to create a red or a green background? And also, what does these 2 parameters mean? I hope this answers my problem! Thanks!! :)

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>