PersonGroupPerson class

Class representing a PersonGroupPerson.

Constructors

PersonGroupPerson(FaceClientContext)

Create a PersonGroupPerson.

Methods

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.
addFaceFromStream(string, string, HttpRequestBody, PersonGroupPersonAddFaceFromStreamOptionalParams, ServiceCallback<PersistedFace>)
addFaceFromStream(string, string, HttpRequestBody, ServiceCallback<PersistedFace>)
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.
addFaceFromUrl(string, string, string, PersonGroupPersonAddFaceFromUrlOptionalParams, ServiceCallback<PersistedFace>)
addFaceFromUrl(string, string, string, ServiceCallback<PersistedFace>)
create(string, PersonGroupPersonCreateOptionalParams)

Create a new person in a specified person group.

create(string, PersonGroupPersonCreateOptionalParams, ServiceCallback<Person>)
create(string, ServiceCallback<Person>)
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.

deleteFace(string, string, string, RequestOptionsBase, ServiceCallback<void>)
deleteFace(string, string, string, ServiceCallback<void>)
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.

deleteMethod(string, string, RequestOptionsBase, ServiceCallback<void>)
deleteMethod(string, string, ServiceCallback<void>)
get(string, string, RequestOptionsBase)

Retrieve a person's information, including registered persisted faces, name and userData.

get(string, string, RequestOptionsBase, ServiceCallback<Person>)
get(string, string, ServiceCallback<Person>)
getFace(string, string, string, RequestOptionsBase)

Retrieve information about a persisted face (specified by persistedFaceId, personId and its belonging personGroupId).

getFace(string, string, string, RequestOptionsBase, ServiceCallback<PersistedFace>)
getFace(string, string, string, ServiceCallback<PersistedFace>)
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).

list(string, PersonGroupPersonListOptionalParams, ServiceCallback<Person[]>)
list(string, ServiceCallback<Person[]>)
update(string, string, PersonGroupPersonUpdateOptionalParams)

Update name or userData of a person.

update(string, string, PersonGroupPersonUpdateOptionalParams, ServiceCallback<void>)
update(string, string, ServiceCallback<void>)
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.
updateFace(string, string, string, PersonGroupPersonUpdateFaceOptionalParams, ServiceCallback<void>)
updateFace(string, string, string, ServiceCallback<void>)

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.

options
PersonGroupPersonAddFaceFromStreamOptionalParams

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.

options
PersonGroupPersonAddFaceFromStreamOptionalParams

The optional parameters

callback

ServiceCallback<PersistedFace>

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

ServiceCallback<PersistedFace>

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

options
PersonGroupPersonAddFaceFromUrlOptionalParams

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

options
PersonGroupPersonAddFaceFromUrlOptionalParams

The optional parameters

callback

ServiceCallback<PersistedFace>

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

ServiceCallback<PersistedFace>

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.

options
PersonGroupPersonCreateOptionalParams

The optional parameters

Returns

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.

options
PersonGroupPersonCreateOptionalParams

The optional parameters

callback

ServiceCallback<Person>

The callback

create(string, ServiceCallback<Person>)

function create(personGroupId: string, callback: ServiceCallback<Person>)

Parameters

personGroupId

string

Id referencing a particular person group.

callback

ServiceCallback<Person>

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<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

ServiceCallback<Person>

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

ServiceCallback<Person>

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<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

ServiceCallback<PersistedFace>

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

ServiceCallback<PersistedFace>

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.

options
PersonGroupPersonListOptionalParams

The optional parameters

Returns

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.

options
PersonGroupPersonListOptionalParams

The optional parameters

callback

ServiceCallback<Person[]>

The callback

list(string, ServiceCallback<Person[]>)

function list(personGroupId: string, callback: ServiceCallback<Person[]>)

Parameters

personGroupId

string

Id referencing a particular person group.

callback

ServiceCallback<Person[]>

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.

options
PersonGroupPersonUpdateOptionalParams

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.

options
PersonGroupPersonUpdateOptionalParams

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.

options
PersonGroupPersonUpdateFaceOptionalParams

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.

options
PersonGroupPersonUpdateFaceOptionalParams

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