PersonGroupPerson class
Class representing a PersonGroupPerson.
Constructors
Person |
Create a PersonGroupPerson. |
Methods
add |
Add a face to a person into a person group for face identification or verification. To deal with
an image contains multiple faces, input face can be specified as an image with a targetFace
rectangle. It returns a persistedFaceId representing the added face. No image will be stored.
Only the extracted face feature will be stored on server until PersonGroup PersonFace -
Delete, PersonGroup
Person - Delete or
PersonGroup - Delete is
called.
|
add |
|
add |
|
add |
Add a face to a person into a person group for face identification or verification. To deal with
an image contains multiple faces, input face can be specified as an image with a targetFace
rectangle. It returns a persistedFaceId representing the added face. No image will be stored.
Only the extracted face feature will be stored on server until PersonGroup PersonFace -
Delete, PersonGroup
Person - Delete or
PersonGroup - Delete is
called.
|
add |
|
add |
|
create(string, Person |
Create a new person in a specified person group. |
create(string, Person |
|
create(string, Service |
|
delete |
Delete a face from a person in a person group by specified personGroupId, personId and
persistedFaceId.
|
delete |
|
delete |
|
delete |
Delete an existing person from a person group. The persistedFaceId, userData, person name and face feature in the person entry will all be deleted. |
delete |
|
delete |
|
get(string, string, Request |
Retrieve a person's information, including registered persisted faces, name and userData. |
get(string, string, Request |
|
get(string, string, Service |
|
get |
Retrieve information about a persisted face (specified by persistedFaceId, personId and its belonging personGroupId). |
get |
|
get |
|
list(string, Person |
List all persons in a person group, and retrieve person information (including personId, name, userData and persistedFaceIds of registered faces of the person). |
list(string, Person |
|
list(string, Service |
|
update(string, string, Person |
Update name or userData of a person. |
update(string, string, Person |
|
update(string, string, Service |
|
update |
Add a face to a person into a person group for face identification or verification. To deal with
an image contains multiple faces, input face can be specified as an image with a targetFace
rectangle. It returns a persistedFaceId representing the added face. No image will be stored.
Only the extracted face feature will be stored on server until PersonGroup PersonFace -
Delete, PersonGroup
Person - Delete or
PersonGroup - Delete is
called.
|
update |
|
update |
Constructor Details
PersonGroupPerson(FaceClientContext)
Create a PersonGroupPerson.
new PersonGroupPerson(client: FaceClientContext)
Parameters
- client
- FaceClientContext
Reference to the service client.
Method Details
addFaceFromStream(string, string, HttpRequestBody, PersonGroupPersonAddFaceFromStreamOptionalParams)
Add a face to a person into a person group for face identification or verification. To deal with
an image contains multiple faces, input face can be specified as an image with a targetFace
rectangle. It returns a persistedFaceId representing the added face. No image will be stored.
Only the extracted face feature will be stored on server until PersonGroup PersonFace -
Delete, PersonGroup
Person - Delete or
PersonGroup - Delete is
called.
Note persistedFaceId is different from faceId generated by Face -
Detect.
- Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
- Each person entry can hold up to 248 faces.
- JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
- "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" rectangle is not returned from Face - Detect, there’s no guarantee to detect and add the face successfully.
- Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures.
- Adding/deleting faces to/from a same person will be processed sequentially. Adding/deleting faces to/from different persons are processed in parallel.
- The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
- Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to How to specify a detection model.
function addFaceFromStream(personGroupId: string, personId: string, image: HttpRequestBody, options?: PersonGroupPersonAddFaceFromStreamOptionalParams): Promise<PersonGroupPersonAddFaceFromStreamResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<Models.PersonGroupPersonAddFaceFromStreamResponse>
addFaceFromStream(string, string, HttpRequestBody, PersonGroupPersonAddFaceFromStreamOptionalParams, ServiceCallback<PersistedFace>)
function addFaceFromStream(personGroupId: string, personId: string, image: HttpRequestBody, options: PersonGroupPersonAddFaceFromStreamOptionalParams, callback: ServiceCallback<PersistedFace>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
addFaceFromStream(string, string, HttpRequestBody, ServiceCallback<PersistedFace>)
function addFaceFromStream(personGroupId: string, personId: string, image: HttpRequestBody, callback: ServiceCallback<PersistedFace>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- image
- HttpRequestBody
An image stream.
- callback
The callback
addFaceFromUrl(string, string, string, PersonGroupPersonAddFaceFromUrlOptionalParams)
Add a face to a person into a person group for face identification or verification. To deal with
an image contains multiple faces, input face can be specified as an image with a targetFace
rectangle. It returns a persistedFaceId representing the added face. No image will be stored.
Only the extracted face feature will be stored on server until PersonGroup PersonFace -
Delete, PersonGroup
Person - Delete or
PersonGroup - Delete is
called.
Note persistedFaceId is different from faceId generated by Face -
Detect.
- Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
- Each person entry can hold up to 248 faces.
- JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
- "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" rectangle is not returned from Face - Detect, there’s no guarantee to detect and add the face successfully.
- Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures.
- Adding/deleting faces to/from a same person will be processed sequentially. Adding/deleting faces to/from different persons are processed in parallel.
- The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
- Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to How to specify a detection model.
function addFaceFromUrl(personGroupId: string, personId: string, url: string, options?: PersonGroupPersonAddFaceFromUrlOptionalParams): Promise<PersonGroupPersonAddFaceFromUrlResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- url
-
string
Publicly reachable URL of an image
The optional parameters
Returns
Promise<Models.PersonGroupPersonAddFaceFromUrlResponse>
addFaceFromUrl(string, string, string, PersonGroupPersonAddFaceFromUrlOptionalParams, ServiceCallback<PersistedFace>)
function addFaceFromUrl(personGroupId: string, personId: string, url: string, options: PersonGroupPersonAddFaceFromUrlOptionalParams, callback: ServiceCallback<PersistedFace>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- url
-
string
Publicly reachable URL of an image
The optional parameters
- callback
The callback
addFaceFromUrl(string, string, string, ServiceCallback<PersistedFace>)
function addFaceFromUrl(personGroupId: string, personId: string, url: string, callback: ServiceCallback<PersistedFace>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- url
-
string
Publicly reachable URL of an image
- callback
The callback
create(string, PersonGroupPersonCreateOptionalParams)
Create a new person in a specified person group.
function create(personGroupId: string, options?: PersonGroupPersonCreateOptionalParams): Promise<PersonGroupPersonCreateResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
The optional parameters
Returns
Promise<PersonGroupPersonCreateResponse>
Promise<Models.PersonGroupPersonCreateResponse>
create(string, PersonGroupPersonCreateOptionalParams, ServiceCallback<Person>)
function create(personGroupId: string, options: PersonGroupPersonCreateOptionalParams, callback: ServiceCallback<Person>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
The optional parameters
- callback
The callback
create(string, ServiceCallback<Person>)
function create(personGroupId: string, callback: ServiceCallback<Person>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- callback
The callback
deleteFace(string, string, string, RequestOptionsBase)
Delete a face from a person in a person group by specified personGroupId, personId and
persistedFaceId.
Adding/deleting faces to/from a same person will be processed sequentially.
Adding/deleting faces to/from different persons are processed in parallel.
function deleteFace(personGroupId: string, personId: string, persistedFaceId: string, options?: RequestOptionsBase): Promise<RestResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
deleteFace(string, string, string, RequestOptionsBase, ServiceCallback<void>)
function deleteFace(personGroupId: string, personId: string, persistedFaceId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
- options
- RequestOptionsBase
The optional parameters
- callback
-
ServiceCallback<void>
The callback
deleteFace(string, string, string, ServiceCallback<void>)
function deleteFace(personGroupId: string, personId: string, persistedFaceId: string, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
- callback
-
ServiceCallback<void>
The callback
deleteMethod(string, string, RequestOptionsBase)
Delete an existing person from a person group. The persistedFaceId, userData, person name and face feature in the person entry will all be deleted.
function deleteMethod(personGroupId: string, personId: string, options?: RequestOptionsBase): Promise<RestResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
deleteMethod(string, string, RequestOptionsBase, ServiceCallback<void>)
function deleteMethod(personGroupId: string, personId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- options
- RequestOptionsBase
The optional parameters
- callback
-
ServiceCallback<void>
The callback
deleteMethod(string, string, ServiceCallback<void>)
function deleteMethod(personGroupId: string, personId: string, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- callback
-
ServiceCallback<void>
The callback
get(string, string, RequestOptionsBase)
Retrieve a person's information, including registered persisted faces, name and userData.
function get(personGroupId: string, personId: string, options?: RequestOptionsBase): Promise<PersonGroupPersonGetResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<PersonGroupPersonGetResponse>
Promise<Models.PersonGroupPersonGetResponse>
get(string, string, RequestOptionsBase, ServiceCallback<Person>)
function get(personGroupId: string, personId: string, options: RequestOptionsBase, callback: ServiceCallback<Person>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- options
- RequestOptionsBase
The optional parameters
- callback
The callback
get(string, string, ServiceCallback<Person>)
function get(personGroupId: string, personId: string, callback: ServiceCallback<Person>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- callback
The callback
getFace(string, string, string, RequestOptionsBase)
Retrieve information about a persisted face (specified by persistedFaceId, personId and its belonging personGroupId).
function getFace(personGroupId: string, personId: string, persistedFaceId: string, options?: RequestOptionsBase): Promise<PersonGroupPersonGetFaceResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<PersonGroupPersonGetFaceResponse>
Promise<Models.PersonGroupPersonGetFaceResponse>
getFace(string, string, string, RequestOptionsBase, ServiceCallback<PersistedFace>)
function getFace(personGroupId: string, personId: string, persistedFaceId: string, options: RequestOptionsBase, callback: ServiceCallback<PersistedFace>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
- options
- RequestOptionsBase
The optional parameters
- callback
The callback
getFace(string, string, string, ServiceCallback<PersistedFace>)
function getFace(personGroupId: string, personId: string, persistedFaceId: string, callback: ServiceCallback<PersistedFace>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
- callback
The callback
list(string, PersonGroupPersonListOptionalParams)
List all persons in a person group, and retrieve person information (including personId, name, userData and persistedFaceIds of registered faces of the person).
function list(personGroupId: string, options?: PersonGroupPersonListOptionalParams): Promise<PersonGroupPersonListResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
The optional parameters
Returns
Promise<PersonGroupPersonListResponse>
Promise<Models.PersonGroupPersonListResponse>
list(string, PersonGroupPersonListOptionalParams, ServiceCallback<Person[]>)
function list(personGroupId: string, options: PersonGroupPersonListOptionalParams, callback: ServiceCallback<Person[]>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
The optional parameters
- callback
The callback
list(string, ServiceCallback<Person[]>)
function list(personGroupId: string, callback: ServiceCallback<Person[]>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- callback
The callback
update(string, string, PersonGroupPersonUpdateOptionalParams)
Update name or userData of a person.
function update(personGroupId: string, personId: string, options?: PersonGroupPersonUpdateOptionalParams): Promise<RestResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
update(string, string, PersonGroupPersonUpdateOptionalParams, ServiceCallback<void>)
function update(personGroupId: string, personId: string, options: PersonGroupPersonUpdateOptionalParams, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
update(string, string, ServiceCallback<void>)
function update(personGroupId: string, personId: string, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- callback
-
ServiceCallback<void>
The callback
updateFace(string, string, string, PersonGroupPersonUpdateFaceOptionalParams)
Add a face to a person into a person group for face identification or verification. To deal with
an image contains multiple faces, input face can be specified as an image with a targetFace
rectangle. It returns a persistedFaceId representing the added face. No image will be stored.
Only the extracted face feature will be stored on server until PersonGroup PersonFace -
Delete, PersonGroup
Person - Delete or
PersonGroup - Delete is
called.
Note persistedFaceId is different from faceId generated by Face -
Detect.
- Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
- Each person entry can hold up to 248 faces.
- JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
- "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" rectangle is not returned from Face - Detect, there’s no guarantee to detect and add the face successfully.
- Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures.
- Adding/deleting faces to/from a same person will be processed sequentially. Adding/deleting faces to/from different persons are processed in parallel.
function updateFace(personGroupId: string, personId: string, persistedFaceId: string, options?: PersonGroupPersonUpdateFaceOptionalParams): Promise<RestResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
updateFace(string, string, string, PersonGroupPersonUpdateFaceOptionalParams, ServiceCallback<void>)
function updateFace(personGroupId: string, personId: string, persistedFaceId: string, options: PersonGroupPersonUpdateFaceOptionalParams, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
updateFace(string, string, string, ServiceCallback<void>)
function updateFace(personGroupId: string, personId: string, persistedFaceId: string, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- personId
-
string
Id referencing a particular person.
- persistedFaceId
-
string
Id referencing a particular persistedFaceId of an existing face.
- callback
-
ServiceCallback<void>
The callback