def preprocessFrame(frame: np.ndarray) -> QPixmap: """ Convert greyscale frame into rgb QPixmap. :param frame: numpy greyscale ndarray :return: QPixmap """ conv = Conversion() return conv.array2qpixmap(conv.greyscale2rgb(frame))
def preprocessFrames(frames: List[np.ndarray]) -> None: """ Convert greyscale frames into rgb QPixmap. :param frames: numpy greyscale ndarray list :return: None """ conv = Conversion(frames[0].shape) for index, img in enumerate(frames): frames[index] = conv.array2qpixmap(conv.greyscale2rgb(img))