Removed "Cannot search, objects must be updated!" warning when no object is yet added when the camera is running

git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@276 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
matlabbe 2014-05-20 15:30:25 +00:00
parent 96462e0ec8
commit e4ca56879c

View File

@ -1659,9 +1659,12 @@ void MainWindow::update(const cv::Mat & image)
ui_->label_objectsDetected->setNum(objectsDetected.size()); ui_->label_objectsDetected->setNum(objectsDetected.size());
} }
else else
{
if(!objectsDescriptors_.empty() && keypoints.size())
{ {
this->statusBar()->showMessage(tr("Cannot search, objects must be updated!")); this->statusBar()->showMessage(tr("Cannot search, objects must be updated!"));
printf("Cannot search, objects must be updated!\n"); printf("Cannot search, objects must be updated!\n");
}
if(this->isVisible()) if(this->isVisible())
{ {
ui_->imageView_source->setData(keypoints, cv::Mat(), image, Settings::currentDetectorType(), Settings::currentDescriptorType()); ui_->imageView_source->setData(keypoints, cv::Mat(), image, Settings::currentDetectorType(), Settings::currentDescriptorType());