util3d_motion_estimation.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the Universite de Sherbrooke nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef UTIL3D_MOTION_ESTIMATION_H_
29 #define UTIL3D_MOTION_ESTIMATION_H_
30 
32 
33 #include <rtabmap/core/Transform.h>
35 
36 namespace rtabmap
37 {
38 
39 namespace util3d
40 {
41 
43  const std::map<int, cv::Point3f> & words3A,
44  const std::map<int, cv::KeyPoint> & words2B,
45  const CameraModel & cameraModel,
46  int minInliers = 10,
47  int iterations = 100,
48  double reprojError = 5.,
49  int flagsPnP = 0,
50  int pnpRefineIterations = 1,
51  const Transform & guess = Transform::getIdentity(),
52  const std::map<int, cv::Point3f> & words3B = std::map<int, cv::Point3f>(),
53  cv::Mat * covariance = 0, // mean reproj error if words3B is not set
54  std::vector<int> * matchesOut = 0,
55  std::vector<int> * inliersOut = 0);
56 
58  const std::map<int, cv::Point3f> & words3A,
59  const std::map<int, cv::Point3f> & words3B,
60  int minInliers = 10,
61  double inliersDistance = 0.1,
62  int iterations = 100,
63  int refineIterations = 5,
64  cv::Mat * covariance = 0,
65  std::vector<int> * matchesOut = 0,
66  std::vector<int> * inliersOut = 0);
67 
69  const std::vector<cv::Point3f> & objectPoints,
70  const std::vector<cv::Point2f> & imagePoints,
71  const cv::Mat & cameraMatrix,
72  const cv::Mat & distCoeffs,
73  cv::Mat & rvec,
74  cv::Mat & tvec,
75  bool useExtrinsicGuess,
76  int iterationsCount,
77  float reprojectionError,
78  int minInliersCount,
79  std::vector<int> & inliers,
80  int flags,
81  int refineIterations = 1,
82  float refineSigma = 3.0f);
83 
84 } // namespace util3d
85 } // namespace rtabmap
86 
87 #endif /* UTIL3D_TRANSFORMS_H_ */
Transform RTABMAP_EXP estimateMotion3DTo2D(const std::map< int, cv::Point3f > &words3A, const std::map< int, cv::KeyPoint > &words2B, const CameraModel &cameraModel, int minInliers=10, int iterations=100, double reprojError=5., int flagsPnP=0, int pnpRefineIterations=1, const Transform &guess=Transform::getIdentity(), const std::map< int, cv::Point3f > &words3B=std::map< int, cv::Point3f >(), cv::Mat *covariance=0, std::vector< int > *matchesOut=0, std::vector< int > *inliersOut=0)
static Transform getIdentity()
Definition: Transform.cpp:380
#define RTABMAP_EXP
Definition: RtabmapExp.h:38
Transform RTABMAP_EXP estimateMotion3DTo3D(const std::map< int, cv::Point3f > &words3A, const std::map< int, cv::Point3f > &words3B, int minInliers=10, double inliersDistance=0.1, int iterations=100, int refineIterations=5, cv::Mat *covariance=0, std::vector< int > *matchesOut=0, std::vector< int > *inliersOut=0)
void RTABMAP_EXP solvePnPRansac(const std::vector< cv::Point3f > &objectPoints, const std::vector< cv::Point2f > &imagePoints, const cv::Mat &cameraMatrix, const cv::Mat &distCoeffs, cv::Mat &rvec, cv::Mat &tvec, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, int minInliersCount, std::vector< int > &inliers, int flags, int refineIterations=1, float refineSigma=3.0f)


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:37:06