Friday, August 13, 2010

Reading data from WebCam on Python using OpenCV

Hi Guys!!

This is a simple program (I mean it!! Its a 14 line python script) to read WebCam data live using Python and I have run the program on IDLE 2.6.

Btw, My other programs in OpenCV will be posted here.

I'll assume that you have OpenCV 2.0/2.1 installed on your Computer System. If you haven't, you may want to refer Installing OpenCV and then run this program.

The code:


3 comments:

  1. Wow thanks a lot! :D

    I'm about to begin a project where I want to read from my webcam and process imgs, and seeing your post made me go with python & openCV. (instead of Java)

    ReplyDelete
  2. maybe is better to put while(k==-1).
    Actually the code doesn't exit if the user hit a key.

    ReplyDelete