I'm developing app in Xamarin.iOS to recognize faces on the photo. I'm using Cognitive Services and Windows SDK. When I send photo with two faces (which corresponds to two different persons) I receive two elements array:
var result = results[0 or 1]
I wonder how I can check if array have two elements (because in most cases I send only 1 face, so result is have one element)?
edit Maybe I will show my code:
var result1 = results[1].Candidates[0].PersonId;
var person = await fsc.GetPersonAsync(personGroupId, result);
Console.WriteLine($"Person indentified is {person.Name}");
results[]
is an array where is returned faceID of recognized person.
What I mean is that if I send photo with 2 faces I get return with results[0]
and results[1]
-> where are faceIDs of recognized persons. I would like to show to user that there are two persons on photo. But if I send photo with one face returned is array results[0]
.