The following XML shows a single record produced by face detection.
<output> <record> ... <trackname>FaceDetect.Result</trackname> <FaceResult> <id>4895aeee-6a8f-44f9-915c-b86eff702118</id> <face> <region> <left>282</left> <top>84</top> <width>236</width> <height>236</height> </region> <outOfPlaneAngleX>0</outOfPlaneAngleX> <outOfPlaneAngleY>0</outOfPlaneAngleY> <ellipse> <center> <x>398.5</x> <y>194.25</y> </center> <a>106.25</a> <b>148.75</b> <angle>0</angle> </ellipse> <lefteye> <center> <x>441</x> <y>173</y> </center> <radius>16</radius> </lefteye> <righteye> <center> <x>356</x> <y>173</y> </center> <radius>16</radius> </righteye> </face> </FaceResult> </record> </output>
The record contains the following information:
The id
element provides a unique identifier for the detected face. The face detection engine issues an ID for each detected appearance of a face. If you are detecting faces in video and consecutive frames show the same face in a near-identical location, all records related to that appearance will have the same ID.
For example, if a face appears in the same location for a hundred consecutive video frames, the engine uses the same ID for each record in the data track and the single record in the result track. The record in the result track will have a timestamp that covers all of the frames.
If the face disappears and then reappears, the engine considers this as a new detection and produces a new ID and a new record in the result track.
The face
element contains the location of the detected face:
region
describes the location of the face within the image or video frame. The left
and top
elements provide the position of the top-left corner of a rectangle that surrounds the face, and the width
and height
elements provide its size. outOfPlaneAngleX
indicates how far the person is looking to the left or right. outOfPlaneAngleY
indicates how far the person is looking up or down. When both of these angles are zero, the person is looking directly at the camera.ellipse
element describes the location of the detected face as a circle or ellipse. When DetectEyes=FALSE
, Media Server returns a circle that describes the approximate position of the face. When DetectEyes=TRUE
and the person is looking directly at the camera, Media Server returns an ellipse that should more accurately describe the position.lefteye
and righteye
elements describe eye locations. These are returned only if DetectEyes=TRUE
and the person is looking directly towards the camera.
|