Ejemplo n.º 1
0
    echo "ERR ";
    exit(-1);
}
while (!feof($fs)) {
    list($arrayg[$n]['gender'], $usernameg[$n], $arrayg[$n]['recognized'], $arrayg[$n]['filename'], $resultsg[$n]) = fscanf($fs, "%s %s %s %s %f");
    $n++;
}
$resultado = $results[0];
array_multisort($results, SORT_NUMERIC, SORT_DESC, $username);
//array_multisort($resultsg,SORT_NUMERIC,SORT_DESC,
//                $usernameg);
//if ($username[0] == $arg+"_gmm") {
//       $acceso='OK';
//} else {
//       $acceso='NOK';
//}
if (number_format($resultado, 2) == number_format(max_float($results), 2)) {
    $acceso = 'OK';
} else {
    $acceso = 'NOK';
}
if ($resultsg[0] > $resultsg[1]) {
    $gender = 'M';
} else {
    $gender = 'F';
}
$salida = array('result' => $acceso, 'recognized' => $array[0]['recognized'], 'value' => number_format($resultado, 2), 'gender' => $gender, 'maxValue' => number_format(max_float($results), 2), 'minValue' => number_format(min_float($results), 2), 'valueCount' => count($results), 'possibleId' => basename($username[0], "_gmm") . " " . number_format(max_float($results), 2), 'confidence' => max_float($results) - min_float($results));
echo json_encode($salida);
?>

Ejemplo n.º 2
0
            $reconocido = 'NEGATIVO';
            $rechazados++;
            $background = "red";
        }
        print "<tr style=\"background-color:{$background};color:yellow\"><td>{$reconocido}</td><td>{$stat_user}</td><td>{$stat_value}</td></tr>\n";
    }
    $indice++;
    $tempuser = $stat_user;
    $tempvalue = $stat_value;
}
$percent = $aceptados * $rechazados / $indice;
$posibleId = basename($username[0], "_gmm") . " " . number_format(max_float($results), 2);
$confidence = max_float($results) - min_float($results);
$recognized = $array[0]['recognized'];
$maxvalue = number_format(max_float($results), 2);
$minvalue = number_format(min_float($results), 2);
print "</table></center>";
print "<center><hr width=40%></center>";
print "<center>";
print "<table border=\"1\" style=\"background-color:orange;color:black;border:1px dotted black;width:40%;border-collapse:collapse;\">";
print "<tr><th>Usuarios:</th><td>{$indice}</td></tr>\n";
print "<tr><th>Aceptados:</th><td>{$aceptados}</td></tr>\n";
print "<tr><th>Rechazados:</th><td>{$rechazados}</td></tr>\n";
print "<tr><th>Porcentaje:</th><td>{$percent}%</td></tr>\n";
print "</table>";
print "</center>";
print "<center><hr width=40%></center>";
print "<center>";
print "<table border=\"1\" style=\"background-color:orange;color:black;border:1px dotted black;width:40%;border-collapse:collapse;\">";
print "<tr><th>Resultado:</th><td>{$acceso}</td></tr>\n";
print "<tr><th>Reconocido:</th><td>{$recognized}</td></tr>\n";