[digikam] [Bug 302923] Sort Icon-view items found by Fuzzy Searches [patch]
Mario Frank
bugzilla_noreply at kde.org
Fri Dec 23 21:06:37 GMT 2016
https://bugs.kde.org/show_bug.cgi?id=302923
Mario Frank <mario.frank at uni-potsdam.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Latest Commit| |https://commits.kde.org/dig
| |ikam/e12dd0980f4371f1a7511a
| |817fc7e17d7dccd2e6
Resolution|--- |FIXED
Version Fixed In| |5.4.0
Status|UNCONFIRMED |RESOLVED
--- Comment #11 from Mario Frank <mario.frank at uni-potsdam.de> ---
Git commit e12dd0980f4371f1a7511a817fc7e17d7dccd2e6 by Mario Frank.
Committed on 23/12/2016 at 20:45.
Pushed by mfrank into branch 'master'.
This patch aims to improve the usability of fuzzy/duplicates/sketch search.
A sorting option (by similarity) is introduced which can be helpful in
fuzzy/sketch search where similar images are searched for a given one. Sorting
the resulting images by similarity to the given image is an obviously helpful
feature.
It is now possible to drop local files that are images and not present in the
Digikam database into the fuzzy search image label and trigger a fuzzy search
for this image.
Details:
Sort by similarity:
For sorting by similarity, a new option Sort by similarity with default order
descending was introduced. This option is only active if the fuzzy search
sidebar is active, i.e. fuzzy/duplicates/sketch search.
To compare two pictures, it is necessary to get their similarity to the
original picture. Since this information was only printed to console but not
saved in the image info, SAlbum query or the properties,
I do that myself. For every similar picture, a property similarityTo_X with X
being the id of the original image and the similarity are stored as image
property. When the image with id X is deleted, the property
is removed to keep the DB small. Also, the property is removed from images if
the fuzzy/duplicates search is done for image X such that old similarity values
are removed. Though the similarity of image X to image Y
is symmetric, I do not want to store both. This would bloat the DB. Only the
detected similarities are explicitly stored.
Drag and drop images not yet present in DB for fuzzy searches:
I allow dragging objects over the image label iff the mime type of the event
data is a URL list. In this case, it is no DIMG. If the first URL (there is
only one in the list) is a local file and can be loaded as QImage, dropping is
allowed. The function
loadImage in HaarIface is used since it was already present and has
optimisations for specific image formats. In order to not import the image but
to be able to find similar pictures, and sort by the similarity, a temporary
image id is needed.
I use -1 for this case since this image id cannot be present in DB. Also,
everytime a new external image is dropped for fuzzy search, the similarities
for the previous dropped image are removed from database to keep the entries up
to date.
Moreover, I save the image url of the dropped image in the fuzzy search view.
This way, refreshing the similar images due to modification of thresholds does
work, too.
Made small tests with valgrind - did not find memory leaks, yet.
Made functionality tests for fuzzy drop. Trying to drag local files that are no
images (e.g. pdf, odt, plain text) is not successful as wished.
Made functionality tests for similarity search. Did not find defects.
More tests will be applied in the next days.
Related: bug 320666
FIXED-IN: 5.4.0
M +3 -1 NEWS
M +7 -0 app/main/digikamapp.cpp
M +46 -0 app/utils/searchmodificationhelper.cpp
M +29 -0 app/utils/searchmodificationhelper.h
M +27 -0 app/views/digikamview.cpp
M +4 -0 app/views/digikamview.h
M +9 -0 app/views/leftsidebarwidgets.cpp
M +8 -0 app/views/leftsidebarwidgets.h
M +6 -0 libs/album/albummanager.cpp
M +6 -0 libs/database/coredb/coredb.cpp
M +1 -0 libs/database/coredb/coredb.h
M +28 -1 libs/database/haar/haariface.cpp
M +14 -2 libs/database/haar/haariface.h
M +25 -0 libs/database/item/imageextendedproperties.cpp
M +7 -0 libs/database/item/imageextendedproperties.h
M +5 -0 libs/database/item/imageinfo.cpp
M +2 -0 libs/database/item/imageinfo.h
M +13 -0 libs/database/item/imagelister.cpp
M +6 -0 libs/models/imagefiltermodel.cpp
M +1 -0 libs/models/imagefiltermodel.h
M +26 -1 libs/models/imagesortsettings.cpp
M +4 -1 libs/models/imagesortsettings.h
M +2 -0 libs/settings/applicationsettings.cpp
M +3 -0 libs/settings/applicationsettings.h
M +9 -0 libs/settings/applicationsettings_miscs.cpp
M +4 -0 libs/settings/applicationsettings_p.cpp
M +2 -0 libs/settings/applicationsettings_p.h
M +11 -0 utilities/fuzzysearch/findduplicatesview.cpp
M +73 -0 utilities/fuzzysearch/fuzzysearchview.cpp
M +3 -0 utilities/fuzzysearch/fuzzysearchview.h
https://commits.kde.org/digikam/e12dd0980f4371f1a7511a817fc7e17d7dccd2e6
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list