Install Digital Cameras, Scanners, and Web Cameras on Ubuntu

[hacking ubuntu book preview]

Although TV cards are cool, they are not as common as digital cameras, scanners, and web- cams. Unfortunately, this is where hardware support really becomes hit-and-miss. My eight- year-old SCSI scanner is supported, whereas my newer USB scanner is not. And although both of my digital cameras can work as webcams under Windows, neither can work as webcams under Linux.

Note

Not every camera provides the same compatibility. If your camera does not support a capture mode, then you cannot use the computer to take pictures with it and you cannot use it as a high- resolution webcam.

A tool that you may want to consider installing is gphoto2. This program provides support for over 700 different camera models. It enables you to scan for compatibility with the camera and query supported functionality.

  1. Install gphoto2 as well as the graphical front end (gtkam) and the gimp plug-in to allow captures from cameras.

    sudo apt-get install gphoto2 gtkam gtkam-gimp
  2. Plug your camera into the USB port. There is no need to restart the X-server in order to load the drivers. If any windows, such as the camera import applet, pop up with prompts to import images or show the camera’s contents, just close them.

  3. Determine if the camera is supported. If the gphoto2 command does not auto-detect your camera, then the camera is not supported. You may need to use a different driver if one is available. If the camera is mounted as a disk, then it will not be listed as a camera device.

    $ gphoto2 --auto-detect
    Model                           Port
    ---------------------------------------------
    HP PhotoSmart 618               usb:

    Note

    Depending on your camera model and capabilities, you may see multiple lines of output from the gphoto2 –auto-detect command.

  4. List the camera’s capabilities. Most digital cameras have two PC-connect modes. The first mode is usually called something like digital device and makes the camera appear as an actual USB camera. The second mode makes the camera appear as a USB drive. The different camera modes provide different attributes. For example, here are the attributes for the HP PhotoSmart 618 in digital device mode.

Note

The ability to switch PC-connect modes depends on the camera. You will need to hunt through the camera’s configuration menu to see if mode selection is supported and to change modes.

$ gphoto2 --abilities
Abilities for camera             : HP PhotoSmart 618
Serial port support              : yes
USB support                      : yes
Transfer speeds supported        :
                                 : 9600
                                 : 19200
                                 : 38400
                                 : 57600
                                 : 115200
Capture choices                  :
                                 : Capture not supported by
the driver
Configuration support            : no
Delete files on camera support   : yes
File preview (thumbnail) support : yes
File upload support              : no

For a comparison, here are the attributes for the same camera in USB disk drive mode.

$ gphoto2 --abilities
Abilities for camera             : USB PTP Class Camera
Serial port support              : no
USB support                      : yes
Capture choices                  :
                                 : Capture not supported by
the driver
Configuration support            : yes
Delete files on camera support   : yes
File preview (thumbnail) support : yes
File upload support              : yes

Depending on your supported capture modes, you may be able to use the camera with scanner software such as Gimp and xsane, or with VoIP and teleconference software like WengoPhone. Even if the camera does not support captures or webcam mode, you can still access the device as a USB drive and copy (or move) off images. In USB disk drive mode, the camera appears no different than a USB thumb drive. You can transfer files by opening the drive via Nautilus and copying off the files. In digital device mode, use gtkam to view the photos and copy them to the desktop.

[via a preview of Hacking Ubuntu Book – Dr. Neal Krawetz]

Share your love

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *