Sunday, April 3, 2011

Bookmark and Share

Geotagging inside Adobe Lightroom...

Lightroom Geotagging plugin in action (click image for larger view)

One thing I am personally surprised at, is how few camera manufacturers put built-in GPS modules in their cameras.  There are a handful of P&S models from a few companies, but the only DSLR I can think of is a recent Sony model. Nowadays, I expect a GPS chipset would likely cost a company $10 or less to include in their camera - heck, just about every cellphone made in recent years has one, even inexpensive ones and not just high end smart-phones. Some companies, such as Nikon with their GP-1 and Hasselblad with their GIL GPS receiver have some reasonably convenient add on modules for their cameras that will automatically geotag your images, but why not include these in all cameras?!

Okay fine... another point of profit for the companies in selling you a module, but for example, we sell very few GPS add-ons at Beau Photo, so I doubt the companies are making much money on these. Maybe they are generally too expensive for people, or maybe most photographers don't care, but honestly once you've seen the convenience of being able to plot on a map exactly where a photo was taken, you'll be hooked. It's likely that commercial or studio photographers will have no use for this (duh... where's my studio?), but certainly if you are an outdoor, scenic or wildlife photographer, or do travel photography in far away lands, being able to locate a photo with a single click could be really useful! Interspersed throughout this article are photos from my 2010 trip to the US southwest, with map links below each one. How I came to geotag these photos is what I am discussing...

Personally, I shoot with a Canon system, and there is nothing they have which is even remotely convenient, as far as an add-on GPS module. So what can I do? A GPS data-recorder would be one option...

I am currently testing out a Qstarz BT-1000XT Travel Recorder (thanks Moreno!) to see how I can integrate it with my photography workflow. I have not been testing this little recorder for very long, but it does seem to work well and provided a very accurate track, both recording while lying on my car's dashboard and even just jammed into my jacket pocket. Normally I would try to affix it to the top of my camera bag or camera backpack. A simple switch turns on the recording, and with its excellent battery life, just leave it on the whole time while you are out shooting. It was set to record a GPS waypoint once every second, while in motion, and with a 400,000 data point memory, that would be over 111 hours of continuous moving recording (over 4.5 days) before you'd need to download the data and clear the unit again. In practice, once the unit is at rest for a while, it will pause the recording as to not duplicate data points unnecessarily, so it would likely last even longer before requiring a download and clear.

One thing you need to do carefully when using an external recorder, is to set the time on your camera as accurately as possible to the GPS supplied atomic time signal. If you have a dedicated GPS, it will have perfectly synced time you can refer to, or generally if you are connected on a digital cellphone network, you could read the time from your phone, sync your camera that way and it should be good to within a few seconds. After all, that's how the geotagging plugin works its magic: it looks at the capture time of your photo and tries to match it up with your location at that time. If there is not waypoint data at the exact time of capture, it will try to interpolate from the two surrounding positions and take a guess. The more closely your data points are captured, the better this guess will be. That is the obvious benefit of a built-in GPS or an add-on module: no need to deal with tedious time synchronization.

Apart from a dedicated recorder like the Qstarz, there are certainly other ways to get a GPS tracklog. One would be your iPhone, and there are numerous GPS apps that will record a tracklog. However leaving the iPhone running and recording a track is very hard on battery life. Another is to record a track with a dedicated handheld GPS, however again the battery life probably won't be as good (the tiny Li-Ion battery in the Qstarz is good for over 40 hours before needing to be recharged) and turning on a normal GPS and initiating a track recording (or making sure it still is recording and has not run out of memory) is way more tedious than simply flipping the switch on a dedicated recorder.

On the other hand, getting the data points from the Qstarz into my computer proved a bit of a pain since the company does seem not support Macintosh systems at all. I finally discovered an easy to use program called HoudahGPS and together with an OS X device driver that I managed to locate online (Silicon Labs VCP Driver Kit), which works with the Qstarz recorder, I was able to download the track-log as a standard GPX file, using a regular mini-USB cable. So now I have the GPX tracklog file on my computer and a bunch of image files that need tagging. Now what?

Enter the excellent Lightroom Geo-encoding Plugin by Jeffrey Friedl. This plugin is free... sort of.  Initially it can be used without registration, but after 6 weeks it becomes "donationware", forcing you to register using PayPal and making some sort of donation, whatever you feel the software is worth to you. You can donate as little as one penny or as much as you want. There is more info about this on his website, along with details on what restrictions would otherwise apply after the 6 week trial period.

There are many programs that can take a GPS tracklog file and apply it to a set of images, but many of those only work with JPEG files or if they do support raw files, they might only work with a subset of available cameras. Jeffrey's software is the first I've seen that integrates with Lightroom as a plugin and works right inside the program, on existing images in your library. While the user interface could use a little visual polish, it seems to be a very flexible plugin with many options. By default, it creates GPS "shadow" data, that is, the plugin creates its own metadata entry that is independent of the standard GPS metadata fields. The side effect of this was an initially alarming message that my Lightroom library had to be updated before using the plugin, but that went without a hitch on two different libraries I tested it on. One does have the option to "write-back" the GPS shadow data to the industry standard fields as well. There are many other options too for fine tuning the tagging and performing other functions.

One other huge advantage of using this plugin is that it preserves existing XMP metadata. As I understand it, with many other geotagging programs that write to XMP metadata files, if you were to tag images that have already been edited or adjusted in Lightroom or Photoshop, writing the GPS data would essentially overwrite the entire XMP file, starting you off from scratch as far as any edits are concerned. This Lightroom plugin seamlessly inserts the GPS data without altering any other aspects of your image ratings or edits. Very nice and very well integrated! Now for an example of how I used the plugin to tag the images in this article...

On my last three week trip to the US southwest in spring of 2010, I used a SPOT Satellite Messenger both as a safety device in the event of a backcountry  emergency, and as a GPS logging device. In tracking mode, the SPOT will send one location message every ten minutes, via the GlobalStar satellite communications network. This way, friends and family can follow along with my adventures and always see exactly where I am, and the route that I took. In addition, it provides me with a handy log of my travels as well, but this is the first time I have tried to geotag photos using the SPOT tracking data. Since the SPOT only records one location point every ten minutes (sometimes less if it cannot send out the satellite message), the accuracy of the GPS tag on any given photograph might not be all that good. You can certainly walk quite a distance in 10 minutes, let alone drive! However, it still allows me to see the general area in which the photo was taken. My last trip took me through nine states and 10,000 km of driving, all the way down to Big bend National Park in Texas, so sometimes I might look at a photo in my library, and if there are no surrounding shots that give it obvious context, I may not remember where the photo was taken anymore. I do try to add keywords, but sometimes my memory just fails me.

So, back to the 2010 trip. I generated one huge GPX file with all three weeks of travels, selected all 2770 images I shot during the trip in Lightroom, loaded the GPX file into Jeffrey's plugin and hit the "Geoencode Images" button. In a matter of 30 seconds or so, bingo it was done... albeit with some error messages. There were nearly 1500 images that it couldn't tag for a variety of reasons. Hmm... then I noticed the "Fuzziness" setting and since the SPOT records at 10 minute intervals, I figured I'd set this to 20 minutes. Well... not much better. Then I set fuzziness to 5 hours, just for the heck of it, and let it process. This time, it took quite a lot longer but after 5 minutes or so, it finished and now there were only 700 images it couldn't tag. Looking at the error log, the problems do appear to be related to the long gaps I had between GPS data points, and occasionally the SPOT was inadvertently left off even and I traveled quite a ways before noticing and turning it back on.

In the end, while incomplete, having 2000 or so images geotagged from my last trip is seriously cool! There were numerous shots I liked, but for the life of me, I could no longer remember where exactly they had been taken... the ones in this article for example. I am definitely looking forward to my next trip, where I intend on bringing along one of those small GPS recorders, like the Qstarz, in order to have a finer-grained flow of data-points with fewer large temporal gaps. The post-trip geotagging should go much more smoothly then, I would think. I'll leave you with a few more images from that trip...

The next image is interesting and, I think, a rare thing to see. You are looking at the "skeleton" of a saguaro cactus! I have never seen a dead one still standing upright like that before.

This last shot was taken in Colorado, on a road that I had never driven before. I was on my way home and had a lot of ground to cover, so wasn't stopping much for photos unfortunately. Even after I got back from my trip, I stared at a map and tried to puzzle out where exactly that shot was taken. Geotagging to the rescue!


Post a Comment