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  float ransacReprojThreshold = 3.0f,
82  float ransacConfidence = 0.99f,
83  const std::map<int, cv::Point3f> & refGuess3D = std::map<int, cv::Point3f>(),
84  double * variance = 0,
85  std::vector<int> * matchesOut = 0);
86 
87 std::multimap<int, cv::KeyPoint> RTABMAP_EXP aggregate(
88  const std::list<int> & wordIds,
89  const std::vector<cv::KeyPoint> & keypoints);
90 
91 } // namespace util3d
92 } // namespace rtabmap
93 
94 #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, float ransacReprojThreshold=3.0f, float ransacConfidence=0.99f, const std::map< int, cv::Point3f > &refGuess3D=std::map< int, cv::Point3f >(), double *variance=0, std::vector< int > *matchesOut=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 Mon Dec 14 2020 03:37:06