Bug 337011 - Image Quality Sorter doesn't apply labels [patch]
Summary: Image Quality Sorter doesn't apply labels [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Maintenance-Quality (show other bugs)
Version: 4.1.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-03 16:43 UTC by robert
Modified: 2017-08-12 12:46 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments
qualitysorter.patch (8.37 KB, patch)
2015-01-28 19:39 UTC, Maik Qualmann
Details
qualitysorter2.patch (9.13 KB, patch)
2015-01-28 20:37 UTC, Maik Qualmann
Details
delete.patch (472 bytes, patch)
2015-02-06 18:49 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description robert 2014-07-03 16:43:06 UTC
Running image quality sorter with various settings for the different reject, pending and accepted thresholds, as well as weights doesn't do anything (or at least apply the labels.)

Reproducible: Always

Steps to Reproduce:
1. Open maintenance tool
2. Choose albums, tags, etc to scan
3. Choose image quality sorter
4. Combinations of thresholds and weights don't seem to matter
5. Click ok to run image quality sorter
6. Active process shows it running
7. When done, either use labels filter or advanced search, no labels have been applied...
Actual Results:  
No labels applied, however manual rejected, pending and accepted labels work as expected

Expected Results:  
Image quality sorter should apply labels based on settings
Comment 1 caulier.gilles 2014-07-03 19:49:03 UTC
I CC Gowtham Ashok who is original author of this feature...

Note : with  digiKam 4.1.0 we now depend of OpenCV 2.4.9

Gilles Caulier
Comment 2 Gowtham Ashok 2014-07-08 20:32:33 UTC
I am looking into this. The algorithm is not getting run at all, according to debug log.
Comment 3 caulier.gilles 2014-08-29 22:29:58 UTC
Gowtham,

Any progress about your investigations in this file ?

Gilles Caulier
Comment 4 Henrique Santos Fernandes 2015-01-05 02:08:29 UTC
Archlinux

version 4.5  it does nothing.

What can i do to help?

Thanks
Comment 5 Johannes Schwenk 2015-01-13 08:13:22 UTC
I can confirm this behavior for 4.6.0 and OpenCV 2.4.9 on Ubuntu amd64. Do you need additional information? How can I help?

Also, the scanner does not honor the album selection. Even when I am selecting only one album, the process runs for all albums in the collection. I will open another bug report for this.
Comment 6 Maik Qualmann 2015-01-28 19:39:36 UTC
Created attachment 90758 [details]
qualitysorter.patch

This patch restore the function of quality sorter in maintenance thread.
The quality sorter seems provide accurate results.
Comment 7 Maik Qualmann 2015-01-28 20:37:39 UTC
Created attachment 90760 [details]
qualitysorter2.patch

Patch 2 fixes the dysfunction when selecting the Scanmode.
Comment 8 caulier.gilles 2015-02-05 09:42:36 UTC
Git commit c4956b73fc290015fbe8c1e6d6153b01874473e3 by Gilles Caulier.
Committed on 05/02/2015 at 09:38.
Pushed by cgilles into branch 'master'.

apply patch #90760 from Maik Qualmann to restore Image Quality Sorter tool functionnalities
FIXED-IN: 4.8.0

M  +2    -1    NEWS
M  +50   -37   libs/database/imgqsort/imgqsort.cpp
M  +3    -2    libs/database/imgqsort/imgqsort.h
M  +11   -7    utilities/maintenance/imagequalitytask.cpp
M  +1    -1    utilities/maintenance/maintenancedlg.cpp

http://commits.kde.org/digikam/c4956b73fc290015fbe8c1e6d6153b01874473e3
Comment 9 caulier.gilles 2015-02-05 10:33:50 UTC
Git commit b2d67ec88b62a0d9801a6835e8900be87281e3d6 by Gilles Caulier.
Committed on 05/02/2015 at 10:31.
Pushed by cgilles into branch 'frameworks'.

backport comit #c4956b73fc290015fbe8c1e6d6153b01874473e3 from git/master to frameworks brnach

M  +50   -37   libs/database/imgqsort/imgqsort.cpp
M  +3    -2    libs/database/imgqsort/imgqsort.h
M  +11   -7    utilities/maintenance/imagequalitytask.cpp
M  +1    -1    utilities/maintenance/maintenancedlg.cpp

http://commits.kde.org/digikam/b2d67ec88b62a0d9801a6835e8900be87281e3d6
Comment 10 Maik Qualmann 2015-02-06 18:49:36 UTC
Created attachment 90951 [details]
delete.patch

Coverity Scan found a defect in the qualitysorter2.patch. This patch should fix it.

>>> Deleting array variable "maxIdx" with non-array delete in "delete maxIdx".
Comment 11 caulier.gilles 2015-02-06 21:59:10 UTC
Git commit 32397e04f48da794cba8d8e33eb0ba015b495f84 by Gilles Caulier.
Committed on 06/02/2015 at 21:57.
Pushed by cgilles into branch 'master'.

apply patch #90951

M  +2    -2    libs/database/imgqsort/imgqsort.cpp

http://commits.kde.org/digikam/32397e04f48da794cba8d8e33eb0ba015b495f84
Comment 12 caulier.gilles 2015-02-06 22:02:59 UTC
Git commit 824e2ece4f58ebabc461866968b736761d73a029 by Gilles Caulier.
Committed on 06/02/2015 at 21:59.
Pushed by cgilles into branch 'frameworks'.

backport commit #c4956b73fc290015fbe8c1e6d6153b01874473e3 from git/master to frameworks branch

M  +1    -1    libs/database/imgqsort/imgqsort.cpp

http://commits.kde.org/digikam/824e2ece4f58ebabc461866968b736761d73a029

diff --git a/libs/database/imgqsort/imgqsort.cpp b/libs/database/imgqsort/imgqsort.cpp
index d2583aa..ea2570f 100644
--- a/libs/database/imgqsort/imgqsort.cpp
+++ b/libs/database/imgqsort/imgqsort.cpp
@@ -340,7 +340,7 @@ double ImgQSort::blurdetector() const
     qCDebug(DIGIKAM_GENERAL_LOG) << "The maximum of the edge intensity is " << maxval;
     qCDebug(DIGIKAM_GENERAL_LOG) << "The result of the edge intensity is  " << blurresult;

-    delete maxIdx;
+    delete [] maxIdx;
     return blurresult;
 }