Preferences: Fixed xfeatures2d features not available without nonfree on OpenCV >= 3.4.2 (https://github.com/introlab/rtabmap_ros/issues/422)

This commit is contained in:
matlabbe
2020-05-25 17:31:13 -04:00
parent 35385e299d
commit b40d9610ed
7 changed files with 88 additions and 47 deletions
+15 -2
View File
@@ -47,12 +47,25 @@ AboutDialog::AboutDialog(QWidget * parent) :
version.append(" [DEMO]");
#endif
QString cv_version = CV_VERSION;
#ifdef RTABMAP_NONFREE
#if CV_MAJOR_VERSION < 3
#ifdef RTABMAP_NONFREE
cv_version.append(" [With nonfree]");
_ui->label_opencv_license->setText("Not Commercial");
#else
#else
cv_version.append(" [Without nonfree]");
_ui->label_opencv_license->setText("BSD");
#endif
#elif defined(HAVE_OPENCV_XFEATURES2D)
#ifdef RTABMAP_NONFREE
cv_version.append(" [With xfeatures2d, nonfree]");
_ui->label_opencv_license->setText("Not Commercial");
#else
cv_version.append(" [With xfeatures2d]");
_ui->label_opencv_license->setText("BSD");
#endif
#else
cv_version.append(" [Without xfeatures2d and nonfree]");
_ui->label_opencv_license->setText("BSD");
#endif
_ui->label_version->setText(version);
_ui->label_opencv_version->setText(cv_version);