RegVis: fixed out-of-range vector error when guess is used and we match to projections. ImageView: Added right-click menu option to set a fixed size for features

This commit is contained in:
matlabbe
2017-12-18 14:38:54 -05:00
parent 6a50b3f149
commit d6058768fc
6 changed files with 52 additions and 3 deletions

View File

@@ -845,7 +845,7 @@ Transform RegistrationVis::computeTransformationImpl(
{
std::vector<std::vector<cv::DMatch> > matches;
cv::BFMatcher matcher(descriptors.type()==CV_8U?cv::NORM_HAMMING:cv::NORM_L2SQR);
matcher.knnMatch(descriptorsTo.row(i), descriptors, matches, 2);
matcher.knnMatch(descriptorsTo.row(i), cv::Mat(descriptors, cv::Range(0, oi)), matches, 2);
UASSERT(matches.size() == 1);
UASSERT(matches[0].size() == 2);
if(matches[0].at(0).distance < _nndr * matches[0].at(1).distance)

View File

@@ -203,7 +203,7 @@ pcl::PointCloud<pcl::PointXYZ>::Ptr voxelize(
}
else if(cloud->size() && !cloud->is_dense && indices->size() == 0)
{
UWARN("Cannot voxelize a cloud not dense with empty indices! (input=%d pts)", (int)cloud->size());
UWARN("Cannot voxelize a not dense (organized) cloud with empty indices! (input=%d pts). Returning empty cloud!", (int)cloud->size());
}
return output;
}