Example #1
0
 def test_Concatenate(self):
     video=Video()
     w=400
     h=400
     #https://stackoverflow.com/a/21170291/1497139
     image1=video.createBlank(w, h, (192,192,192))
     image2=video.createBlank(w, h, (255,128,0))
     image3=video.createBlank(w, h, (255//3,255//3,255/3))
     image4=video.createBlank(w, h, (0,0,255))
     combined=video.as2x2(image1,image2,image3,image4,downScale=1)
     hc, wc= combined.shape[:2]
     assert hc==2*h
     assert wc==2*w    
     video.showImage(combined, "combined",keyWait=1000)
Example #2
0
 def test_CreateBlank(self):
     video = Video()
     width = 400
     height = 400
     image = video.createBlank(width, height)
     iheight, iwidth, channels = image.shape
     print ("created blank %dx%d image with %d channels" % (iwidth, iheight, channels))
     assert height == iheight
     assert width == iwidth
     assert channels == 3