Bug 374004 - Different Images recognised as identical images
Summary: Different Images recognised as identical images
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (show other bugs)
Version: 5.3.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-21 20:35 UTC by Blomi
Modified: 2017-08-13 15:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.5.0


Attachments
Zip with the 3 images of the camera. (2.47 MB, application/zip)
2016-12-21 20:35 UTC, Blomi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Blomi 2016-12-21 20:35:02 UTC
Created attachment 102923 [details]
Zip with the 3 images of the camera.

Different images are treated as identical images by digikam.

I've copied 3 images from my smartphone camera with a file browser into an album.
I start digikam and browser to this album and wait until these pictures are detected.
In the side-pane in Versions/Versions with the display option "Show available versions and the applied filters in a combined list." for each picture only the current image is shown below "Image History". Everything fine so far.
Now I select each picture (individual or together doesn't matter) a give these one star.
When I now select one picture the other two images are shown in the section "Identical Images" in the right side-pane. But the content of the pictures is different.
I wouldn't expect that different images are shown as identical.

Besides that the pictures are shown as identical (I wouldn't bother too much), within my album some as wrongly identical detected images are NOT shown in the album view anymore (although they can be seen in the file browser). Unfortunately I can't reproduce how this happened but this is very annoying.

The pictures are taken by a Samsung Galaxy S4.
The Exif-Information contains for each picture the same Exif.Photo.ImageUniqueID of S13F0LAHA01.
In the database all 3 pictures have the same uuid S13F0LAHA01 in the table ImageHistory.

Is the same ImageUniqueID given by the camera the root cause?
Do I have to manipulate the ImageUniqueID by my self before using digikam or can digikam take care of this maybe not ideal behaviour of the smartphone?
Comment 1 caulier.gilles 2016-12-21 22:47:41 UTC
yes, exactly. Exif.Photo.ImageUniqueID is used to register image to database. 

Code relevant :

metadata parser : https://cgit.kde.org/digikam.git/tree/libs/dmetadata/dmetadata.cpp#n981

used to register image in DB while scanning :
https://cgit.kde.org/digikam.git/tree/libs/database/item/imagescanner.cpp#n984

Gilles Caulier
Comment 2 Blomi 2016-12-26 08:46:25 UTC
So somehow like the detection of the click counter in
https://cgit.kde.org/digikam.git/tree/libs/dmetadata/dmetadata.cpp#n989
via exifUid.startsWith(QLatin1String("00000000000000000000"))
a detection of not unique IDs is necessary.

But this will be difficult: How to determinate if the IDs are the same because of a stupid camera implementation or the IDs are intentionally the same because it's an modified version of the same picture.
Comment 3 Maik Qualmann 2017-01-29 12:17:49 UTC
Git commit c142f6b5c2a491db75253f75c331bdc2c4d48c0f by Maik Qualmann.
Committed on 26/01/2017 at 11:37.
Pushed by mqualmann into branch 'master'.

blacklist Samsung cameras for Exif.Photo.ImageUniqueID

M  +2    -1    libs/dmetadata/dmetadata.cpp

https://commits.kde.org/digikam/c142f6b5c2a491db75253f75c331bdc2c4d48c0f
Comment 4 Maik Qualmann 2017-01-29 12:20:57 UTC
Note: this only fixed for new added images. See Bug 375483

Maik