Ask Your Question
0

Python and OpenCV installation

asked 2012-11-26 09:15:59 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hi guys, I am new to Python and OpenCV. So prob this will be a dumb question but I would very much appreciate the answer. thanks.

  1. Based on the web search I installed Python 2.7 WIN 32 bit, and the latest OpenCV 2.4.3. I also installed numpy.

  2. I copied cv2.pyd from opencv folder to lib/site-packages python folder

  3. import cv2 as cv in python

  4. looks ok... no error...

  5. there are no functions such as Load, LoadImage, LoadImageM.... basically no functions that are present in python cookbook http://opencv.willowgarage.com/documentation/python/cookbook.html ...

Now the most basic question:

How can I install opencv so I can go thorough examples from python cookbook from the above link???

Thank you.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2012-11-27 00:57:48 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hi,
You have installed properly! The point is you should import cv not cv2 if you want to use the old functions.

import cv
import cv2

cv.LoadImage("your Image")
cv2.imread("your image")
edit flag offensive delete link more

Comments

Thank you. Well if all that can be done with cv, can also be done with cv2, I'll stick with cv2.

noblerabbit gravatar imagenoblerabbit ( 2012-11-27 02:56:52 -0600 )edit
0

answered 2014-07-05 00:14:53 -0600

you can use 64bit OpenGl compiled OpenCV or use "cv2.waitkey()" after "imshow" like this: cv2.imshow('my Image', Img) a = cv2.waitkey(0) if (a == 27) cv2.destroyAllWindows()

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-26 09:15:59 -0600

Seen: 1,344 times

Last updated: Jul 21 '14