ImageCapture from WebCam

Narendra Sisodiya <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
I am using following code. I am using opencv, It is Okey or is there any
scope for improvement !
Anything faster ? I am processing images using PIL


import Image
import sys
import opencv
import time

#this is important for capturing/displaying images
from opencv import highgui

camera = highgui.cvCreateCameraCapture(3)
def get_image():
    im = highgui.cvQueryFrame(camera)
    # Add the line below if you need it (Ubuntu 8.04+)
    #im = opencv.cvGetMat(im)
    #convert Ipl image to PIL image
    return opencv.adaptors.Ipl2PIL(im)


-- 
┌─────────────────────────┐
│    Narendra Sisodiya
│    http://narendrasisodiya.com
└─────────────────────────┘

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.