getting an error for "OpponentColorDescriptorExtractor" in opencv
I want to have the descriptor for keypoints with color information. so, i want to use "OpponentColorDescriptorExtractor" as mentioned here:
http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_descriptor_extractors.html#opponentcolordescriptorextractor
I am using the following code but i am getting an error:
The following code is working:
SiftDescriptorExtractor detector;
Ptr<DescriptorExtractor> oppDescExtractor;
OpponentColorDescriptorExtractor opponentDescExtractor(oppDescExtractor);
The error is:
OpenCV Error: Assertion failed (!descriptorExtractor.empty()) in OpponentColorDescriptorExtractor,
So, how should i declare "OpponentColorDescriptorExtractor" ?