mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Added parameter "Mem/UseOdometryFeatures=false" to use directly features already extracted from odometry for the vocabulary (issue #32)
This commit is contained in:
@@ -77,7 +77,8 @@ void KeypointItem::showDescription()
|
||||
"Hessian = %4\n"
|
||||
"X = %5\n"
|
||||
"Y = %6\n"
|
||||
"Size = %7").arg(_id).arg(_kpt.angle).arg(_kpt.response).arg(_kpt.pt.x).arg(_kpt.pt.y).arg(_kpt.size));
|
||||
"Size = %7\n"
|
||||
"Octave = %8").arg(_id).arg(_kpt.angle).arg(_kpt.response).arg(_kpt.pt.x).arg(_kpt.pt.y).arg(_kpt.size).arg(_kpt.octave));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -87,7 +88,8 @@ void KeypointItem::showDescription()
|
||||
"X = %5\n"
|
||||
"Y = %6\n"
|
||||
"Size = %7\n"
|
||||
"Depth = %8 m").arg(_id).arg(_kpt.angle).arg(_kpt.response).arg(_kpt.pt.x).arg(_kpt.pt.y).arg(_kpt.size).arg(_depth));
|
||||
"Octave = %8\n"
|
||||
"Depth = %9 m").arg(_id).arg(_kpt.angle).arg(_kpt.response).arg(_kpt.pt.x).arg(_kpt.pt.y).arg(_kpt.size).arg(_kpt.octave).arg(_depth));
|
||||
}
|
||||
_placeHolder->setRect(text->boundingRect());
|
||||
}
|
||||
|
||||
@@ -510,6 +510,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->spinBox_imageDecimation->setObjectName(Parameters::kMemImageDecimation().c_str());
|
||||
_ui->general_spinBox_laserScanDownsample->setObjectName(Parameters::kMemLaserScanDownsampleStepSize().c_str());
|
||||
_ui->checkBox_useDepthAsMask->setObjectName(Parameters::kMemUseDepthAsMask().c_str());
|
||||
_ui->checkBox_useOdomFeatures->setObjectName(Parameters::kMemUseOdomFeatures().c_str());
|
||||
|
||||
// Database
|
||||
_ui->checkBox_dbInMemory->setObjectName(Parameters::kDbSqlite3InMemory().c_str());
|
||||
@@ -776,6 +777,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_ui->doubleSpinBox_kp_roi2, SIGNAL(valueChanged(double)), this, SLOT(updateKpROI()));
|
||||
connect(_ui->doubleSpinBox_kp_roi3, SIGNAL(valueChanged(double)), this, SLOT(updateKpROI()));
|
||||
connect(_ui->graphOptimization_type, SIGNAL(currentIndexChanged(int)), this, SLOT(updateG2oVisibility()));
|
||||
connect(_ui->checkBox_useOdomFeatures, SIGNAL(toggled(bool)), this, SLOT(useOdomFeatures()));
|
||||
|
||||
//Create a model from the stacked widgets
|
||||
// This will add all parameters to the parameters Map
|
||||
@@ -2192,6 +2194,9 @@ void PreferencesDialog::showEvent ( QShowEvent * event )
|
||||
_ui->groupBox_source0->setEnabled(false);
|
||||
_ui->groupBox_odometry1->setEnabled(false);
|
||||
|
||||
_ui->checkBox_useOdomFeatures->setChecked(false);
|
||||
_ui->checkBox_useOdomFeatures->setEnabled(false);
|
||||
|
||||
this->setWindowTitle(tr("Preferences [Monitoring mode]"));
|
||||
}
|
||||
else
|
||||
@@ -2207,6 +2212,8 @@ void PreferencesDialog::showEvent ( QShowEvent * event )
|
||||
_ui->groupBox_source0->setEnabled(true);
|
||||
_ui->groupBox_odometry1->setEnabled(true);
|
||||
|
||||
_ui->checkBox_useOdomFeatures->setEnabled(true);
|
||||
|
||||
this->setWindowTitle(tr("Preferences"));
|
||||
}
|
||||
this->readSettingsBegin();
|
||||
@@ -3260,6 +3267,29 @@ void PreferencesDialog::updateG2oVisibility()
|
||||
_ui->groupBox_g2o->setVisible(_ui->graphOptimization_type->currentIndex() == 1);
|
||||
}
|
||||
|
||||
void PreferencesDialog::useOdomFeatures()
|
||||
{
|
||||
if(this->isVisible() && _ui->checkBox_useOdomFeatures->isChecked())
|
||||
{
|
||||
int r = QMessageBox::question(this, tr("Using odometry features for vocabulary..."),
|
||||
tr("Do you want to match feature parameters "
|
||||
"below with corresponding ones used for odometry?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||
|
||||
if(r == QMessageBox::Yes)
|
||||
{
|
||||
_ui->comboBox_detector_strategy->setCurrentIndex(_ui->reextract_type->currentIndex());
|
||||
_ui->surf_doubleSpinBox_maxDepth->setValue(_ui->loopClosure_bowMaxDepth->value());
|
||||
_ui->surf_doubleSpinBox_minDepth->setValue(_ui->loopClosure_bowMinDepth->value());
|
||||
_ui->surf_spinBox_wordsPerImageTarget->setValue(_ui->reextract_maxFeatures->value());
|
||||
_ui->checkBox_useDepthAsMask->setChecked(_ui->loopClosure_useDepthAsMask->isChecked());
|
||||
_ui->lineEdit_kp_roi->setText(_ui->loopClosure_roi->text());
|
||||
_ui->subpix_winSize_kp->setValue(_ui->subpix_winSize->value());
|
||||
_ui->subpix_iterations_kp->setValue(_ui->subpix_iterations->value());
|
||||
_ui->subpix_eps_kp->setValue(_ui->subpix_eps->value());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::changeWorkingDirectory()
|
||||
{
|
||||
QString directory = QFileDialog::getExistingDirectory(this, tr("Working directory"), _ui->lineEdit_workingDirectory->text());
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<y>-591</y>
|
||||
<width>681</width>
|
||||
<height>2010</height>
|
||||
</rect>
|
||||
@@ -4971,6 +4971,33 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
<string>Vocabulary</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_useOdomFeatures">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_145">
|
||||
<property name="text">
|
||||
<string>Use odometry features. Disable to select different feature type. Note that if no features are received, they will be re-extracted (if visual odometry is used, you may want to match the feature type below with the one used for odometry).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_8">
|
||||
<property name="title">
|
||||
@@ -4979,6 +5006,64 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
<layout class="QVBoxLayout" name="verticalLayout_60">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_32" columnstretch="0,1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="toolTip">
|
||||
<string>0 means that the response (hessian) threshold
|
||||
used for the detector will not be adapted.
|
||||
Otherwise, the threshold is modified to
|
||||
generate the number of words requested.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Maximum words per image (0=no maximum). Setting to -1 will disable features extraction, so disabling loop closure detection indirectly.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_101">
|
||||
<property name="text">
|
||||
<string>ROI ratios [left, right, top, bottom] between 0 and 1.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_81">
|
||||
<property name="toolTip">
|
||||
<string>0 means that the response (hessian) threshold
|
||||
used for the detector will not be adapted.
|
||||
Otherwise, the threshold is modified to
|
||||
generate the number of words requested.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bad signature ratio (less than Ratio x AverageWordsPerImage = bad).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_kp_roi">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboBox_detector_strategy">
|
||||
<item>
|
||||
@@ -5052,38 +5137,6 @@ generate the number of words requested.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="toolTip">
|
||||
<string>0 means that the response (hessian) threshold
|
||||
used for the detector will not be adapted.
|
||||
Otherwise, the threshold is modified to
|
||||
generate the number of words requested.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Maximum words per image (0=no maximum). Setting to -1 will disable features extraction, so disabling loop closure detection indirectly.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_101">
|
||||
<property name="text">
|
||||
<string>ROI ratios [left, right, top, bottom] between 0 and 1.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_kp_roi1">
|
||||
<property name="suffix">
|
||||
@@ -5174,32 +5227,6 @@ generate the number of words requested.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_81">
|
||||
<property name="toolTip">
|
||||
<string>0 means that the response (hessian) threshold
|
||||
used for the detector will not be adapted.
|
||||
Otherwise, the threshold is modified to
|
||||
generate the number of words requested.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bad signature ratio (less than Ratio x AverageWordsPerImage = bad).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_kp_roi">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_kp_roi0">
|
||||
<property name="suffix">
|
||||
|
||||
Reference in New Issue
Block a user