File size: 309 Bytes
3979c37
 
 
 
 
 
967c482
3979c37
3524600
3979c37
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import cv2


def show_preview(flag, img, title=None):
    if title is None:
        title = flag
    cv2.imshow(flag, img[:, :, ::-1].copy())
    cv2.setWindowTitle(flag, title)
    cv2.setWindowProperty(flag, cv2.WND_PROP_TOPMOST, 1)
    cv2.waitKey(1)


def close_all_preview():
    cv2.destroyAllWindows()