OpenCV2 3 1特徵點提取

2021-06-21 14:14:54 字數 1315 閱讀 1796

今天做特徵點匹配實驗,從網上找來了surf特徵點檢測程式,除錯也調通了,但是執行之後就是沒有結果出來,還會出現執行之後程式崩潰的問題,後來試了好多遍,發現是由於lib檔案有問題,雖然在屬性裡已經新增了,但是仍然鏈結不上。解決方法是在程式開始新增lib檔案,如下所示。

#include "opencv2/objdetect/objdetect.hpp"

#include "opencv2/features2d/features2d.hpp"

#include "opencv2/highgui/highgui.hpp"

#include "opencv2/calib3d/calib3d.hpp"

#include "opencv2/imgproc/imgproc_c.h"

#include "opencv2/imgproc/imgproc.hpp"

#include "core/core.hpp"

#include "cv.h"

#include "fstream"

#include "iostream"

#if defined _debug

#pragma comment(lib,"opencv_core231d.lib")

#pragma comment(lib,"opencv_imgproc231d.lib")

#pragma comment(lib,"opencv_highgui231d.lib")

#pragma comment(lib,"opencv_features2d231d.lib")

#pragma comment(lib,"opencv_calib3d231d.lib")

#pragma comment(lib,"opencv_flann231d.lib")

#else

#pragma comment(lib,"opencv_core231.lib")

#pragma comment(lib,"opencv_imgproc231.lib")

#pragma comment(lib,"opencv_highgui231.lib")

#pragma comment(lib,"opencv_features2d231.lib")

#pragma comment(lib,"opencv_calib3d231.lib")

#endif

#include using namespace cv;

using namespace std;

int main(int argc,char* argv)

特徵點提取opencv

opencv中提供了harris角點檢測的介面,即cv cornerharris 缺陷 角點是畫素級別的,速度較慢 dst cv2.cornerharris gray,2,3,0.04 img 資料型別為 float32 的輸入影象 blocksize 角點檢測中要考慮的領域大小 ksize sob...

MFC使用opencv2 3 1的環境配置

1.標頭檔案包含設定 include opencv2 opencv.hpp include include cv.h include highgui.h using namespace std using namespace cv 2.類庫設定 1 debug opencv calib3d231d....

64位win7下安裝opencv2 3 1

這段時間腦袋不開竅,在64位的win7下面安裝opencv2.3.1,費了不少功夫。在這裡總結一下,以免後面安裝在重複這些錯誤。自己完全是 按照opencv中文論壇教程一步步來,在新增library和include檔案時連路徑也是複製的,以為這樣不會出錯,結果問題一大堆。第一 首先提示的是64位和3...