def loadCameraCalibration(self): cpf = "/jevois/share/camera/calibration{}x{}.yaml".format(self.w, self.h) fs = cv2.FileStorage(cpf, cv2.FILE_STORAGE_READ) if (fs.isOpened()): self.camMatrix = fs.getNode("camera_matrix").mat() self.distCoeffs = fs.getNode("distortion_coefficients").mat() else: jevois.LFATAL("Failed to read camera parameters from file [{}]".format(cpf))
def load_camera_calibration(self, w, h): cpf = "/jevois/share/camera/calibration{}x{}.yaml".format(w, h) fs = cv2.FileStorage(cpf, cv2.FILE_STORAGE_READ) if fs.isOpened(): self.cameraMatrix = fs.getNode("camera_matrix").mat() self.distortionMatrix = fs.getNode("distortion_coefficients").mat() jevois.LINFO("Loaded camera calibration from {}".format(cpf)) else: jevois.LFATAL( "Failed to read camera parameters from file [{}]".format(cpf))
def loadCameraCalibration(self, w, h): """Loads the camera calibration from disk for the given width and height of the image""" calibFile = '/jevois/share/camera/calibration{}x{}.yaml'.format(w, h) fs = cv2.FileStorage(calibFile, cv2.FILE_STORAGE_READ) if fs.isOpened(): self.camMatrix = fs.getNode("camera_matrix").mat() self.distCoeffs = fs.getNode("distortion_coefficients").mat() jevois.LINFO(f"Loaded camera calibration from {calibFile}") else: jevois.LFATAL( f"Failed to read camera calibration parameters from {calibFile}" )
def process(self, inframe): jevois.LFATAL("process no usb not implemented")