I'm new to python and I'm trying to use the openCV libraries. After lots of reading and lots of trial and error I decided to ask here.
I installed the openCV with macports, still I keep getting the same error (as I did when installing using the setup.py file inside openCV pkg). My script is a "Hello world" script I wrote (copied) from http://www.neuroforge.co.uk/index.php/getting-started-with-python-a-opencv and the "import cv" is not working. Is that because of path? I tried adding:
import sys sys.path.append('/opt/local/include/opencv')
but no change...
the full script is:
import cv cv.NamedWindow('a_window', cv.CV_WINDOW_AUTOSIZE) image = cv.LoadImage('picture.png', cv.LOAD_IMAGE_COLOR) font = cv.InitFont(cv.CV_FONT_HERSHEY_SIMPLEX, 1, 1, 0, 3, 8) x = 200 y = 200 cv.PutText(frame,"Hello World!!!", (x,y),font, 255) cv.ShowImage('a_window', image) cv.Waitkey(10000) cv.SaveImage('image.png', image)