Bug 413926

Summary: Incompatibility between software, for face regions on auto-rotated portrait position photos
Product: [Applications] digikam Reporter: Andreas <andreas.jansson>
Component: Faces-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: andreas.jansson, caulier.gilles, metzpinguin
Priority: NOR    
Version: 6.3.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 7.0.0
Sentry Crash Report:
Attachments: Portrait pos photo opened in Photo Station, after adding face tags with DigiKam.

Description Andreas 2019-11-07 21:40:40 UTC
Created attachment 123787 [details]
Portrait pos photo opened in Photo Station, after adding face tags with DigiKam.

SUMMARY
Face tag incompatibility between DigiKam and Synology Photo Station was observed, for upright (portrait) position photos, straight out of camera (auto rotated into upright position).
I have not observed this on any "landscape" position photos.

STEPS TO REPRODUCE
1. Take a photo in portrait position (perhaps you need a camera that writes meta data about camera position, for auto rotation).
2. Add two face regions to the image, using DigiKam.
3. Open the image in Synology Photo Station 6 or perhaps any other program that can show face tags.

OBSERVED RESULT
The regions are not in the same places when opened in Photo Station, as they were in digikam.

EXPECTED RESULT
Would expect them to be in the same places.

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I resized the image, and rotated it to the right, and then back to the left, added the tags anew (they disappeard with the resize I think). Now the face tags showed on the same place in Photo Station, so my guess is that the rotation or resize made something. Perhaps the auto rotation meta data was changed or removed, and the image. 
I'm not sure which program to blame, DigiKam or Photo Station. And I don't really know anything about auto rotation, or where that is done, but when I take upright photos with my camera they are presented upright on my computer, no need to rotate manually.
Comment 1 Maik Qualmann 2019-11-07 21:42:45 UTC

*** This bug has been marked as a duplicate of bug 372340 ***
Comment 2 caulier.gilles 2019-12-23 15:10:02 UTC
7.0.0-beta1 is out with new Face Recognition algorithm based on Deep
Learning/Neural Network API from OpenCV

https://download.kde.org/unstable/digikam/

Please test and give us a feedback

Thanks in advance
Gilles Caulier
Comment 3 caulier.gilles 2020-01-19 08:51:48 UTC
Git commit 32bb16fee6b2676b30bf843bf3e083a23084cd3d by Maik Qualmann.
Committed on 19/01/2020 at 08:37.
Pushed by mqualmann into branch 'master'.

read and write not aligned face metadata from image
FIXED-IN: 7.0.0

M  +2    -1    NEWS
M  +7    -4    core/libs/database/item/scanner/itemscanner_photo.cpp
M  +3    -29   core/libs/fileactionmanager/metadatahub.cpp
M  +0    -6    core/libs/fileactionmanager/metadatahub.h
M  +6    -5    core/utilities/imageeditor/main/imagewindow.cpp

https://invent.kde.org/kde/digikam/commit/32bb16fee6b2676b30bf843bf3e083a23084cd3d