Ask Your Question

Revision history [back]

Update Python bindings after changing opencv source

I have modified the opencv cascade classifier's source code for object detection to incorporate new functionality. I made changes to the source code of opencv_createsamples and opencv_traincascade which are responsible for training the classifier. Then I also made similar changes to the cascade classifier's detectMultiScale which is the detector library. While the first two are executables the detector is compiled as an opencv library. Because of the changes to the source code of the library the Python wrapper which links the C/C++ library to Python methods seems to be broken. As the set of symbols stored inside pointing the sources are no more the same because of the changes I am getting the following error when I do import cv2.

ImportError: /usr/local/lib/python2.7/dist-packages/ undefined symbol:_ZN2cv17CascadeClassifier16detectMultiScaleERKNS_11_InputArrayERSt6vectorINS_5Rect_IiEESaIS6_EEdiiNS_5Size_IiEESB_

How do I now update the Python bindings and hence to reflect my changes? Any help is appreciated. Thanks.