OpenCV:从用户定义的关键点中提取SURF功能 [英] OpenCV: Extract SURF Features from user-defined keypoints

查看:109
本文介绍了OpenCV:从用户定义的关键点中提取SURF功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从指定的关键点计算SURF功能.我正在使用OpenCV的Python包装器.以下是我尝试使用的代码,但是在任何地方都找不到有效的示例.

I want to compute SURF Features from keypoints that I specify. I am using the Python wrapper of OpenCV. The following is the code I am trying to use, but I cannot find a working example anywhere.

surf = cv2.SURF()
keypoints, descriptors = surf.detect(np.asarray(image[:,:]),None,useProvidedKeypoints = True)

如何指定此功能要使用的关键点?

How can I specify the keypoints to be used by this function?

类似的未回答的问题: 在useProvidedKeypoints = true时cvExtractSURF不起作用

Similar, unanswered, question: cvExtractSURF don't work when useProvidedKeypoints = true

文档

推荐答案

如果我正确理解Python绑定的源代码,则Python绑定中永远不会使用C ++接口中存在的"keypoints"参数.因此,我警告您无法对当前绑定执行您要尝试的操作.一种可能的解决方案是编写您自己的绑定.我知道这不是您希望得到的答案...

If I understand the source code of the Python bindings correctly, the "keypoints" argument that is present in the C++ interface is never used in the Python bindings. So I hazard that it's not possible to do what you are trying to do with the current bindings. A possible solution would be to write your own binding. I know it's not the answer you were hoping...

这篇关于OpenCV:从用户定义的关键点中提取SURF功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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