Using googles panorama API

半腔热情 提交于 2019-12-10 22:32:10

问题


I want to use google's API for displaying panoramas. Apparently I need for input a jpg with the panorama, in which I embed the metadata in XMP format. How can this be done? is it my job as a developer or the one's who creates the panorama? can this be done with a tool? ie photoshop?


回答1:


Ok this is how I did it, I used photoshop which has an option to pass metadata from a custom template so I created an XMP file using the metadata mentioned in google documentation page. Hope it helps anyone who finds this post!

<?xpacket begin='' id=''?><x:xmpmeta xmlns:x='adobe:ns:meta/'>
<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:UsePanoramaViewer>True</GPano:UsePanoramaViewer>
        <GPano:CaptureSoftware>Photo Sphere</GPano:CaptureSoftware>
        <GPano:StitchingSoftware>Photo Sphere</GPano:StitchingSoftware>
        <GPano:ProjectionType>equirectangular</GPano:ProjectionType>
        <GPano:PoseHeadingDegrees>350.0</GPano:PoseHeadingDegrees>
        <GPano:InitialViewHeadingDegrees>90.0</GPano:InitialViewHeadingDegrees>
        <GPano:InitialViewPitchDegrees>0.0</GPano:InitialViewPitchDegrees>
        <GPano:InitialViewRollDegrees>0.0</GPano:InitialViewRollDegrees>
        <GPano:InitialHorizontalFOVDegrees>75.0</GPano:InitialHorizontalFOVDegrees>
        <GPano:CroppedAreaLeftPixels>0</GPano:CroppedAreaLeftPixels>
        <GPano:CroppedAreaTopPixels>0</GPano:CroppedAreaTopPixels>
        <GPano:CroppedAreaImageWidthPixels>4000</GPano:CroppedAreaImageWidthPixels>
        <GPano:CroppedAreaImageHeightPixels>2000</GPano:CroppedAreaImageHeightPixels>
        <GPano:FullPanoWidthPixels>4000</GPano:FullPanoWidthPixels>
        <GPano:FullPanoHeightPixels>2000</GPano:FullPanoHeightPixels>
        <GPano:FirstPhotoDate>2012-11-07T21:03:13.465Z</GPano:FirstPhotoDate>
        <GPano:LastPhotoDate>2012-11-07T21:04:10.897Z</GPano:LastPhotoDate>
        <GPano:SourcePhotosCount>50</GPano:SourcePhotosCount>
        <GPano:ExposureLockUsed>False</GPano:ExposureLockUsed>
    </rdf:Description>

</rdf:RDF>



来源:https://stackoverflow.com/questions/22857122/using-googles-panorama-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!