This commit is contained in:
Marina Kolpakova 2012-03-18 17:17:44 +00:00
parent 2ca6a50546
commit aa19fd500c

View File

@ -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;