src/libs/src/gauss_dist.c
double r4_dist(int x1, int y1, int x2, int y2,double pfl)
{
    double xres = 0;
    if(x1 >x2)
        xres = x1-x2;
    else
        xres = x2-x1;

    double yres = 0;
    if(y1 >y2)
        yres = y1-y2;
    else
        yres = y2-y1;

    double pixdist = sqrt((yres*yres) + (xres*xres));
    //25 cm is average face (check value!!!)
    //converted to real life
    //pfl/25.0 == for every 1 pixel we have X amount of Centimeters in real life
    //pixdist = disntace in pixels between the two points
    return pixdist * (pfl/25.0);
}
//25 = length of face in cm on average
// pfl = perspective length of the face in pixels on our measured distances //the first face 1#
// => example : at 1 meter we have 25 cm = 100 pixels
// on 1.2 meters we have 25 cm = 90 pixels (NEED TO MEASURE IT OUT OURSELVES)
25 = length of face in cm on average
pfl = perspective length of the face in pixels on our measured distances //the first face 1
> example : at 1 meter we have 25 cm = 100 pixels
on 1.2 meters we have 25 cm = 90 pixels (NEED TO MEASURE IT OUT OURSELVES)
25 = length of face in cm on average pfl = perspective length of the face in pixels on our measured distances // the first face 1 > example : at 1 meter we have 25 cm = 100 pixels on 1 . 2 meters we have 25 cm = 90 pixels ( NEED TO MEASURE IT OUT OURSELVES )
double r4_dist(int x1, int y1, int x2, int y2,double pfl)
{
    double xres = 0;
    if(x1 >x2)
        xres = x1-x2;
    else
        xres = x2-x1;
    double yres = 0;
    if(y1 >y2)
        yres = y1-y2;
    else
        yres = y2-y1;
    double pixdist = sqrt((yres*yres) + (xres*xres));
    return pixdist * (pfl/25.0);
}
double r4_dist ( int x1 , int y1 , int x2 , int y2 , double pfl ) { double xres = 0 ; if ( x1 > x2 ) xres = x1 - x2 ; else xres = x2 - x1 ; double yres = 0 ; if ( y1 > y2 ) yres = y1 - y2 ; else yres = y2 - y1 ; double pixdist = sqrt ( ( yres * yres ) + ( xres * xres ) ) ; return pixdist * ( pfl / 25.0 ) ; }
25 = length of face in cm on average
pfl = perspective length of the face in pixels on our measured distances //the first face 1
> example : at 1 meter we have 25 cm = 100 pixels
on 1.2 meters we have 25 cm = 90 pixels (NEED TO MEASURE IT OUT OURSELVES)
25 = length of face in cm on average pfl = perspective length of the face in pixels on our measured distances // the first face 1 > example : at 1 meter we have 25 cm = 100 pixels on 1 . 2 meters we have 25 cm = 90 pixels ( NEED TO MEASURE IT OUT OURSELVES )
//25 cm is average face (check value!!!) //converted to real life //pfl/25.0 == for every 1 pixel we have X amount of Centimeters in real life //pixdist = disntace in pixels between the two points