Grabbing from three inputs simultaneously with V4L2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I have a Matrox Meteor/RGB framegrabber card connected to a Point Grey Triclops
trinocular camera (a camera with three lenses). I am using V4L2 for grabbing a
stereo image (one camera for each channel, R, G and B) to get stereo vision for
a robot I am developing. I am programming i C++.

I have tried testing the setup with the demo software that came with the driver
(Xcaptest, vcat), but I can only get output from channel 5 (RGB) when streaming
with Xcaptest. Xcaptest returns an error with DQbuf if I try to grab a single
image. Vcat produces no input at all from input 5.

If I grab from input 0,1 and 2 (composite), I get the image from each of the
lenses, but when trying to change input, run-time, I have to close the grabber
and re-open it, or else the input is not changed.

Does anyone on this list know how input is changed run-time without closing the
opened device? The documentation states it should be able to (grabbing multiple,
preset inputs), but I am unsure how this is done.

If anyone knows hot to grab from input 5, please tell me!

The (pseudo)code (Very snipped):
FUNTCION GRABOPEN
vid = open(device, O_RDWR);
ioctl(vid, VIDIOC_S_STD, &vstd);
ioctl(vid,VIDIOC_S_FMT,&fmt);
close(vid);

FUNCTION GRAB
vid = open(device, O_RDONLY);
ioctl(vid, VIDIOC_QUERYCAP, &cap);
ioctl(vid,VIDIOC_S_INPUT,&inputVidR);
R =  read(vid, dataR, fmt.fmt.pix.sizeimage);
close(vid);
<repeated for other channels>

Settings:
Std=NTSC
Format=320x240x32 (V4L2_PIX_FMT_BGR32, 32 because of other function libraries)
fmt.type=V4L2_BUF_TYPE_CAPTURE
fmt.flags=V4L2_FMT_FLAG_ODDFIELD

All help is greatly appreciated!

Jonas Lepsøy





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux