projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a66955
)
No need to check vector size before clear()
author
Andy Maloney
<asmaloney@gmail.com>
Sun, 3 Feb 2013 00:00:41 +0000
(19:00 -0500)
committer
Andy Maloney
<asmaloney@gmail.com>
Sun, 3 Feb 2013 00:00:41 +0000
(19:00 -0500)
modules/contrib/src/chamfermatching.cpp
patch
|
blob
|
history
diff --git
a/modules/contrib/src/chamfermatching.cpp
b/modules/contrib/src/chamfermatching.cpp
index
881606a
..
17d06b3
100644
(file)
--- a/
modules/contrib/src/chamfermatching.cpp
+++ b/
modules/contrib/src/chamfermatching.cpp
@@
-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_);
}
/**