martedì 5 novembre 2013

Making one photo album with two cameras, how to merge the photo sets in a smart way


Coming back from my New York holiday I have had to merge toghether two photo sets, taken with two cameras, into a single photo album.
I 'll provide here a quick walkthru by using the Linux OS and the jhead console command.

About the jhead command installation please use/refer your Linux distro package manager.


When merging photo sets from  two (or more) cameras, you face these problems:
  • different filename conventions for image files
  • different progressive numbers in image filenames
  • camera clocks are not synched
Let's assume you have moved the two photo sets in two folders, /frank and /ann ;
The first step is to fix the clocks delta; you have to find out two shots taken at the same time by frank and ann, let's look for something similar to:



You can use photo A and B in order to calculate the time delta between camera clocks.

Let's open these images with an image viewer and let's read the time/date EXIF informations (usually you have to look at the image "properties").

OR

you can obtain the time/date info by using the  jhead  command from shell, e.g.

>jhead IMG_2337.JPG 

File name    : IMG_2337.JPG
File size    : 3184059 bytes
File date    : 2013:10:10 16:06:04
Camera make  : Canon
Camera model : Canon DIGITAL IXUS 75
Date/Time    : 2013:10:10 16:06:05
Resolution   : 3072 x 2304
Flash used   : No (auto)
Focal length :  5.8mm  (35mm equivalent: 37mm)
CCD width    : 5.72mm
Exposure time: 0.017 s  (1/60)
Aperture     : f/2.8
Focus dist.  : 3.84m
ISO equiv.   : 160
Whitebalance : Auto
Metering Mode: matrix  

Consider this situation:
  1. Ann's photo, foto B,  Date/Time    : 2013:10:10 16:06:05
  2. Frank's photo, foto A, Date/Time    : 2013:10:10 16:16:25 

Frank's clock is 10 minutes and 20 seconds fast, you are going to fix this:

>cd frank
>jhead -ta-0:10:20 *.JPG

This command has fixed the exif time information by decreasing the photos time/date (-0:10:20). The two photo sets are now time-synced.
Jhead command provides other options to easily manage a very big clock delta (days, months or years), please refer to man pages.

The next step is photo renaming, you are going to change the photos filenames with new ones based on their EXIF time/date;
let's use jhead again:

>cd frank
>jhead -n%Y%m%d-%H%M%S-frank *.JPG
>cd ../ann
>jhead -n%Y%m%d-%H%M%S-ann *.JPG

e.g. this is going to rename the ann photo IMG_2337.JPG to 20131010-160605-ann.jpg
Please note the postfix -ann (and -frank), it helps mixing photos with the same time attribute.

Now you can simply move (or copy) the photos into the fresh new /happyholidays folder.

mv /ann/*.* /happyholydays
mv /frank/*.* /happyholydays

I hope this is useful, have fun. :-)