简体   繁体   English

在opencv 2.4 for python中缺少冲浪

[英]Surf missing in opencv 2.4 for python

I'm trying to instantiate a SURF object in python using OpenCV as described here but this happens: 我试图实例化一个对象SURF使用OpenCV的Python作为描述在这里 ,但出现这种情况:

>>> import cv2
>>> cv2.__version__
'2.4.0'
>>> cv2.SURF()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'SURF'

Does anyone know why this happens or if SURF is missing from the Python version of OpenCV? 有谁知道为什么会发生这种情况,或者如果从OpenCV的Python版本中缺少SURF?

It is a regression which should be fixed in the next library update. 这是一个回归,应该在下一个库更新中修复。

But SURF is not really absent. 但SURF并不是真的缺席。 You still can access it via the generic wrappers: 您仍然可以通过通用包装器访问它:

surf_detector = cv2.FeatureDetector_create("SURF")
surf_descriptor = cv2.DescriptorExtractor_create("SURF")

Update: cv2.SURF() is restored in OpenCV 2.4.1 更新:在OpenCV 2.4.1中恢复cv2.SURF()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM