NewFace
Inserts a new, empty, face into a database of faces.
NOTE: After adding a new face, you must add images of the face using the action AddFaceImages. You must train Media Server to recognize the face using the action BuildFace.
Type: synchronous
Parameter | Description | Required |
---|---|---|
database
|
The name of the database to add the face to. The database must already exist. | Yes |
identifier
|
A unique identifier for the face (maximum 254 bytes). If you do not set this parameter, Media Server generates an identifier automatically. | No |
Example
The following example adds a face to the politicians
database:
/action=NewFace&database=politicians
You can use the person's name as the identifier, but all identifiers must be unique within the database:
/action=NewFace&database=politicians&identifier=JohnSmith
Response
The action returns the identifier assigned to the face:
<autnresponse> <action>NEWFACE</action> <response>SUCCESS</response> <responsedata> <identifier>6600dc0f9dd72d0cb55589e8f1d28b62</identifier> </responsedata> </autnresponse>
See Also
- If you haven't created a database for storing faces, first run the action CreateFaceDatabase.
- To add metadata about the face, for example the person's name, use the action AddFaceMetadata.
- To add training images for the face, use the action AddFaceImages.
- To train Media Server to recognize the face, use the action BuildFace.
- You can use the action TrainFace to add and train a new face, with metadata and training images, in a single action.