Ask Your Question
0

ImportError: cannot import name cv

asked 2016-04-19 01:28:09 -0600

I'm using ubuntu 15.10 and opencv-3.1.0. When I tried to run a python code I'm getting the following error

ImportError: cannot import name cv

The same code was running fine with another ubuntu machine and opencv

Don't know whats the problem Someone kindly help

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-04-19 01:30:24 -0600

berak gravatar image

the cv module is the old c-based python wrapper. opencv moved away from that years ago, and it was removed in opencv3

please use cv2, and port your code.

edit flag offensive delete link more

Comments

Thanks for your reply.

I tried that and now I'm getting the following errors:

libv4l2: error setting pixformat: Device or resource busy VIDEOIO ERROR: libv4l unable to ioctl S_FMT libv4l2: error setting pixformat: Device or resource busy libv4l1: error setting pixformat: Device or resource busy VIDEOIO ERROR: libv4l unable to ioctl VIDIOCSPICT

OpenCV Error: Assertion failed (scn == 3 || scn == 4) in ipp_cvtColor, file /home/subhajit/opencv-3.1.0/modules/imgproc/src/color.cpp, line 7456 Traceback (most recent call last): File "HoughCircles.py", line 76, in <module> imgGray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) cv2.error: /home/subhajit/opencv-3.1.0/modules/imgproc/src/color.cpp:7456: error: (-215) scn == 3 || scn == 4 in function ipp_cvtColor

Subhajit Biswas gravatar imageSubhajit Biswas ( 2016-04-19 01:36:02 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-04-19 01:28:09 -0600

Seen: 2,772 times

Last updated: Apr 19 '16