[digikam] [Bug 372217] New: The results of the Duplicates are currently sorted by the image id and sortable by name and count if similars. But it should be sortable by the similarity of the duplicates, too. [patch]
bugzilla_noreply at kde.org
Tue Nov 8 14:23:46 GMT 2016
Bug ID: 372217
Summary: The results of the Duplicates are currently sorted by
the image id and sortable by name and count if
similars. But it should be sortable by the similarity
of the duplicates, too. [patch]
Platform: Compiled Sources
Assignee: digikam-devel at kde.org
Reporter: mario.frank at uni-potsdam.de
Target Milestone: ---
Created attachment 102120
The first patch.
When searching for duplicates, the result set is a table with the thumbnail and
the count of similar pictures (including the original one). It is possible to
sort the rows by either the reference picture (either name or id, I'm not sure
here) or the count of entries in this virtual album. Sadly, it is not possible
to sort the result by similarity. This patch introduces this functionality. For
each reference image, the average similarity (in percent) is calculated for the
potential duplicates, excluding the reference image. This way, it is possible
to sort the virtual albums by the average similarities of the duplicates in
both ascending and descending order. There is still one glitch in the sorting.
Since the sorting of the items is done by lexicographic order, the ordering of
was not correct if the length of the average similarity string differs. This
problem was fixed with another patch that introduces arithmetic ordering for
this column explicitly. The second patch will be submitted as comment.
The complete commit messages:
[PATCH] Extended the duplicates search list view. Now, the average
similarity of the found duplicates (excluding the original image) is shown as
table column. Sorting the result set by the average similarity is thus
possible. To implement this feature, the haariface had to be modified. It
returns a map of average similarities to a map of image ids to the set of
similar images instead of the map of image ids to the set of similar images.
Communicating the average similarity to the search list view was not possible
via slots and signals and this would have lead to sending a map of image ids
to average similarities and then distributing the appropriate average
similarity to the correct FindDuplicateAlbumItem. Instead, the average
similarity is communicated via the SearchXml-query as a field of the group.
This way, the correct item gets the correct similarity automatically. The
evaluation of the new field by an SQL query is surpressed by the introduction
of noEffect fields which need to have a prefix "noeffect_". So, the log is
not polluted by unnecessary debug information.
[PATCH] The items in the FindDuplicatesAlbum were sorted by
lexicographic order which does not make sense for the average similarity
column (e.g. 100.00 is not correctly sorted). Thus, the less than operator
was adopted such that for the average similarity column, arithmetic order is
used. To make the code more stable against regressions due to reordering the
columns, an enum was introduced.
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel