Fixed crash when using binary descriptors and maxWords/maxDepth are set

Added BRISK detector

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1839 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-10-06 19:41:45 +00:00
parent d30c2baf51
commit 4d4c5af6e5
10 changed files with 303 additions and 27 deletions

View File

@@ -1136,11 +1136,6 @@ Transform transformFromXYZCorrespondences(
Transform transform;
if(cloud1->size() && cloud1->size() == cloud2->size())
{
// Not robust to outliers...
//Eigen::Matrix4f transformMatrix;
//pcl::registration::TransformationEstimationSVD<pcl::PointXYZ, pcl::PointXYZ> trans_est;
//trans_est.estimateRigidTransformation (*cloud2, *cloud1, transformMatrix);
// Robust to outliers RANSAC
pcl::CorrespondencesPtr correspondences(new pcl::Correspondences);
for(unsigned int i = 0; i<cloud1->size(); ++i)
@@ -1159,6 +1154,14 @@ Transform transformFromXYZCorrespondences(
UDEBUG("RANSAC inliers=%d outliers=%d", (int)correspondencesInliers.size(), (int)correspondences->size()-(int)correspondencesInliers.size());
transform = util3d::transformFromEigen4f(crsc.getBestTransformation());
/*UDEBUG("RANSAC=%s", transform.prettyPrint().c_str());
pcl::registration::TransformationEstimationSVD<pcl::PointXYZ, pcl::PointXYZ> trans_est;
Eigen::Matrix4f transform_svd;
trans_est.estimateRigidTransformation (*cloud2, *cloud1, correspondencesInliers, transform_svd);
transform = util3d::transformFromEigen4f(transform_svd);
UDEBUG("SVD=%s", transform.prettyPrint().c_str());*/
if(correspondencesInliers.size() == correspondences->size() && transform.isIdentity())
{