Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.9 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    nvmedia_ldc_util.h File Reference

    Detailed Description

    NVIDIA Media Interface: LDC Utility functions

    Definition in file nvmedia_ldc_util.h.

    Go to the source code of this file.

    Data Structures

    struct  NvMediaLdcCameraIntrinsic
     Instrinsic camera parameters. More...
     
    struct  NvMediaLdcCameraExtrinsic
     Extrinsic camera parameters. More...
     
    struct  NvMediaLdcLensDistortion
     Distortion coefficients for the lens model. More...
     

    Enumerations

    enum  NvMediaLdcLensModel {
      NVMEDIA_LDC_LENS_MODEL_POLYNOMIAL_DISTORTION,
      NVMEDIA_LDC_LENS_MODEL_FISHEYE_EQUIDISTANT,
      NVMEDIA_LDC_LENS_MODEL_FISHEYE_EQUISOLID,
      NVMEDIA_LDC_LENS_MODEL_FISHEYE_ORTHOGRAPHIC,
      NVMEDIA_LDC_LENS_MODEL_FISHEYE_STEREOGRAPHIC
    }
     Supported lens models used to generate a Warp Map. More...
     

    Functions

    NvMediaStatus NvMediaLdcGetNumControlPoints (NvMediaLdcRegionParameters const *const regionParams, uint32_t *numControlPoints)
     Helper function to calculate the number of control points from the defined sparse warp map region parameters. More...
     
    NvMediaStatus NvMediaLdcGenWarpMapIdentity (NvMediaRect const *const dstRect, NvMediaLdcRegionParameters const *const regionParams, uint32_t numControlPoints, NvMediaLdcControlPoint *const controlPoints)
     Helper function to fills the given warp map with an identity mapping. More...
     
    NvMediaStatus NvMediaLdcGenWarpMap (NvMediaLdcCameraIntrinsic const *const Kin, NvMediaLdcCameraExtrinsic const *const X, NvMediaLdcCameraIntrinsic const *const Kout, NvMediaLdcLensDistortion const *const distModel, NvMediaRect const *const dstRect, NvMediaLdcRegionParameters const *const regionParams, uint32_t numControlPoints, NvMediaLdcControlPoint *const controlPoints)
     Generates Warp Map for a particular lens model. More...
     

    Enumeration Type Documentation

    ◆ NvMediaLdcLensModel

    Supported lens models used to generate a Warp Map.

    See also
    NvMediaLdcGenWarpMap
    Enumerator
    NVMEDIA_LDC_LENS_MODEL_POLYNOMIAL_DISTORTION 

    Specifies a polynomial distortion model.

    NVMEDIA_LDC_LENS_MODEL_FISHEYE_EQUIDISTANT 

    Specifies a fisheye model: r = 2ftan(theta/2), where theta is the angle from the optical axis, f is the focal length, and r is the distance of a pixel from the image center.

    NVMEDIA_LDC_LENS_MODEL_FISHEYE_EQUISOLID 

    Specifies a fisheye model: r = f*theta, where theta is the angle from the optical axis, f is the focal length, and r is the distance of a pixel from the image center.

    NVMEDIA_LDC_LENS_MODEL_FISHEYE_ORTHOGRAPHIC 

    Specifies a fisheye model: r = 2fsin(theta/2), where theta is the angle from the optical axis, f is the focal length, and r is the distance of a pixel from the image center.

    NVMEDIA_LDC_LENS_MODEL_FISHEYE_STEREOGRAPHIC 

    Specifies a fisheye model: r = fsin(theta), where theta is the angle from the optical axis, f is the focal length, and r is the distance of a pixel from the image center.

    Definition at line 29 of file nvmedia_ldc_util.h.

    Function Documentation

    ◆ NvMediaLdcGenWarpMap()

    NvMediaStatus NvMediaLdcGenWarpMap ( NvMediaLdcCameraIntrinsic const *const  Kin,
    NvMediaLdcCameraExtrinsic const *const  X,
    NvMediaLdcCameraIntrinsic const *const  Kout,
    NvMediaLdcLensDistortion const *const  distModel,
    NvMediaRect const *const  dstRect,
    NvMediaLdcRegionParameters const *const  regionParams,
    uint32_t  numControlPoints,
    NvMediaLdcControlPoint *const  controlPoints 
    )

    Generates Warp Map for a particular lens model.

    Parameters
    [in]KinPointer to NvMediaLdcCameraIntrinsic parameters.
    [in]XPointer to NvMediaLdcCameraExtrinsic parameters.
    [in]KoutPointer to NvMediaLdcCameraIntrinsic parameters.
    [in]distModelPointer to NvMediaLdcLensDistortion struct.
    [in]dstRectPointer to the destination rectangle.
    [in]regionParamsPointer to NvMediaLdcRegionParameters for Warp Map.
    [in]numControlPointsNumber of control points in Warp Map.
    [in]controlPointsPointer to the control points array.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKWarp Map is successfully generated.
    NVMEDIA_STATUS_BAD_PARAMETEROne of parameters is invalid. This could be either:
    • Kin is NULL
    • X is NULL
    • Kout is NULL
    • distModel is NULL
    • dstRect is NULL
    • regionParams is NULL
    • numControlPoints is 0
    • controlPoints is NULL
    • regionParams has values that out of acceptable domain.
    • number of control points is inconsistent with regions config.
    • X is invalid, determinant is 0.
    Precondition
    None.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different controlPoints object
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: Yes

    ◆ NvMediaLdcGenWarpMapIdentity()

    NvMediaStatus NvMediaLdcGenWarpMapIdentity ( NvMediaRect const *const  dstRect,
    NvMediaLdcRegionParameters const *const  regionParams,
    uint32_t  numControlPoints,
    NvMediaLdcControlPoint *const  controlPoints 
    )

    Helper function to fills the given warp map with an identity mapping.

    This function is useful if the user wants to specify their own mapping. It sets the control points coordinates to the destination coordinates as defined implicitly by the NvMediaLdcRegionParameters. The user then can iterate through these points and apply a custom mapping function to each one.

    Parameters
    [in]dstRectPointer to the destination rectangle.
    [in]regionParamsPointer to NvMediaLdcRegionParameters for Warp Map.
    [in]numControlPointsNumber of control points in Warp Map.
    [in]controlPointsPointer to the control points array.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKWarp Map was successfully configured.
    NVMEDIA_STATUS_BAD_PARAMETEROne of parameters is invalid. This could be either:
    • dstRect is NULL
    • regionParams is NULL
    • numControlPoints is 0
    • controlPoints is NULL
    • regionParams has values that out of acceptable domain.
    • number of control points is inconsistent with regions config.
    Precondition
    None.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different controlPoints object
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: Yes

    ◆ NvMediaLdcGetNumControlPoints()

    NvMediaStatus NvMediaLdcGetNumControlPoints ( NvMediaLdcRegionParameters const *const  regionParams,
    uint32_t *  numControlPoints 
    )

    Helper function to calculate the number of control points from the defined sparse warp map region parameters.

    Parameters
    [in]regionParamsPointer to NvMediaLdcRegionParameters that contains parameters for regions of a Warp Map.
    [out]numControlPointsNumber of Control Points calculated.
    Returns
    An NvMediaStatus return code.
    Return values
    NVMEDIA_STATUS_OKNumber of Control Points has been calculated successfully.
    NVMEDIA_STATUS_BAD_PARAMETEROne of parameters is invalid. This could be either:
    • regionParams is NULL
    • numControlPoints is NULL
    • regionParams has values that out of acceptable domain.
    Precondition
    None.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes, with the following conditions:
        • Each thread uses different numControlPoints object
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: Yes
    人人超碰97caoporen国产