https://bugs.kde.org/show_bug.cgi?id=429021

            Bug ID: 429021
           Summary: Wrong image rotation when extracting face thumbs
           Product: digikam
           Version: 7.1.0
          Platform: Microsoft Windows
                OS: Microsoft Windows
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: Faces-Recognition
          Assignee: digikam-bugs-n...@kde.org
          Reporter: betoke...@gmail.com
  Target Milestone: ---

SUMMARY
I wanted to extract the faces thumbnails with the SQL code below, parsed and
piped to magic for crop and resize based on image tag properties. With the
thumbs in external JPG files, I noticed about 10% of them were wrong, not
showing the face, but another part of the image. Both images with faces
detected automatically and manually suffered with the issue, even thou auto
recognized images were about 90% of the total images with the issue. The total
images I looked into is about 3300. 

STEPS TO REPRODUCE
1. Rotate the affected images left/right
2. The image thumb shows erratic behavior, rotating in random direction (same
as image, opposite, or completely upside down)
3. The thumb blinks and then rotates correctly
4. The image always rotates correctly. The boxes around faces are always
correct

OBSERVED RESULT
Wrong face thumbs extracted from some images. Some image data sown below.

EXPECTED RESULT

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

ADDITIONAL INFORMATION
SQL code used to extract the face thumbs:
ATTACH 'E:\digiKam\digikam4.db' as ddk;
ATTACH 'E:\digiKam\thumbnails-digikam.db' as dtn;
SELECT tar.specificPath||ta.relativePath,ti.name,titp.imageid,titp.value 
FROM ddk.Albums AS ta, ddk.AlbumRoots AS tar, ddk.ImageTagProperties AS titp,
ddk.Images AS ti 
WHERE ta.id=ti.album and tar.id=ta.albumRoot and ti.id=titp.imageid and
titp.property='tagRegion' and titp.tagid IN (
        SELECT id FROM ddk.Tags WHERE name='XXX'
) ORDER BY ti.name
;
DETACH DATABASE ddk;
DETACH DATABASE dtn;

Sample image data, before and after the fix:
digiKam.db
        Tags with person name -> id=89
        Images name="2007-11-02 13h26 663" -> id=26236
        ImageTagProperties imageid=26236 and tagid=89 -> property=<rect
x="1181" y="1038" width="192" height="251"/>

After fix (rotate back and forth 90 degrees)
        property=<rect x="1181" y="1038" width="192" height="251"/>

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to