使用googles panorama API

时间:2014-04-04 08:11:38

标签: android panoramas

我想使用谷歌的API来显示全景图。显然我需要输入带有全景图的jpg,其中我以XMP格式嵌入元数据。如何才能做到这一点?是我作为开发人员的工作还是创建全景图的人?这可以用工具完成吗?即photoshop?

1 个答案:

答案 0 :(得分:2)

好的,我就是这样做的,我使用的photoshop可以选择从自定义模板传递元数据,所以我使用google文档页面中提到的元数据创建了一个XMP文件。希望它可以帮助任何找到这篇文章的人!

<?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>