diff --git a/corelib/WebcamCapture/main.cpp b/corelib/WebcamCapture/main.cpp index c67ba933..c7a376a6 100644 --- a/corelib/WebcamCapture/main.cpp +++ b/corelib/WebcamCapture/main.cpp @@ -37,7 +37,6 @@ void showUsage() " -device #: Id of the webcam (default 0)\n" " -width #: Image width (default 640)\n" " -height #: Image height (default 480)\n" - " -rawSize Resize image after capturing the with default size\n" " -fps #.#: Frame rate (Hz) (default 2.0)\n" " -hide : Image not shown while capturing (default true)\n" " -dir \"path\": Path of the images saved (default \"./imagesCaptured\")\n" @@ -122,7 +121,6 @@ int main(int argc, char * argv[]) int usbDevice = 0; int imageWidth = 640; int imageHeight = 480; - bool rawSize = false; float imageRate = 2.0; int startId = 1; std::string extension = "jpg"; @@ -217,7 +215,6 @@ int main(int argc, char * argv[]) " device=%d\n" " width=%d\n" " height=%d\n" - " rawSize=%s\n" " hz=%f\n" " show=%s\n" " dir=%s\n" @@ -227,7 +224,6 @@ int main(int argc, char * argv[]) usbDevice, imageWidth, imageHeight, - uBool2str(rawSize).c_str(), imageRate, uBool2str(show).c_str(), targetDirectory.c_str(), @@ -237,7 +233,7 @@ int main(int argc, char * argv[]) UDirectory::makeDir(targetDirectory); - rtabmap::CameraVideo cam(usbDevice, rawSize, imageRate, false, imageWidth, imageHeight); + rtabmap::CameraVideo cam(usbDevice, imageRate, false, imageWidth, imageHeight); if(!cam.init()) { printf("Can't initialize the camera...\n"); diff --git a/corelib/include/rtabmap/core/Camera.h b/corelib/include/rtabmap/core/Camera.h index badef748..b5cd2d84 100644 --- a/corelib/include/rtabmap/core/Camera.h +++ b/corelib/include/rtabmap/core/Camera.h @@ -176,7 +176,6 @@ public: public: CameraVideo(int usbDevice = 0, - bool rawImageSizeCaptured = false, float imageRate = 0, bool autoRestart = false, unsigned int imageWidth = 0, @@ -200,7 +199,6 @@ private: // Usb camera int _usbDevice; - bool _rawImageSizeCaptured; }; diff --git a/corelib/src/Camera.cpp b/corelib/src/Camera.cpp index 1800cd49..03a1ff3d 100644 --- a/corelib/src/Camera.cpp +++ b/corelib/src/Camera.cpp @@ -438,7 +438,6 @@ IplImage * CameraImages::takeImage() // CameraVideo ///////////////////////// CameraVideo::CameraVideo(int usbDevice, - bool rawImageSizeCaptured, float imageRate, bool autoRestart, unsigned int imageWidth, @@ -446,8 +445,7 @@ CameraVideo::CameraVideo(int usbDevice, Camera(imageRate, autoRestart, imageWidth, imageHeight), _capture(0), _src(kUsbDevice), - _usbDevice(usbDevice), - _rawImageSizeCaptured(rawImageSizeCaptured) + _usbDevice(usbDevice) { } @@ -485,7 +483,7 @@ bool CameraVideo::init() { ULOGGER_DEBUG("CameraVideo::init() Usb device initialization on device %d with imgSize=[%d,%d]", _usbDevice, getImageWidth(), getImageHeight()); _capture = cvCaptureFromCAM(_usbDevice); - if(_capture && getImageWidth() && getImageHeight() && !_rawImageSizeCaptured) + if(_capture && getImageWidth() && getImageHeight()) { cvSetCaptureProperty(_capture, CV_CAP_PROP_FRAME_WIDTH, double(getImageWidth())); cvSetCaptureProperty(_capture, CV_CAP_PROP_FRAME_HEIGHT, double(getImageHeight())); diff --git a/guilib/include/rtabmap/gui/PreferencesDialog.h b/guilib/include/rtabmap/gui/PreferencesDialog.h index 8848d9e2..fdc09d3b 100644 --- a/guilib/include/rtabmap/gui/PreferencesDialog.h +++ b/guilib/include/rtabmap/gui/PreferencesDialog.h @@ -111,7 +111,6 @@ public: bool getSourceImagesRefreshDir() const; //Images group QString getSourceVideoPath() const; //Video group int getSourceUsbDeviceId() const; //UsbDevice group - bool isSourceUsbRawImageSizeCaptured() const; //UsbDevice group QString getSourceDatabasePath() const; //Database group bool getSourceDatabaseIgnoreChildren() const; //Database group diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index ac685ee4..97557c79 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -992,7 +992,6 @@ void MainWindow::startDetection() { _camera = new CameraVideo( _preferencesDialog->getSourceUsbDeviceId(), - _preferencesDialog->isSourceUsbRawImageSizeCaptured(), _preferencesDialog->getGeneralImageRate(), _preferencesDialog->getGeneralAutoRestart(), _preferencesDialog->getSourceWidth(), diff --git a/guilib/src/PreferencesDialog.cpp b/guilib/src/PreferencesDialog.cpp index 412e8358..040e178e 100644 --- a/guilib/src/PreferencesDialog.cpp +++ b/guilib/src/PreferencesDialog.cpp @@ -85,7 +85,6 @@ 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 @@ -521,7 +520,6 @@ 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"); @@ -661,7 +659,6 @@ 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"); @@ -1532,10 +1529,6 @@ 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(); diff --git a/guilib/src/ui/preferencesDialog.ui b/guilib/src/ui/preferencesDialog.ui index 884b1d5e..c5644910 100644 --- a/guilib/src/ui/preferencesDialog.ui +++ b/guilib/src/ui/preferencesDialog.ui @@ -579,24 +579,6 @@ when using the file type, logs are saved in Logrtabmap.txt (located in the worki - - - - - - - - - - - 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. - - - true - - - @@ -1071,7 +1053,7 @@ We can edit how will like the prediction used in the Bayes filter when there is 0 0 - 26 + 98 78