Re: Video::Capture example?
From: Stan Brown (stanb_at_panix.com)
Date: 10/31/03
- Next message: Chris Mattern: "Re: DOS window."
- Previous message: Ben Morrow: "Re: Logic Flow Question"
- In reply to:(deleted message) zentara: "Re: Video::Capture example?"
- Next in thread: Stan Brown: "Re: Video::Capture example?"
- Reply: Stan Brown: "Re: Video::Capture example?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 00:32:20 +0000 (UTC)
In <4u32qvgthijulq4baguj941i6a9jhr8g7p@4ax.com> zentara <zentara@highstream.net> writes:
>On Wed, 29 Oct 2003 15:15:27 +0000 (UTC), Stan Brown <stanb@panix.com>
>wrote:
>>I'm writing a perl script to capture images from some cameras, and make
>>mpes out of them on Linux.
>>
>>I't basicly working using system() calls to v4lctl, but that is slowing
>>things dow, spawning a seperate task for each capture.
>>
>>I've found the Video::Captur module, and I think it's the way to go.
>>However it has no documentation for the calls, and the example programs
>>have no comments.
>>
>>Could anyone point me to a working example of capturing an image using
>>this? I suspect I jyst need to traslate a couple of v4;ctl commands to the
>>corect syntax for using this module. EG:
>Here is a Tk camera capture program is wrote. The biggest obstacles are
>making sure the camera syncs, and converting the raw BGR data to RGB.
>There are a couple of different ways you can do this, I used a technique
>of reversing the data, then flipping it with Imager. Imager also has a
>more direct matrix method, but I think it was a bit slower that way.
>Read "perldoc Imager::Transformations".
Thanks for the help on this again!
I've managed to integrate major peices of this into my script, and have it
working! But I've got a few questiosn, if some kind soul could enlighten me
a bit further.
First, why do we go through the capture/convert loop twice per grab?
for ( 0 .. 1 ) {
my $nfr = $grab->capture( 1 - $frame, 640, 480 );
I've been benchmarking, and it seems that the 2nd pass take much longer
than the first.
second, could someone explain these calls to me?
my $channel = $grab->channel(0);
my $tuner = $grab->tuner(0);
$tuner->mode(1);
$channel->norm(1);
$tuner->set;
$channel->set;
It appears to me that first read the chanlel (and tuner ? what's a tuner?)
The set them back?
And finally, if I want to use the 2nd capture card, I pass a 1 to the first
2 calls, right?
Thansk again for all the help on this!
-- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin
- Next message: Chris Mattern: "Re: DOS window."
- Previous message: Ben Morrow: "Re: Logic Flow Question"
- In reply to:(deleted message) zentara: "Re: Video::Capture example?"
- Next in thread: Stan Brown: "Re: Video::Capture example?"
- Reply: Stan Brown: "Re: Video::Capture example?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|