Version: unspecified (using KDE 4.7.4) OS: Linux I think it would not be bad if one could locate some tags on a photo. I'm thinking of what well-known social networks provide, marking some coordinates on the photo (e. g. a face) and tagging it as e. g. a person. This would perhaps also be very handy when – one day – face detection will be availibe: like click on a face and get a list of proposed persons. If this would be possible, one could also feed a database with the so far tagged faces. What do you think? Reproducible: Always Steps to Reproduce: … Actual Results: … Expected Results: …
This is one option for future development of KPA. libkface might provide us good API for detecting faces from photos and later on also recognition. However, I am not sure what is currently supported in this library and if it is being developed.
*** Bug 223053 has been marked as a duplicate of this bug. ***
*** Bug 170801 has been marked as a duplicate of this bug. ***
Is something going on about this? Even without automatic face detection or recognition, it would be fine if there was an option to make a tag locatable on the photo as a general improvement.
After some investigation, I found that – speaking of face detection – the work has kindly already been done by the opencv folks. Based on the Python "facedetect" script (see http://www.thregr.org/~wavexx/hacks/facedetect/ ), I easily created a quite minimalistic Python 2 script wrapping opencv's face detection machine and printing the coordinates of the faces found: ------------------------------ from math import sqrt import cv2 CascadeClassifier = cv2.CascadeClassifier('/usr/share/OpenCV/haarcascades/haarcascade_frontalface_alt2.xml') image = cv2.equalizeHist(cv2.imread('image.jpg', cv2.IMREAD_GRAYSCALE)) side = sqrt(image.size) minlen = int(side / 20) maxlen = int(side / 2) for face in CascadeClassifier.detectMultiScale(image, 1.1, 4, cv2.cv.CV_HAAR_DO_CANNY_PRUNING, (minlen, minlen), (maxlen, maxlen)): print('{} {} {} {}'.format(*face)) ------------------------------ I don't speak C++, but I think this could be used in KPA without much effort. Probably, libkface also already implements such a wrapper (I didn't find documentation for this). So – the only thing that actually has to be added to KPA is the possibility to link a tag with coordinates.
There is currently some ongoing work on this: https://github.com/jzarl/kphotoalbum/pull/1
Git commit 8869495c53f3ac43243a1e0474c4395bd81d209f by Johannes Zarl. Committed on 21/06/2014 at 17:16. Pushed by johanneszarl into branch 'positionable_tags-cleanedup2'. GUI-Changes for implementing positionable tags. Original patchset by Tobias Leupold. This patchset also reimplements handling of image rotation in the AnnotationDialog, fixing bug #336094. Related: bug 336094 M +248 -8 AnnotationDialog/Dialog.cpp M +19 -2 AnnotationDialog/Dialog.h M +281 -26 AnnotationDialog/ImagePreview.cpp M +45 -4 AnnotationDialog/ImagePreview.h M +37 -0 AnnotationDialog/ImagePreviewWidget.cpp M +6 -0 AnnotationDialog/ImagePreviewWidget.h M +53 -5 AnnotationDialog/ListSelect.cpp M +14 -2 AnnotationDialog/ListSelect.h A +420 -0 AnnotationDialog/ResizableFrame.cpp [License: UNKNOWN] * A +60 -0 AnnotationDialog/ResizableFrame.h [License: UNKNOWN] * M +3 -1 CMakeLists.txt M +14 -6 MainWindow/Window.cpp M +1 -0 MainWindow/Window.h M +3 -2 Viewer/ImageDisplay.cpp M +1 -0 Viewer/ImageDisplay.h M +6 -0 Viewer/InfoBox.cpp M +4 -0 Viewer/InfoBox.h A +54 -0 Viewer/TaggedArea.cpp [License: UNKNOWN] * A +33 -0 Viewer/TaggedArea.h [License: UNKNOWN] * M +117 -0 Viewer/ViewerWidget.cpp M +5 -0 Viewer/ViewerWidget.h The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/kphotoalbum/8869495c53f3ac43243a1e0474c4395bd81d209f
Git commit ed792aec09c1df9c4f700e87c356f0a454f5cde6 by Johannes Zarl. Committed on 22/06/2014 at 23:10. Pushed by johanneszarl into branch 'master'. GUI-Changes for implementing positionable tags. Original patchset by Tobias Leupold. This patchset also reimplements handling of image rotation in the AnnotationDialog, fixing bug #336094. Related: bug 336094 M +248 -8 AnnotationDialog/Dialog.cpp M +19 -2 AnnotationDialog/Dialog.h M +283 -26 AnnotationDialog/ImagePreview.cpp M +40 -3 AnnotationDialog/ImagePreview.h M +37 -0 AnnotationDialog/ImagePreviewWidget.cpp M +6 -0 AnnotationDialog/ImagePreviewWidget.h M +53 -5 AnnotationDialog/ListSelect.cpp M +14 -2 AnnotationDialog/ListSelect.h A +420 -0 AnnotationDialog/ResizableFrame.cpp [License: UNKNOWN] * A +60 -0 AnnotationDialog/ResizableFrame.h [License: UNKNOWN] * M +4 -2 CMakeLists.txt M +14 -6 MainWindow/Window.cpp M +1 -0 MainWindow/Window.h M +3 -2 Viewer/ImageDisplay.cpp M +1 -0 Viewer/ImageDisplay.h M +6 -0 Viewer/InfoBox.cpp M +4 -0 Viewer/InfoBox.h A +54 -0 Viewer/TaggedArea.cpp [License: UNKNOWN] * A +33 -0 Viewer/TaggedArea.h [License: UNKNOWN] * M +117 -0 Viewer/ViewerWidget.cpp M +5 -0 Viewer/ViewerWidget.h The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/kphotoalbum/ed792aec09c1df9c4f700e87c356f0a454f5cde6
Introduced in KPhotoAlbum 4.5 :-)