OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
查看: 3556|回复: 2

opencv compute()函数出错

[复制链接]
发表于 2019-1-12 18:08:09 | 显示全部楼层 |阅读模式
  1. Mat img = imread("test.jpg",1);
  2.         Ptr<FastFeatureDetector>detector = FastFeatureDetector::create();
  3.         vector<KeyPoint> keypoints1;
  4.         detector->detect(img, keypoints1);
  5.         Mat descriptors1;
  6.         detector->compute(img, keypoints1, descriptors1);
  7.         Mat img_keypoints1;
  8.         drawKeypoints(img, keypoints1, img_keypoints1, Scalar::all(-1));
  9.         imshow("Box_in_scene keyPoints", img_keypoints1);
复制代码

编译时vs2017显示compute那里Exception thrown at 0x00007FFA01ABA388 in test.exe: Microsoft C++ exception: cv::Exception at memory location 0x00000013B08FF180.Unhandled exception at 0x00007FFA01ABA388 in test.exe: Microsoft C++ exception: cv::Exception at memory location 0x00000013B08FF180.
OpenCV(4.0.1) Error: The function/feature is not implemented () in cv::Feature2D::detectAndCompute
怎么解决??????????

回复

使用道具 举报

发表于 2019-1-16 22:42:38 | 显示全部楼层
首先定位错误的地方,然后看是否有输入数据?是否有函数调用问题。
回复 支持 反对

使用道具 举报

发表于 2019-2-16 10:38:46 | 显示全部楼层
  1. FastFeatureDetector detector(40);
  2.             vector<KeyPoint> keypoints1;
  3.             detector.detect(img, keypoints1);
  4.             Mat descriptors1;
  5.             detector.
  6.             detector.compute(img, keypoints1, descriptors1);
  7.             Mat img_keypoints1;
  8.             drawKeypoints(img, keypoints1, img_keypoints1, Scalar::all(-1));
  9.             imshow("Box_in_scene keyPoints", img_keypoints1);
复制代码


我刚刚试着运行了一下楼主的代码,然后报错/home/cheng/TTest/mainwindow.cpp:23: error: ‘class cv::FastFeatureDetector’ has no member named ‘compute’

OpenCV版本2.4.4
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-3-28 19:46 , Processed in 0.009195 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表