How to play digital cameras in Linux (1)

Source: Internet
Author: User

Digital cameras are currently one of the fastest growing peripherals, and their configuration in Linux is very simple. The gphoto2 software package supports digital cameras. Generally, you only need to install and configure the gphoto2 package to use a digital camera in Linux. Gphoto2 of the latest version 2.1.6 supports more than 616 types of digital cameras from 27 vendors. You can see the link: http: // www.gphoto.org/proj/libgphoto2/support.php. If your digital camera is in the driving column. Then it can be used normally. Note: In addition to downloading and installing gphoto2, there are several other function libraries: libgphoto2, libkexif, and libkipi. You can find them on the official website of gphoto2. Download Method:

# Wget http://ovh.dl.sourceforge.net/sourceforge/gphoto/gphoto2-2.1.6.tar.gz

# Wget http://keihanna.dl.sourceforge.net/sourceforge/gphoto/libgphoto2-2.1.6.tar.gz

# Wget http://umn.dl.sourceforge.net/sourceforge/digikam/libkipi-0.1.2.tar.bz2

# Wget http://umn.dl.sourceforge.net/sourceforge/digikam/libkexif-0.2.2.tar.bz2

The installation process is relatively simple. I will not go into details here. The following describes how to play with a digital camera in Linux, the operating system Red Hat Enterprise Linux 4.0.

I. Driver of USB Digital Camera in Linux:
Digital cameras and PCs generally use USB interfaces for communication. The ideal situation is plug-and-play. In this case, you only need to use a simple mount command to access the data on a digital camera just like a flash disk. The technical features of USB are not described here. Let's take a look at Linux's support for USB. USB transmits data in serial mode. The maximum data transmission rate of USB 1.1 is 12 Mbps. Linux kernel Versions later than 2.4 are supported. The USB 2.0 specification evolved from the USB 1.1 specification. the Linux kernel version 2.4.19 began to support USB 2.0. In addition to supporting the USB interface in the kernel version, you must determine whether the current system has compiled the USB driver module. If the Linux system supports USB devices, some driver modules are required. We all know that the built-in drivers are generally in the/lib/modules/2. xxxx/kernel/drivers directory. This directory contains usb and several subdirectories. You can find the following key USB modules: USB core. o is the basic driver module required by all usb devices;

Host/ehci-hcd.o is USB 2.0 device support; host/usb-uhci.o is Intel VIA chipset USB driver;
Host/usb-ohci.o is iMac, SiS, Ali and other non Intel chipset USB driver; storage/usb-storage.o is a USB interface storage equipment, such as mobile hard disk, USB flash disk will be used; hid. o is the basic support for human-computer interaction devices such as keyboards and mice for USB interfaces. In this directory there are some specific device drivers, drive different devices: usb-storage.o USB is for the drive module and the storage part; scsi_mod.o is for the SCSI device support; sd_mod.o is for SCSI hard drive support module; sr_mod.o is for SCSI optical drive support module; ide-scsi.o this module can simulate the IDE device into SCSI interface.

There are many digital camera interfaces, but we know that the USB interface is the main interface of digital cameras. To access digital cameras in Linux, you can usually use the following two methods.

1. operate a digital camera under the command line

After installing the gphoto2 package, you can drive the digital camera. there are usually two commands to query the status of the digital camera, gphoto2 -- auto-detect and gphoto2-. Use the gphoto2 -- auto-detect command for model detection, while gphoto2-a is used for parameter detection:

# Gphoto2 -- auto-detect

Model Port

HP PhotoSmart R507 (PTP mode) usb

----------------------------------------------------------

Gphoto2-

Camera function: HP PhotoSmart R507 (PTP mode)

Serial Port support: No

USB support: Yes

Supported transmission speed: 9600

19200

38400

576000

1152000

Capture option: Image

: Preview

Supported configuration: Yes

Yes

Support file Preview (thumbnail): Yes

File Upload support: Yes

Gphoto2 important operation commands:

-- List-cameras: list supported digital cameras

-- List-ports: Lists supported Port Devices.

-- Auto-detect: automatic detection of digital camera functions

-- List-files: list files stored by a digital camera

