Automatic Assignment of Tag Icons
Kartik Ramesh
kartikx2000 at gmail.com
Sat Jun 6 05:20:53 BST 2020
Hello all,
I've implemented automatic addition and removal of icons to face tags.
Changes have been made to utilities/facemanagement and app/views/stack.
This automatic addition/removal will happen only on confirmed tags and not
on unknown/unconfirmed/ignored.
Desired Functionality:
1. Whenever the user confirms the face to a tag (either pre-existing or
just going to be created), if the tag does not have a tag icon, then the
face just confirmed will be added as the tag icon. This icon remains the
tag icon for all further confirmations to this tag, i.e. the tag icon does
not change again and again.
2. When the user deletes a face from a tag (either using Rejection Overlay
(i.e. the Red Cross Button) or using Remove Tag Context Menu), if after
deletion the tag has no faces associated to it, the tag icon will get reset.
The implementation is such that the changes are TAlbum specific and not
TagModel, hence even if we have a very large number of TAlbums(tags)
performance should not go down. Furthermore, changes only happen once so
repeated assignments aren't carried out.
Note on implementation : Changes to TAlbum icons require AlbumManager
methods, which can only be used in files that are compiled in gui_digikam.
Hence, I've made changes in upper level files (which are compiled with
gui_digikam) and not the lower level database methods (where the actual
confirm/reject happens). I have used QTimer at places, to ensure the
confirm/reject operations (in the lower level) are carried out, before
setting/removing icons.
One Issue that I notice is that since we're assigning faces as the Icon,
the size of the Icon depends on the size of the Face (which was cropped by
Face Detector). Hence, icon sizes are unequal. I will try to fix this.
Regards
Kartik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20200606/2aa0eeec/attachment.htm>
More information about the Digikam-devel
mailing list