23 lines
751 B
Python
23 lines
751 B
Python
import cv2
|
|
import numpy as np
|
|
from time import sleep
|
|
|
|
class Image:
|
|
def __init__(self, x, y):
|
|
self.x = x
|
|
self.y = y
|
|
|
|
def show(self, path):
|
|
image = cv2.imread(path)
|
|
cv2.namedWindow("window", cv2.WND_PROP_FULLSCREEN)
|
|
cv2.moveWindow("window", self.x, self.y)
|
|
cv2.setWindowProperty("window",cv2.WND_PROP_FULLSCREEN,cv2.WINDOW_FULLSCREEN)
|
|
cv2.imshow("window", image)
|
|
|
|
def blank(self):
|
|
blank_image = np.zeros(shape=[512, 512, 3], dtype=np.uint8)
|
|
cv2.namedWindow("window", cv2.WND_PROP_FULLSCREEN)
|
|
cv2.moveWindow("window", self.x, self.y)
|
|
cv2.setWindowProperty("window",cv2.WND_PROP_FULLSCREEN,cv2.WINDOW_FULLSCREEN)
|
|
cv2.imshow("window", blank_image)
|