을 제공하는 것은SurfFeatureDetector를 추가 한 후, 프로그램은 내가 <code>opencv 3.3.0</code></p> <p>내 코드를 사용하고 오류
#include <stdio.h>
#include <iostream>
#include "opencv2/core.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/xfeatures2d.hpp"
#include <fstream>
#include <string>
#include <vector>
using namespace cv;
using namespace std;
using namespace cv::xfeatures2d;
int main(int argc, char** argv)
{
Mat img1;
img1 = imread("img/img1.jpg", IMREAD_GRAYSCALE);
if (img1.empty())
{
cout << "Could not open or find the image" << endl;
return -1;
}
Ptr<SurfFeatureDetector> detector = SurfFeatureDetector::create(400);
vector<KeyPoint> keypoints;
detector->detect(img1, keypoints);
imshow("img1", img1);
waitKey(0);
return 0;
}
내가 C++
과 opencv
에 새로운 오전입니다. 서핑 부분없이 코드가 잘 작동합니다.
오류가
OpenCV Error: Assertion failed (TlsSetValue(tlsKey, pData) == TRUE) in cv::TlsAbstraction::SetData, file C:\Users\Darshana\Documents\opencv\opencv-3.3.0\modules\core\src\system.cpp, line 1270
나뿐만 아니라 Ptr<SURF> detector = SURF::create(400);
으로 노력했다.
UPDATE
나는 이것에 대한 해결책을 알아낼 수 없었다. 설치 문제 또는 라이브러리 문제 일 수 있습니다. 그래서 저는 opencv 2.4.13
으로 이동하고 모든 것이 잘 작동합니다. 비록 위의 코드를 v2.4.13
과 작동하도록 변경해야했습니다.
투표가 실패하면 이유를 말씀해주십시오. – Darshana