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  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to