#!/usr/bin/perl use Video::Capture::V4l; sub print_picture { my $c=shift; print "Picture Settings: "; print "brightness ",$c->brightness; print ", hue ",$c->hue; print ", colour ",$c->colour; print ", contrast ",$c->contrast; print ", whiteness ",$c->whiteness; print ", depth ",$c->depth; print ", palette ",$c->palette; print "\n"; } $grab = new Video::Capture::V4l or die "Unable to open Videodevice: $!"; print_picture $grab->picture; $|=1; my $frame=0; my $fr=$grab->capture ($frame, 640, 480); my $count=0; for(1..2) { my $nfr = $grab->capture (1-$frame, 640, 480); $grab->sync($frame) or die "unable to sync"; # save $fr now, as it contains the raw BGR data open (JP,">z$count.raw") or die $!; print JP $nfr; close JP; print "."; $count++; $frame = 1-$frame; $fr = $nfr; }