InitModule_nonFree() - unresolved externel symbol.
Hi,
I'm writing a small program that extracts descriptors from images and writes them to files.
I'm using (example) detector_descriptor_matcher_evaluation as reference.
I guess this is a very simple problem, but I just can't solve it, I'm probably missing something:
Everything compiled and worked fine (I used FAST and ORB) but I had to use sift so I added a call to cv::initModule_nonfree(); and an include :#include "opencv2/nonfree/nonfree.hpp"
but now I'm getting a linker error:
unresolved external symbol initModule_nonfree(void).
I'm quite sure all the definitions in the project properties are ok since it worked with ORB before I added the call to initModule_nonfree().
Can someone please tell me what I might be missing here and what could be the problem?
Thanks.
Also, another small question: what's the purpose of
saveloadDDM( params_filename, detector, descriptor, matcher );
in the example detector_descriptor_matcher_evaluation ?
here's the code
static void saveloadDDM( const string& params_filename,
Ptr<FeatureDetector>& detector,
Ptr<DescriptorExtractor>& descriptor,
Ptr<DescriptorMatcher>& matcher )
{
FileStorage fs(params_filename, FileStorage::READ);
if( fs.isOpened() )
{
detector->read(fs["detector"]);
descriptor->read(fs["descriptor"]);
matcher->read(fs["matcher"]);
}
else
{
fs.open(params_filename, FileStorage::WRITE);
fs << "detector" << "{";
detector->write(fs);
fs << "}" << "descriptor" << "{";
descriptor->write(fs);
fs << "}" << "matcher" << "{";
matcher->write(fs);
fs << "}";
}
}
I commented it out since it throws and exception. Is it ok not to use it?
Thanks, Gil
OK, this is embarrassing. I forgot to add the lib opencv_nonfree245.lib to additional libraries.
But the second small questions still remains:)
Thanks, Gil.