Ask Your Question

Ramkumar Natarajan's profile - activity

2016-06-17 16:32:55 -0500 commented question Update Python bindings cv2.so after changing opencv source

Thanks for replying. I tried adding this option to the existing cmake options but doesn't seem to update the bindings or make any changes to cv2.so.

2016-06-17 00:49:03 -0500 asked a question Update Python bindings cv2.so 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 cv2.so which links the C/C++ library to Python methods seems to be broken. As the set of symbols stored inside cv2.so 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/cv2.so: undefined symbol:_ZN2cv17CascadeClassifier16detectMultiScaleERKNS_11_InputArrayERSt6vectorINS_5Rect_IiEESaIS6_EEdiiNS_5Size_IiEESB_

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

2016-06-01 13:38:00 -0500 received badge  Enthusiast
2016-06-01 13:38:00 -0500 received badge  Enthusiast
2016-05-31 17:20:43 -0500 commented answer different step size output for cv::Mat::step1

Then what is the difference between Mat::step and Mat::step1() ?

2016-05-20 03:33:40 -0500 asked a question opencv_traincascade to train in different colorspace

I am trying to modify the opencv traincascade source which is used to train the cascade classifier to detect objects. The original implementation of the Viola Jones algorithm uses only grayscale images to train the classifier. I am trying the change the metric used to calculate the haar feature value over an image and also make the rest of the source complaint to operating on a 3 channel colorspace. If anyone had already worked in improving or modifying this particular implementation in opencv please let me know where exactly should I make this modification for haar feature metric.

The original implementation calculates the feature value by taking the difference between sum of pixel intensities of the image under black portion of the window and the sum of pixel intensities under the white portion of the window. I am planning to modify it to taking the root mean square of all the differences in all the 3 channels.

I would appreciate any comments and suggestions on my approach. Please also help me with decoding the source.

Thanks.

PS: The method also allows LBP and HOG features but I am interested only in modifying the Haar Features.