diff --git a/src/Camera.cpp b/src/Camera.cpp index 24b62f92..1f9f0faf 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -52,9 +52,10 @@ void Camera::takeImage() Settings::getCamera_imageHeight().toInt() != img->height) { // declare a destination IplImage object with correct size, depth and channels - cv::Mat imgMat(cvSize(Settings::getCamera_imageWidth().toInt(), Settings::getCamera_imageHeight().toInt()), - img->depth, - img->nChannels ); + cv::Mat headerImg = img; + cv::Mat imgMat(Settings::getCamera_imageHeight().toInt(), + Settings::getCamera_imageWidth().toInt(), + headerImg.type()); //use cvResize to resize source to a destination image (linear interpolation) IplImage resampledImg = imgMat; diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index c67b6560..fc163ac6 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -78,7 +78,7 @@ MainWindow::MainWindow(Camera * camera, QWidget * parent) : connect(ui_->actionLoad_objects, SIGNAL(triggered()), this, SLOT(loadObjects())); connect(ui_->actionAbout, SIGNAL(triggered()), aboutDialog_ , SLOT(exec())); - QTimer::singleShot(1000, this, SLOT(startProcessing())); + QTimer::singleShot(10, this, SLOT(startProcessing())); } MainWindow::~MainWindow()