The Kom Firin dig as a PhotoOverlay with hotspots

Last month I visited my first real live archaeological excavation — the Ramesside temple complex at Kom Firin in the Nile delta, currently being excavated by a team from the British Museum.

That area of the delta just recently got a high-resolution imagery update in Google Earth, so even though it is in the middle of nowhere, we were able to get there through the judicious use of Mobile GMaps and my Nokia N95′s built-in GPS. (Egypt has excellent mobile phone coverage.)

I took some snapshots of the visit (which I uploaded to Flickr), but at one point I also stood on a hillock, held out my arm, and put the Nokia to work making a 360-degree panorama. This wasn’t a high-tech proposition — I really just took a photo, turned a bit to the right, took another, etc… about 15 times.

The object of that little experiment was to see if I couldn’t create a 360-degree panorama in Google Earth. The answer was yes, with an additional unexpected use for the georeferenced photos on Flickr — you can turn them into placemarks and position them in front of the panorama, in effect creating clickable hotspots usable from within Google Earth’s PhotoOverlay view.

Here’s the resulting file. Double-click on the “Kom Firin 360″ item to enter the PhotoOverlay viewing mode (give it some time to download the tiles, poor server). Notice how the placemarks float in front of the overlay but disappear as you zoom in. You can click on a placemark to see the popup containing a thumbnail of the photo, which links through to the corresponding URL on Flickr.




Here’s how to make your own:

Turning the set of georeferenced images from Kom Firin on Flickr into a KML file was easy. I used Adam Franco’s excellent Flickr set to KML converter.

Then I set to work on the panorama. I used DoubleTake for the Mac, which imports a whole series of partial panorama images and does a remarkable job guessing how to match and stitch them. Perfectionists can spend hours fine-tuning, but luckily I am from the “good-enough” school of editing in this regard.

(Some tips: While stitching the images manually, I set the program to 360-degree mode, but when it was time to export a big jpeg image, I turned that off and cropped manually — it just results in fewer hassles.)

The exported jpeg image (weighing in at 27MB) was then processed by CASA’s most excellent Java app PhotoOverlay Creator. I ran it in Windows on my Mac. The result is a folder containing hundreds of small jpeg files, comprising a “pyramid” of progressively more detailed images that get loaded only when you zoom in on a part of the image. These were then uploaded to Ogle Earth’s web server.

I did some tweaking on the KML file produced by PhotoOverlay Creator, however. Fortunately, it is easy to have it open in a text editor, make changes and then choose “revert” on the file in Google Earth, which in effect refreshes it. Using the opacity slider, I was able to have the horizon in the panorama match the horizon in Google Earth (by playing with <bottomFov> and <topFov>). I also played with the radius of the panorama (using <near>) so that a number of nearby georeferenced placemarks would be inside its circumference.

(Tip: Because I had lowered the field of view in order to match the horizons, I had to raise the camera’s height to avoid the panorama being cut off at the bottom when zoomed out.)

(Another tip: You can control the direction of the panorama by changing the camera’s <heading> value. Luckily for the imagery I took, there are some very distinct landmarks nearby (the tree, the magazine, the lake) visible on Google Earth’s base imagery, so it was easy to precisely position the view.)

Then came the fun part. It turns out that placemarks near the camera are visible when you are in PhotoOverlay viewing mode. If — as is the case with the KML produced by Adam Franco’s Flickr to KML converter — the KML contains placemarks with photos as icons and in the popups, then you can position these in front of the panorama as clickable hotspots, merely by adjusting their height.

This part is a bit fidgety, but not as fidgety as you might think. It is quite easy to get a good correlation between the view in the panorama, the view on Google Earth’s base imagery, and the georeferenced images from Flickr.

The result, I think, gives a pretty good indication of what it’s like to be at an archaeological excavation in the Nile Delta, with plenty of opportunity for storytelling via placemarks.

[Update 21:53 UTC: Thanks for Ben Hagemark (who's worked with the Gigapan and Gigapxl default layers in Google Earth) for pointing out two further possible enhancements to the final file: You can link to the PhotoOverlay view directly by adding an id to the PhotoOverlay tag (e.g. id="kom_firin_360") and then linking to it in the description for the popup balloon, like so: <a href="#kom_firin_360">Fly into this panorama.</a>. Another improvement is to link the balloon of each photo to the next. We've seen this in Google Earth's newest default layers, and here is how to do it: give each placemark a different id, for example id="photo1", then in the description of each balloon, link to the id of the next placemark, like so so: <a href="#photo2;balloon">Next photo</a>. Technical note: Make sure to wrap the description text inside a <![CDATA[...]]> tag to avoid syntax errors.]

7 thoughts on “The Kom Firin dig as a PhotoOverlay with hotspots”

  1. Windows users might try the free application Autostitch. While the demo version has limitations (JPG only, limited documentation), it does a great job at stitching together multiple images and correcting for exposure differences. If your images cover more than 360 degrees, it will automatically crop the final panorama to only cover 360.

    For converting to QTVR in Windows, try Pano2QTVR. The free version converts a 360 panorama to Quicktime VR, and supports other functions as well (like hotspots).

  2. Hello, Stefan,

    nice work you did there. And nice that you showed us how easy this could be.

    One suggestion: give each photo a LookAt position to have a nice tour through the Photos folder. You can “Play” the folder and view each photo depending on the Tour settings in GE. Thats my way to show my photos.

  3. That’s neat, Stefan! And thanks to Leszek for pointing out those other tools too. I’ll have to check those out.

    Stefan, Seeing this, in the context of a dig — I keep going back to a question I’ve wanted to ask you for a long time. Do you see any potential in using SketchUp to map a dig site for visualization — or is that tool not quite ready for that task?

  4. photoshop CS does an excellent job stitching panoramas together….


    the auto setting works fine normally, sometimes one of the other settings works better…

  5. To be completely honest, I was never impressed with Photomerge. It’s okay if you have a relatively flat set of images, like a wide landscape — and the color is basically the same for every shot, but anything more complicated and it doesn’t work very well.

    I’m extremely impressed with Autostitch. I just can’t get enough of the accuracy it stitches at and especially its color-match and blending capabilities. I’d rate that method up there with one of the greatest image processing acheivements this year, along with the Content Aware Image Resizing (Seam Carving) algorithm.

  6. Is the “Kom Firin 360″ item still in the kml file?

    I just loaded it and do not see the panorama.

  7. OK – well the photo overlay info is there in the kml text, but Google Earth doesn’t show it at all.


    Ahhh – I needed to update Google Earth.

    Very cool.

Comments are closed.