我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用cv2.CALIB_FIX_K3。
def fix_radial_flags(flags): flags = flags | cv2.CALIB_FIX_K1 flags = flags | cv2.CALIB_FIX_K2 flags = flags | cv2.CALIB_FIX_K3 flags = flags | cv2.CALIB_FIX_K4 flags = flags | cv2.CALIB_FIX_K5 flags = flags | cv2.CALIB_FIX_K6 return flags
def get_fitflags(self,field=0): if self.model[field] == 'perspective': fitflags = cv2.CALIB_USE_INTRINSIC_GUESS if self.fixaspectratio[field]: fitflags = fitflags + cv2.CALIB_FIX_ASPECT_RATIO if self.fixk1[field]: fitflags = fitflags + cv2.CALIB_FIX_K1 if self.fixk2[field]: fitflags = fitflags + cv2.CALIB_FIX_K2 if self.fixk3[field]: fitflags = fitflags + cv2.CALIB_FIX_K3 if self.disabletangentialdist[field]: fitflags = fitflags + cv2.CALIB_ZERO_TANGENT_DIST if self.fixcc[field]: fitflags = fitflags + cv2.CALIB_FIX_PRINCIPAL_POINT elif self.model[field] == 'fisheye': fitflags = cv2.fisheye.CALIB_RECOMPUTE_EXTRINSIC + cv2.fisheye.CALIB_USE_INTRINSIC_GUESS + cv2.fisheye.CALIB_FIX_SKEW if self.fixk1[field]: fitflags = fitflags + cv2.fisheye.CALIB_FIX_K1 if self.fixk2[field]: fitflags = fitflags + cv2.fisheye.CALIB_FIX_K2 if self.fixk3[field]: fitflags = fitflags + cv2.fisheye.CALIB_FIX_K3 if self.fixk4[field]: fitflags = fitflags + cv2.fisheye.CALIB_FIX_K4 return fitflags # Get a list of human-readable strings saying what fitting options are anebled. # Output: list of strings, each string describes an enabled fit option.