need and expert to fix a smile detection app

asked 2014-05-22 04:13:40 -0600

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

edit retag flag offensive close merge delete

Comments

are you doing a face detection before ? you could adjust the minsize based on the size of the found face rect.

berak gravatar imageberak ( 2014-05-22 04:17:45 -0600 )edit

What is your min size parameter? What happens if you make it smaller?

Witek gravatar imageWitek ( 2014-05-22 09:55:07 -0600 )edit

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...

androdevs gravatar imageandrodevs ( 2014-05-23 06:02:34 -0600 )edit
1

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.

Witek gravatar imageWitek ( 2014-05-23 13:40:23 -0600 )edit

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>

berak gravatar imageberak ( 2014-05-24 00:56:23 -0600 )edit

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

androdevs gravatar imageandrodevs ( 2014-05-24 15:22:49 -0600 )edit

With no minSize set, despite lost smoothness, can your application detect small smiles?

Witek gravatar imageWitek ( 2014-05-28 17:14:40 -0600 )edit