Fixed a warning (int and unsigned int comparison) in Camera.cpp

Updated example to switch between LSH and KDTree depending on descriptors type detected. Also use SIFT as it gives better results than SURF.

git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@163 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
matlabbe
2012-08-31 14:09:25 +00:00
parent 3930d71b2f
commit 4fb42d4889
3 changed files with 42 additions and 37 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ void Camera::takeImage()
}
else if(!images_.empty())
{
if(currentImageIndex_ < images_.size())
if(currentImageIndex_ < (unsigned int)images_.size())
{
img = cv::imread(images_[currentImageIndex_++]);
}
-2
View File
@@ -1048,8 +1048,6 @@ void MainWindow::update(const cv::Mat & image)
QColor color((Qt::GlobalColor)(nColor==Qt::yellow?Qt::gray:nColor));
for(QMultiMap<int, int>::iterator iter = matches[i].begin(); iter!=matches[i].end(); ++iter)
{
printf("iter.key()=%d, iter.value()=%d\n", iter.key(), iter.value());
printf("objects_[%d].keypoints=%d\n", i, (int)objects_[i]->keypoints().size());
objects_[i]->setKptColor(iter.key(), color);
ui_->imageView_source->setKptColor(iter.value(), color);
}