################################################################################################### # # Copyright (c) 2017, NVIDIA CORPORATION. All Rights Reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and related documentation without an express # license agreement from NVIDIA CORPORATION is strictly prohibited. # # LDC configuration file nvimg_ldc application. # # Plese see nvmedia_image.h and nvmedia_ldc.h for detailed information about parameters and # datatypes # ################################################################################################### ################################################################################################### # Top level application parameters # inputFile name limited to 256 chars inputFile = "/ldc_test/fisheye_1280_1080_yuv420.yuv" # outputFile name limited to 256 chars outputFile = "/ldc_out/out_fisheye_1280_1080_yuv420.yuv" # UV order used in YUV files #0=>YVU #1=>YUV UVorder = 1 # Sub-Sampling type of the input surface # 1 => NVM_SURF_ATTR_SUB_SAMPLING_TYPE_420 # 2 => NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422 # 3 => NVM_SURF_ATTR_SUB_SAMPLING_TYPE_444 # 4 => NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422R # 0 => NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE subSampling = 1 # Bits per component of the input/output surfaces # 1 => NVM_SURF_ATTR_BITS_PER_COMPONENT_8 # 2 => NVM_SURF_ATTR_BITS_PER_COMPONENT_10 # 3 => NVM_SURF_ATTR_BITS_PER_COMPONENT_12 # 4 => NVM_SURF_ATTR_BITS_PER_COMPONENT_14 # 5 => NVM_SURF_ATTR_BITS_PER_COMPONENT_16 # 6 => NVM_SURF_ATTR_BITS_PER_COMPONENT_32 bitsPerComponent = 1 # Number of frames to be processed numFrames = 1 ################################################################################################### ################################################################################################### # Params for NvMediaLDCCreate # srcWidth width of the source image. srcWidth = 1936 # srcHeight height of the source image. srcHeight = 1216 # srcRect Structure containing co-ordinates of the rectangle in the source image. # Left X co-ordinate. Inclusive. srcRectx0 = 0 # Top Y co-ordinate. Inclusive. srcRecty0 = 0 # Right X co-ordinate. Exclusive. srcRectx1 = 1936 # Bottom Y co-ordinate. Exclusive. srcRecty1 = 1216 # dstWidth width of the destination image. dstWidth = 1280 # dstHeight height of the destination image. dstHeight = 1080 # dstRect Structure containing co-ordinates of the rectangle in the destination image. # Left X co-ordinate. Inclusive. dstRectx0 = 0 # Top Y co-ordinate. Inclusive. dstRecty0 = 0 # Right X co-ordinate. Exclusive. dstRectx1 = 1280 # Bottom Y co-ordinate. Exclusive. dstRecty1 = 1080 # initParams Initialization parameters of LDC creatation. See \ref NvMediaLDCInitParams. # Specifies the LDC mode. See NvMediaLDCMode enum. #0=>NVMEDIA_LDC_MODE_GEOTRANS #1=>NVMEDIA_LDC_MODE_TNR3 #2=>NVMEDIA_LDC_MODE_GEOTRANS_TNR3 ldcMode = 2 ################################################## # Specifies geometric transform initialization paramters. # NvMediaGeoTransMode Specifies the geometric transform mode. #0=>NVMEDIA_GEOTRANS_MODE_GEN_MAPPING #1=>NVMEDIA_GEOTRANS_MODE_FEED_MAPPING #2=>NVMEDIA_GEOTRANS_MODE_AFFINE_TRANSFORM #3=>NVMEDIA_GEOTRANS_MODE_PERSPECTIVE_TRANSFORM geoTransMode = 0 #NvMediaFilterQuality Specifies the filter quality #0=>NVMEDIA_FILTER_QUALITY_LOW #1=>NVMEDIA_FILTER_QUALITY_MEDIUM #2=>NVMEDIA_FILTER_QUALITY_HIGH filter = 2 # NvMediaCameraModel Specifies the camera model parameters. Required when # geoTransMode is NVMEDIA_GEOTRANS_MODE_GEN_MAPPING. # NvMediaLensModel Specifies the camera model. See \ref NvMediaLensModel #0=>NVMEDIA_LDC_MODEL_POLYNOMIAL_DISTORTION #1=>NVMEDIA_LDC_MODEL_FISHEYE_EQUIDISTANT #2=>NVMEDIA_LDC_MODEL_FISHEYE_EQUISOLID #3=>NVMEDIA_LDC_MODEL_FISHEYE_ORTHOGRAPHIC #4=>NVMEDIA_LDC_MODEL_FISHEYE_STEREOGRAPHIC model = 1 # Distortion coefficients is defined in the following way: # k1, k2, k3, k4, k5, k6 are radial distortion coeffcients. p1 and p2 are tangential # distortion coeffcients. # Denote point without distortion as [x, y, 1] and the corresponding point with distortion # as [xd, yd, 1], the distortion model are defined as follows: # # When NvMediaLensModel = NVMEDIA_LDC_MODEL_POLYNOMIAL_DISTORTION # The control parameters are k1, k2, k3, k4, k5, k6, p1, p2. Set to 0 if not needed. # r = sqrt (x ^ 2 + y ^ 2) # kr = (1 + k1 * r^2 + k2 * r^4 + k3 * r^6) / (1 + k4 * r^2 + k5 * r^4 + k6 * r^6) # xd = x * kr + p1 * (2 * x * y) + p2 * (r^2 + 2 * x^2) # yd = y * kr + p1 * (r^2 + 2 * y^2) + p2 * (2 * x * y) # # When NvMediaLensModel = NVMEDIA_LDC_MODEL_FISHEYE_EQUIDISTANT / EQUISOLID / ORTHOGRAPHIC / STEREOGRAPHIC # The control parameters are k1, k2, k3, k4. The rest are not used. Set to 0 if not needed. # r = sqrt (x ^ 2 + y ^ 2) # theta = atan(r) # theta_d = theta * (1 + k1 * theta^2 + k2 * theta^4 + k3 * theta^6 + k4 * theta^8) # k1 = 0.0 k2 = 0.0 p1 = 0.0 p2 = 0.0 k3 = 0.0 k4 = 0.0 k5 = 0.0 k6 = 0.0 # NvMediaCamIntriParams Specifies the camera intrinsic matrix, please refer to \ref NvMediaCamIntriParams # Specifies the camera focal length in X axis, measured in pixel unit. fx = 418.12 # Specifies the camera focal length in Y axis, measured in pixel unit. fy = 418.12 # Specifies the optical centers in X axis, measured in pixel unit. cx = 640.0 # Specifies the optical centers in Y axis, measured in pixel unit. cy = 540.0 # Specifies the rotation matrix. Define in the following way: # |r11 r12 r13| # |r21 r22 r23| # |r31 r32 r33| R00 = 1.0 R01 = 0.0 R02 = 0.0 R10 = 0.0 R11 = 1.0 R12 = 0.0 R20 = 0.0 R21 = 0.0 R22 = 1.0 # Specifies the translation vector. Define in the following way: # |t1 t2 t3| T0 = 0.0 T1 = 0.0 T2 = 0.0 # Specifies the target camera intrinsic matrix, please refer to \ref NvMediaCamIntriParams # Specifies the camera focal length in X axis, measured in pixel unit. targetKfx = 418.12 # Specifies the camera focal length in Y axis, measured in pixel unit. targetKfy = 418.12 # Specifies the optical centers in X axis, measured in pixel unit. targetKcx = 640.0 # Specifies the optical centers in Y axis, measured in pixel unit. targetKcy = 540.0 # Specifies the perspective matrix. Required when geoTransMode # is \ref NVMEDIA_GEOTRANS_MODE_AFFINE_TRANSFORM or # \ref NVMEDIA_GEOTRANS_MODE_PERSPECTIVE_TRANSFORM, # Define in the following way: # |p[0][0] p[0][1] p[0][2]| # |p[1][0] p[1][1] p[1][2]| # |p[2][0] p[2][1] p[2][2]| ptMatrix00 = 0.0 ptMatrix01 = 0.0 ptMatrix02 = 0.0 ptMatrix10 = 0.0 ptMatrix11 = 0.0 ptMatrix12 = 0.0 ptMatrix20 = 0.0 ptMatrix21 = 0.0 ptMatrix32 = 0.0 # Specifies the region configure paramters. Required when geoTransMode # is NVMEDIA_GEOTRANS_MODE_GEN_MAPPING or NVMEDIA_GEOTRANS_MODE_FEED_MAPPING. # \brief NvMedia definition for LDC region configuration. The \ref NvMediaLDCRegionConfig # defines the layout of the control points in the destination image. # Example of defining regions in the image # * \code # * # * # * # * (dstRect->x1 - dstRect->x0) # * / \ # * / \ # * / \ # * # * horRegionWidth[0] horRegionWidth[numHorRegion -1] # * / \ / \ # * |-------| |--------| # * -------------------------------------- \ # * |******** ******** ... ******** |-- \ # * |* + + * * * ... * * | \ \ # * |* + + * * * * * | verRegionHeight[0] \ # * |* + + * * * * * | / \ # * |******** ******** ******** |-- \ # * |.. .. | \ # * |.. .. | \ # * |.. .. | (dstRect->y1 - dstRect->y0) # * | | / # * | | / # * |******** ********... ******** |-- / # * |* * * *... * * | \ / # * |* * * * * * | verRegionHeight[numVerRegion -1] / # * |* * * * * * | / / # * |******** ******** ******** |-- / # * -------------------------------------- # * # * \endcode # * # * Example of defining control points in one region # * \code # * ********* # * * + + *-- \ # * * * log2verSpace # * * + + *-- / # * * * # * ********* # * |--| # * log2horSpace # * # * \endcode # */ # #/** # * Restrictions: # * 1. numHorRegion cannot exceed \ref NVMEDIA_LDC_MAX_HOR_REGION # * numVerRegion cannot exceed \ref NVMEDIA_LDC_MAX_VER_REGION # * 2a.horRegionWidth[0] to horRegionWidth[numHorRegion-2] shall be greater than and aligned to \ref NVMEDIA_LDC_MIN_REGION_WIDTH # * horRegionWidth[numHorRegion-1] has to be greater than NVMEDIA_LDC_MIN_REGION_WIDTH. # * 2b.verRegionHeight[0] to verRegionHeight[numVerRegion-2] shall be greater than and aligned to \ref NVMEDIA_LDC_MIN_REGION_HEIGHT # * verRegionHeight[numVerRegion-1] has to be greater than NVMEDIA_LDC_MIN_REGION_HEIGHT # * 3a The sum of horRegionWidth shall be equal to the width of \ref dstRect # * 3b.The sum of verRegionHeight shall be equal to the height of \ref dstRect # */ # # Specifies the number of horizontal regions. # Allowed values are [1, 4], inclusive. numHorRegion = 2 # Specifies the number of vertical regions. # Allowed values are [1, 4], inclusive. numVerRegion = 2 # Specifies the width of regions horRegionWidth0 = 640 horRegionWidth1 = 640 horRegionWidth2 = 0 horRegionWidth3 = 0 # Specifies the height of regions verRegionHeight0 = 544 verRegionHeight1 = 536 verRegionHeight2 = 0 verRegionHeight3 = 0 # Specifies the horizontal interval between the control points in each region # in log2 space. log2horSpace0 = 1 log2horSpace1 = 2 log2horSpace2 = 0 log2horSpace3 = 0 # Specifies the vertical interval between the control points in each region # in log2 space. log2verSpace0 = 1 log2verSpace1 = 2 log2verSpace2 = 0 log2verSpace3 = 0 ################################################## ################################################## # Specifies TNR3 initialization paramters. # See NvMediaTNR3Params. */ # Specifies the sigma of the luma for spatial filter */ spatialSigmaLuma = 4 # Specifies the sigma of the chroma for spatial filter */ spatialSigmaChroma = 4 # Specifies the sigma of the luma for range filter rangeSigmaLuma = 40 # Specifies the sigma of the chroma for range filter rangeSigmaChroma = 120 # Specifies the SAD multiplier parameter. This value is clamped between 0.0 and 1.0 sadMultiplier = 0.4375 # Specifies the weight of luma when calculating SAD. This value is clamped between 0.0 and 1.0 sadWeightLuma = 1.0 # flag whether to enable the spatial alpha smooth alphaSmoothEnable = 1 # Specifies the temporal alpha restrict increase capablility. This value is clamped between 0.0 and 1.0 alphaIncreaseCap = 0.125 # Specifies the alpha scale IIR for strength. This value is clamped between 0.0 and 1.0 alphaScaleIIR = 0.5 # Specifies the max luma value in Alpha Clip Calculation. This value is clamped between 0.0 and 1.0 alphaMaxLuma = 0.7324 # Specifies the min luma value in Alpha Clip Calculation. This value is clamped between 0.0 and 1.0 alphaMinLuma = 0.0 # Specifies the max chroma value in Alpha Clip Calculation. This value is clamped between 0.0 and 1.0 alphaMaxChroma = 0.7324 # Specifies the min chroma value in Alpha Clip Calculation. This value is clamped between 0.0 and 1.0 alphaMinChroma = 0.1953 # Specifies parameter BetaX1 in Beta Calculation. This value is clamped between 0.0 and 1.0 betaX1 = 0.3906 # Specifies parameter BetaX2 in Beta Calculation. This value is clamped between 0.0 and 1.0 betaX2 = 1.0 # Specifies parameter MinBeta threshold in Beta Calculation. This value is clamped between 0.0 and 1.0 minBeta = 0.3906 # Specifies parameter MaxBeta threshold in Beta Calculation. This value is clamped between 0.0 and 1.0 maxBeta = 1.0 ################################################## ################################################################################################### ################################################################################################### # Params for NvMediaLDCUpdateTNR3Params # Boolean flag to enable testing of updating TNR3 parameters after \ref NvMediaLDCCreate # Currently the app simply rotates through pre-defined TNR3 param set for different lighting # conditions for each frame. bUpdateTNR3Params = 1 ###################################################################################################