mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
CameraStereoVideo: added resolution options for usb camera
This commit is contained in:
@@ -740,6 +740,8 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
connect(_ui->lineEdit_cameraStereoVideo_path_2, SIGNAL(textChanged(const QString &)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
|
||||
connect(_ui->spinBox_stereo_right_device, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->spinBox_stereousbcam_streamWidth, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->spinBox_stereousbcam_streamHeight, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
|
||||
connect(_ui->comboBox_stereoZed_resolution, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
connect(_ui->comboBox_stereoZed_quality, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
|
||||
@@ -1954,6 +1956,8 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
||||
_ui->lineEdit_cameraStereoVideo_path->setText("");
|
||||
_ui->lineEdit_cameraStereoVideo_path_2->setText("");
|
||||
_ui->spinBox_stereo_right_device->setValue(-1);
|
||||
_ui->spinBox_stereousbcam_streamWidth->setValue(0);
|
||||
_ui->spinBox_stereousbcam_streamHeight->setValue(0);
|
||||
_ui->comboBox_stereoZed_resolution->setCurrentIndex(2);
|
||||
_ui->comboBox_stereoZed_quality->setCurrentIndex(1);
|
||||
_ui->checkbox_stereoZed_selfCalibration->setChecked(true);
|
||||
@@ -2408,6 +2412,8 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
|
||||
_ui->lineEdit_cameraStereoVideo_path->setText(settings.value("path", _ui->lineEdit_cameraStereoVideo_path->text()).toString());
|
||||
_ui->lineEdit_cameraStereoVideo_path_2->setText(settings.value("path2", _ui->lineEdit_cameraStereoVideo_path_2->text()).toString());
|
||||
_ui->spinBox_stereo_right_device->setValue(settings.value("device2", _ui->spinBox_stereo_right_device->value()).toInt());
|
||||
_ui->spinBox_stereousbcam_streamWidth->setValue(settings.value("width", _ui->spinBox_stereousbcam_streamWidth->value()).toInt());
|
||||
_ui->spinBox_stereousbcam_streamHeight->setValue(settings.value("height", _ui->spinBox_stereousbcam_streamHeight->value()).toInt());
|
||||
settings.endGroup(); // StereoVideo
|
||||
|
||||
settings.beginGroup("StereoZed");
|
||||
@@ -2894,6 +2900,8 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath) const
|
||||
settings.setValue("path", _ui->lineEdit_cameraStereoVideo_path->text());
|
||||
settings.setValue("path2", _ui->lineEdit_cameraStereoVideo_path_2->text());
|
||||
settings.setValue("device2", _ui->spinBox_stereo_right_device->value());
|
||||
settings.setValue("width", _ui->spinBox_stereousbcam_streamWidth->value());
|
||||
settings.setValue("height", _ui->spinBox_stereousbcam_streamHeight->value());
|
||||
settings.endGroup(); // StereoVideo
|
||||
|
||||
settings.beginGroup("StereoZed");
|
||||
@@ -5933,6 +5941,7 @@ Camera * PreferencesDialog::createCamera(bool useRawImages, bool useColor)
|
||||
this->getGeneralInputRate(),
|
||||
this->getSourceLocalTransform());
|
||||
}
|
||||
((CameraStereoVideo*)camera)->setResolution(_ui->spinBox_stereousbcam_streamWidth->value(), _ui->spinBox_stereousbcam_streamHeight->value());
|
||||
}
|
||||
else if(driver == kSrcStereoVideo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user