-
Notifications
You must be signed in to change notification settings - Fork 18
Description
A stitched panorama I created was not recognised by google photos as a panorama/photo sphere. It seems that the following metadata is required for it to recognise a panorama: https://developers.google.com/streetview/spherical-metadata
Would it be possible for xpano to include this metadata where applicable? The library used to write Exif data (Exiv2) also supports writing XMP https://exiv2.org/doc/xmpsample_8cpp-example.html
Also, are there any alternative viewers that are good for viewing the output of xpano?
It seems that the latest Pixel phones may have removed the ability to create photo spheres as mentioned in this discussion but currently (one year later) the viewer can still display them. Example (from the linked discussion) https://photos.app.goo.gl/fyaBzA2cPyN34H1j7 (click to activate the viewer). The javascript viewer/library https://photo-sphere-viewer.js.org/playground.html also reads this metadata so it is still useful even if abandoned by Google.
The metadata can be read with magick <image.jpg> XMP:-
The example above has the following metadata:
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.5.0">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description
rdf:about=""
xmlns:GPano="http://ns.google.com/photos/1.0/panorama/"
xmlns:GCamera="http://ns.google.com/photos/1.0/camera/"
GPano:UsePanoramaViewer="True"
GPano:IsPhotosphere="True"
GPano:ProjectionType="equirectangular"
GPano:CroppedAreaImageHeightPixels="4000"
GPano:CroppedAreaImageWidthPixels="8000"
GPano:FullPanoHeightPixels="4000"
GPano:FullPanoWidthPixels="8000"
GPano:CroppedAreaTopPixels="0"
GPano:CroppedAreaLeftPixels="0"
GPano:FirstPhotoDate="2022-05-17T10:29:50+00:00"
GPano:LastPhotoDate="2022-05-17T10:32:42+00:00"
GPano:SourcePhotosCount="38"
GPano:PoseHeadingDegrees="276"
GPano:LargestValidInteriorRectLeft="0"
GPano:LargestValidInteriorRectTop="0"
GPano:LargestValidInteriorRectWidth="8704"
GPano:LargestValidInteriorRectHeight="4352"
>
<GCamera:SpecialTypeID>
<rdf:Bag>
<rdf:li>com.google.android.apps.camera.gallery.specialtype.SpecialType-PHOTOSPHERE</rdf:li>
</rdf:Bag>
</GCamera:SpecialTypeID>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>A cylindrical panorama created with the Samsung camera app has the following metadata (note that google photos incorrectly displays as a sphere still, the docs do indicate that only equirectangular is supported):
<?xpacket begin="" id="xxxxxxxxxxxxxxxxxxxxxxxx"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description
rdf:about=""
xmlns:GPano="http://ns.google.com/photos/1.0/panorama/"
GPano:ProjectionType="cylindrical"
GPano:CroppedAreaImageWidthPixels="10880"
GPano:CroppedAreaImageHeightPixels="3264"
GPano:FullPanoWidthPixels="23800"
GPano:CroppedAreaLeftPixels="6460"
GPano:CroppedAreaTopPixels="0"
/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>