模块“cv2.cv2”没有属性“sfm”

2024-05-12 19:45:13 发布

您现在位置:Python中文网/ 问答频道 /正文

无法将sfm与opencv python一起使用

import cv2
help(cv2.sfm)

我得到以下错误:

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

我想使用sfm组件。我尝试从源代码构建,但不知道应该设置哪些构建选项,以便为opencv的sfm函数使用python绑定。我还尝试了pip install opencv-contrib-python,但这也没有安装sfm组件


Tags: importmost错误stdinhelp组件callcv2