Sunday, September 20, 2009

Fun with the Gphoto2 Command

I read about another powerful package of free and open source software (FOSS) today. This software application can control over 1,100 different cameras. The command is gphoto2. With this command you can instruct a camera to take a picture, retrieve pictures, list files on the camera, delete files off the camera, etc...

I like birdwatching and taking pictures of birds. I could never get close enough to take a good picture until now. With gphoto2 I can set my camera on a tri-pod in my backyard right in front of my bird feeders. I connect the camera via USB to a netbook. The netbook sits under the camera on the tri-pod. The netbook is connected to my wireless router via Wi-Fi. I have a computer in the living room that has a window view of my feeders. I remotely connect to my netbook using the ssh command. When a bird comes in to feed I execute the gphoto2 command on the netbook and now I've got an up-close-and-personal photo of the bird.

Here is the command syntax I'm using on my netbook running Ubuntu 9.04 operating system:

gphoto2 --capture-image --get-file capt0000.jpg --folder /store_00010001 --hook-script --force-overwrite

The gphoto2 command above tells the netbook to instruct the camera to take a photo, get the file from the camera and display it. I can then decide whether or not it is a keeper. If it is a keeper I copy the file from the netbook to my computer in the living room with the following command:

scp capt0009.jpg

The command scp above performs a secure copy from the netbook to the computer in the living room.

I didn't get to spend much time taking pictures due to the inclement weather but I did iron out my work flow. Below are a couple shots of up-close-and-personal cardinals. Click on the photos to enlarge.

I'm frequently amazed by the free and open source Linux operating system Ubuntu. If it can be done with software it can be done on Linux and at no cost to the user.

No comments: