I am new to JavaCV / OpenCV, so I apologize in advance if I will be a complete idiot ...
I need to define the "primary / main" face of the image (this image will be basically a "profile image"), face recognition is not required.
Due to the fact that different haarcascade files detect different faces and that the detected faces sometimes do not collide, and arbitrary artifacts in the image, I need to decide which face to use. Assuming that the detected faces are real faces, it makes sense to use the largest face because it is a pic profile.
The main problem I am facing is that the code detects (for some images) more, that 1 face and the largest face are not really faces. Here is an example from one of my tests, in which the code found 2 faces, 1 - a real face, and the other - a woman's bust, it happens that her bust is larger than her face.
Face: java.awt.Rectangle[x=62,y=42,width=78,height=78] Area 6084
Bust: java.awt.Rectangle[x=86,y=144,width=80,height=80] Area 6400

So my question is shorter, if I have several faces detected, is there some kind of rating scale that I can use to determine which face best matches what OpenCV sees as a face?
Neila source share