detectMultiscale for smile [closed]

asked 2014-05-19 08:58:26 -0600

Hi, I'm working on a smile intensity detection app (based on the work done here, and works very well. However it has a problem. the problem occours here:

cascadeClassifierSmile.detectMultiScale(grayScaleImageROI, nestedObjects, 1.1, 0, 2, new Size(minSize, minSize), new Size());

where : - grayScaleImageROI is the bottom half portion of the rectangle containing the face, previously detected. - nestedObjects is of type MatOfRect

The number of elements returned in nested objects should be for me the smile intensity, and works very well, but the quality of the detection it strongly depends on minSize value given in detectMultiScale function. I noticed that when the camera is near to the subect (and ence the face rectangle is bigger, I have to provide bigger minSize value, more is the distance of the camera from the subject, smaller is the face rectangle, smaller must be minSize value. It seems to not be a linear relationship, so, ho do I solve this problem?? using a fixed size of minSize works very well only with a particular ditance of the camera from the subject, but ho can I calculate minSize in order to make it work from all distances?

thanks a lot

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-17 11:10:24.981218