【发布时间】:2018-07-25 01:03:17
【问题描述】:
我正在尝试测试一些背景减法方法(遵循tutorial),但 Python 无法找到它们。
使用 Windows 和 Anaconda。我确保通过 conda 升级 opencv 并运行
pip install opencv-contrib-python
另一个相关question 中推荐的命令。
不过,我明白了:
(tracx) C:\Users\USER>python
Python 3.5.4 |Anaconda, Inc.| (default, Nov 8 2017, 14:34:30) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> fgbg = cv2.createBackgroundSubtractorMOG()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'cv2.cv2' has no attribute 'createBackgroundSubtractorMOG'
>>> quit()
【问题讨论】:
-
你能让它工作吗?
标签: python opencv conda background-subtraction