NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
pva_algos_detector.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
4  *
5  * NVIDIA CORPORATION and its licensors retain all intellectual property
6  * and proprietary rights in and to this software, related documentation
7  * and any modifications thereto. Any use, reproduction, disclosure or
8  * distribution of this software and related documentation without an express
9  * license agreement from NVIDIA CORPORATION is strictly prohibited.
10  */
11 
12 #ifndef PVA_ALGOS_DETECTOR
13 #define PVA_ALGOS_DETECTOR
14 
15 #include <pva_algos_common.h>
16 
17 struct DetectorAlgoContext;
18 
24 typedef struct
25 {
27  uint32_t imageWidth;
29  uint32_t imageHeight;
31  uint32_t linePitch;
33  uint32_t maxFeatureCount;
35  uint32_t detectionLevel;
39  int32_t nmsSize;
42  float lambda;
46 
48 
54 typedef struct DetectorAlgoContext *pvaAlgosDetectorContext_t;
55 
61 typedef struct
62 {
64  uint8_t *image;
66  uint32_t *age;
68  uint32_t *id;
70  uint32_t *outAge;
72  uint32_t *outId;
74  uint32_t *maxId;
76  uint8_t *imageMask;
80  uint32_t *status;
82  float *loc;
84  float *ncc;
86  uint32_t *scales;
90  uint32_t *trackCount;
92  uint32_t *detectCount;
94  uint32_t *outputFeatureCount;
96  float *outLoc;
98  uint32_t *outStatus;
100  uint32_t *outScales;
102  float *outNcc;
104  uint32_t *newToOld;
106  uint32_t *maxIdD;
108  uint32_t *oldFeatureCount;
113 
130 
144  pvaAlgosDetectorConfig_t *detectorParams);
145 
162  pvaAlgosDetectorIOBuffer_t *detectorBuffers, cupvaStream_t *instanceStream,
163  int execTimeout);
164 
175 
177 #endif //PVA_ALGOS_DETECTOR
cupvaStream_t
void * cupvaStream_t
Dummy definition for non PVA supported platforms.
Definition: PVA.h:29
pvaAlgosDetectorIOBuffer_t::loc
float * loc
In: Feature locations of previously detected features.
Definition: pva_algos_detector.h:82
pvaAlgosDetectorIOBuffer_t::outScales
uint32_t * outScales
Out: Output feature scale array.
Definition: pva_algos_detector.h:100
pvaAlgosDetectorIOBuffer_t::enableNccScore
bool enableNccScore
In:Flag is disabled when ncc score is null.
Definition: pva_algos_detector.h:111
pvaAlgosDetectorContext_t
struct DetectorAlgoContext * pvaAlgosDetectorContext_t
Structure that stores internal objects needed for feature detector.
Definition: pva_algos_detector.h:54
pvaAlgosDetectorIOBuffer_t::oldFeatureCount
uint32_t * oldFeatureCount
In:: Pointer to tracked input feature count.
Definition: pva_algos_detector.h:108
pvaAlgosDetectorIOBuffer_t::outputFeatureCount
uint32_t * outputFeatureCount
Out: Number of (features detected +features that are being tracked from previous frame)
Definition: pva_algos_detector.h:94
pvaAlgosDetectorIOBuffer_t::id
uint32_t * id
In: Feature ids of previously detected features.
Definition: pva_algos_detector.h:68
pvaAlgosDetectorIOBuffer_t::outLoc
float * outLoc
Out: Output feature locations array.
Definition: pva_algos_detector.h:96
pvaAlgosDetectorIOBuffer_t::outId
uint32_t * outId
Out: Output feature id array.
Definition: pva_algos_detector.h:72
pvaAlgosDetectorIOBuffer_t::status
uint32_t * status
In: Feature status array of previously detected features.
Definition: pva_algos_detector.h:80
pvaAlgosDetectorConfig_t::nmsSize
int32_t nmsSize
In: size of non-maximum suppresion filter.
Definition: pva_algos_detector.h:39
pvaAlgosDetectorIOBuffer_t::detectCount
uint32_t * detectCount
Out: Number of newly detected features in current frame.
Definition: pva_algos_detector.h:92
pvaAlgosDetectorConfig_t::detectionLevel
uint32_t detectionLevel
pyramid level on which feature detection will execute.
Definition: pva_algos_detector.h:35
pvaAlgosDetectorIOBuffer_t::ncc
float * ncc
In: Feature NCC ages from feature tracker.
Definition: pva_algos_detector.h:84
pvaAlgosDetectorInit
pvaAlgosError_t pvaAlgosDetectorInit(pvaAlgosDetectorContext_t *detectorContext, pvaAlgosDetectorConfig_t *detectorParams)
Initializes the necessary values for the internal objects in DetectorAlgoContext object.
pva_algos_common.h
pvaAlgosDetectorConfig_t::thresholdFixedPoint
int32_t thresholdFixedPoint
In: threshold score to classify the point as a feature.
Definition: pva_algos_detector.h:45
pvaAlgosDetectorGetContext
pvaAlgosError_t pvaAlgosDetectorGetContext(pvaAlgosDetectorContext_t *detectorContext)
Initializes DetectorAlgoContext object and sends it back to the caller.
pvaAlgosDetectorConfig_t::imageWidth
uint32_t imageWidth
Input image width.
Definition: pva_algos_detector.h:27
pvaAlgosDetectorIOBuffer_t::maxId
uint32_t * maxId
In: Input max id of the feature in last frame.
Definition: pva_algos_detector.h:74
pvaAlgosDetectorDeInit
pvaAlgosError_t pvaAlgosDetectorDeInit(pvaAlgosDetectorContext_t *detectorContext)
Frees the internal objects and the DetectorAlgoContext object.
pvaAlgosDetectorIOBuffer_t::trackCount
uint32_t * trackCount
Out: Number of features detected that are being tracked from previous frame.
Definition: pva_algos_detector.h:90
pvaAlgosDetectorIOBuffer_t::age
uint32_t * age
In: Feature ages of previously detected features.
Definition: pva_algos_detector.h:66
pvaAlgosDetectorConfig_t
Structure that holds configuration parameters for a feature detector.
Definition: pva_algos_detector.h:24
pvaAlgosDetectorIOBuffer_t::outStatus
uint32_t * outStatus
Out: Output feature status array.
Definition: pva_algos_detector.h:98
pvaAlgosDetectorIOBuffer_t
Structure that holds I/O Buffers that change based on the frame inputs.
Definition: pva_algos_detector.h:61
pvaAlgosDetectorConfig_t::imageHeight
uint32_t imageHeight
Input image height.
Definition: pva_algos_detector.h:29
pvaAlgosDetectorIOBuffer_t::imageMask
uint8_t * imageMask
In: Image ROI mask, set to 0xff to enable pixel or 0x0 to disable.
Definition: pva_algos_detector.h:76
pvaAlgosDetectorConfig_t::linePitch
uint32_t linePitch
Input image line pitch.
Definition: pva_algos_detector.h:31
pvaAlgosDetectorIOBuffer_t::outAge
uint32_t * outAge
Out: Output feature age array.
Definition: pva_algos_detector.h:70
pvaAlgosDetectorIOBuffer_t::image
uint8_t * image
In: Input image pointer.
Definition: pva_algos_detector.h:64
pvaAlgosDetectorConfig_t::maskAdjustmentEnabled
int32_t maskAdjustmentEnabled
In: to enable update of distribution mask before each detection.
Definition: pva_algos_detector.h:37
pvaAlgosError_t
pvaAlgosError_t
Possible error codes returned by PVA Algos.
Definition: pva_algos_common.h:25
pvaAlgosDetectorIOBuffer_t::maxIdD
uint32_t * maxIdD
Out: Max feature id in current frame after detection.
Definition: pva_algos_detector.h:106
pvaAlgosDetectorConfig_t::maxFeatureCount
uint32_t maxFeatureCount
Maximum no of features that can be detected.
Definition: pva_algos_detector.h:33
pvaAlgosDetectorIOBuffer_t::scales
uint32_t * scales
In: Feature scales of previously detected features.
Definition: pva_algos_detector.h:86
pvaAlgosDetectorProcess
pvaAlgosError_t pvaAlgosDetectorProcess(pvaAlgosDetectorContext_t *detectorContext, pvaAlgosDetectorIOBuffer_t *detectorBuffers, cupvaStream_t *instanceStream, int execTimeout)
Sets the I/O Buffers to the internal objects and runs the Feature Detector Algorithm.
pvaAlgosDetectorIOBuffer_t::harrisOutput
int * harrisOutput
Out: Output Harris scores.
Definition: pva_algos_detector.h:88
pvaAlgosDetectorConfig_t::lambda
float lambda
value of harris-k.
Definition: pva_algos_detector.h:42
pvaAlgosDetectorIOBuffer_t::outNcc
float * outNcc
Out: Output ncc score array.
Definition: pva_algos_detector.h:102
pvaAlgosDetectorIOBuffer_t::featureMask
int * featureMask
In: Max number of features to keep per cell, set a uniform or Gaussian mask.
Definition: pva_algos_detector.h:78
pvaAlgosDetectorIOBuffer_t::newToOld
uint32_t * newToOld
out track status
Definition: pva_algos_detector.h:104