Photospheres on Google+

Carpebble-logo

Photosphere is the Google+ term for an equirectangular panorama, with GPS coordinates and specific embedded orientation information. Click on this link for an album containing some of my photospheres from 2012. If you want some pictures of the sun, then Google photosphere, which is also the name for the outer part of the sun, which emits the light that we see. Photospheres can be identified by the photo-sphere icon in the top left corner. They can be viewed either as flat images or in an interactive viewer.

Panoramic images stored in Google+ are currently limited to 2508x1254 pixels in size, but it is possible to view larger photospheres, by storing them in PicasaWeb and sharing them as links on Google+. In Google+, go to photos, then albums. Open the photosphere you want to view and copy the address from the address bar in the browser. You can obtain shortened addresses using the Google url shortener. If you share the link to your photosphere directly from PicasaWeb, then it will not open in the Google+ photosphere viewer. Click on this link for a higher resolution photosphere shared on Google+ in this way. This photosphere is best viewed at full screen, to get the benefit of the higher resolution. Storing these larger photospheres in PicasaWeb does use up some of my 5Gbyte storage allowance on PicasaWeb. Photos which are less than 2048 pixels on their longest edge do not use up the Google Drive data allowance.

Photospheres consist of an equirectangular panorama (which may or may not be 360x180 degrees) and metadata. If you have a Jelly Bean Android phone, you can shoot the panorama and the phone will add the metadata for you. I don't use an Android phone and I prefer my panoramas without parallax errors. I have used three methods to add metadata to my panoramas, which I capture using a panoramic tripod head and SLR, before stitching with Hugin.

Adding metadata

1) Use the Google app at: http://photo-sphere.appspot.com/. The instructions are self-explanatory and the wizard works well with smaller images. I had no problems with a 2508x1254 pixel panorama, but it failed with a panorama over 9000x4500 pixels. This app is probably the easiest and most reliable way to produce a photosphere from a regular equirectangular panorama.

2) Edit the metadata using exiftool. If you are happy with command-line tools and writing batch files, this is the way forward - it is much quicker than using the Google tool and I have described this method in detail below.

3) Edit the data manually in a GUI, such as ExifToolGUI. This useful little application enables me to view and change the metadata associated with my photos. Useful features include the ability to remove all metadata, to edit individual items using Exiftool direct and to geotag the image, by either importing GPS data or, what I have done, in program | preferences enable internet access for Google map. This is the high-resolution map, which enables the same pin-point precision as geotagging in Picasa or on Google+.

My workflow is currently as follows:

1) Resample the panorama to 2508x1254 pixels using GIMP (I use a batch-processing plug-in called DBP, otherwise I would use IrfanView).

2) Use ExifToolGUI to geotag the images and work out the facing direction, entering the facing direction into the batch file for step (3). Geotagging is quick to achieve in ExifToolGUI, but could also be done with Picasa, PicasaWeb or Google+.

3) Set up batch files to add the correct metadata using exiftool. The details for this are given below.

If you are inclined to use this approach and want a better editor than windows notepad, then I would recommend using notepad++.

Notes for the use of exiftool with batch files

Download exiftool e.g. to c:\exiftool\exiftool(-k).exe.

A short pathname for the exiftool directory (folder) is good, as you may want to navigate to this directory (folder) using the command tool, in which case it is better to have a short path name and no spaces in the path.

Rename the executable to exiftool.exe (actually, I made a copy of it).

Use notepad++ to create a batch file to write the metadata into the panorama. The way I am running this, the batch file, image file and exiftool.exe should all be in the same directory (folder).

Here is an example of commands I use to call exiftool. These can be stored in a batch file, with a name like "add_xmp.bat", which can be run either from the command line or by double-clicking on the file from windows.

exiftool -xmp:UsePanoramaViewer=True -xmp:StitchingSoftware=Hugin -xmp:ProjectionType=equirectangular -xmp:PoseHeadingDegrees=270.0 -xmp:InitialViewHeadingDegrees=270 -xmp:InitialViewPitchDegrees=0 -xmp:InitialViewRollDegrees=0 -xmp:InitialHorizontalFOVDegrees=75.0 -xmp:CroppedAreaLeftPixels=0 -xmp:CroppedAreaTopPixels=0 -xmp:CroppedAreaImageWidthPixels=2508 -xmp:CroppedAreaImageHeightPixels=1254 -xmp:FullPanoWidthPixels=2508 -xmp:FullPanoHeightPixels=1254 -xmp:FirstPhotoDate=2012-12-12T15:12:00.000Z -xmp:LastPhotoDate=2012-12-12T15:12:00.000Z -xmp:SourcePhotosCount=8 -xmp:ExposureLockUsed=True -xmp:StitchingSoftware=Hugin "Barranco de la Orchilla Panorama.jpg"

