def hdSolidBlock(fn = "redHDSolidBlock.jpg", bgr = None):
'''Generate test images as solid blocks of colour of known size, save to filename fn.'''
# Create a zero (black) image of HD size with 3 colour dimensions. Colour space assumed BGR by default.
h = 1080
w = 1920
img = np.zeros((h,w,3),dtype="uint8")
# Want to set all of the pixels to bgr tuple, default red, 8 bit colour
if not bgr:
bgr = [0,0,255]
img[:,:] = bgr
vw = ImageViewer(img)
vw.windowShow()
#cv2.imshow("zeroes", frame)
#ch = 0xff & cv2.waitKey(10000)
#cv2.destroyAllWindows()
cv2.imwrite(fn, img)
评论列表
文章目录