image

I constantly come up with new ways I think I will use to keep track of the charge status of my camera batteries, but I tend to forget between each time I am on a shoot, so it is kinda silly.   The other day I came up with this:

I used a marker, and added a plus sign to the battery covers, on one side. When the battery is fresh, the cover is put on so that the plus faces the contacts. When it is flat, the other way around. Now it is easy to see of I have just charged, or used up whatever battery I fish out of my bag.
I also added a piece of gaffers tape on the “negative” side, in case the plus gets rubbed off.

I do most of my photo editing, and picture organizing, in Adobe Photoshop Lightroom. Since I now how over forty thousand pictures from miscellanous events and concerts, and everything else, I like to tag people in pictures, so I can find them again, easily, if anyone asks.

Picasa 3 came with a face detection feature, which scans through all the pictures in your library, and tries to find people with some fancy algorithm. You can then add a name to the face, and easily see all pictures you have with that person in it. Almost. It doesn’t find a face in every situation, so it is not perfect, but it is a good start.

However, Picasa does not store the data about people in the files metadata. You can trick it in there, but since I work with RAW files (NEF), and Picasa doesn’t use XMP for metadata, that is not a good way to do it.

With a bit of reasearch, I found out that in every directory where there are pictures with found faces, Picasa stores a file ( .picasa.ini) that contains information about what picture file contains faces, where in the file there is a face, and what contact that is hooked up to. Picasa also stores an XML file with all the contacts in them.

Using that I wrote a small Perl-script that gets all the contacts out of the XML-file, scans through the current directory for the .picasa.ini file, matches contacts with that, and stores the new data in XML metadata with the file.

Before using the script, you need to change some variables to point to the right contacts file and such. You also need the XML library for Perl, and the Perl Exiftool-library installed.

The script has only been tested in Windows 7, with Cygwin.

The procedure goes as follow:

  1. In Picasa, do the face tagging. Check the picasa website for help on that.
  2. In Lightroom, make sure you select all the pictures you want to update, and write all the metadata to files. That’s from the metadata menu.
  3. Go to the folder you have some pictures with people in it and run the Perl script.
  4. Open Lightroom again, select the pictures, and choose to read metadata from files.

It seems to be working okay now, but I take no responsibility for damages it may do to your pictures if you try it. Make sure you have a backup first!

To run the script recursively I use the command:

 find . -name \.picasa\.ini -execdir ~/scriptlocation/faceextract.pl \;

The script is available on github

© 2012 Greger's blog Suffusion theme by Sayontan Sinha