Although it did not matter to the browser on my PC, the Google specification does distinguish between real numbers and integers for some of this metadata. When I carelessly used an integer for the PoseHeadingDegrees, it may have been the cause of a problem on Android devices used by some contacts. The specification for the Google panoramic metadata is at developers.google.com/panorama/metadata/. I don't know why there is a Z at the end of the Date-Time, but it is in the specification document. The date is in YYYY-MM-DD format.

I have automated writing the metadata using two batch files, Batch-exif.bat and Pan-exif.bat.

Batch-exif.bat contains this text:

Call Pan-exif.bat 270.0 270 2012-12-12T15:12:00.000Z "Barranco de la Orchilla Panorama.jpg"

Call Pan-exif.bat 360.0 360 2012-12-12T17:08:00.000Z "Chimiche panorama.jpg"

Call Pan-exif.bat 135.0 135 2012-12-11T18:09:00.000Z "Los Gigantes Beach Panorama.jpg"

Call Pan-exif.bat 045.0 045 2012-12-13T13:09:00.000Z Pico-Viejo-Panorama.jpg

Call Pan-exif.bat 015.0 015 2012-12-12T14:35:00.000Z "San Miguel Fields Panorama.jpg"

Call Pan-exif.bat 270.0 270 2012-12-12T14:33:00.000Z "San Miguel Irrigation.jpg"

CAll Pan-exif.bat 260.0 260 2012-12-12T14:15:00.000Z "San Miguel Student Circle.jpg"

Call Pan-exif.bat 255.0 255 2012-12-12T13:53:00.000Z "Scoria Panorama.jpg"

CAll Pan-exif.bat 270.0 270 2012-12-13T13:30:00.000Z "Teide Fumarole Panorama.jpg"

Call Pan-exif.bat 315.0 315 2012-12-13T13:47:00.000Z Teide-Teleferico-Path-Panorama.jpg

Call Pan-exif.bat 300.0 300 2012-12-13T13:54:00.000Z Teleferico-East-Panorama.jpg

Call Pan-exif.bat 020.0 020 2012-12-13T12:51:00.000Z Teleferico-Panorama.jpg

I have run Batch-exif.bat with 12 lines for 12 separate panoramas.

Pan-exif contains this text:

exiftool -xmp:UsePanoramaViewer=True -xmp:StitchingSoftware=Hugin -xmp:ProjectionType=equirectangular -xmp:PoseHeadingDegrees=%1 -xmp:InitialViewHeadingDegrees=%2 -xmp:InitialViewPitchDegrees=0 -xmp:InitialViewRollDegrees=0 -xmp:InitialHorizontalFOVDegrees=75.0 -xmp:CroppedAreaLeftPixels=0 -xmp:CroppedAreaTopPixels=0 -xmp:CroppedAreaImageWidthPixels=2508 -xmp:CroppedAreaImageHeightPixels=1254 -xmp:FullPanoWidthPixels=2508 -xmp:FullPanoHeightPixels=1254 -xmp:FirstPhotoDate=%3 -xmp:LastPhotoDate=%3 -exif:DateTimeOriginal=%3 -xmp:SourcePhotosCount=8 -xmp:ExposureLockUsed=True -xmp:StitchingSoftware=Hugin -exif:Make=Canon -exif:Model="Canon EOS 1000D" -exif:Software="Hugin and GIMP" -exif:Artist="Mark Vanstone" -exif:Copyright="Mark Vanstone photographer and editor" -exif:LensModel="Opteka 6.5mm fisheye" -exif:ImageWidth=2508 -exif:ImageHeight=1254 %4

%1, %2, %3 and %4 are the first, second, third and fourth values from the command line when Pan-exif.bat is called by Batch-exif.bat.

You can see that it is also adding camera, copyright, software and lens data to the image. The lens is a manual lens, so unless I record the aperture setting at the time of shooting, that information is lost and does not appear in the Exif metadata.

I am sorry if this account is not very user-friendly. I am using tools that I know, in a way that I am comfortable with, having grown up with DOS and UNIX batch files and shell scripts. Once it is set up, this method allows very fast processing of a large number of equal-sized (2508x1254 pixel) photospheres.