NVIDIA DeepStream SDK API Reference

7.0 Release
PnP.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  *
4  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
5  * property and proprietary rights in and to this material, related
6  * documentation and any modifications thereto. Any use, reproduction,
7  * disclosure or distribution of this material and related documentation
8  * without an express license agreement from NVIDIA CORPORATION or
9  * its affiliates is strictly prohibited.
10  *
11  * SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES
12  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
13  */
14 
15 #include <cv/core/Array.h>
16 #include <cv/core/MathTypes.h>
17 
18 #include <vector>
19 
20 namespace cvcore {
21 namespace vision3d {
22 
32  double score;
33  std::vector<uint32_t> inliers;
34 };
35 
50 uint32_t EvaluateRansacFormula(const float successRate,
51  const float outlierRatio,
52  const uint32_t sampleSize);
53 
68  const Array<Vector2d> &points2,
69  const Vector2d focal, const Vector2d principal);
70 
88 std::vector<PoseHypothesis> ComputeCameraPoseEpnpRansac(
89  const Array<Vector3d> &points3, const Array<Vector2d> &points2,
90  const Vector2d focal, const Vector2d principal,
91  const uint32_t numExperiments, const double ransacThreshold,
92  const uint32_t maxTopPoses, const uint32_t seed);
93 
109  const Array<Vector2d> &points2,
110  const Vector2d focal, const Vector2d principal,
111  const Pose3d& initialGuess, size_t iterations = 5);
112 } // namespace vision3d
113 } // namespace cvcore
cvcore::Vector2< double >
cvcore
Definition: PnP.h:20
MathTypes.h
cvcore::vision3d::ComputeCameraPoseEpnpRansac
std::vector< PoseHypothesis > ComputeCameraPoseEpnpRansac(const Array< Vector3d > &points3, const Array< Vector2d > &points2, const Vector2d focal, const Vector2d principal, const uint32_t numExperiments, const double ransacThreshold, const uint32_t maxTopPoses, const uint32_t seed)
A function to compute the pose of a pinhole camera from at least 6 2D-3D point correspondences with o...
Array.h
cvcore::vision3d::PoseHypothesis::inliers
std::vector< uint32_t > inliers
Definition: PnP.h:33
cvcore::vision3d::PoseHypothesis::pose
Pose3d pose
Definition: PnP.h:31
cvcore::Array
Implementation of Array class.
Definition: Array.h:133
cvcore::vision3d::ComputeCameraPoseIterativePnp
Pose3d ComputeCameraPoseIterativePnp(const Array< Vector3d > &points3, const Array< Vector2d > &points2, const Vector2d focal, const Vector2d principal, const Pose3d &initialGuess, size_t iterations=5)
A function to compute the pose of a camera give the camera instrinsics iteratively.
cvcore::Pose3< double >
cvcore::vision3d::EvaluateRansacFormula
uint32_t EvaluateRansacFormula(const float successRate, const float outlierRatio, const uint32_t sampleSize)
A function to calculate the number of RANSAC rounds necessary to sample at least a single uncontamina...
cvcore::vision3d::PoseHypothesis
A struct to describe the Pose hypothesis returned by RANSAC-based pose estimation.
Definition: PnP.h:30
cvcore::vision3d::PoseHypothesis::score
double score
Definition: PnP.h:32
cvcore::vision3d::ComputeCameraPoseEpnp
Pose3d ComputeCameraPoseEpnp(const Array< Vector3d > &points3, const Array< Vector2d > &points2, const Vector2d focal, const Vector2d principal)
A function to compute the pose of a camera give the camera instrinsics and at least 6 2D-3D point cor...