opencv 3,blobdetection,在detectAndCompute中未实现()函数/功能 [英] opencv 3, blobdetection, The function/feature is not implemented () in detectAndCompute

查看:432
本文介绍了opencv 3,blobdetection,在detectAndCompute中未实现()函数/功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对opencv 3有问题: 我想使用特征检测器SimpleBlobDetector,即将使用通过凸度和圆度的过滤器. 但是,当我尝试执行代码时,会跟踪以下错误:

detectAndCompute中未实现()函数/功能

然后应用程序崩溃.

我在互联网上搜索信息,但没有任何相关答案. 我认为Opencv的第3版可能是造成此错误的原因,因为我知道我以很好的方式使用了检测器(我尝试过的方式与opencv官方教程完全一样),并且我发现SimpleBlobDector已针对第三个版本进行了修改.

使用断点,我知道以下行会崩溃:

detector.detect(灰色,关键点);

已创建SimpleBlobDetector(使用create函数)并进行了配置,灰色图像并非空白,并且无需在检测之前填充关键点矢量.

我使用在MinGW中使用QtCreator编译的opencv 3.0.0. opencv处理不是从主线程启动的.

其他人也有同样的问题吗? 如果可以使用另一个类的补丁或其他解决方案,我将不胜感激.我确实需要使用凸度来过滤斑点,我发现其他检测器(FeatureDetector或Brisk)是不可配置的,只能返回关键点,而这些关键点没有面积或丰满度参数来计算凸度.

预先感谢

解决方案

这看起来已经解决了,但也许对其他人有帮助.我有同样的问题.我创建了这样的Blob检测器:

cv::SimpleBlobDetector detector;
detector.create(params);
detector.detect( img, keypoints );

结果以错误The function/feature is not implemented () in detectAndCompute结束.

但是当我这样尝试时:

cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params); 
detector->detect( img, keypoints );

现在一切正常.

这真的很奇怪,如果有人知道为什么这样工作,请告诉我.

I have a problem with opencv 3: I want to use a feature detector, SimpleBlobDetector, about to use filters by convexity and circularity. But when I try to execute the code, the following error is tracked:

The function/feature is not implemented () in detectAndCompute

Then the application crashes.

I searched for informations in the internet without any relevant answer. I think the 3rd version of Opencv could be responsible for this bug, because I know I use the detector the good way (I tried exactly like the official opencv tutorial) and I noticed than the SimpleBlobDector has been modified for the third version.

Using breakpoint, I know that the following line crashes:

detector.detect(gray, keypoints);

The SimpleBlobDetector has been created (using the create function) and configured, the gray image isn't empty and the keypoints vector does not need to be filled before the detection.

I use opencv 3.0.0, compiled in MinGW with QtCreator. The opencv treatment is not launched from the main thread.

Did anybody else have the same problem? I would be gratefull if I could have a patch or another solution using another class. I really need to use convexity to filter my blobs and the other detectors I found (FeatureDetector or Brisk) cannot be configurable and only return keypoints, which doesn't have the area or fullness parameters to calculate convexity.

Thanks in advance

解决方案

this looks like it is solved, but maybe it helps someone else. I had the same problem. I created blob detector like this:

cv::SimpleBlobDetector detector;
detector.create(params);
detector.detect( img, keypoints );

This ended up with error: The function/feature is not implemented () in detectAndCompute.

But when I tried it like this:

cv::Ptr<cv::SimpleBlobDetector> detector = cv::SimpleBlobDetector::create(params); 
detector->detect( img, keypoints );

Now everything works as expected.

It is really strange and if anyone knows why is working like that let me know please.

这篇关于opencv 3,blobdetection,在detectAndCompute中未实现()函数/功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