mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-07 02:27:47 +08:00
Refactoring: removed some code duplication about transformation estimation and features (2D-3D) extraction.
Added Feature2D::generateKeypoints3D() for convenience. Added parameter "Vis/PnPOpenCV2". Added parameter "Vis/ForwardEstOnly". Removed OdometryOpticalFlow class, replaced by OdometryF2F (frame-to-frame). To get the same previous OpticalFLow approach, parameter "Vis/CorType" should be set to 1. Some parameters under group "OdomFlow/..." are now under "Vis/CorFlow...". In Registration class, add computeTransformationMod() method to modify input signatures. Added constructor Signature(SensorData) for convenience. Modified words multimap used with cv::Point3f instead of pcl::PointXYZ to limit the use of PCL headers where they are not really required. Added Stereo::create() for convenience. Transform: fixed quaternion constructor where data_ was not initialized. Added parentheses operator for convenience. DatabaseViewer: loading .rtabmap/rtabmap.ini instead of .rtabmap/dbViewer.ini when used from rtabmap application. Added vertical layout option for convenience. MainWindow: fixed wrong Odometry speed values ParametersToolBox: using QStackedWidget instead of a QToolBox for space, added "Restore Defaults" button.
This commit is contained in:
@@ -315,10 +315,10 @@ void findCorrespondences(
|
||||
}
|
||||
|
||||
void findCorrespondences(
|
||||
const std::multimap<int, pcl::PointXYZ> & words1,
|
||||
const std::multimap<int, pcl::PointXYZ> & words2,
|
||||
pcl::PointCloud<pcl::PointXYZ> & inliers1,
|
||||
pcl::PointCloud<pcl::PointXYZ> & inliers2,
|
||||
const std::multimap<int, cv::Point3f> & words1,
|
||||
const std::multimap<int, cv::Point3f> & words2,
|
||||
std::vector<cv::Point3f> & inliers1,
|
||||
std::vector<cv::Point3f> & inliers2,
|
||||
float maxDepth,
|
||||
std::vector<int> * uniqueCorrespondences)
|
||||
{
|
||||
@@ -338,8 +338,8 @@ void findCorrespondences(
|
||||
{
|
||||
inliers1[oi] = words1.find(*iter)->second;
|
||||
inliers2[oi] = words2.find(*iter)->second;
|
||||
if(pcl::isFinite(inliers1[oi]) &&
|
||||
pcl::isFinite(inliers2[oi]) &&
|
||||
if(util3d::isFinite(inliers1[oi]) &&
|
||||
util3d::isFinite(inliers2[oi]) &&
|
||||
(inliers1[oi].x != 0 || inliers1[oi].y != 0 || inliers1[oi].z != 0) &&
|
||||
(inliers2[oi].x != 0 || inliers2[oi].y != 0 || inliers2[oi].z != 0) &&
|
||||
(maxDepth <= 0 || (inliers1[oi].x > 0 && inliers1[oi].x <= maxDepth && inliers2[oi].x>0 &&inliers2[oi].x<=maxDepth)))
|
||||
@@ -361,10 +361,10 @@ void findCorrespondences(
|
||||
}
|
||||
|
||||
void findCorrespondences(
|
||||
const std::map<int, pcl::PointXYZ> & words1,
|
||||
const std::map<int, pcl::PointXYZ> & words2,
|
||||
pcl::PointCloud<pcl::PointXYZ> & inliers1,
|
||||
pcl::PointCloud<pcl::PointXYZ> & inliers2,
|
||||
const std::map<int, cv::Point3f> & words1,
|
||||
const std::map<int, cv::Point3f> & words2,
|
||||
std::vector<cv::Point3f> & inliers1,
|
||||
std::vector<cv::Point3f> & inliers2,
|
||||
float maxDepth,
|
||||
std::vector<int> * correspondences)
|
||||
{
|
||||
@@ -384,8 +384,8 @@ void findCorrespondences(
|
||||
{
|
||||
inliers1[oi] = words1.find(*iter)->second;
|
||||
inliers2[oi] = words2.find(*iter)->second;
|
||||
if(pcl::isFinite(inliers1[oi]) &&
|
||||
pcl::isFinite(inliers2[oi]) &&
|
||||
if(util3d::isFinite(inliers1[oi]) &&
|
||||
util3d::isFinite(inliers2[oi]) &&
|
||||
(inliers1[oi].x != 0 || inliers1[oi].y != 0 || inliers1[oi].z != 0) &&
|
||||
(inliers2[oi].x != 0 || inliers2[oi].y != 0 || inliers2[oi].z != 0) &&
|
||||
(maxDepth <= 0 || (inliers1[oi].x > 0 && inliers1[oi].x <= maxDepth && inliers2[oi].x>0 &&inliers2[oi].x<=maxDepth)))
|
||||
|
||||
Reference in New Issue
Block a user