-- Num-files: displays the number of files stored by a digital camera.

-Get-all-thumbnails: get all files

-Delete-all-files: delete all files

-Upload-file: uploads a file to a digital camera.

-Summary: current working status of the digital camera

-Capture-movie: Captures video files of a digital camera.

-Capture-sound: capture audio files of a digital camera

-Manual: Open the camera boot manual page.

2. Use special software
Generally, we prefer to use graphical applications to operate cameras. The new digital cameras generally support image transmission protocols. PTP is short for "picture transfer protocol. Ptp is a standard first developed by Kodak in consultation with Microsoft. Image devices that comply with this standard can be better shared by systems and applications after they are connected to the system, especially in terms of network transmission, the system can directly access these devices to upload images during network album creation, and transfer images during online chats. Of course, this is mainly for the convenience of ordinary users with little computer knowledge, so that cameras, application software, and websites can be combined to easily complete some silly functions. In some Linux releases, there are also a variety of software that supports the PTP protocol. The most famous is gtkam. Some Linux distributions of Red Hat Linux 9.0) already include this program. If you are an experienced player, you can also download the source code and compile it by yourself. Download link: http: // ovh.dl.sourceforge.net/sourceforge/gphoto/gtkam-0.1.12.tar.gz. Most new digital cameras on the market support the PTP protocol, but they are often not set by default. You need to set the memory mode to PTP. Run the gtkam software, select Add Camera in the Camera menu, click "camera"> "Add Camera" in gtkam to Add a digital Camera, and then click "Detect" in the pop-up form ", test the connection type of a digital camera. Click "OK" to view the photos in the digital camera.

Figure 1 interface when gtkam reads a digital camera

Figure 1 shows connecting to the HP 507 camera using gtkam to see a picture on the memory card. Select a photo and click Save to save the photo to the hard disk. Other excellent digital camera graphical interface programs include: digikamhttp: // keihanna.dl.sourceforge.net/sourceforge/digikam/), gThumbhttp: // gthumb.sourceforge.net /)
Gtkam is a program that provides a digital camera graphical interface. gtkam can be directly connected to a digital camera, allowing you to directly open, view, and delete images. Gtkam is based on gphoto2. Sometimes you cannot use gtkam because gphoto2 is not installed or the module is overwritten. Therefore, you need to reinstall gphoto2. Regardless of the front-end program, installing the gphoto2 program is critical.

3. Use a digital camera as a storage device

You can use a digital camera as a storage device, so that you can access the digital camera as you access the USB flash drive:

# Mkdir/mnt/camera

# Mount-t vfat/dev/sda1/mnt/camera


If you want the digital camera to be automatically mounted, you can add a line in/etc/fstab:

/Dev/sda1/mnt/camera auto defaults, user, noauto 0 0


However, only the following models are supported. See table 1:

Vendor name

Specific model

Casio)

QV-2400UX, QV-2x00, QV-3x00, QV-4000, QV-8000

Fuji)

FinePix 1300,140 0 Zoom, 2300 Zoom, 2400 Zoom, 2800 Zoom, 4200Z,

4500,470 0 Zoom, 4900 Zoom, 6800 Zoom, A101, A201, S1 Pro

HP)

PhotoSmart 315,318 xi, 618, C912

Konica)

KD200Z, KD400Z, and Revio KD300Z

Leica Lycra)

Digilux 4.3

Olympus)

Zoom D-15, C-100, C-200Z, C-2040, C-220Z, C-2Z, C-3020Z, C-3040Z, C-4040Zoom, C-700, C-700UZ, C-860L, D-510

Nikon)

CoolPix 2500,885,500 0, 775,995

Pentax bind)

EI2000, Optio 330, Optio 430

Sony)

DSC-F505, DSC-F505V, DSC-F707, DSC-P1, DSC-P20, DSC-P5, DSC-P71, DSC-S30, DSC-S70, DSC-S75, DSC-S85

Minolta)

Dimage 5, Dimage 7, Dimage X

Kyocera)

Finecam S3

Vivitar Vida)

VI Vicam 3550


Unfortunately, the Kodak series digital cameras cannot be used as storage devices.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.