Have you ever wondered how professionals get photos to pop up on their computer as they snap them? Most higher-end cameras have mini USB connection, and software is available to retrieve images as they are taken.
Rather than use a GUI app, in this post I’ll use a command-line program called gphoto2
to drop the images into a folder. With large thumbnails set in your file browser, a desktop program would be redundant.
Basic process
First, you need to install the gphoto2
program. Depending on your system, one of the following commands should do the trick:
|
|
Now, plug in the camera. The command to do a “tethered capture” is:
|
|
Unfortunately, in most desktop environments, your file manager will mount the camera automatically. If this is the case, then the command will give you an error:
|
|
Simply find the camera and unmount it using the eject button:
Now when you type the command, it will block until a photo is taken, and then show you the name of the photo:
|
|
Each of the photos is loaded into the working directory after you release the shutter, so you simply close gphoto2
when you’re done — no manual downloading or SD card required.
Extending this method
Ok, so now that I’ve covered this basic use case, the real reason I suggest gphoto2
is that it will let you script just about anything to do with your camera.
Just typing gphoto2 --help
shows that it can let you trigger a photo or video on a timer, download and delete folders from the camera, or hook up programs via a pipe for processing the files in realtime.
Endless possibilities.