NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/IEstimator2.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef ESTIMATORLIB_IESTIMATOR2_HPP_
19 #define ESTIMATORLIB_IESTIMATOR2_HPP_
20 
21 #include <vector>
22 #include <tuple>
23 
24 #include <Eigen/Dense>
25 
26 #include "modules/Estimatorv2/Estimator_common.hpp"
27 
29 class IEstimator2
30 {
31 public:
33  virtual ~IEstimator2() {}
34 
40  virtual Eigen::VectorXd update(const float dT = 1) = 0;
41 
48  virtual Eigen::VectorXd update(
49  const std::vector<std::tuple<Eigen::VectorXd, Eigen::Matrix2d, bool> > &measurements, const float dT = 1
50  ) = 0;
51 
53  virtual void reset() = 0;
54 
56  virtual Eigen::VectorXd getStates() const = 0;
57 
62  virtual Eigen::VectorXd getPredictedStates(const float dT = 1) = 0;
63 
66 
68  virtual std::tuple<Eigen::VectorXd, Eigen::MatrixXd> getStatesWithCov() const = 0;
69 
74  virtual std::tuple<Eigen::VectorXd, Eigen::MatrixXd> getPredictedStatesWithCov(const float dT = 1) = 0;
75 
80  virtual std::tuple<Eigen::VectorXd, Eigen::MatrixXd> getPredictedMeasurementsWithCov(const float dT = 1) = 0;
81 
83  virtual uint32_t getAge() const = 0;
84 
86  virtual const STATE_ESTIMATOR_TYPES getStateEstimatorType() = 0;
87 
89  virtual const bool useAspectRatio() const = 0;
90 
96  virtual void overrideState(const Eigen::Vector2d& position, const Eigen::Vector2d& velocity) = 0;
97 };
98 
99 #endif // ESTIMATORLIB_IESTIMATOR2_HPP_
IEstimator2::getStateEstimatorType
virtual const STATE_ESTIMATOR_TYPES getStateEstimatorType()=0
Return the configured state-estimator type.
IEstimator2::getStatesWithCov
virtual std::tuple< Eigen::VectorXd, Eigen::MatrixXd > getStatesWithCov() const =0
Return the current states and their covariance.
IEstimator2::getPredictedStatesWithCov
virtual std::tuple< Eigen::VectorXd, Eigen::MatrixXd > getPredictedStatesWithCov(const float dT=1)=0
Predict states and covariance without modifying the current estimate.
MatrixXd
Eigen::MatrixXd MatrixXd
Definition: sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/preprocess/calibration_parser.h:42
IEstimator2::getAge
virtual uint32_t getAge() const =0
Return the number of estimator updates.
IEstimator2::useAspectRatio
virtual const bool useAspectRatio() const =0
Return whether the estimator represents size using aspect ratio.
STATE_ESTIMATOR_TYPES
STATE_ESTIMATOR_TYPES
State-estimator implementations that can be selected by configuration.
Definition: sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/Estimator_common.hpp:22
IEstimator2::getStates
virtual Eigen::VectorXd getStates() const =0
Return the current estimated states.
IEstimator2::reset
virtual void reset()=0
Reset the states and make the age to be zero.
IEstimator2::getPredictedStates
virtual Eigen::VectorXd getPredictedStates(const float dT=1)=0
Predict states without modifying the current estimate.
IEstimator2::~IEstimator2
virtual ~IEstimator2()
Destroy the state-estimator interface.
Definition: 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/IEstimator2.hpp:33
IEstimator2
Define the interface for state estimators.
Definition: sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/IEstimator2.hpp:29
IEstimator2::overrideState
virtual void overrideState(const Eigen::Vector2d &position, const Eigen::Vector2d &velocity)=0
Overwrite the position and velocity components.
IEstimator2::getMeasurementNoiseCovariance
virtual Eigen::MatrixXd getMeasurementNoiseCovariance() const =0
Return the measurement-noise covariance matrix.
IEstimator2::getPredictedMeasurementsWithCov
virtual std::tuple< Eigen::VectorXd, Eigen::MatrixXd > getPredictedMeasurementsWithCov(const float dT=1)=0
Predict measurements and covariance without modifying the current estimate.
IEstimator2::update
virtual Eigen::VectorXd update(const float dT=1)=0
Update without any measurement, using the prediction only.