Now with direction parameter
Thursday, July 26th, 2007Facekit.net now supports parametric estimation of face direction as it’s default feature. Following is the new JSON output format:
-
-
{
-
state: "detected", // Detection result "detected" or "none"
-
label: "front", // Recognition result
-
x:40, y:50, // Detected position
-
xdir: 10, // Direction parameter (-90 to 90)
-
width:20, height:20, // Size of the detected face
-
time:100.0 // Timestamp (only when the input type is flv)
-
}
Use of javascript is completely compatible with the previous examples:
-
-
function getResult(value) {
-
var data = eval("("+value+")");
-
if (data.xdir < -20) {
-
do_something…
-
} else if (data.xdir > 20) {
-
do_something_else…
-
}
-
}
For any feedback, please let me know by writing a comment on this blog.