I am having an error trying to do chamfer matching. Somewhere within the call to chamerMatching, I get the error:
malloc: * error for object 0x104044000: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug
Here is the code:
Mat img = imread(argc == 3 ? argv[1] : "X077_03.jpg", CV_LOAD_IMAGE_GRAYSCALE);
Mat tpl = imread(argc == 3 ? argv[2] : "X077_03.jpg", CV_LOAD_IMAGE_GRAYSCALE);
Canny(img, img, 5, 50, 3);
Canny(tpl, tpl, 5, 50, 3);
vector<vector<Point> > results;
vector<float> costs;
int best = chamerMatching( img, tpl, results, costs );
Does anyone have a guess as to what could be going on?