Python cv2 模块,CALIB_FIX_K3 实例源码

我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用cv2.CALIB_FIX_K3

项目:cvcalib    作者:Algomorph    | 项目源码 | 文件源码
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
项目:calcam    作者:euratom-software    | 项目源码 | 文件源码
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.