Ask Your Question
2

FaceRecognizer LBPH update function can't be called

asked 2012-11-06 03:27:22 -0500

Vincent-123 gravatar image

In OpenCV 2.4.3, FaceRecognizer.LBPH should support the "update" function. But since the "update" function is not virtual, the generic function FaceRecognizer.update is called instead.

See: http://code.google.com/p/javacv/issues/detail?id=233

Thank you

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2012-11-06 15:43:42 -0500

updated 2013-01-09 14:59:44 -0500

Here's the problem. In the trunk of the OpenCV repository, the method is virtual and overriden by the LBPH FaceRecognizer. So it gets called by the rules of late binding in C++. This works for C++ and all the wrappers. Everything is fine! But and here is the problem: In the 2.4 branch of OpenCV the team wants to guarantee binary compability and so the virtual keyword was removed from the method signature. This causes the problem, because the overriden methods don't get called anymore. I'll update this post when it is fixed.

Sorry, I forgot to update. So... The method was virtual, when I commited it to the OpenCV 2.4 trunk. Now the OpenCV team wants to ensure Binary Compability through the versions, so in the OpenCV 2.4 BRANCH (from which OpenCV 2.4.3 is created) the virtual keyword was removed. This of course caused the errors described in here. When I was contacted, that it's not working I looked up the OpenCV TRUNK and the method was still virtual. So the trunk worked fine. At this point I noticed it was only changed in the BRANCH and contacted Vadim to find out what's going on. Vadim then commited some kind of fix, by leaving the method non-virtual and dynamically upcasting the FaceRecognizer object. So the problem should be resolved by now.

edit flag offensive delete link more

Comments

1

Sorry to bother you but is there any news about the fix?

Thank you

Vincent-123 gravatar imageVincent-123 ( 2012-12-04 18:53:52 -0500 )edit

This is working for me now in iOS. I rebuilt the framework from the latest repo version using these instructions: http://docs.opencv.org/trunk/doc/tutorials/introduction/ios_install/ios_install.html

jbeuckm gravatar imagejbeuckm ( 2013-01-08 08:12:30 -0500 )edit
0

answered 2013-01-06 22:29:17 -0500

jbeuckm gravatar image

subscribe.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2012-11-06 03:27:22 -0500

Seen: 533 times

Last updated: Jan 09 '13