VideoIn

introduction

The VideoIn class lets you capture a live video signal. On each frame, the object will send a matrix out. If you need to use this matrix from another thread, you should make a copy with something like:

cv::resize(*val.matrix_, copied_frame_, size_, 0, 0, CV_INTER_NN);

example

This example make your computer heat… To do this it grabs a frame using VideoIn and displays it on screen with GLMat (after some downsampling). Using GLMat to display a preview of the content is not the best idea: you should use the preview method on VideoIn:

video/preview(1)

video capture example

patch

lib("lib")
w = GLWindow()
m = GLMat()
w => m
v = VideoIn()
v => matrix~m