fixed creation of opponent space descriptors (#1805)

This commit is contained in:
Maria Dimashova 2012-04-16 11:50:06 +00:00
parent 3ee1a1d83c
commit 30f8d5a7d7

View File

@ -96,10 +96,11 @@ void DescriptorExtractor::removeBorderKeypoints( vector<KeyPoint>& keypoints,
Ptr<DescriptorExtractor> DescriptorExtractor::create(const string& descriptorExtractorType)
{
if( descriptorExtractorType.find("Opponent") == 0)
if( descriptorExtractorType.find("Opponent") == 0 )
{
size_t pos = string("Opponent").size();
return DescriptorExtractor::create(descriptorExtractorType.substr(pos));
string type = descriptorExtractorType.substr(pos);
return new OpponentColorDescriptorExtractor(DescriptorExtractor::create(type));
}
return Algorithm::create<DescriptorExtractor>("Feature2D." + descriptorExtractorType);