Friday, March 5, 2010

Geotag Photos with an Android Phone and Any Digital Camera


There are many ways to add geospatial information to photos, whether you use Flickr or Picasa's Heads-Up Digitizing Tools, or an expensive camera with a built-in GPS, a camera phone that has a built in GPS, or a GPS Data Logger and a standard Digital Camera. However, I wanted to share a way I use an Android Smartphone (Motorola Droid) and a standard point-and-shoot Digital Camera (Canon SD780 IS) together in a hybrid approach to automatic geotagging. 

This approach lets me cut down on the devices I need to carry along with me (don't need to carry a GPS data logger anymore), and lets me shoot higher resolution images than the 5MP camera on the Droid would allow. 

The Tools You'll Need:

Android Apps:

My Tracks for Android:

GPS Test for Android:
Linux / Mac / PC App:

gpicsync: Follow the instructions for installing on your OS.

Step 1. Start Logging:

Launch My Tracks and from the context menu choose "Record Track," this will start the My Tracks data logger. 

You'll need to keep your phone out (screen can turn off) for the duration of your picture taking - My Tracks will record your track.

Step 2. Launch GPS Test:

As with using a stand-alone GPS, you need to take a temporal reference photo to figure out the time difference between the GPS system (in which your log file will be recorded) and the camera time (which will be timestamped in each image). 

To take this image, use the free app GPS Test to display the current GPS time in the UTC time zone. 

Step 3. Set Your Camera's Time:

My camera has a home / away function so I can set my home time zone but also an "away" time zone - in this case my "away" time zone will be UTC time. Your camera may vary, but try to set the time as closely as possible to the UTC time shown in the time screen of GPS Test.






Step 4. Take a Picture of Your Phone:

From the Time screen in GPS Test, take a photo of your phone's screen with your camera - this picture will serve as your temporal reference in gpicsync so you can investigate the time difference between the GPS and your camera when you go to sync the photos to the GPS track.





Step 5. Keep You Phone Out, Take Pictures:

Your phone can probably stay in your pocket, but it needs a view of the GPS constellation to record your track well.

Step 6. When Finished Shooting, Stop Recording Your Track:

Use the context menu in My Tracks to select "Stop Recording".

You should have a nice map that shows you the track you collected.

Step 7. Send Yourself Your Track:

Use the "Share With Friends" feature of My Tracks to e-mail yourself a "GPX" version of your track, you will use this file as your track in gpicsync.




Step 8. Launch gpicsync, Fix Time: 

The first thing you need to do is to set up the time correction, from the Options menu choose "Local Time Correction"

Open the temporal reference image in a program like Google's Picasa, or just Windows Explorer or Mac OSX's Finder to simultaneously see the timestamp (camera date) of the image and the time that is shown by GPS Test for the UTC time.


Enter these values into the Local Time Correction Dialog.


Step 9. Select Your GPX Track and Photo Directory

For the "Pictures Folder," select the directory on your computer where you have downloaded the photos you want to be automatically geotagged in the gpicsync application. 

For the "GPS File," select the GPX file that you previously e-mailed yourself. 

Click "Synchronize" and gpicsync will index the times in the GPX file and then for each image in the directory check the timestamp of that image against the index to see where you were when that photo was taken and automatically will update the image's EXIF Header to include a GPS position. 



When finished, you will have a directory of automatically geotagged photos, a backup of the original photos, and even a KML file that you can open and view your photos spatially in Google Earth.

Or, you can just upload the photos to a site like Flickr or Picasa and the website will automatically read the EXIF Headers and will store your photos as geotagged photos online.

Check out an example of a recent Helicopter tour I took with my parents and the geotagged photos I took using this method here.