Fixed FernClassifier

pull/13383/head
Maria Dimashova 15 years ago
parent bbc2015014
commit a2a3ec69cb
  1. 4
      modules/features2d/src/descriptors.cpp
  2. 2
      modules/features2d/src/planardetect.cpp

@ -671,9 +671,7 @@ Ptr<GenericDescriptorMatch> createGenericDescriptorMatch( const string& genericD
}
else if( ! genericDescritptorMatchType.compare("FERN") )
{
FernDescriptorMatch::Params params;
params.signatureSize = numeric_limits<int>::max();
descriptorMatch = new FernDescriptorMatch (params);
descriptorMatch = new FernDescriptorMatch();
}
else if( ! genericDescritptorMatchType.compare ("CALONDER") )
{

@ -805,7 +805,7 @@ void FernClassifier::prepare(int _nclasses, int _patchSize, int _signatureSize,
patchSize = Size(_patchSize, _patchSize);
nstructs = _nstructs;
structSize = _structSize;
signatureSize = std::min(_signatureSize, nclasses);
signatureSize = _compressionMethod == COMPRESSION_NONE ? nclasses : std::min(_signatureSize, nclasses);
compressionMethod = signatureSize == nclasses ? COMPRESSION_NONE : _compressionMethod;
leavesPerStruct = 1 << structSize;

Loading…
Cancel
Save