Added rawImageSizeCaptured parameter for Usb source device

git-svn-id: http://rtabmap.googlecode.com/svn/branches/0.3/rtabmap@63 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2011-06-07 15:01:39 +00:00
parent 147bee0e63
commit 450aef86f7
7 changed files with 48 additions and 14 deletions

View File

@@ -992,6 +992,7 @@ void MainWindow::startDetection()
{
_camera = new CameraVideo(
_preferencesDialog->getSourceUsbDeviceId(),
_preferencesDialog->isSourceUsbRawImageSizeCaptured(),
_preferencesDialog->getGeneralImageRate(),
_preferencesDialog->getGeneralAutoRestart(),
_preferencesDialog->getSourceWidth(),

View File

@@ -85,6 +85,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
connect(_ui->general_checkBox_autoRestart, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
//usbDevice group
connect(_ui->source_usbDevice_spinBox_id, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->general_checkBox_rawImageSizeCaptured, SIGNAL(currentIndexChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->source_spinBox_imgWidth, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
connect(_ui->source_spinBox_imgheight, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteSourcePanel()));
//images group
@@ -520,6 +521,7 @@ void PreferencesDialog::readCameraSettings(const QString & filePath)
//usbDevice group
settings.beginGroup("usbDevice");
_ui->source_usbDevice_spinBox_id->setValue(settings.value("id",_ui->source_usbDevice_spinBox_id->value()).toInt());
_ui->general_checkBox_rawImageSizeCaptured->setChecked(settings.value("rawImageSizeCaptured", _ui->general_checkBox_rawImageSizeCaptured->isChecked()).toBool());
settings.endGroup(); // usbDevice
//images group
settings.beginGroup("images");
@@ -659,6 +661,7 @@ void PreferencesDialog::writeCameraSettings(const QString & filePath)
//usbDevice group
settings.beginGroup("usbDevice");
settings.setValue("id", _ui->source_usbDevice_spinBox_id->value());
settings.setValue("rawImageSizeCaptured", _ui->general_checkBox_rawImageSizeCaptured->isChecked());
settings.endGroup(); //usbDevice
//images group
settings.beginGroup("images");
@@ -1529,6 +1532,10 @@ int PreferencesDialog::getSourceUsbDeviceId() const
{
return _ui->source_usbDevice_spinBox_id->value();
}
bool PreferencesDialog::isSourceUsbRawImageSizeCaptured() const
{
return _ui->general_checkBox_rawImageSizeCaptured->isChecked();
}
QString PreferencesDialog::getSourceDatabasePath() const
{
return _ui->source_database_lineEdit_path->text();

View File

@@ -46,6 +46,9 @@
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item>
@@ -65,7 +68,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29">
@@ -546,7 +549,7 @@ when using the file type, logs are saved in Logrtabmap.txt (located in the worki
<item>
<widget class="QStackedWidget" name="stackedWidget_2">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="page_7">
<layout class="QVBoxLayout" name="verticalLayout_30">
@@ -576,6 +579,24 @@ when using the file type, logs are saved in Logrtabmap.txt (located in the worki
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="general_checkBox_rawImageSizeCaptured">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Raw image size captured.
If false, the usb driver is configured with the image width/height above. If true, the image is resized after the capture.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -1050,8 +1071,8 @@ We can edit how will like the prediction used in the Bayes filter when there is
<rect>
<x>0</x>
<y>0</y>
<width>518</width>
<height>147</height>
<width>26</width>
<height>78</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">