immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
39.1k stars 1.85k forks source link

Further panorama improvements #7243

Open dmitry-brazhenko opened 4 months ago

dmitry-brazhenko commented 4 months ago

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

obrazek

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

dmitry-brazhenko commented 4 months ago

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 4 months ago

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

waclaw66 commented 4 months ago

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.

m3e-g commented 2 months ago

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

mistic100 commented 3 weeks ago

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 3 weeks ago

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

waclaw66 commented 3 weeks ago

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.

mistic100 commented 3 weeks ago

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 3 weeks ago

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