简体   繁体   中英

How do i install OpenCV?

Im trying to install OpenCV package for Python on my debian. I ran sudo apt-get install python-opencv and accepted it.

But when I import cv my application says that there is no module named cv :(

import cv was fetched from a tutorial. What is the correct syntax?

I haven't done any developments on python but try to follow this tutorials I hope you may be able to identify the reason.

http://www.neuroforge.co.uk/index.php/getting-started-with-python-a-opencv

The correct import is

import cv2

Also, I've been doing a lot of opencv in python this month, and found this was a great tutorial for getting started: http://trevorappleton.blogspot.com/2013/11/python-getting-started-with-opencv.html

Just execute below command line after activating your virtual environment :->

pip install opencv-python

enjoy computer-vision.....

“A lot of the future of search is going to be about pictures. Computer vision technology is going to be a big deal” Ben Silbermann

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM