immich icon indicating copy to clipboard operation
immich copied to clipboard

Further panorama improvements

Open dmitry-brazhenko opened this issue 1 year ago • 9 comments

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

dmitry-brazhenko avatar Feb 20 '24 13:02 dmitry-brazhenko

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 avatar Feb 20 '24 13:02 dmitry-brazhenko

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 avatar Feb 20 '24 13:02 dmitry-brazhenko

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 avatar Feb 21 '24 09:02 waclaw66

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 avatar May 09 '24 10:05 m3e-g

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 avatar Jun 13 '24 11:06 mistic100

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

mistic100 avatar Jun 14 '24 11:06 mistic100

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 avatar Jun 14 '24 11:06 waclaw66

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 avatar Jun 14 '24 14:06 mistic100

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

mistic100 avatar Jun 18 '24 11:06 mistic100

This has been fixed. Thanks @mistic100!

jrasm91 avatar Sep 11 '24 21:09 jrasm91