need and expert to fix a smile detection app
I have a smile detection app on android that uses haarcascade_smile.xml as classifier. it works , but from some distances it does not. I discovered that it depends on the min size parameter in detectMultiscaleFunction. I need someone who can make it work from every distance and on every screen resolution
are you doing a face detection before ? you could adjust the minsize based on the size of the found face rect.
What is your min size parameter? What happens if you make it smaller?
Of course I'm doing face detection before. The problem is that more is the distance between the camera and the subject, smaller is the face rectangle, smaller should be the minSize parameter. the problem is that it appears not to be a linear proportion. I also tried to make the min size parameter 1/5 of the bottom half of the face rectangle, it works from some distances, it does not from others... I was wondering if there is a kind of relationship between the face rectangle size and the min size parameter. The problem is also that it depends on screen size and resolution. For example, from a tablet, from 2 meters of distance I have a rectangle of the same size I have on a smartphone from half meter...
And what happens if you don't set the minSize? Theoretically, if I am not wrong, the smallest size of an object that can be detected is the original size of the training sample size, and this size is used when you don't specify yours.
let me highlight that again : you can't detect anything smaller than the original training sample rect.
there's definitely a lower bound here. if you look at the smile cascade, you'll find:
<height>36</height> <width>18</width>
If I don't set the minSize, the min value will be used, and it need to mutch computation , the camera loses all of its smoothness
With no minSize set, despite lost smoothness, can your application detect small smiles?