Ask Your Question
0

video processing using opencv

asked 2013-03-08 00:14:19 -0600

chaitanya gravatar image

can anyone give me a reference as how to apply image processing techniques for a frame in a video processing from a cam using opencv?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-08 01:54:25 -0600

The access to the camera is done through HighGui module of OpenCV. Here you could find the doc for the camera access.

Just a small sample from the doc which apply a Gaussian blur, and find the edge with the Canny detector.

VideoCapture cap(0); // open the default camera
// Check the access to the camera here!

Mat edges;
for(;;)
{
    Mat frame;
    cap >> frame; // get a new frame from camera
    cvtColor(frame, edges, CV_BGR2GRAY);
    GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
    Canny(edges, edges, 0, 30, 3);
    imshow("edges", edges);
    if(waitKey(30) >= 0) break;
}

Here you could find the doc for almost all ''simple'' image processing available with OpenCV. The rest of the doc could help you depending on what you want to do with images.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-08 00:14:19 -0600

Seen: 258 times

Last updated: Mar 08 '13