Using Raspberry Pi as a Photo Station
Productivity Sauce
Although Raspberry Pi (RPi) is not powerful enough for heavy-duty image processing, you can still put it to some photography-related uses. For example, as an amateur photographer, I take a lot of photos when I travel, and I upload the photos to my Raspberry Pi at home which neatly organizes and keeps them safe till I get back home.
To turn RPi into a photo station, I opted for the Debian Wheezy minimal image. The only thing I needed to install was the usbmount tool which automatically mounts and unmounts external USB storage devices. Although it's possible to save photos on the SD card, I decided to keep them on a dedicated 16GB USB stick which usbmount tool mounts at /media/usb0. Since the minimal image comes with an SSH server enabled by default, I only had to configure my router to make RPi accessible from the Internet.
Usually I use the Eye-Fi with my DSLR camera to automatically transfer photos to whatever Android device I have on me. I then use the FolderSync app to upload photos to the /media/usb0/Eye-Fi directory on RPi using the SFTP protocol.
RPi then uses a simple Bash script to rename the transferred photos and organize them into folders by date. The script relies on the ExifTool which can be installed using the sudo apt-get install libimage-exiftool-perl command. The script itself is not particularly complicated:
#!/bin/bash SRC=/media/usb0/Eye-Fi DEST=/media/usb0/PHOTOS if [ "$(ls -A $SRC)" ]; then cd $SRC exiftool -r -d $DEST/%Y%m%d/%Y%m%d-%H%M%S.%%e "-FileName<DateTimeOriginal" -ext NEF $SRC else echo "No photos found" fi
The scripts renames each RAW file using the date and time info from the file's EXIF metadata, and organizes the renamed photos by date. Note that this particular example works with Nikon's NEF RAW files, so you have to specify the correct file extension to make the script work with other formats. I usually run the script manually, but you can create a cron job to run it automatically at a specified schedule. Just remember to make the script executable using the chmod +x .rename.sh command (replace rename.sh with the actual name of the script).
This is not the most advanced solution, but it serves me well when I'm out and about.
Comments
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Endless OS 6 has Arrived
After more than a year since the last update, the latest release of Endless OS is now available for general usage.
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
Re: Wrong variable name
Wrong variable name