[Digikam-devel] libkface: recognize without trained faces

Tobias Leupold tobias.leupold at web.de
Mon Jul 28 18:04:12 BST 2014

I just had a look at the sources. Actually, we already have the according 
check, cf. recognition-opencv-lbph/facerec_borrowed.cpp:

		// throw error if no data (or simply return -1?)
		String error_message = "This LBPH model is not computed yet. Did you 
call the train method?";
		CV_Error(CV_StsBadArg, error_message);

Well ... I think it's up to you libkface maintainers if or if not this should 
be displayed. In my opinion, this is not necessary, as it's perfectly clear 
that no face can be recognized if no face has been trained yet.

In KPA, we simply avoided to get this message by counting the list of all 
identities. When we have none, no recognition is issued. But I think it would 
be the nicer solution if libkface simply would not display this message.

Remove it if you also think this way or leave it if not ;-)

More information about the Digikam-devel mailing list