Jan-03-2021, 06:38 PM
What will you do with the image?
The code you've posted has no imports for numpy and cv2, it's not the full code?
something like that
The code you've posted has no imports for numpy and cv2, it's not the full code?
something like that
import sys from PyQt5.QtWidgets import QApplication, QMainWindow import cv2 import numpy as np class Win(): def __init__(self): window = QMainWindow() window.show() def getFrame(self): fp = r'/home/UbuntuUser/Desktop/UAV.tif' self.img = cv2.imdecode(np.fromfile(fp, dtype=np.uint8), cv2.IMREAD_UNCHANGED) print(self.img) if __name__ == '__main__': app = QApplication(sys.argv) win = Win() win.getFrame() sys.exit(app.exec_())