OpenCV 3:可用FeatureDetector :: create()和DescriptorExtractor :: create()选项的列表? [英] OpenCV 3: List of available FeatureDetector::create() and DescriptorExtractor::create() options?
问题描述
编辑:我在看错误的OpenCV2代码示例,OpenCV3中没有FeatureDetector::create
-这使我感到困惑.
edit: I was looking at the wrong OpenCV2 code example, there is no FeatureDetector::create
in OpenCV3 - this was confusing me.
OpenCV的新手,可以通过拆解其他人的C ++代码来进行示例学习.
Hey new to OpenCV and learning by example by pulling apart other peoples C++ code.
我想尝试以下所有可用选项:
I would like to try all available options for:
detector = FeatureDetector::create(str_detector);
descriptor = DescriptorExtractor::create(str_descriptor);
当前str_detector是FAST
,str_descriptor是BRISK
currently str_detector is FAST
and str_descriptor is BRISK
我在寻找可用的检测器和描述符时遇到了麻烦.
I am having trouble finding what available Detectors and Descriptors are available to me.
是否可以输出所有当前可用选项的列表?
Is there a way to output a list of all currently available options?
(我刚刚在全新的Linux安装上从github构建了最新的opencv + opencv-contrib)
(I have just built the latest opencv + opencv-contrib from github on a fresh linux install)
我在这里 https://找到了第三方文件列表github.com/Itseez/opencv_contrib/tree/master/modules/xfeatures2d/src -我认为它们是第三描述符和检测器,因为在某些文件中提到了这些词.但是,最好具有当前已编译/可用选项的完整列表.
I have found a list of 3rd party files here https://github.com/Itseez/opencv_contrib/tree/master/modules/xfeatures2d/src - I think these are 3rd Descriptors and Detectors because those words are mentioned in some of the files. However it would be nice to have a full list of currently compiled/available options to play with.
谢谢!
尝试自己找到答案,请随时
Trying to find the answer myself, edits as I go:
- 在
modules/features2d/include/opencv2/features2d.hpp
中找到了 - 现在正在挖掘
Feature2D
... - 我很困惑,我的C ++失败了,
create .cpp"rel =" noreferrer> https://github.com/Itseez/opencv/blob/master/modules/features2d/src/feature2d.cpp - 好的,所以只需浏览代码即可( https://github.com/Itseez/opencv/blob/master/modules/features2d/include/opencv2/features2d.hpp )
- 危险
- ORB
- MSER
- FastFeatureDetector/FAST
- AgastFeatureDetector/AGAST
- GFTTDetector
- SimpleBlobDetector
- KAZE/AKAZE
typedef Feature2D FeatureDetector
和typedef Feature2D DescriptorExtractor
- Found
typedef Feature2D FeatureDetector
andtypedef Feature2D DescriptorExtractor
inmodules/features2d/include/opencv2/features2d.hpp
- Digging for
Feature2D
now... - I'm so confused, my C++ is failing me, there is no
create
in https://github.com/Itseez/opencv/blob/master/modules/features2d/src/feature2d.cpp - ok so just looking through the code ( https://github.com/Itseez/opencv/blob/master/modules/features2d/include/opencv2/features2d.hpp )
- BRISK
- ORB
- MSER
- FastFeatureDetector / FAST
- AgastFeatureDetector / AGAST
- GFTTDetector
- SimpleBlobDetector
- KAZE / AKAZE
- 怪胎
- StarDetector
- BriefDescriptorExtractor
- LUCID
- 闩锁
- DAISY
- MSDDetector
- SIFT
- SURF
推荐答案
您还拥有OpenCV文档,其中包含OpenCV功能的列表:
You have also the OpenCV documentation to have a list of OpenCV features:
- OpenCV 3.1 documentation
- OpenCV 3.1 contrib documentation
我只知道该功能仅在关键点检测或描述符提取中可用,还是两者都可用,是要阅读文档中链接的相应论文.它还允许对功能进行简短描述(例如,如果它是二进制描述符,主要优点等)
What I do to know if the feature is available only in keypoints detection or descriptor extraction or both is to read the corresponding paper linked in the documentation. It allows also to have a brief description of the features (for example if it is a binary descriptor, main advantages, etc.)
其他解决方案是测试每个功能:
Other solution is to test each feature:
- 如果对
detect()
的调用正常(不引发异常)==>功能检测 - 如果对
compute()
的调用正常==>特征提取 - 如果对
detectAndCompute()
的调用正常==>两者 - 或直接查看源代码.
- if the call to
detect()
is ok (no exception thrown) ==> feature detection - if the call to
compute()
is ok ==> feature extraction - if the call to
detectAndCompute()
is ok ==> both - or looking directly into the source code.
也许存在更优化的解决方案...
Maybe a more optimal solution exists...
无论如何,据我所知(如果我做错了,请随时纠正我):
Anyway, from my knowledge (feel free to correct me if I am wrong):
- 危险:检测器+描述符
- ORB:检测器+描述符
- MSER:探测器
- 快速:检测器
- AGAST:探测器
- GFFT:检测器
- SimpleBlobDetector:检测器
- KAZE:探测器+描述符
- AKAZE:检测器+描述符
- 怪胎:描述符
- StarDetector:探测器
- BriefDescriptorExtractor:描述符
- LUCID:描述符
- 闩锁:描述符
- DAISY:描述符
- MSDDetector:检测器
- SIFT:检测器+描述符
- SURF:检测器+描述符
- BRISK: detector + descriptor
- ORB: detector + descriptor
- MSER: detector
- FAST: detector
- AGAST: detector
- GFFT: detector
- SimpleBlobDetector: detector
- KAZE: detector + descriptor
- AKAZE: detector + descriptor
- FREAK: descriptor
- StarDetector: detector
- BriefDescriptorExtractor: descriptor
- LUCID: descriptor
- LATCH: descriptor
- DAISY: descriptor
- MSDDetector: detector
- SIFT: detector + descriptor
- SURF: detector + descriptor
在OpenCV 3.1中,代码也是:
Also with OpenCV 3.1, the code is:
cv::Ptr<cv::Feature2D> kaze = cv::KAZE::create();
std::vector<cv::KeyPoint> kpts;
cv::Mat descriptors;
kaze->detect(matImg, kpts);
kaze->compute(matImg, kpts, descriptors);
kaze->detectAndCompute(matImg, cv::noArray(), kpts, descriptors);
cv::Ptr<cv::Feature2D> daisy = cv::xfeatures2d::DAISY::create(); //Contrib
要知道要使用哪种规范类型:
To know which norm type to use:
std::cout << "AKAZE: " << akaze->descriptorType() << " ; CV_8U=" << CV_8U << std::endl;
std::cout << "AKAZE: " << akaze->defaultNorm() << " ; NORM_HAMMING=" << cv::NORM_HAMMING << std::endl;
最后,为什么
这篇关于OpenCV 3:可用FeatureDetector :: create()和DescriptorExtractor :: create()选项的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!