Help: Using CV with Python

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help: Using CV with Python

railroadchief
Hello all,
   This is perhaps a dumb question, but I'm going to ask it anyway.  In order to use OpenCV with python, what do I need to do?  I am on a WinXP machine, so I downloaded and installed the win32 installer.  Do I need to run a C compiler on the files, even though I am using python?

Thanks for you help,

Mike

Reply | Threaded
Open this post in threaded view
|

Re: Help: Using CV with Python

Stefán Freyr Stefánsson
Hi.

The windows installer installs a precompiled version of OpenCV so you
don't need to compile it no.

What you do need to do is add the Python stuff from OpenCV to your
python path. You can do this by (assuming you installed OpenCV to
C:\OpenCV2.0):

1) Using the PYTHONPATH variable
- open up a cmd window and type:
C:
SET PYTHONPATH=C:\OpenCV2.0\Python2.6\Lib\site-packages
cd C:\OpenCV2.0\samples\python
python camshift.py

I believe you need to have a working webcam connected for this to work
and of course you need Python 2.6.

2) You can set the PYTHONPATH variable through your control panel if
you want it to be permanent.

3) You should be able to copy the contents of
C:\OpenCV2.0\Python2.6\Lib\site-packages into your site-packages
directory where you have Python installed.

Regards, Stefan.

On Sun, Mar 21, 2010 at 10:42 PM, railroadchief
<[hidden email]> wrote:

> Hello all,
>   This is perhaps a dumb question, but I'm going to ask it anyway.  In order to use OpenCV with python, what do I need to do?  I am on a WinXP machine, so I downloaded and installed the win32 installer.  Do I need to run a C compiler on the files, even though I am using python?
>
> Thanks for you help,
>
> Mike
>
>
>
> ------------------------------------
>
> Change settings: http://www.yahoogroups.com/mygroups, select
>   Get Emails (get all posts)
>   Daily Digest (one summary email per day)
>   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
> Yahoo! Groups Links
>
>
>
>