Commit 30f8d5a7 authored by Maria Dimashova's avatar Maria Dimashova

fixed creation of opponent space descriptors (#1805)

parent 3ee1a1d8
...@@ -96,10 +96,11 @@ void DescriptorExtractor::removeBorderKeypoints( vector<KeyPoint>& keypoints, ...@@ -96,10 +96,11 @@ void DescriptorExtractor::removeBorderKeypoints( vector<KeyPoint>& keypoints,
Ptr<DescriptorExtractor> DescriptorExtractor::create(const string& descriptorExtractorType) Ptr<DescriptorExtractor> DescriptorExtractor::create(const string& descriptorExtractorType)
{ {
if( descriptorExtractorType.find("Opponent") == 0) if( descriptorExtractorType.find("Opponent") == 0 )
{ {
size_t pos = string("Opponent").size(); 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); return Algorithm::create<DescriptorExtractor>("Feature2D." + descriptorExtractorType);
......
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