你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ImageModerationExtensions.MatchFileInputAsync 方法

定义

根据某个自定义图像列表模糊匹配某个图像。 可以使用 href=“/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe”>this</a> API 创建和管理自定义图像列表<。

返回匹配图像的 ID 和标记。<br/><br/> 注意:在添加和删除操作反映在响应中之前,必须在相应的图像列表中运行刷新索引。

public static System.Threading.Tasks.Task<Microsoft.Azure.CognitiveServices.ContentModerator.Models.MatchResponse> MatchFileInputAsync (this Microsoft.Azure.CognitiveServices.ContentModerator.IImageModeration operations, System.IO.Stream imageStream, string listId = default, bool? cacheImage = default, System.Threading.CancellationToken cancellationToken = default);
static member MatchFileInputAsync : Microsoft.Azure.CognitiveServices.ContentModerator.IImageModeration * System.IO.Stream * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.CognitiveServices.ContentModerator.Models.MatchResponse>
<Extension()>
Public Function MatchFileInputAsync (operations As IImageModeration, imageStream As Stream, Optional listId As String = Nothing, Optional cacheImage As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of MatchResponse)

参数

operations
IImageModeration

此扩展方法的操作组。

imageStream
Stream

图像文件。

listId
String

列表 ID。

cacheImage
Nullable<Boolean>

是否保留提交的映像供将来使用;如果省略,则默认为 false。

cancellationToken
CancellationToken

取消标记。

返回

适用于