Further panorama improvements #2188

Closed
opened 2026-02-05 05:33:00 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @dmitry-brazhenko on GitHub (Feb 20, 2024).

Previous PR: https://github.com/immich-app/immich/pull/6992

  • panorama photos got attributes InitialViewHeadingDegrees and InitialViewPitchDegrees, ignoring them causes that image is rotated to the wrong side initially, they should be kept and set to poseHeading and posePitch panorama viewer properties
  • there is a white vertical line between info panel and panorama, it's because viewport of panorama has partial dimensions, but the viewer uses integer (truncated) ones

obrazek

Originally posted by @waclaw66 in https://github.com/immich-app/immich/issues/6992#issuecomment-1952280894

Originally created by @dmitry-brazhenko on GitHub (Feb 20, 2024). Previous PR: https://github.com/immich-app/immich/pull/6992 - panorama photos got attributes `InitialViewHeadingDegrees` and `InitialViewPitchDegrees`, ignoring them causes that image is rotated to the wrong side initially, they should be kept and set to `poseHeading` and `posePitch` panorama viewer properties - there is a white vertical line between info panel and panorama, it's because viewport of panorama has partial dimensions, but the viewer uses integer (truncated) ones ![obrazek](https://github.com/immich-app/immich/assets/15554561/80160439-260d-4706-bfea-f8c3414be768) _Originally posted by @waclaw66 in https://github.com/immich-app/immich/issues/6992#issuecomment-1952280894_
Author
Owner

@dmitry-brazhenko commented on GitHub (Feb 20, 2024):

This was suggested by @waclaw66 in this pull request : https://github.com/immich-app/immich/pull/6992

I converter this to issue just not to loose it

@dmitry-brazhenko commented on GitHub (Feb 20, 2024): This was suggested by @waclaw66 in this pull request : https://github.com/immich-app/immich/pull/6992 I converter this to issue just not to loose it
Author
Owner

@dmitry-brazhenko commented on GitHub (Feb 20, 2024):

What I am confused about: shall we extract these attributes on the fly from image? Or we should do that during image preprocessing

@dmitry-brazhenko commented on GitHub (Feb 20, 2024): What I am confused about: shall we extract these attributes on the fly from image? Or we should do that during image preprocessing
Author
Owner

@waclaw66 commented on GitHub (Feb 21, 2024):

What I am confused about: shall we extract these attributes on the fly from image? Or we should do that during image preprocessing

I would do it in the same way as projectionType, during exif processing, exiftool returns those initial view degrees as well.

@waclaw66 commented on GitHub (Feb 21, 2024): > What I am confused about: shall we extract these attributes on the fly from image? Or we should do that during image preprocessing I would do it in the same way as `projectionType`, during exif processing, exiftool returns those initial view degrees as well.
Author
Owner

@m3e-g commented on GitHub (May 9, 2024):

Hi,
Thanks for working on the pano support in the immich. I have a bunch of panoramic images from the DJI drones, and while they are displayed correctly in gphotos, there are flat in immich.

After looking at the EXIF and IPTC I've noticed some fields which may used for detection:

EXIF:
XPKeywords: pano

IPTC (XMP):
xmlns:GPano - http://ns.google.com/photos/1.0/panorama/
GPano:ProjectionType - equirectangular
GPano:UsePanoramaViewer - True
GPano:CroppedAreaImageHeightPixels - 4096
GPano:CroppedAreaImageWidthPixels - 8192
GPano:CroppedAreaLeftPixels - 0
GPano:CroppedAreaTopPixels - 0
GPano:FullPanoHeightPixels - 4096
GPano:FullPanoWidthPixels - 8192

Could you add support for these fields?

I've attached example picture
dji_fly_20220826_184930_110_1661583283908_pano

