What is a ptlens profile
initialize ( tags, tags, distance = distance ) return mod, cam, lens
#WHAT IS A PTLENS PROFILE MOD#
split ( 'x' ) width, height = int ( width ), int ( height ) mod = lensfunpy. :param dict tags: must contain 'EXIF:Model', 'EXIF:Make', 'Composite:LensID', 'EXIF:FocalLength', 'Composite:Aperture' and optionally 'Composite:ImageSize' if width,height is None """ cam, lens = findCameraAndLensFromExif ( tags, lensfunDbObj ) if width is None : width, height = tags. Therefore it may be necessary to first decode the RAW image and determine the width and height directly.
#WHAT IS A PTLENS PROFILE FULL#
This tag contains the full RAW size, but many RAW decoders produce slightly cropped images. If width and height are not set, then Composite:ImageSize is used. def getLensfunModifierFromExif ( tags, width = None, height = None, lensfunDbObj = None, distance = 10000 ): """ WARNING: Not setting width and height may produce surprising results for RAW files. ' (EXIF: "' + tags + '")' ) return cam, lens model != tags : print ( 'NOTE: Using lensfun lens "' + lens. score ) + ' (<' + str ( minAcceptedScore ) + ')' ) else : return cam, None lens = lenses if lens. Score < minAcceptedScore : raise LensNotFoundInDBError ( 'Lens "' + tags + '" not found in DB! ' + 'Closest was "' + lenses. score < minAcceptedScore : if raiseIfNotFoundInDB : if not lenses : raise LensNotFoundInDBError ( 'Lens "' + tags + '" not found in DB!' ) if lenses. find_lenses ( cam, None, tags, loose_search = True ) if not lenses or lenses. find_cameras ( tags, tags, loose_search = False ) if not cams : if raiseIfNotFoundInDB : raise CameraNotFoundInDBError ( 'Camera "' + tags + ' - ' + tags + '" not found in DB!' ) else : return None, None # FIXME cam score is always 0 # if cams.score < minAcceptedScore: # raise CameraNotFoundInDBError('Camera "' + tags + ' - ' + tags + '" not found! ' + # 'Closest was "' + cams.maker + ' - ' + cams.model + '" with score ' + # str(cams.score) + ' (<' + str(minAcceptedScore) + ')' ) cam = cams lenses = db. Database () else : db = lensfunDbObj cams = db. get ( 'EXIF:Model' ): raise CameraNotFoundInEXIFError ( 'No camera make/model in EXIF data' ) if lensfunDbObj is None : db = lensfunpy. get ( 'Composite:LensID' ): raise LensNotFoundInEXIFError ( 'No LensID in EXIF data' ) if not tags. Def findCameraAndLensFromExif ( tags, lensfunDbObj = None, minAcceptedScore = 100, raiseIfNotFoundInDB = True ): if not tags.