【问题标题】:openCV SURF erroropenCV SURF 错误
【发布时间】:2013-03-29 09:09:55
【问题描述】:

我使用的是 opencv 2.44 , viusal studio c++ 2010 当我编译时我得到这个错误

错误 1 ​​错误 LNK2019:函数 _main C:\Users\user\Desktop 中引用的未解析外部符号“public: __thiscall cv::SURF::SURF(void)”(??0SURF@cv@@QAE@XZ) \proiect\prj\prj\sh1.obj prj

#include <opencv2\imgproc\imgproc_c.h>
#include <stdio.h>
#include <math.h>
#include <opencv\highgui.h>
#include <opencv\cv.h>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/nonfree/features2d.hpp>
using namespace cv;
void main(){
char i; 
Mat image,img,ref;
ref=imread("hh.jpg");
// create window to show image 
namedWindow("window", CV_WINDOW_AUTOSIZE);
namedWindow("costel", CV_WINDOW_AUTOSIZE);
namedWindow("fanel", CV_WINDOW_AUTOSIZE);
Mat ig,ib,ibb;
Mat bkg;
Mat prev;
Mat stor;
cvtColor(ref, ref, CV_BGR2GRAY);
FastFeatureDetector detector(15);
vector<KeyPoint> keypoints1;
detector.detect(ref, keypoints1);
SurfDescriptorExtractor extractor;
Mat descriptors1;
extractor.compute(ref, keypoints1, descriptors1);

....

【问题讨论】:

    标签: c++ opencv


    【解决方案1】:

    对我来说,设置项目属性似乎有问题。 VS中的属性->链接器->输入->附加依赖项。可能是你仔细检查你是否添加了 opencv_features2d244.lib 和 opencv_nonfree244.lib

    【讨论】:

      【解决方案2】:
      1. 将您需要使用的所有 DLL 复制到 DEBUG 文件夹或您的 exe 所在的位置。
      2. 检查所有源路径和头路径

      祝你好运。您可能在丢失 DLL 的神话中,在您的 cv 安装文件夹中找到 opencv_nonfree244.dll 、 opencv_features2d244.dll 和所有其他 dll 并将它们复制到应该修复它的文件夹中。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-12-26
        • 2015-03-12
        • 1970-01-01
        • 2013-01-14
        • 1970-01-01
        • 2012-04-16
        • 2012-07-15
        • 1970-01-01
        相关资源
        最近更新 更多