[Digikam-devel] libkface: recognize without trained faces

Tobias Leupold tobias.leupold at web.de
Sun Jul 27 22:26:31 BST 2014

Hi List/Gilles/Marcel!

We're working on libkface inclusion here at KPhotoAlbum at the moment (not 
just me anymore :-). We found one thing that should probably handled by 
libkface itself. It's more a cosmetic thing, but I think it wouldn't hurt to 
change this.

If one issues a face recognition and no face has been trained yet, libkface 
prints an error message to the console:

> OpenCV Error: Bad argument (This LBPH model is not computed yet. Did you
> call the train method?) in predict, file
> ...recognition-opencv-lbph/facerec_borrowed.cpp, line 384

This message disappears when the first face has been trained. I think it would 
be nice if libkface would check for that itself and not print an error 
message, but simply return nothing (as it already does at the moment).

What do you think?

Yours, Tobias

More information about the Digikam-devel mailing list