Is cv2.cv missing in OpenCV 3.0?

余生颓废 提交于 2019-11-28 00:19:41

问题


I've just installed OpenCV 3 on Win7 for using with Python 2.7. I've copied cv2.pyd to /DLLs.

Unfortunately many examples I've tried, don't work, because cv2.cv seems to be missing in OpenCV3

Is there a replacement for it? Is there a table of new constant-names used to be declared in cv2.cv?

Many thanks!


回答1:


yes, the deprecated cv2.cv was removed in opencv3.0

something similar to:

import cv2

help(cv2)

will give you a (looong) list of the api's content.




回答2:


To get old examples to work, you need to create/edit a file cv.py in site-packages with the following single line of text:

import cv2 as cv



回答3:


Its not there in 3. Only cv2 is present.And also instead of functions being cv.something its now cv2.You can import cv2 and check the changes.



来源:https://stackoverflow.com/questions/26132081/is-cv2-cv-missing-in-opencv-3-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!