Tuesday, March 8, 2011

record data from Camera in Opencv

Hi all,

In this article I'll show how to record data from the camera (webcam) on your Computer running Ubuntu.
NOTE: Click here, If you are running Windows (recent version or Visual Studio 2008).

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

I don't think you will be able to use Kinect with this code. For that, you might wan't to refer OpenNI API.

Basically we import cv.h, highgui.h and get a hold of the camera using cvCreateCameraCapture() function and extract frame from it using cvQueryFrame()

The program is as follows:




TALK TO THE HAND :P


You can chage the program accordingly at cvCreateCameraCapture parameter (which is usually >=0) to capture your specific camera (if you have more than 1 Camera attached to your computer).

This program saves all the IMAGES in .jpg format in the present folder. You can as well record it into a .avi or any other video file, for that click here.

No comments:

Post a Comment