Bug 475604

Summary: Support for "portrait size"
Product: [Applications] digikam Reporter: Roberto <betokella>
Component: Faces-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: caulier.gilles
Priority: NOR    
Version First Reported In: 8.2.0   
Target Milestone: ---   
Platform: unspecified   
OS: Unspecified   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Query and output

Description Roberto 2023-10-14 12:36:27 UTC
SUMMARY
Those who frequently have to provide portrait pictures would greatly benefit from being able to select based on "portrait size". Portrait size here is defined as the percentage of the detected face box(es) area(s) in pixels over the total picture area in pixels, both information available in the digikam databases today. One should be able to select pictures based on A) either the largest detected face box or the average of all detected face boxes and B) filter files based on the minimum and the maximum "portrait sizes".

STEPS TO REPRODUCE
1. N/A
2. 
3. 

OBSERVED RESULT
N/A

EXPECTED RESULT
N/A

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

ADDITIONAL INFORMATION
Some tools implement the concept of big/medium/large portrais with the classification method being hiden from the user with way less flexibility than this proposal.
Comment 1 Roberto 2024-03-03 11:13:13 UTC
REFINING THE PROPOSED METHOD
The portrait size should be calculated as the total sum of the face rectangles areas (height x width) divided by the total area of the image (height x width) multiplied by 100 and rounded to integer. This will not affect single portraits and will acomodate the concept of portrait size to support group portraits where multiple small faces will use up a big area.

There could be an additional item in the "Face regions" section in "Advanced search" reading something like "Faces sizes: Return items with faces regions total area ratio ___ to ___ (min-max %).
Comment 2 Roberto 2024-03-06 16:26:00 UTC
Created attachment 166485 [details]
Query and output
Comment 3 Roberto 2024-03-06 16:28:21 UTC
The "Query and output" attachment contains a sample query and results showing the proposed method (could not manage XML in SQLite so used regexp).

/Roberto