util3d_features.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_FEATURES_H_
29 #define UTIL3D_FEATURES_H_
30 
32 
33 #include <opencv2/calib3d/calib3d.hpp>
34 #include <rtabmap/core/Transform.h>
37 #include <list>
38 #include <map>
39 
40 namespace rtabmap
41 {
42 
43 namespace util3d
44 {
45 
46 
47 std::vector<cv::Point3f> RTABMAP_EXP generateKeypoints3DDepth(
48  const std::vector<cv::KeyPoint> & keypoints,
49  const cv::Mat & depth,
50  const CameraModel & cameraModel,
51  float minDepth = 0,
52  float maxDepth = 0);
53 
54 std::vector<cv::Point3f> RTABMAP_EXP generateKeypoints3DDepth(
55  const std::vector<cv::KeyPoint> & keypoints,
56  const cv::Mat & depth,
57  const std::vector<CameraModel> & cameraModels,
58  float minDepth = 0,
59  float maxDepth = 0);
60 
61 std::vector<cv::Point3f> RTABMAP_EXP generateKeypoints3DDisparity(
62  const std::vector<cv::KeyPoint> & keypoints,
63  const cv::Mat & disparity,
64  const StereoCameraModel & stereoCameraModel,
65  float minDepth = 0,
66  float maxDepth = 0);
67 
68 std::vector<cv::Point3f> RTABMAP_EXP generateKeypoints3DStereo(
69  const std::vector<cv::Point2f> & leftCorners,
70  const std::vector<cv::Point2f> & rightCorners,
71  const StereoCameraModel & model,
72  const std::vector<unsigned char> & mask = std::vector<unsigned char>(),
73  float minDepth = 0,
74  float maxDepth = 0);
75 
76 std::map<int, cv::Point3f> RTABMAP_EXP generateWords3DMono(
77  const std::map<int, cv::KeyPoint> & kpts,
78  const std::map<int, cv::KeyPoint> & previousKpts,
79  const CameraModel & cameraModel,
80  Transform & cameraTransform,
81  int pnpIterations = 100,
82  float pnpReprojError = 8.0f,
83  int pnpFlags = 0, // cv::SOLVEPNP_ITERATIVE
84  int pnpRefineIterations = 1,
85  float ransacParam1 = 3.0f,
86  float ransacParam2 = 0.99f,
87  const std::map<int, cv::Point3f> & refGuess3D = std::map<int, cv::Point3f>(),
88  double * variance = 0);
89 
90 std::multimap<int, cv::KeyPoint> RTABMAP_EXP aggregate(
91  const std::list<int> & wordIds,
92  const std::vector<cv::KeyPoint> & keypoints);
93 
94 } // namespace util3d
95 } // namespace rtabmap
96 
97 #endif /* UTIL3D_FEATURES_H_ */
GLM_FUNC_DECL genIType mask(genIType const &count)
std::map< int, cv::Point3f > RTABMAP_EXP generateWords3DMono(const std::map< int, cv::KeyPoint > &kpts, const std::map< int, cv::KeyPoint > &previousKpts, const CameraModel &cameraModel, Transform &cameraTransform, int pnpIterations=100, float pnpReprojError=8.0f, int pnpFlags=0, int pnpRefineIterations=1, float ransacParam1=3.0f, float ransacParam2=0.99f, const std::map< int, cv::Point3f > &refGuess3D=std::map< int, cv::Point3f >(), double *variance=0)
#define RTABMAP_EXP
Definition: RtabmapExp.h:38
std::multimap< int, cv::KeyPoint > RTABMAP_EXP aggregate(const std::list< int > &wordIds, const std::vector< cv::KeyPoint > &keypoints)
std::vector< cv::Point3f > RTABMAP_EXP generateKeypoints3DDisparity(const std::vector< cv::KeyPoint > &keypoints, const cv::Mat &disparity, const StereoCameraModel &stereoCameraModel, float minDepth=0, float maxDepth=0)
std::vector< cv::Point3f > RTABMAP_EXP generateKeypoints3DDepth(const std::vector< cv::KeyPoint > &keypoints, const cv::Mat &depth, const CameraModel &cameraModel, float minDepth=0, float maxDepth=0)
std::vector< cv::Point3f > RTABMAP_EXP generateKeypoints3DStereo(const std::vector< cv::Point2f > &leftCorners, const std::vector< cv::Point2f > &rightCorners, const StereoCameraModel &model, const std::vector< unsigned char > &mask=std::vector< unsigned char >(), float minDepth=0, float maxDepth=0)


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:43:41