Commit aa19fd50 authored by Marina Kolpakova's avatar Marina Kolpakova

Fixed bug #1654

parent 2ca6a505
...@@ -1121,7 +1121,7 @@ ChamferMatcher::Match* ChamferMatcher::Matching::localChamferDistance(Point offs ...@@ -1121,7 +1121,7 @@ ChamferMatcher::Match* ChamferMatcher::Matching::localChamferDistance(Point offs
} }
if(cost > 0){ if(cost > 0){
ChamferMatcher::Match* istance(new ChamferMatcher::Match()); ChamferMatcher::Match* istance = new ChamferMatcher::Match();
istance->cost = cost; istance->cost = cost;
istance->offset = offset; istance->offset = offset;
istance->tpl = tpl; istance->tpl = tpl;
...@@ -1153,7 +1153,10 @@ ChamferMatcher::Matches* ChamferMatcher::Matching::matchTemplates(Mat& dist_img, ...@@ -1153,7 +1153,10 @@ ChamferMatcher::Matches* ChamferMatcher::Matching::matchTemplates(Mat& dist_img,
ChamferMatcher::Match* is = localChamferDistance(loc, dist_img, orientation_img, tpl, orientation_weight); ChamferMatcher::Match* is = localChamferDistance(loc, dist_img, orientation_img, tpl, orientation_weight);
if(is) if(is)
{
matches->push_back(*is); matches->push_back(*is);
delete is;
}
} }
delete it; delete it;
......
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