Fixed bugs in FernDescriptorMatch and FernClassifier

This commit is contained in:
Ilya Lysenkov
2010-06-08 06:54:17 +00:00
parent 165f2520c9
commit 15413c8d40
2 changed files with 2 additions and 2 deletions

View File

@@ -541,7 +541,7 @@ void FernDescriptorMatch::trainFernClassifier()
vector<int> labels;
for( size_t imageIdx = 0; imageIdx < collection.images.size(); imageIdx++ )
{
refimgs[imageIdx] = &collection.images[imageIdx];
refimgs[imageIdx] = new Mat (collection.images[imageIdx]);
for( size_t pointIdx = 0; pointIdx < collection.points[imageIdx].size(); pointIdx++ )
{
points.push_back(collection.points[imageIdx][pointIdx].pt);