Minor changes... added some debug info
git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@111 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
parent
dfb4e5038d
commit
3ba8c95284
@ -541,6 +541,8 @@ void MainWindow::updateObjects()
|
|||||||
{
|
{
|
||||||
for(int i=0; i<objects_.size(); ++i)
|
for(int i=0; i<objects_.size(); ++i)
|
||||||
{
|
{
|
||||||
|
QTime time;
|
||||||
|
time.start();
|
||||||
const cv::Mat & img = objects_.at(i)->cvImage();
|
const cv::Mat & img = objects_.at(i)->cvImage();
|
||||||
cv::FeatureDetector * detector = Settings::createFeaturesDetector();
|
cv::FeatureDetector * detector = Settings::createFeaturesDetector();
|
||||||
std::vector<cv::KeyPoint> keypoints;
|
std::vector<cv::KeyPoint> keypoints;
|
||||||
@ -562,6 +564,7 @@ void MainWindow::updateObjects()
|
|||||||
{
|
{
|
||||||
printf("WARNING: no features detected in object %d !?!\n", objects_.at(i)->id());
|
printf("WARNING: no features detected in object %d !?!\n", objects_.at(i)->id());
|
||||||
}
|
}
|
||||||
|
printf("%d descriptors extracted from object %d (in %d ms)\n", descriptors.rows, objects_.at(i)->id(), time.elapsed());
|
||||||
objects_.at(i)->setData(keypoints, descriptors, img, Settings::currentDetectorType(), Settings::currentDescriptorType());
|
objects_.at(i)->setData(keypoints, descriptors, img, Settings::currentDetectorType(), Settings::currentDescriptorType());
|
||||||
|
|
||||||
//update object labels
|
//update object labels
|
||||||
@ -658,6 +661,7 @@ void MainWindow::updateData()
|
|||||||
flannIndex_.build(objectsDescriptors_, *params, Settings::getFlannDistanceType());
|
flannIndex_.build(objectsDescriptors_, *params, Settings::getFlannDistanceType());
|
||||||
delete params;
|
delete params;
|
||||||
ui_->label_timeIndexing->setNum(time.restart());
|
ui_->label_timeIndexing->setNum(time.restart());
|
||||||
|
ui_->label_vocabularySize->setNum(objectsDescriptors_.rows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -839,6 +843,7 @@ void MainWindow::update(const cv::Mat & image)
|
|||||||
flannIndex_.build(descriptors, *params, Settings::getFlannDistanceType());
|
flannIndex_.build(descriptors, *params, Settings::getFlannDistanceType());
|
||||||
delete params;
|
delete params;
|
||||||
ui_->label_timeIndexing->setNum(time.restart());
|
ui_->label_timeIndexing->setNum(time.restart());
|
||||||
|
ui_->label_vocabularySize->setNum(objectsDescriptors_.rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DO NEAREST NEIGHBOR
|
// DO NEAREST NEIGHBOR
|
||||||
|
|||||||
@ -292,6 +292,62 @@
|
|||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLabel" name="label_timeMatching">
|
||||||
|
<property name="text">
|
||||||
|
<string>000</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>ms</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>ms</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="2">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="text">
|
||||||
|
<string>ms</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QLabel" name="label_minMatchedDistance">
|
||||||
|
<property name="text">
|
||||||
|
<string>000</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Min matched distance</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_14">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max matched distance</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QLabel" name="label_maxMatchedDistance">
|
||||||
|
<property name="text">
|
||||||
|
<string>000</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -369,62 +425,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QLabel" name="label_timeMatching">
|
|
||||||
<property name="text">
|
|
||||||
<string>000</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2">
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string>ms</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="text">
|
|
||||||
<string>ms</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="2">
|
|
||||||
<widget class="QLabel" name="label_12">
|
|
||||||
<property name="text">
|
|
||||||
<string>ms</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1">
|
|
||||||
<widget class="QLabel" name="label_minMatchedDistance">
|
|
||||||
<property name="text">
|
|
||||||
<string>000</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="label_13">
|
|
||||||
<property name="text">
|
|
||||||
<string>Min matched distance</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
|
||||||
<widget class="QLabel" name="label_14">
|
|
||||||
<property name="text">
|
|
||||||
<string>Max matched distance</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="1">
|
|
||||||
<widget class="QLabel" name="label_maxMatchedDistance">
|
|
||||||
<property name="text">
|
|
||||||
<string>000</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -446,6 +446,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="label_17">
|
||||||
|
<property name="text">
|
||||||
|
<string>Vocabulary size</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QLabel" name="label_vocabularySize">
|
||||||
|
<property name="text">
|
||||||
|
<string>000</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -462,7 +476,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>348</width>
|
<width>348</width>
|
||||||
<height>373</height>
|
<height>357</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user