Merge pull request #425 from asmaloney:vector_empty

This commit is contained in:
Andrey Kamaev 2013-02-04 12:03:03 +04:00 committed by OpenCV Buildbot
commit 6dc3b662f6

View File

@ -930,15 +930,13 @@ void ChamferMatcher::Template::show() const
void ChamferMatcher::Matching::addTemplateFromImage(Mat& templ, float scale)
{
Template* cmt = new Template(templ, scale);
if(templates.size() > 0)
templates.clear();
templates.clear();
templates.push_back(cmt);
cmt->show();
}
void ChamferMatcher::Matching::addTemplate(Template& template_){
if(templates.size() > 0)
templates.clear();
templates.clear();
templates.push_back(&template_);
}
/**