Fixed bug #1654
This commit is contained in:
parent
2ca6a50546
commit
aa19fd500c
@ -1121,7 +1121,7 @@ ChamferMatcher::Match* ChamferMatcher::Matching::localChamferDistance(Point offs
|
||||
}
|
||||
|
||||
if(cost > 0){
|
||||
ChamferMatcher::Match* istance(new ChamferMatcher::Match());
|
||||
ChamferMatcher::Match* istance = new ChamferMatcher::Match();
|
||||
istance->cost = cost;
|
||||
istance->offset = offset;
|
||||
istance->tpl = tpl;
|
||||
@ -1153,7 +1153,10 @@ ChamferMatcher::Matches* ChamferMatcher::Matching::matchTemplates(Mat& dist_img,
|
||||
|
||||
ChamferMatcher::Match* is = localChamferDistance(loc, dist_img, orientation_img, tpl, orientation_weight);
|
||||
if(is)
|
||||
{
|
||||
matches->push_back(*is);
|
||||
delete is;
|
||||
}
|
||||
}
|
||||
|
||||
delete it;
|
||||
|
Loading…
x
Reference in New Issue
Block a user