_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Thanks a lot for your work. I am reviewing the metadata part for now, including your kexiv2 commit. 1) setXmpTagString(const char* xmpTagName, const QString& value, int type, bool setProgramName) - Is there a difference between calling the new method with 0, to calling the normal setXmpTagString? - Is there a difference between calling the new method with 1, to calling setXmpTagStringBag? - Looking at http://www.exiv2.org/doc/xmpsample_8cpp-example.html and the way a structure is added there (videoFrameSize, CreatorContactInfo), is it necessary at all to add the parent key of the structure by setting the type setXmpStruct? It seems one can directly add the members of the structure. 2) IIRC correctly, MWG stores the regions referring to the unrotated picture. Is this correct? In digikam, we store the regions referring to the readily rotated picture. - This problem can be solved when writing for non-RAW formats by reading the rotation metadata field, need to add the required 2D rotation - this problem is currently unsolvable for RAW files, see my comment 1 on 309341. - How do Picasa and Microsoft write the regions? In particular, does Picasa correctly implement the specification? Would need to test with an image in portrait orientation which is rotated upright only by Exif tag. - Marcel On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Thank you Marcel for reviewing my patch. 1.1 There is not difference between calling new method with 0 and original setXmpTagString. I can remove this part, I let it just to preserve the original name (setXmpTagString). At you wish I can add an enumeration {normal, bag, struct} instead of 0,1,2 ... 1.2 Yes, there is a difference between calling new method with 1, compared to setXmpStringBag. setXmpStringBag set the given char* as bag and then adds all strings form QStringList. This one simply set a char* as bag without adding anything to it. Later I add more complex structures, that's why I need only to set up an empty bag. 1.3 It works for first structure, but if I try to create structure-in-a-structure, it doesn't work anymore. That's why I need to set it as structure by hand. 2. This one is a little tricky, because I'm not that familiar about how Digikam store faces(now your comment makes everything more clear), after applying this patch https://bugs.kde.org/show_bug.cgi?id=314509 I saw that rotation force metadata re-read and garbage tags are added into database. My idea is read exif rotation value, and always adjust rectangle and read/store it only in one way. After this, rectangle should be rotation independent. It's a good idea? - Veaceslav On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Marcel Wiesweg
1) Ok, so essentially this method is about adding tags of specified nature without value. I would recommend to make this clear in the API, something like enum TagType { NormalyTag, ArrayLangAltTag, ArrayBagTag, ArraySeqTag, StructureTag }; addXmpTag(const char* key, TagType type, ...) and provide API docs for which purposes this method is intended. If you need another method to add values or subkeys, whatever, dont hesitate to add them. KDE git is open for development at the moment. 2) Unfortunately, we have two years ago defined that the regions in digikam's database are stored relative to the rotated picture, and MWG have defined the opposite. I dont know what Microsoft defined for their face tags. So there's not much we can do about that than write conversion routines. There is a longer text in the MWG guidance about this problem, they have invested though for their solution. - Marcel On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
Marcel, Do you read this thread ? http://stackoverflow.com/questions/12115998/face-tagging-information-and-photo-metadata There is a link to M$ Face tagging. Gilles Caulier - Gilles On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Marcel Wiesweg
Ok, I updated setXmpTagString to use XmpTagType. Of course this patch won't compile anymore.. Now I'm trying to figure out how to do the conversion and will come back soon with another patch. - Veaceslav On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Gilles Caulier-4
I will read all this and will come up with a solution. - Veaceslav On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
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 On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
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! - Veaceslav On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
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); } - Marcel On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
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 On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
Well...only peoples can tell that a face tag can be used only in one way. Especially when digikam apply rotations directly on image and don't use exif tag, it's almost impossible for program to tell how image is oriented... It was one of my main question about how to rotate the rectangle... after all I simply added an extension to transform function to rotate images... but it doesn't work as well... 1. I don't know how to force a rectangle redraw on image, so I could get off all garbage.. 2. Gilles told me that database interface is used for multithreading, and I'm not sure if I can safely use methods from FaceTagEditor... - Veaceslav On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
FaceTagsEditor delete faces just fine, but something is adding garbage tags into database... interesting... - Veaceslav On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
I managed to add some functionality to update tags into database but there are 2 things that bother me: 1. There is a method in utilities/facemanagement/facegroup void FaceGroup::applyItemGeometryChanges() that add garbage tags into database when image is rotated... I disabled this line //d->editPipeline.editRegion(d->info, d->view->previewItem()->image(), item->face(), currentRegion); but I'm not sure if it doesn't affect something else. 2. As far as I understood, there is some lazy algorithm for displaying tags rectangle on a image... the problem is if I will try to hover the photo while it still rotate, tags won't be displayed correctly...I set a hover lock but it doesn't seem to work... - Veaceslav On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
This entry can be considerate as obsolete due to this new entry : https://git.reviewboard.kde.org/r/109453/ Gilles Caulier - Gilles On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
Ship it! Ship It! - Gilles Caulier On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Veaceslav Munteanu
_______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |