Bug 475604 - Support for "portrait size"
Summary: Support for "portrait size"
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (other bugs)
Version First Reported In: 8.2.0
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-14 12:36 UTC by Roberto
Modified: 2024-03-06 16:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Query and output (1.66 KB, text/plain)
2024-03-06 16:26 UTC, Roberto
Details

Note You need to log in before you can comment on or make changes to this bug.
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