Ask Your Question

czc080's profile - activity

2015-12-01 04:28:07 -0600 asked a question Recompile the modified source code for opencv python

I'm currently trying to expose different internal c++ function to python, for example, to expose the elbp function, I opened the facerec.hpp and put the following code

CV_EXPORTS_W Mat elbp(InputArray src, int radius, int neighbors);

after namespace while removing the static before the wrapper function:

static Mat elbp(InputArray src, int radius, int neighbors) {
Mat dst;
elbp(src, dst, radius, neighbors);
return dst;}

After this, what I did was to run the cmake in the opencv build directory and then make the whole opencv again,the whole process took like 2 hour(since im doing it on a raspberry pi) which is really painful. I dont want to switch to c++ atm, is there any other way to simply expose the internal c++ function(or do some modification on the existing function) without recompile the whole opencv?

I'm quite new to both Linux and opencv,i would be really appreciated if anyone can help.....

2015-11-30 18:53:03 -0600 received badge  Editor (source)
2015-11-30 18:52:45 -0600 asked a question Improve camshift performance

Hi, I'm currently trying to use camshift to track the face detected by the haar detector, the tracking is great under sufficient light condition and good contrast between the face and background. But if the light is dim and with a similar background , the search window will become larger and jumping around.... I did some research and tried to use the uniform LBP feature as the 3rd channel for HSV image, but that still doesn't work well , I need some extra work on that.

My question is:

1)Besides the tracking algorithm, is there any external factors need particular attention in order to improve the robustness of the tracking effect.

2)Since im using the servo to control the camera, I noticed a lot of noise when the camera rotates, anything can be done about that?

3)I'm using python and I noticed there are some advanced function is not exposed to it,any suggestion to improve the camshift under the python if possible?

2015-11-30 18:34:33 -0600 commented question Cant display the image after applyting exposed elbp function in python

and regarding to @berak questions a:) why do I need to put wait after imshow()? c:) the code is from the face module in the opencv_contrib,here is the directory: "/home/pi/opencv_contrib-3.0.0/modules/face/src/lbph_faces.cpp"

2015-11-30 18:31:39 -0600 commented question Cant display the image after applyting exposed elbp function in python

Hi! Thx for the solution, I tried to normalize the image with :

cv2.normalize(XX,XX,0,255,cv2.NORM_MINMAX)

but it doesn't work, what I did was to multiply the image matrix by a value like 32 ,and finally I can see the image,I wonder why normallize doesnt work though

2015-11-30 05:43:46 -0600 asked a question Cant display the image after applyting exposed elbp function in python

I am trying to display an image after applying elbp function to a gray-scale image, the function was exposed manually in the face module for python. here's the code:

LBP = cv2.face.elbp(gray_roi,1,8)
cv2.imshow("Face",LBP)

But however, what I got is a pure black window,also I noticed that the cols and rows are always smaller than the original image by 2,here is the error information:

could not broadcast input array from shape (95,95) into shape (97,97)

I noticed one other ppl asked the same question but was using c++ instead:

link text

But what I cant understand is what he meant by normalized the image to fit the screen rendering range?