Commit 6dc3b662 authored by Andrey Kamaev's avatar Andrey Kamaev Committed by OpenCV Buildbot

Merge pull request #425 from asmaloney:vector_empty

parents 58c4d5f4 ac8744af
...@@ -930,15 +930,13 @@ void ChamferMatcher::Template::show() const ...@@ -930,15 +930,13 @@ void ChamferMatcher::Template::show() const
void ChamferMatcher::Matching::addTemplateFromImage(Mat& templ, float scale) void ChamferMatcher::Matching::addTemplateFromImage(Mat& templ, float scale)
{ {
Template* cmt = new Template(templ, scale); Template* cmt = new Template(templ, scale);
if(templates.size() > 0) templates.clear();
templates.clear();
templates.push_back(cmt); templates.push_back(cmt);
cmt->show(); cmt->show();
} }
void ChamferMatcher::Matching::addTemplate(Template& template_){ void ChamferMatcher::Matching::addTemplate(Template& template_){
if(templates.size() > 0) templates.clear();
templates.clear();
templates.push_back(&template_); templates.push_back(&template_);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment