Azure Cognitive Face会抛出NullReferenceException [重复]

问题描述 投票:0回答:1

这个问题在这里已有答案:

我正在尝试制作一个Xamarin应用程序来识别相机拍摄的照片上的脸部。不知何故,这部分代码抛出了NullReferenceException

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);
}

其中“a”是图片的字节[]

我想知道如何解决这个问题?

c# azure xamarin microsoft-cognitive
1个回答
0
投票

我认为微软停止支持Project Oxford(或类似的东西),所以我使用Azure.Cognitive.Vision.Face代替:\

© www.soinside.com 2019 - 2024. All rights reserved.