Ask Your Question

sandeepjohnv87's profile - activity

2015-01-22 06:15:44 -0500 received badge  Nice Answer (source)
2013-10-24 08:07:55 -0500 received badge  Teacher (source)
2013-10-24 07:18:07 -0500 answered a question Multi cascade detector. LBP

Dear Dereyly,

I could not reply for your comment as there were many words in my reply so I am posting this as a new answer.

Actually the detection process is done on image pyramids, Which means the image of size 640x480 is resized w.r.t to the scale-factor and the feature rectangle is put at every point on the scaled image, which means , say suppose we are checking on the 640x480 image with scale-factor equal to 1, now a feature like mentioned above 2x4 rectangle is put at every point in a sliding window fashion and checked for the MB-LBP value w.r.t their neighbors. Similarly every feature is put at every point and checked. Now the rectangular box at which all the features got passed is where the face is located.

Basically we train a cascade with a 24x24 or 20x20 image. So in the test process we check in this 24x24 rectangular box(this is not feature rectangle) where the selected features rectangles are based on this 24x24 image only. Now say suppose your 640x480 image has only one face which is occupying the entire frame, then you will get a detection of the face only at the scale-factor which reduces the 640x480 image to 24x24. So at this pyramid image you have only one point(one rectangular box) to be checked. So if you have 64 features then at this pyramid your feature mat will be of size 64x1 size only with the mat containing the pointers on the image where the feature rectangles are to be placed.

Even at the scale-factor 1 on 640x480 image your features mat is still 64x1 but the CascadeClassifier::runAt will take care of placing the 24x24 rectangular box at appropriate point on the image.

Regards, Sandeep John.V

2013-10-23 06:15:29 -0500 answered a question Multi cascade detector. LBP

Hi,

The LBP feature: [63] x=0; y=1; width=2; height=4 means, 63 is the feature ID. In openCV the LBP cascade generated uses MB-LBP rather than normal LBP. MB-LBP means macro-block LBP. Here it means the rectangle of 2x4 at (0,1) is the macro-block for which the total sum of the pixels of that rectangle is compared with the neighboring rectangles of same width and height to form the LBP pattern which may take any value from 0 to 255 depending on the comparisions.

Actually here (0,1) is the starting coordinate of the zeroth neighbor macro-block. That means we are actually evaluating for the macro-block at (2,5) with 2x4 dimensions.

Thanks and Regards Sandeep John.V

2013-10-23 05:25:07 -0500 received badge  Editor (source)
2013-10-23 05:24:21 -0500 asked a question Different approaches in Face Detection in openCV 1.x and openCV 2.x

Hi,

I have been using openCV FD(face detection) using Haar-like Cascade.

In the later versions of openCV while searching for faces the original image is re-sized w.r.t scale factor and feed to the cascade run at each window size, where as in the older versions the cascade rectangles and their weights are re-sized according to the window size and given for the cascade run without re-sizing original image.

May I know why exactly this is done in that way and what benefit do we get by searching in the latest version style?

Thanks Sandeep John.V