你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Image Moderation - Match File Input
Fuzzily match an image against one of your custom image lists. You can create and manage your custom image lists by using this API.
Returns the ID and tags of a matching image.
Note: You must refresh the index on the corresponding image list to ensure that additions and removals are reflected in the response.
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/Match
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/Match?overload=stream&listId={listId}&CacheImage={CacheImage}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Supported Azure Cognitive Services endpoints (protocol and host name, such as https://westus.api.cognitive.microsoft.com). |
Cache
|
query |
boolean |
Whether to retain the submitted image for future use. If it's omitted, the default is false. |
|
list
|
query |
string |
List ID. |
Request Header
Media Types: "image/gif", "image/jpeg", "image/png", "image/bmp", "image/tiff"
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Request Body
Media Types: "image/gif", "image/jpeg", "image/png", "image/bmp", "image/tiff"
Name | Type | Description |
---|---|---|
ImageStream |
object |
Image file. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Supported values for tags are:
|
|
Other Status Codes |
Error response. |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Definitions
Name | Description |
---|---|
APIError |
Error information that the API returns. |
Error |
Error body. |
Match |
Match details. |
Match |
Response for a match request. |
Status |
Status properties. |
APIError
Error information that the API returns.
Name | Type | Description |
---|---|---|
Error |
Error body. |
Error
Error body.
Name | Type | Description |
---|---|---|
Code |
string |
|
Message |
string |
Match
Match details.
Name | Type | Description |
---|---|---|
Label |
string |
Label. |
MatchId |
integer |
Match ID. |
Score |
number |
Confidence score of the image match. |
Source |
string |
Source. |
Tags |
integer[] |
Tags for match details. |
MatchResponse
Response for a match request.
Name | Type | Description |
---|---|---|
CacheID |
string |
Cache ID. |
IsMatch |
boolean |
Indicates if there is a match. |
Matches |
Match[] |
Match details. |
Status |
Evaluation status. |
|
TrackingId |
string |
Tracking ID. |
Status
Status properties.
Name | Type | Description |
---|---|---|
Code |
integer |
Status code. |
Description |
string |
Status description. |
Exception |
string |
Exception status. |