how to Create a Black Image in OpenCV

#hellow everyone today i am going to show you#how to create a black image in opencv
#first import opencv and numpy
import cv2
import numpy as np

#creating black image
#width of the image
width = 700
#height of the image
height = 600
Black_image = np.zeros( (width, height), dtype=np.uint8)

#displaying image untill press ESC button
while True:
    cv2.imshow('window', Black_image)
    if cv2.waitKey(1) == 27:
        breakcv2.destroyAllWindows()



Comments

Popular posts from this blog

How to Adding and Blending image in OpenCV.

How draw Line, Rectangle, Circle, Triangle, and write text in openCV.

Making Border on Image, splitting and merging Color Channels in opencv.