[Digikam-devel] Review Request 109087: Patch that enable digikam to write face tags into xmp metadata [Experimental]

Marcel Wiesweg marcel.wiesweg at gmx.de
Thu Feb 28 21:31:03 GMT 2013



> On Feb. 25, 2013, 4:34 p.m., Veaceslav Munteanu wrote:
> > Ok ... so here is the summary of http://www.metadataworkinggroup.com/pdf/mwg_guidance.pdf :
> > 
> > Image regions can suffer from 3 issues:
> >  - Re-size
> >  - Rotation
> >  - Crop
> > 
> > Image metadata doesn't suffer from re-size because it store values between 0 and 1. Digikam database suffer indeed because it store data in integer format. Resize should update database
> > Rotation should update database and image metadata.
> > Crop should update database and image metadata.
> > 
> > Now I need some info about where is the relevant code that re-size,rotate and crop images so I could patch it to meet metadata working group specifications.
> >
> 
> Veaceslav Munteanu wrote:
>     I'm stuck with database update...
>     
>     Marcel,
>     
>     so far I used FaceTagEditor class to get facetags list for metadatahub. When I try to delete all existing face tags(want to replace them with rotated ones), FaceTagsEditor::removeAllFaces() doesn't seem to work...
>     
>     So, i get a lot of garbage tags into DB and also a lot of garbage rectangles on rotated image... Probably there is a cache, or something else that I don't get it.
>     
>     Can you give me some hints? thank you!
> 
> Marcel Wiesweg wrote:
>     removeAllTags seems to have been unused until today, so you need to debug. Suggestion for debug statements:
>     
>     void FaceTagsEditor::removeAllFaces(qlonglong imageid)
>     {
>         QList<int>  tagsToRemove;
>         QStringList attributes = DatabaseFace::attributesForFlags(DatabaseFace::AllTypes);
>     
>         kDebug() << "remove all faces from" << imageid;
>         kDebug() << "removing the following properties:" << attributes;
>         foreach(ImageTagPair pair, faceImageTagPairs(imageid, DatabaseFace::AllTypes))
>         {
>             kDebug() << "Having pair" << pair.imageId() << pair.tagId() << pair.properties();
>             foreach(const QString& attribute, attributes)
>             {
>                 pair.removeProperties(attribute);
>             }
>

I was thinking why the seemingly obvious problem of rotation hasn't been solved yet. Answer: It seemed at the time and still seems of little practical impact for faces, which have a clearly defined orientation. There's not much use of marking an upside down face (with rare exceptions, if you are Georg Baselitz for example).
It's slightly more important for generic regions which are the focus of MWG. And of course, cropping and resizing is common and breaks digikam regions.


- Marcel


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109087/#review28044
-----------------------------------------------------------


On Feb. 21, 2013, 9:21 p.m., Veaceslav Munteanu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109087/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2013, 9:21 p.m.)
> 
> 
> Review request for Digikam, Gilles Caulier and Marcel Wiesweg.
> 
> 
> Description
> -------
> 
> This patch allows digikam to write face tags using Picassa/MetadataWorkingGroup format into image's xmp. This patch is still experimental, do not test with you usual photo collection. 
> Even if It shouldn't do anything bad, I don't want to mess your collection.
> 
> This patch depends on libkexiv2 new methods that I added. It's based on this commit:
> 
> http://quickgit.kde.org/?p=libkexiv2.git&a=commit&h=f2c50255227852bcb83115f13bfc4d4394a780ed
> 
> 
> This addresses bug https://bugs.kde.org/show_bug.cgi?id=277429.
>     http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=277429
> 
> 
> Diffs
> -----
> 
>   digikam/fileaction/metadatahub.cpp ea74590 
>   libs/database/core/tagregion.h 436960f 
>   libs/database/core/tagregion.cpp 4fda6af 
>   libs/dmetadata/dmetadata.h fb9a617 
>   libs/dmetadata/dmetadata.cpp 8eccb45 
>   libs/dmetadata/metadatasettingscontainer.h 02d35d2 
>   libs/dmetadata/metadatasettingscontainer.cpp 3e6cd93 
>   utilities/setup/setupmetadata.cpp f73870c 
> 
> Diff: http://git.reviewboard.kde.org/r/109087/diff/
> 
> 
> Testing
> -------
> 
> I tested so far with my limited collection and setting and deleting tags works well. Tested with exiv2 -pa to see if tags are set or removed.
> 
> 
> Thanks,
> 
> Veaceslav Munteanu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20130228/6dc9113c/attachment.html>


More information about the Digikam-devel mailing list