9

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!

Valentin H
  • 7,240
  • 12
  • 61
  • 111

3 Answers3

6

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.

berak
  • 39,159
  • 9
  • 91
  • 89
  • depends on [where you look](http://docs.opencv.org/trunk/doc/py_tutorials/py_tutorials.html) – berak Nov 12 '14 at 08:46
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
Ninga
  • 689
  • 7
  • 14
  • OK I tried this briefly - had some success but then started writing fresh code for cv2 - was easier than trying to get old code that imported cv2.cv working. – Ninga Aug 19 '16 at 01:04
0

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.

Shunya
  • 20
  • 6