Ask Your Question

Revision history [back]

Trouble In running a new algorithm I've added to OpenCV

Hi,

I've added a new algorithm for feautures2d. I've edited the features2d.hpp file and added a new cpp file to the features2d module.

I've built the project INSTALL to create a new folder containing the new hpp files and new lib files. The folder is named "C:\OpenCV_2_4_5 for gil\opencv\BuildedLib\install".

I've created a new solution and project to test the new algorithm. I've include the hpp files from "C:\OpenCV_2_4_5 for gil\opencv\BuildedLib\install\include" and linked to the libs under "C:\OpenCV_2_4_5 for gil\opencv\BuildedLib\install\lib", but I'm getting the following linker errors:

1>OIM2.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl cv::Algorithm::~Algorithm(void)" (??1Algorithm@cv@@UEAA@XZ) referenced in function "public: void __cdecl cv::BriefDescriptorExtractor::`vbase destructor'(void)" (??_DBriefDescriptorExtractor@cv@@QEAAXXZ)
1>OIM2.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl cv::DescriptorExtractor::~DescriptorExtractor(void)" (??1DescriptorExtractor@cv@@UEAA@XZ) referenced in function "public: virtual __cdecl cv::BriefDescriptorExtractor::~BriefDescriptorExtractor(void)" (??1BriefDescriptorExtractor@cv@@UEAA@XZ)
1>OIM2.obj : error LNK2019: unresolved external symbol "public: __cdecl cv::BriefDescriptorExtractor::BriefDescriptorExtractor(int)" (??0BriefDescriptorExtractor@cv@@QEAA@H@Z) referenced in function main

Here is my (very simple) code:

#include "cv.h" 
#include "opencv2/core/core_c.h"
#include "opencv2/core/core.hpp"
#include "opencv2/flann/miniflann.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/photo/photo.hpp"
#include "opencv2/video/video.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/ml/ml.hpp"
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"


using namespace cv;


int main( int argc, char** argv )
{
    BriefDescriptorExtractor Brief(32);


}

Can someone please help me resolve this errors? I would like to contribute the algorithm to OpenCv, but first, I need to get it working :)

Thanks,

Gil.