调用GetImage接口从媒体集中获取一张图片的信息。
接口说明
此接口已不再维护,建议使用新版(2020-09-30 版本)接口 GetFileMeta 。关于新版与旧版 API 的对比,请参见新旧版本使用指引中的新版与旧版 API 对应关系说明章节。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
imm:GetImage | *全部资源 * |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
Project | string | 是 | 项目名称。 | immimagetest |
SetId | string | 是 | 媒体集的唯一标识。 | set001 |
ImageUri | string | 是 | 图片的 OSS URI。 OSS 地址规则为 | oss://imm-test/testcases/face1.jpg |
返回参数
示例
正常返回示例
JSON
格式
{
"ImageQuality": {
"OverallScore": 0.7759467363357544,
"Color": 0.6101377010345459,
"ColorScore": 0.6101377010345459,
"ContrastScore": 0.6101377010345459,
"Contrast": 0.6101377010345459,
"ExposureScore": 0.6101377010345459,
"ClarityScore": 0.6101377010345459,
"Clarity": 0.6101377010345459,
"Exposure": 0.6101377010345459,
"CompositionScore": 0.6101377010345459
},
"ModifyTime": "2020-11-24T10:56:52.461Z",
"Address": {
"Township": "转塘街道",
"District": "西湖区",
"AddressLine": "中国浙江省杭州市西湖区转塘街道石龙山西路",
"Country": "中国",
"City": "杭州市",
"Province": "浙江省"
},
"SourceType": "image",
"SourceUri": "oss://imm-test/testcases/face1.jpg",
"FacesFailReason": "Timeout",
"CroppingSuggestionStatus": "NotProcessed",
"CroppingSuggestionFailReason": "Timeout",
"AddressFailReason": "Timeout",
"RemarksA": "remarka",
"AddressModifyTime": "2020-11-24T10:56:52.461Z",
"RemarksB": "remarkb",
"ImageFormat": "jpg",
"TagsFailReason": "Timeout",
"RemarksArrayB": "[\"remarkb1\",\"remarkb2\"]",
"FacesModifyTime": "2020-11-24T10:56:52.461Z",
"Exif": "{\"FileSize\":{\"value\":\"29304\"},\"Format\":{\"value\":\"jpg\"},\"ImageHeight\":{\"value\":\"417\"},\"ImageWidth\":{\"value\":\"500\"},\"ResolutionUnit\":{\"value\":\"2\"},\"XResolution\":{\"value\":\"96/1\"},\"YResolution\":{\"value\":\"96/1\"}}",
"RemarksC": "remarkc",
"RemarksD": "remarkd",
"ImageWidth": 500,
"RemarksArrayA": "[\"remarka1\",\"remarka2\"]",
"SourcePosition": "00000000.010",
"Tags": [
{
"TagName": "脸",
"TagConfidence": 0.9812195897102356,
"CentricScore": 0,
"TagLevel": 2,
"ParentTagName": "人物"
}
],
"Faces": [
{
"Gender": "MALE",
"GenderConfidence": 1,
"FaceId": "59edc040d0a8f4952b183d1b5044913a0ccd8739500ee2705ffe4965a0406a51",
"FaceAttributes": {
"GlassesConfidence": 1,
"Glasses": "NONE",
"Mask": "NONE",
"BeardConfidence": 1,
"MaskConfidence": 1,
"FaceBoundary": {
"Top": 191,
"Width": 269,
"Height": 252,
"Left": 95
},
"HeadPose": {
"Pitch": 18.385589599609375,
"Roll": 4.204030513763428,
"Yaw": 2.4945924282073975
},
"Beard": "NONE"
},
"FaceQuality": 0.9321779608726501,
"Emotion": "HAPPY",
"Age": "29",
"FaceConfidence": 0.9608758687973022,
"EmotionConfidence": 0.7079545259475708,
"Attractive": 0.96,
"GroupId": "group-not-grouped",
"EmotionDetails": {
"HAPPY": 0.7079545259475708,
"CALM": 0.2918718755245209,
"SURPRISED": 0.00006676767952740192,
"DISGUSTED": 0.000033771051676012576,
"ANGRY": 0.00001282201901631197,
"SAD": 0.00001527295717096422,
"SCARED": 0.0000014976058082538657
}
}
],
"AddressStatus": "Success",
"FacesStatus": "Success",
"ImageQualityModifyTime": "2020-11-24T10:56:52.461Z",
"CroppingSuggestion": [
{
"Score": 0.8979608535766602,
"CroppingBoundary": {
"Top": 30,
"Width": 200,
"Height": 300,
"Left": 10
},
"AspectRatio": "2:3"
}
],
"RequestId": "D349D345-4744-472C-ABDC-7A29A5E04042",
"CreateTime": "2020-11-24T9:56:52.461Z",
"ExternalId": "externalId001",
"TagsModifyTime": "2020-11-24T10:56:52.461Z",
"ImageQualityFailReason": "Timeout",
"Orientation": "{\"val\":\"Right-top\",\"type\":3}",
"ImageUri": "oss://imm-test/testcases/face1.jpg",
"OCRStatus": "NotProcessed",
"OCRModifyTime": "2020-11-24T10:56:52.461Z",
"ImageTime": "2020-11-24T10:56:52.461Z",
"CroppingSuggestionModifyTime": "2020-11-24T10:56:52.461Z",
"ImageHeight": 861,
"ImageQualityStatus": "Success",
"TagsStatus": "Success",
"OCRFailReason": "Timeout",
"SetId": "set001",
"FileSize": 69732,
"Location": "30.134390,120.074997",
"OCR": [
{
"OCRConfidence": 0.8254936695098877,
"OCRContents": "欢迎使用智能媒体管理",
"OCRBoundary": {
"Top": 12,
"Width": 12,
"Height": 12,
"Left": 12
}
}
]
}
错误码
访问错误中心查看更多错误码。