Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Exception handling opencv中的崩溃检测功能(ORB和BRISK)_Exception Handling_Detect_Opencv3.0_Orb_Brisk - Fatal编程技术网

Exception handling opencv中的崩溃检测功能(ORB和BRISK)

Exception handling opencv中的崩溃检测功能(ORB和BRISK),exception-handling,detect,opencv3.0,orb,brisk,Exception Handling,Detect,Opencv3.0,Orb,Brisk,我试图使用探测器球体获取图像中的关键点,但总是出现异常和崩溃,我的代码就是下一个 vector < KeyPoint > kp; int nfeatures = 500; float scaleFactor = 1.2f; int nlevels = 8; int edgeThreshold = 15; int firstLevel = 0; int WTA_K = 2; int scoreType = ORB::HARRIS_SCORE; int patchSize = 31;

我试图使用探测器球体获取图像中的关键点,但总是出现异常和崩溃,我的代码就是下一个

vector < KeyPoint > kp;

int nfeatures = 500;
float scaleFactor = 1.2f;
int nlevels = 8;
int edgeThreshold = 15;
int firstLevel = 0;
int WTA_K = 2;
int scoreType = ORB::HARRIS_SCORE;
int patchSize = 31;
int fastThreshold = 20;

Ptr < ORB > detector = ORB::create(
    nfeatures,
    scaleFactor,
    nlevels,
    edgeThreshold,
    firstLevel,
    WTA_K,
    scoreType,
    patchSize,
    fastThreshold );

detector->detect(img, kp);
cout << "Found " << kp.size() << " Keypoints " << std::endl;

Mat out;
drawKeypoints(img, kp, out, Scalar::all(255));

imshow("Kpts", out);
vectorkp;
int n特征=500;
浮点比例因子=1.2f;
int nlevels=8;
int edgeThreshold=15;
int firstLevel=0;
int WTA_K=2;
int scoreType=ORB::HARRIS_分数;
int patchSize=31;
int fastThreshold=20;
Ptr检测器=ORB::创建(
n功能,
缩放因子,
N级,
edgeThreshold,
一级,
WTA_K,
分数类型,
补丁大小,
快速阈值);
检测器->检测(img,kp);

cout好的,我用cmake和opencv_contrib解决了为visual studio构建opencv的问题,如果有人有相同的问题,我会按照下面链接的说明进行操作:


好的,我解决了使用cmake和opencv\u contrib为visual studio构建opencv的问题,如果有人有相同的问题,我会按照下面链接的说明进行操作:


此错误在CV2版本
4.2.0
中持续至今。我同样尝试过使用
cv2.ORB()
进行初始化,收到
~00x5错误
,尝试
ORB\u create()
,最终成功了

该错误在CV2版本
4.2.0
中持续至今。我同样尝试过使用
cv2.ORB()
进行初始化,收到
~00x5错误
,尝试
ORB\u create()
,最终成功了

Ptr < BRISK > detector = BRISK::create();
vector <KeyPoint> kp;
detector->detect(img,kp);