Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.20.37 Release
    For Test and Development only

    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    SFM.h
    Go to the documentation of this file.
    1
    2//
    3// Notice
    4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
    5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
    6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
    7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
    8//
    9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
    10// information or for any infringement of patents or other rights of third parties that may
    11// result from its use. No license is granted by implication or otherwise under any patent
    12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
    13// expressly authorized by NVIDIA. Details are subject to change without notice.
    14// This code supersedes and replaces all information previously supplied.
    15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
    16// components in life support devices or systems without express written approval of
    17// NVIDIA CORPORATION & AFFILIATES.
    18//
    19// SPDX-FileCopyrightText: Copyright (c) 2015-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
    20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
    21//
    22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
    23// property and proprietary rights in and to this material, related
    24// documentation and any modifications thereto. Any use, reproduction,
    25// disclosure or distribution of this material and related documentation
    26// without an express license agreement from NVIDIA CORPORATION or
    27// its affiliates is strictly prohibited.
    28//
    30
    46#ifndef DW_IMAGEPROCESSING_SFM_SFM_H_
    47#define DW_IMAGEPROCESSING_SFM_SFM_H_
    48
    49#include <dw/core/base/Config.h>
    50#include <dw/rig/Rig.h>
    54#include <dw/core/base/Types.h>
    55
    57
    58#include <cuda_runtime_api.h>
    59
    60#include <stdint.h>
    61
    62#ifdef __cplusplus
    63extern "C" {
    64#endif
    65
    74// dwReconstructor
    75
    79typedef struct dwReconstructorObject* dwReconstructorHandle_t;
    80
    82typedef struct dwReconstructorObject const* dwConstReconstructorHandle_t;
    83
    88{
    91
    94
    97
    101
    105
    108
    113
    119
    134
    153 const dwReconstructorConfig* config,
    154 cudaStream_t stream,
    155 dwContextHandle_t context);
    156
    172
    188// @note This method renders the handle unusable.
    191
    213
    238
    271 const dwTransformation3f* predictedRig2World,
    272 const uint32_t listCount,
    273 const uint32_t* const d_featureCounts[],
    274 const dwFeature2DStatus* const d_statuses[],
    275 const dwVector2f* const d_trackedLocations[],
    276 const dwVector4f* const d_worldPoints[],
    278
    298
    330dwStatus dwReconstructor_updateHistory(int32_t* rig2WorldHistoryIdx,
    331 const dwTransformation3f* rig2World,
    332 const uint32_t listCount,
    333 const uint32_t* const d_featureCounts[],
    334 const dwVector2f* const d_trackedLocations[],
    336
    361 dwFeature2DStatus* d_statuses,
    362 const uint32_t* d_featureCount,
    363 const uint32_t cameraIdx,
    365
    388 const dwTransformation3f* rig2World,
    389 const uint32_t* const d_pointCount[],
    390 const dwVector4f* const d_worldPoints[],
    392
    422 uint32_t cameraIdx,
    423 const dwTransformation3f* previousRigToWorld,
    424 const dwTransformation3f* predictedRigToWorld,
    425 const uint32_t* d_featureCount,
    426 const dwFeature2DStatus d_featureStatuses[],
    427 const dwVector2f d_featureLocations[],
    428 const dwVector4f d_worldPoints[],
    430
    449// @note `d_newToOldMap` must be got by `dwFeature2DTracker_getNewToOldMap`
    450// @note This method must be called after `dwFeature2DTracker_compact()` or
    451// `dwFeature2DTracker_process(DW_FEATURE2D_TRACKER_STAGE_COMPACT_GPU_ASYNC)` to keep the
    452// feature lists synchronized.
    455 const uint32_t* d_validIndexCount,
    456 const uint32_t* d_newToOldMap,
    458
    482 const uint32_t* d_validIndexCount,
    483 const uint32_t* d_newToOldMap,
    485
    501// @note The ownership of the stream remains by the callee.
    504
    521
    522#ifdef __cplusplus
    523}
    524#endif
    525
    528#endif // DW_IMAGEPROCESSING_SFM_SFM_H_
    NVIDIA DriveWorks API: Camera Methods
    NVIDIA DriveWorks API: Core Methods
    dwStatus
    Status definition.
    Definition: ErrorDefs.h:44
    NVIDIA DriveWorks API: Feature Array and Feature History Array
    NVIDIA DriveWorks API: Rig Configuration
    NVIDIA DriveWorks API: Core Types
    NVIDIA DriveWorks API: Core Exports
    float float32_t
    Specifies POD types.
    Definition: BasicTypes.h:59
    struct dwContextObject * dwContextHandle_t
    Context handle.
    Definition: Context.h:85
    #define DW_API_PUBLIC
    Definition: Exports.h:56
    dwFeature2DStatus
    Defines the possible status of a feature.
    Definition: FeatureList.h:62
    float32_t minRigDistance
    Specifies the minimum distance between vehicle poses to add a new one to the list.
    Definition: SFM.h:104
    float32_t maxReprojectionErrorAngleRad
    Specifies the max angle of the reprojection error (angle between tracked optical ray and triangulated...
    Definition: SFM.h:112
    uint32_t maxPoseHistoryLength
    Specifies the maximum size of the history.
    Definition: SFM.h:96
    uint8_t minTriangulationEntries
    Specifies the minimum number of entries in the feature history needed for triangulation.
    Definition: SFM.h:107
    dwConstRigHandle_t rig
    Specifies the rig to use for reconstruction.
    Definition: SFM.h:90
    float32_t poseEstimationOutlierThresholdRad
    Specifies the max angle of the reprojection error (angle between tracked optical ray and triangulated...
    Definition: SFM.h:117
    uint32_t maxFeatureCount
    Specifies the maximum number of features for each camera.
    Definition: SFM.h:93
    float32_t minNewObservationAngleRad
    Specifies the minimum cosine of the angle between two optical rays to add a new one to the feature hi...
    Definition: SFM.h:100
    DW_API_PUBLIC dwStatus dwReconstructor_enableCamerasForPoseEstimation(uint8_t const enabled[], dwReconstructorHandle_t obj)
    Marks the cameras to use for pose estimation.
    DW_API_PUBLIC dwStatus dwReconstructor_getEstimatedPose(dwTransformation3f *correctedRig2World, dwReconstructorHandle_t obj)
    Returns the estimated pose from a previous call to dwReconstructor_estimatePoseAsync.
    DW_API_PUBLIC dwStatus dwReconstructor_project(dwVector2f *d_locations[], const dwTransformation3f *rig2World, const uint32_t *const d_pointCount[], const dwVector4f *const d_worldPoints[], dwReconstructorHandle_t obj)
    Projects triangulated features back to the image.
    DW_API_PUBLIC dwStatus dwReconstructor_reset(dwReconstructorHandle_t obj)
    Resets a reconstructor.
    DW_API_PUBLIC dwStatus dwReconstructor_estimatePoseAsync(const dwTransformation3f *previousRig2World, const dwTransformation3f *predictedRig2World, const uint32_t listCount, const uint32_t *const d_featureCounts[], const dwFeature2DStatus *const d_statuses[], const dwVector2f *const d_trackedLocations[], const dwVector4f *const d_worldPoints[], dwReconstructorHandle_t obj)
    Uses all tracked features from all cameras to estimate the current rig pose.
    DW_API_PUBLIC dwStatus dwReconstructor_compactFeatureHistory(const uint32_t cameraIdx, const uint32_t *d_validIndexCount, const uint32_t *d_newToOldMap, dwReconstructorHandle_t obj)
    Compacts the internal feature history by keeping only selected features.
    struct dwReconstructorObject const * dwConstReconstructorHandle_t
    Handle representing a const reconstructor object.
    Definition: SFM.h:82
    DW_API_PUBLIC dwStatus dwReconstructor_initConfig(dwReconstructorConfig *config)
    Initializes the reconstructor config with default values.
    DW_API_PUBLIC dwStatus dwReconstructor_updateHistory(int32_t *rig2WorldHistoryIdx, const dwTransformation3f *rig2World, const uint32_t listCount, const uint32_t *const d_featureCounts[], const dwVector2f *const d_trackedLocations[], dwReconstructorHandle_t obj)
    Updates the feature and pose history.
    DW_API_PUBLIC dwStatus dwReconstructor_setCUDAStream(cudaStream_t stream, dwReconstructorHandle_t obj)
    Sets the CUDA stream for CUDA related operations.
    struct dwReconstructorObject * dwReconstructorHandle_t
    Handle representing a reconstructor object.
    Definition: SFM.h:79
    DW_API_PUBLIC dwStatus dwReconstructor_initialize(dwReconstructorHandle_t *obj, const dwReconstructorConfig *config, cudaStream_t stream, dwContextHandle_t context)
    Creates and initializes a reconstructor.
    DW_API_PUBLIC dwStatus dwReconstructor_getCUDAStream(cudaStream_t *stream, dwReconstructorHandle_t obj)
    Gets CUDA stream used by the reconstructor.
    DW_API_PUBLIC dwStatus dwReconstructor_dryrunEstimation(dwReconstructorHandle_t obj)
    Dryrun the reconstructor estimation on GPU to record CUDAGraph.
    DW_API_PUBLIC dwStatus dwReconstructor_triangulateFeatures(dwVector4f *d_worldPoints, dwFeature2DStatus *d_statuses, const uint32_t *d_featureCount, const uint32_t cameraIdx, dwReconstructorHandle_t obj)
    Triangulates the features of a camera from the internal feature and pose history.
    DW_API_PUBLIC dwStatus dwReconstructor_release(dwReconstructorHandle_t obj)
    Releases a reconstructor.
    DW_API_PUBLIC dwStatus dwReconstructor_compactWorldPoints(dwVector4f *d_worldPoints, const uint32_t *d_validIndexCount, const uint32_t *d_newToOldMap, dwReconstructorHandle_t obj)
    Compacts the world point array by keeping only selected features.
    DW_API_PUBLIC dwStatus dwReconstructor_predictFeaturePosition(dwVector2f d_predictedLocations[], uint32_t cameraIdx, const dwTransformation3f *previousRigToWorld, const dwTransformation3f *predictedRigToWorld, const uint32_t *d_featureCount, const dwFeature2DStatus d_featureStatuses[], const dwVector2f d_featureLocations[], const dwVector4f d_worldPoints[], dwReconstructorHandle_t obj)
    Predicts the positions of features based on the predicted car motion.
    Configuration parameters for a reconstructor.
    Definition: SFM.h:88
    struct dwRigObject const * dwConstRigHandle_t
    Handle representing the const Rig interface.
    Definition: Rig.h:74
    Specifies a 3D rigid transformation.
    Definition: MatrixTypes.h:182
    Defines a two-element single-precision floating-point vector.
    Definition: MatrixTypes.h:48
    Defines a four-element single-precision floating point vector.
    Definition: MatrixTypes.h:92
    人人超碰97caoporen国产