2
\$\begingroup\$

This panorama is interactive, this isn't.

How do I make my panorama interactive? I guess it's either an EXIF flag or a specific format. Ideally I'm looking for something free which works on Linux. Hugin does not seem to have a setting for this.


I've tried the following command:

exiftool \
-ProjectionType=equirectangular \
-FullPanoWidthPixels'<$ImageWidth' \
-FullPanoHeightPixels'<$ImageHeight' \
-UsePanoramaViewer=True \
-out test1.jpg \
original.jpg

And verified the result:

$ exiftool test1.jpg | grep -e Pano -e Projection
Full Pano Height Pixels         : 1061
Full Pano Width Pixels          : 22902
Projection Type                 : equirectangular
Use Panorama Viewer             : True

Unfortunately Flickr still shows test 1 as a normal image.


OK, I'm getting somewhere. I tried also resizing it to 2:1 using:

convert -resize 2:1 test1.jpg test2.jpg

Test 2 does show up as a panorama, but looks completely messed up, probably because the original image does not have 180° vertical range.


I then tried to tweak the "Full Pano" pixel settings, but test 3 doesn't look any different. In fact, as you can see in test 4 these settings don't seem to change anything.


Cross-posted on Flickr.

\$\endgroup\$

3 Answers 3

2
\$\begingroup\$

You can't just mess with the metadata; you have to actually remap the image.

Flickr's panorama interactive viewer can only be used with equirectangular 360x180 panoramas. And to make it interactive on Flickr only requires adding the "equirectangular" tag (unlike Facebook, where you have to set the metadata). But, the image does have to be an actual equirectangular projection that covers the entire spherical view. So, filling in the missing floor/ceiling areas with black to get a 2:1 rectangle is possibly your best bet. You could try using Hugin and loading up your panorama as a Panorama (cylindrical) "lens type" and then remapping to an equirectangular 2:1, with steps similar to those in this Q&A.

Flickr's interactive viewer does not recognize 360º cylindrical panos and does not make them interactive. The only way I know of to interactively view a cylindrical 360º stored on Flickr, is to use a viewer that that uses Flickr's API, such as Aldo's fieldofview.com. To use it, create a URL in the following format:

http://fieldofview.com/flickr/?page=photos/user_ID/photo_ID/&tags=TAGS

Where user_ID is your Flickr user ID, photo_ID is the photo's ID, and TAGS are any other tagged photos you want to throw into the viewer.

So, for example:

https://fieldofview.com/flickr/?page=photos/l0b0/44945085211/&tags=360

gives you an interactive view of the pano, with a linked gallery of everything tagged '360' in the user's Flickr stream. But it assumes that all panos have 360º coverage, so the left and right edges are going to be wrapped around and joined together in the viewer.

See also: Wrapping photos to an equirectangular projection in Hugin.

\$\endgroup\$
1
\$\begingroup\$

The first image is posted in a dedicated Equirectangular group, featuring such images. In the discussion section of that group this has been discussed here and here for example.

The bottom line is that the flickr viewer (and probably most other viewer, too) needs exif data like that:

FullPanoHeightPixels = 6000
FullPanoWidthPixels = 3000
ProjectionType=equirectangular
UsePanoramaViewer=True
\$\endgroup\$
1
  • \$\begingroup\$ Unfortunately that doesn't seem to work - see my update. \$\endgroup\$
    – l0b0
    Nov 10, 2018 at 20:04
0
\$\begingroup\$

TLDR: Flickr may not support partial equirectangular images, but Google Photos does.


If the image was a full 2:1 equirectangular image:

exiftool \
-xmp:ProjectionType=equirectangular \
-xmp:CroppedAreaLeftPixels=0 \
-xmp:CroppedAreaTopPixels=0 \
-xmp:CroppedAreaImageWidthPixels"<ImageWidth" \
-xmp:CroppedAreaImageHeightPixels"<ImageHeight" \
-xmp:FullPanoWidthPixels"<ImageWidth" \
-xmp:FullPanoHeightPixels"<ImageHeight" \
-xmp:UsePanoramaViewer=true \
-out test1.jpg \
in.jpg

However, the image you linked to is not 2:1, not even close.

Width: 22902
Height: 1061

Let's assume it can be treated as a cropped 2:1. If it wasn't cropped, the height would be half of the width:

22902/2 = 11451

... So we'll set FullPanoHeightPixels to 11451.

Next we need to calculate CroppedAreaTopPixels. Again, we divide the width by 2 to get the "full height", then we subtract the actual height to figure out how much is "missing". Next, we'll divide this by 2 to find the amount missing "above":

((22902/2)-1061)/2 = 5195

... So we'll set CroppedAreaTopPixels to 5195. Note that this assumes the panorama is more-or-less lined up with the "true horizon". If you had captured more sky than ground, you would want to use a smaller number here, which absent more information to go on, would need to be figured out by trial-and-error.

Plugging these two numbers into the basic command above yields:

exiftool \
-xmp:ProjectionType=equirectangular \
-xmp:CroppedAreaLeftPixels=0 \
-xmp:CroppedAreaTopPixels=5195 \
-xmp:CroppedAreaImageWidthPixels"<ImageWidth" \
-xmp:CroppedAreaImageHeightPixels"<ImageHeight" \
-xmp:FullPanoWidthPixels"<ImageWidth" \
-xmp:FullPanoHeightPixels=11451 \
-xmp:UsePanoramaViewer=true \
-out test2.jpg \
in.jpg

Tested in Google Photos, looks good, no noticeable issues.

Tested in Flickr: no good, doesn't use panorama viewer.

I then took one of my own 2:1 equirectangular images, and uploaded it to Flickr, and the panorama viewer was used, but bleh, Flickr does a poor job of stitching the very bottom of the image (nadir, looking directly down) [ref], Google Photos looks much better.

Next, I cropped my 4096x2048 image using ImageMagick:

convert in2.jpg -shave 0x512 test4.jpg

... resulting in a 4096x1024 image with 512px missing from the top and bottom.

Next, I updated the EXIF data as follows:

exiftool \
-xmp:CroppedAreaTopPixels=512 \
-xmp:CroppedAreaImageHeightPixels"<ImageHeight" \
-ExifImageHeight"<ImageHeight" \
-out test5.jpg \
test4.jpg

Finally, I uploaded it to the two services I tested on:

Google Photos: looks great, just like the original but with a circle missing at the top and bottom of the sphere (a spherical segment, missing two spherical caps).

Flickr: not showing panorama viewer.

... Which leads me to assume that Flickr may not support partial equirectangular images.

\$\endgroup\$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.