Ask Your Question
1

What's the difference between cv and cv2 using python2?

asked 2013-10-14 18:20:51 -0600

DralKhogo gravatar image

I've compiled OpenCV-2.4.6 on Windows machine and using Python2.7 to create OpenCV applications.

There lots of examples out there on the web but you can't use them right away and need to fix to make them run, because some of them use "cv", others use "cv2" or other packages. What's the main difference between import cv and import cv2 on python2? Is cv2 an extension to cv and you always must use cv2? Are there bigger amount of functions in cv2 but some of them are only in cv?

cv or cv2? or both?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-10-15 02:42:39 -0600

berak gravatar image

import cv will load the old c-api bindings. IplImage and such. try not to use that, as the support for the old api will end soon.

instead, use import cv2, which wraps the c++ api, and uses numpy arrays for images

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-10-14 18:20:51 -0600

Seen: 14,153 times

Last updated: Oct 15 '13