Fixed issue 24 (instead of crashing, an error message is shown in the console and no features are extracted)
git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@387 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
parent
629b2aefaa
commit
55a59e2a10
@ -394,7 +394,17 @@ protected:
|
||||
}
|
||||
timeDetection_+=timeStep.restart();
|
||||
|
||||
extractor_->compute(image_, keypoints_, descriptors_);
|
||||
try
|
||||
{
|
||||
extractor_->compute(image_, keypoints_, descriptors_);
|
||||
}
|
||||
catch(cv::Exception & e)
|
||||
{
|
||||
UERROR("Descriptor exception: %s. Maybe some keypoints are invalid "
|
||||
"for the selected descriptor extractor.", e.what());
|
||||
descriptors_ = cv::Mat();
|
||||
keypoints_.clear();
|
||||
}
|
||||
timeExtraction_+=timeStep.restart();
|
||||
|
||||
if((int)keypoints_.size() != descriptors_.rows)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user