Device::QuickCam - Perl extension for using the Connectix QuickCam
use Device::QuickCam; my $cam = Device::QuickCam->new(); $cam->set_quality(50); #Set JPEG Quality in % $cam->set_bpp(24); #Set bits per pixel (24 or 32) $cam->set_width(320); #Set image width $cam->set_height(240); #Set image height for(1..10) { $cam->set_file("foo-$_.jpg"); #Use filename $cam->grab(); #Grab it }
This module allows access to the Connectix/Logitech QuickCam. This module uses libcqcam and expects the user to play around with it. libcqcam isn't installed as library during a default cqcam installation (altho Debian does appear to provide it as a package).
You'll need
Root access or similar permissions to access the port.
libcqcam installed and headers nearby. You will need them while building the C++ code. Location of libcqcam can be found below.
libcqcam and this module output images in JPEG. You will need libjpeg installed.
Well, obviously a QuickCam. These cameras were first manufactured by Connectix. Logitech later bought the company and same webcams were then/now sold under the Logitech brand. There are FAQs on how to get these cameras working in Linux. (working)
Well, It helps anyway. I have no idea how this might work on other platforms altho libcqcam supports a few.
This function grabs image data, using settings defined beforehand.
This function can be used to set JPEG Quality. Values range from 0 to 100. Default is 50.
This function can be used to set a bits per pixel rate. Valid values are 24 and 32. Default is 24.
This function can be used to set the output image width. Values range from 0 to 640. Default is 320.
This function can be used to set the output image height. Values range from 0 to 480. Default is 240.
This function can be used to set the red level of the output image. Values range from 0 to 255.
This function can be used to set the green level of the output image. Values range from 0 to 255.
This function can be used to set the blue level of the output image. Values range from 0 to 255.
This function can be used to set scaling of the image. Valid values are 1, 2 and 4. Default is 1.
This function can be used to toggle auto adjusting. Set 0 for off, 1 for on. Default is on.
This function can be used to set a camera port. Default value is 0 for autoprobe. Valid values are 0x378, 0x278 and 0x3bc. If unsure, leave this at 0.
This function allows you to toggle debug info. 0 is off, 1 is on. Default is off.
This functions allows you to set a filename for output. By not setting a filename, you force output to STDOUT.
This function allows you to toggle HTTP Support. 0 is off, 1 is on. Default is off.
I included libcqcam in this archive. You need to build this yourself before installing this module. Go into the libcqcam directory and type :
make
Then copy libcqcam.a to a directory in which is listed in ld.so.conf (I used /usr/lib) and run ldconfig. Then you should be able to make this module.
None by default.
Hendrik Van Belleghem, <beatnik - at - quickndirty - dot - org>
Based on code by Patrick Reynolds <reynolds - at - cs - dot - duke - dot - edu>
perl.
libcqcam, part of cqcam. http://www.cs.duke.edu/~reynolds/cqcam/
To install Device::QuickCam, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::QuickCam
CPAN shell
perl -MCPAN -e shell install Device::QuickCam
For more information on module installation, please visit the detailed CPAN module installation guide.