From 2e54e2a5863eb38bedd2bcaf1dbb455655096932 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Thu, 8 Nov 2012 16:15:04 +0400 Subject: [PATCH] fixed problem with LBPHFaceRecognizer::update() without breaking binary compatibility. --- modules/contrib/src/facerec.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/contrib/src/facerec.cpp b/modules/contrib/src/facerec.cpp index 7a8ab7420..fbf124a48 100644 --- a/modules/contrib/src/facerec.cpp +++ b/modules/contrib/src/facerec.cpp @@ -300,7 +300,13 @@ public: //------------------------------------------------------------------------------ // FaceRecognizer //------------------------------------------------------------------------------ -void FaceRecognizer::update(InputArrayOfArrays, InputArray) { +void FaceRecognizer::update(InputArrayOfArrays src, InputArray labels ) { + if( dynamic_cast(this) != 0 ) + { + dynamic_cast(this)->update( src, labels ); + return; + } + string error_msg = format("This FaceRecognizer (%s) does not support updating, you have to use FaceRecognizer::train to update it.", this->name().c_str()); CV_Error(CV_StsNotImplemented, error_msg); }