How do i install OpenCV?


Question

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?

1
4
6/30/2012 10:47:12 AM

Accepted Answer

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

2
3/26/2014 12:55:06 AM

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


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon