J
J
junkpot2019-03-23 22:00:38
C++ / C#
junkpot, 2019-03-23 22:00:38

Why is Microsoft Cognitive Face not working?

I'm trying to write a Xamarin program that detects faces in a photo I just took, but calling DetectAsync throws a NullReferenceException in that part of the code. What could be the problem?

using (Stream imageFileStream = new MemoryStream(a))
                {
                    imageFileStream.Position = 0;
                    var result = await faceServiceClient.DetectAsync(imageFileStream);

                    if (result != null)
                        await BlobStorageService.SaveBlockBlob("photos", a, Entry1.Text);
                }

Where a is the byte array of the image.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2019-03-24
@2ord

You need to look for the reason in "a - array of bytes of the image."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question