Created attachment 104115 [details] After Box 1 is drawn About 30% of the time, after I draw the first face box (Jane) on an image, the metadata region coordinates written to the image are infinity. Then when I draw a second box (Jim), Jane 1 is corrected but Jane is then repeated twice. Jane 2 and 3 coordinates are massive negative numbers. Verification by another tool confirms it the metadata as inf. See attached screenshots.
Created attachment 104116 [details] After Box 2 is drawn.
If I clear the faces and try again, everything is normal.
This happens with 5.4.0 too.
Created attachment 104531 [details] The metadata did not show Hi, Could you please tell me how to open the metadata region in the last two attachment which shows the parameters about the region? After draw a face region, I clicked metadata action in the right-side bar, but I did not find the parameters about name and other parameters, show in this attachment. (Tracking the code is a good way, I tracked it but the code is a bit huge......)
On top of metadata viewer, you have a button to setup tags filters. turn on all. Face tags are typically on XMP view. Gilles Caulier
FaceTags are managed in database here : https://cgit.kde.org/digikam.git/tree/libs/database/tags and stored in metadata by this method : https://cgit.kde.org/digikam.git/tree/libs/dmetadata/dmetadata.cpp#n1659 Gilles Caulier
The problem was first reported on the 15th Feb pre-release version of 5.5.0 and then confirmed in 5.4.0. I was using the 11-March build of 5.5.0 pre-release yesterday and the problem did not happen. Maybe something was fixed by accident in this area in the March build.
Hi Gilles, I set the filter as you said, click the tags filters, and turn on all in the Views and Behavior, as shown in the Attachment "filter1" and "filter2". Then I installed mysql for the db reading and writing. But I met three problems. The first is some pictures have XMP metadata (see attachment "has metadata", I closed some filters in it, just left the useful ones), and some pictures have no XMP and other metadata (see attachment "has no metadata"). The second problem is that the XMP metadata about face tags is unavaliable, as shown in attachment "has metadata". The third problem is that I installed 5.5.0 in windows, the "Last Keyword XMP" will show the face tag's name after I draw the box and click "Album->Write Metadata to Images", as shown in attachment "windows5.5.0 version". However, in ubuntu, I compiled the latest code and installed the software, draw the box, click "Album->Write Metadata to Images", the face tag's name still not shows in "Last Keyword XMP" view, the attachment "has metadata" shows the result. I read the method storing the metadata that you posted two days ago: https://cgit.kde.org/digikam.git/tree/libs/dmetadata/dmetadata.cpp#n1659 This method add the metadata of "Area","Regions" and "Region List" to XMP view. I found that the method is invoked by: https://cgit.kde.org/digikam.git/tree/libs/fileactionmanager/metadatahub.cpp#n271 Then I debuged the program, and I found that the operations like create/modify face tags, write/read metadata from database or write/read tags from database, they all did not invoke the write method, therefore the setImageFacesMap can't be executed, so the XMP view has no data. I don't know whether I missed some configurations of the software, if so, please indicate it for me. If there are some mistakes in my operations or I did not see the right code, please indicate it too. Thanks. Yingjie Liu
Created attachment 104577 [details] filter1
Created attachment 104578 [details] filter2
Created attachment 104579 [details] has metadata
Created attachment 104580 [details] has no metadata
Created attachment 104581 [details] windows5.5.0 version
Git commit 76060c16c14dabfb4aa7a5ac956c5292aff810bf by Maik Qualmann. Committed on 15/03/2017 at 19:55. Pushed by mqualmann into branch 'master'. fix MetadataSynchronizer and non working lazy sync in digiKam-5.5.0 M +1 -1 utilities/maintenance/maintenancedata.cpp https://commits.kde.org/digikam/76060c16c14dabfb4aa7a5ac956c5292aff810bf
Lui, Under Linux, with last Maik patch applied to git master, this fix your problem to write metadata in image after to apply face tag ? Gilles Caulier
Hi Gilles, I tested Maik's patch under Ubuntu 16.04(x64). It solves the problem of writing metadata in image after applying face tag. The metadata shows in the right sidebar after I clicked "Album->Write Metadata to Images". These days, I am looking at the "Unavailable" problem: The parameters in "Metadata Working Group Regions" such as "Area", "Name", "Region List" shows "Unavailable" even after drawing a tag box. I think, metadata part in digikam is a bigger part than the last two bugs(372342 and 351866). So far, I have read the code of how to show the metadata in XMP view, includes the class MetadataWidget, MetadataListView which showing the metadata, class SetUp, SetupMetadata, and MetadataPanel which is created after user click the button to setup tags filters, and these classes decide which item of metadata to show in the MetadataWidget. Next step, I think I have to look at the code which set the concrete parameters of "Area", "Name" and "Region List", and how they worked. I think this will find the reason why they shows "Unavailable".
Exiv2 library is used in background to handle XMP tags. Exiv2 has a CLI tool to show metadata from the console. "exiv2 -px file.jpg" show any XMP tags ? Gilles Caulier
Created attachment 104631 [details] parameters shown using exiv2 Hi Gilles, It shows the XMP tags after using "exiv2 -px file.jpg", as you can see in this attachment. But the parameters did not show in digikam(It is still Unavaliable). Is it because of my OS or some other reasons....
Git commit 9b154ceeecb732ecb97d6900ab0841e643639f4e by Gilles Caulier. Committed on 15/08/2017 at 18:06. Pushed by cgilles into branch 'master'. patch from Yingjie Liu for fix face tag region if image is rotated. The tag region in database is not expected when rotate the image. The reason : function FaceGroup::aboutToSetInfo(const ImageInfo& info) in https://cgit.kde.org/digikam.git/tree/utilities/facemanagement/facegroup.cpp#n359 invoked applyItemGeometryChanges() after transformation. Before FaceGroup::aboutToSetInfo(const ImageInfo& info), the new coordination of tag region has been written into database. However, in applyItemGeometryChanges(), the tag region coordination of tag region will be change again in database which caused a wrong coordination. A new FaceGroup::aboutToSetInfoAfterRotate(const ImageInfo& info) is now used instead of FaceGroup::aboutToSetInfo(const ImageInfo& info) which will not invoke applyItemGeometryChanges(). Then the coordination of tag region in database is true after image transformation. Related: bug 326538, bug 381378 M +4 -1 NEWS M +2 -1 app/views/imagepreviewview.cpp M +11 -0 utilities/facemanagement/facegroup.cpp M +2 -0 utilities/facemanagement/facegroup.h https://commits.kde.org/digikam/9b154ceeecb732ecb97d6900ab0841e643639f4e
Not reproducible with 7.0.0-beta1