你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Image Moderation - Find Faces Url Input
返回找到的人脸列表。
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/FindFaces
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/FindFaces?overload=url&CacheImage={CacheImage}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
Endpoint
|
path | True |
string |
支持的 Azure 认知服务终结点 (协议和主机名,例如 https://westus.api.cognitive.microsoft.com) 。 |
Cache
|
query |
boolean |
是否保留提交的映像供将来使用。 如果省略,则默认值为 false。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
|
Content-Type | True |
string |
内容类型。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
DataRepresentation |
string |
|
Value |
string |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
找到的人脸列表。 |
|
Other Status Codes |
错误响应。 |
安全性
Ocp-Apim-Subscription-Key
类型:
apiKey
在:
header
示例
Find Faces request
示例请求
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/FindFaces?overload=url
{
"DataRepresentation": "URL",
"Value": "https://moderatorsampleimages.blob.core.windows.net/samples/img_300.jpg"
}
示例响应
{
"Faces": [
{
"Left": 80,
"Right": 118,
"Top": 44,
"Bottom": 82
}
],
"Count": 1,
"AdvancedInfo": [],
"Result": true,
"Status": {
"Code": 3000,
"Description": "OK",
"Exception": ""
},
"TrackingId": "SEA_ad975eeae1f24f81bebb40be0c3ba4fd_ContentModerator.Preview_01158625-4fea-4dd5-8f21-5e2657ea2eee"
}
定义
名称 | 说明 |
---|---|
APIError |
API 返回的错误信息。 |
Error |
错误正文。 |
Face |
找到的人脸的坐标。 |
Found |
包含找到的人脸的请求对象。 |
Key |
键/值对对象属性。 |
Status |
状态属性。 |
APIError
API 返回的错误信息。
名称 | 类型 | 说明 |
---|---|---|
Error |
错误正文。 |
Error
错误正文。
名称 | 类型 | 说明 |
---|---|---|
Code |
string |
|
Message |
string |
Face
找到的人脸的坐标。
名称 | 类型 | 说明 |
---|---|---|
Bottom |
integer |
底部坐标。 |
Left |
integer |
左坐标。 |
Right |
integer |
右坐标。 |
Top |
integer |
顶部坐标。 |
FoundFaces
包含找到的人脸的请求对象。
名称 | 类型 | 说明 |
---|---|---|
AdvancedInfo |
高级信息。 |
|
CacheId |
string |
缓存 ID。 |
Count |
integer |
找到的人脸数。 |
Faces |
Face[] |
人脸列表。 |
Result |
boolean |
如果找到结果,则为 True。 |
Status |
评估状态。 |
|
TrackingId |
string |
跟踪 ID。 |
KeyValuePair
键/值对对象属性。
名称 | 类型 | 说明 |
---|---|---|
Key |
string |
键参数。 |
Value |
string |
值参数。 |
Status
状态属性。
名称 | 类型 | 说明 |
---|---|---|
Code |
integer |
状态代码。 |
Description |
string |
状态说明。 |
Exception |
string |
异常状态。 |