@m3e-g commented on GitHub (May 9, 2024): Hi, Thanks for working on the pano support in the immich. I have a bunch of panoramic images from the DJI drones, and while they are displayed correctly in gphotos, there are flat in immich. After looking at the EXIF and IPTC I've noticed some fields which may used for detection: ``` EXIF: XPKeywords: pano IPTC (XMP): xmlns:GPano - http://ns.google.com/photos/1.0/panorama/ GPano:ProjectionType - equirectangular GPano:UsePanoramaViewer - True GPano:CroppedAreaImageHeightPixels - 4096 GPano:CroppedAreaImageWidthPixels - 8192 GPano:CroppedAreaLeftPixels - 0 GPano:CroppedAreaTopPixels - 0 GPano:FullPanoHeightPixels - 4096 GPano:FullPanoWidthPixels - 8192 ``` Could you add support for these fields? I've attached example picture ![dji_fly_20220826_184930_110_1661583283908_pano](https://github.com/immich-app/immich/assets/19466624/7016383a-1f9b-4f96-812f-50a66d60b3c2)
Author
Owner

@mistic100 commented on GitHub (Jun 13, 2024):

Hello
I am the developer of photo sphere viewer.

I think there is room for improvement in the lib itself, some XMP data are already read for cropped panoramas, but it makes sense to also read positional data.

@mistic100 commented on GitHub (Jun 13, 2024): Hello I am the developer of photo sphere viewer. I think there is room for improvement in the lib itself, some XMP data are already read for cropped panoramas, but it makes sense to also read positional data.
Author
Owner

@mistic100 commented on GitHub (Jun 14, 2024):

I have a branch where try to read and apply more XMP data ff3e68a902

The only problem is I don't know what is the direction of InitialViewHeadingDegrees and InitialViewPitchDegrees, if someone have an example file with such data and the expected orientation, I could finish the feature.

It also reads and apply InitialHorizontalFOVDegrees for #9801

@mistic100 commented on GitHub (Jun 14, 2024): I have a branch where try to read and apply more XMP data https://github.com/mistic100/Photo-Sphere-Viewer/commit/ff3e68a902c5880d612761a2d75a60f354856791 The only problem is I don't know what is the direction of InitialViewHeadingDegrees and InitialViewPitchDegrees, if someone have an example file with such data and the expected orientation, I could finish the feature. It also reads and apply InitialHorizontalFOVDegrees for #9801
Author
Owner

@waclaw66 commented on GitHub (Jun 14, 2024):

The only problem is I don't know what is the direction of InitialViewHeadingDegrees and InitialViewPitchDegrees, if someone have an example file with such data and the expected orientation, I could finish the feature.

It also reads and apply InitialHorizontalFOVDegrees for #9801

Example panorama is here... https://github.com/immich-app/immich/issues/3465
Unfortunatelly that panorama photo it's rendered incorectly as sphere in the current version of Immich, it was ok in some versions erlier.

@waclaw66 commented on GitHub (Jun 14, 2024): > The only problem is I don't know what is the direction of InitialViewHeadingDegrees and InitialViewPitchDegrees, if someone have an example file with such data and the expected orientation, I could finish the feature. > > It also reads and apply InitialHorizontalFOVDegrees for #9801 Example panorama is here... https://github.com/immich-app/immich/issues/3465 Unfortunatelly that panorama photo it's rendered incorectly as sphere in the current version of Immich, it was ok in some versions erlier.
Author
Owner

@mistic100 commented on GitHub (Jun 14, 2024):

Thanks, with your example file and my correction, the initial yaw/heading is correct

127 0 0 1_8080_adapter-equirectangular html

(This is Photo Sphere Viewer test page, not immich)

@mistic100 commented on GitHub (Jun 14, 2024): Thanks, with your example file and my correction, the initial yaw/heading is correct ![127 0 0 1_8080_adapter-equirectangular html](https://github.com/immich-app/immich/assets/41597/788d0cdc-1146-4d19-89fb-066b6e83fac7) (This is Photo Sphere Viewer test page, not immich)
Author
Owner

@mistic100 commented on GitHub (Jun 18, 2024):

FYI this evolution of the library has been released in version 5.8.0

@mistic100 commented on GitHub (Jun 18, 2024): FYI this evolution of the library has been released in version 5.8.0
Author
Owner

@jrasm91 commented on GitHub (Sep 12, 2024):

This has been fixed. Thanks @mistic100!

@jrasm91 commented on GitHub (Sep 12, 2024): This has been fixed. Thanks @mistic100!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2188