OpenCV3: added RHO homography type "Homography/method"

This commit is contained in:
matlabbe
2016-01-17 12:24:42 -05:00
parent c6ee7a27ef
commit ccb679e7c2
3 changed files with 13 additions and 1 deletions
+7
View File
@@ -394,6 +394,13 @@ void ParametersToolBox::addParameter(QVBoxLayout * layout,
widget->setItemData(4, 0, Qt::UserRole - 1);
#endif
}
if(key.compare(Settings::kHomography_method()) == 0)
{
#if CV_MAJOR_VERSION < 3
// disable RHO approach
widget->setItemData(2, 0, Qt::UserRole - 1);
#endif
}
widget->setCurrentIndex(splitted.first().toInt());
connect(widget, SIGNAL(currentIndexChanged(int)), this, SLOT(changeParameter(int)));
+5
View File
@@ -1425,6 +1425,11 @@ int Settings::getHomographyMethod()
{
switch(method)
{
#if CV_MAJOR_VERSION >= 3
case 2:
method = cv::RHO;
break;
#endif
case 0:
method = cv::LMEDS;
break;