本文介绍图像分析处理(imageprocess)类目下的膝关节术前测量DetectKneeKeypointXRay的语法及示例。
功能描述
膝关节术前测量能力可以对输入的下肢全长片正位片,检测到的关键点坐标及其位置标签(最多20个,左右各10个)。
关于该接口功能的示例图如下:

接入指引
1. 注册阿里云账号:打开阿里云官网,在阿里云官网右上角,单击立即注册,按照操作提示完成账号注册。
2. 开通能力:请确保您已开通图像分析处理,若未开通服务请立即开通。
3. 创建AccessKey:请确保您已创建AccessKey,如果您使用的是子账号AccessKey,您需要给子账号赋予AliyunVIAPIFullAccess权限,具体操作,请参见RAM授权。
4. 在线调试(可选):您可以通过OpenAPI Explorer在线调试能力,查看完整的调用示例代码及SDK依赖信息,也可以下载完整的工程。
5. 开发接入步骤:
- 在SDK总览中选择您要接入使用的SDK语言。
- 在对应语言的SDK文档中找到AI类目为图像分析处理(imageprocess)的SDK包进行安装。
- 参考文档中提供的示例代码进行适当修改后调用。
6. 客户端直接调用:该能力常用的客户端调用方式包括以下几种。
输入限制
- 图像格式:JPEG、JPG、PNG、DCM、BMP、TIFF、HEIC。
- 图像大小:不超过100 MB。
- URL地址中不能包含中文字符。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DetectKneeKeypointXRay | 系统规定参数。取值:DetectKneeKeypointXRay。 |
ImageUrl | String | 是 | https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xuhan/8%E6%9C%88%E4%BB%BD%E5%8C%BB%E7%96%97/sample_png_1.png | 图像URL地址。推荐使用上海地域的OSS链接,对于文件在本地或者非上海地域OSS链接的情况,请参见文件URL处理。 |
DataFormat | String | 是 | png | 图像格式。目前只支持以下几种:jpeg,jpg,png,dcm,bmp、tiff、heic。 |
OrgId | String | 是 | 0001 | 数据来源机构代码。 |
OrgName | String | 是 | weiyi | 数据来源机构名称。 |
TracerId | String | 否 | 123 | 提供用户自定义TracerID的功能,为本次请求指定一个ID便于跟踪。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | ADF539E2-893F-490D-9553-F4415331FE4D | 请求ID。 |
Data | Object | 返回的结果数据内容。 |
|
KeyPoints | Array of KeyPoints | 算法返回的结果。 |
|
Value | Float | 0.3920471668243408 | 概率值。 |
Coordinates | Array of Integer | [198,0] | 点的坐标 |
Tag | Object | 数据结构。 |
|
Direction | String | R | 方向, |
Label | String | v1 | 点的标签。
|
ImageUrl | String | https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xuhan/8%E6%9C%88%E4%BB%BD%E5%8C%BB%E7%96%97/sample_png_1.png | 图像URL地址,与请求参数中的 |
OrgId | String | 0001 | 数据来源机构代码,与请求参数中的 |
OrgName | String | weiyi | 数据来源机构名称,与请求参数中的 |
SDK参考
阿里云视觉AI图像分析处理类目下的膝关节术前测量能力推荐使用SDK调用,支持多种编程语言,调用时请选择AI类目为图像分析处理(imageprocess)的SDK包,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见SDK总览。
示例
请求示例
http(s)://imageprocess.cn-shanghai.aliyuncs.com/?Action=DetectKneeKeypointXRay //更多关于访问域名(Endpoint)信息,请参见:https://help.aliyun.com/document_detail/143103.html
&DataFormat=png
&ImageUrl=https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xuhan/8%E6%9C%88%E4%BB%BD%E5%8C%BB%E7%96%97/sample_png_1.png
&OrgId=0001
&OrgName=weiyi
&TracerId=123
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DetectKneeKeypointXRayResponse>
<RequestId>ADF539E2-893F-490D-9553-F4415331FE4D</RequestId>
<Data>
<OrgId>1</OrgId>
<KeyPoints>
<Coordinates>198</Coordinates>
<Coordinates>0</Coordinates>
<Value>0.3920471668243408</Value>
<Tag>
<Label>v1</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>101</Coordinates>
<Coordinates>426</Coordinates>
<Value>0.709830105304718</Value>
<Tag>
<Label>v2</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>146</Coordinates>
<Coordinates>103</Coordinates>
<Value>0.326011061668396</Value>
<Tag>
<Label>v3</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>152</Coordinates>
<Coordinates>103</Coordinates>
<Value>0.5343582630157471</Value>
<Tag>
<Label>v4</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>254</Coordinates>
<Coordinates>116</Coordinates>
<Value>0.681907594203949</Value>
<Tag>
<Label>v5</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>3</Coordinates>
<Coordinates>93</Coordinates>
<Value>0.32550984621047974</Value>
<Tag>
<Label>v6</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>149</Coordinates>
<Coordinates>106</Coordinates>
<Value>0.9705429077148438</Value>
<Tag>
<Label>v7</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>251</Coordinates>
<Coordinates>119</Coordinates>
<Value>0.6277104616165161</Value>
<Tag>
<Label>v8</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>171</Coordinates>
<Coordinates>153</Coordinates>
<Value>0.2979351282119751</Value>
<Tag>
<Label>v9</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>299</Coordinates>
<Coordinates>329</Coordinates>
<Value>0.1713046133518219</Value>
<Tag>
<Label>v10</Label>
<Direction>R</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>350</Coordinates>
<Coordinates>217</Coordinates>
<Value>0.6529710292816162</Value>
<Tag>
<Label>v1</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>392</Coordinates>
<Coordinates>329</Coordinates>
<Value>0.5352941751480103</Value>
<Tag>
<Label>v2</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>344</Coordinates>
<Coordinates>121</Coordinates>
<Value>0.27702343463897705</Value>
<Tag>
<Label>v3</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>340</Coordinates>
<Coordinates>154</Coordinates>
<Value>0.2746117115020752</Value>
<Tag>
<Label>v4</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>337</Coordinates>
<Coordinates>153</Coordinates>
<Value>0.5176264643669128</Value>
<Tag>
<Label>v5</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>344</Coordinates>
<Coordinates>122</Coordinates>
<Value>0.43878501653671265</Value>
<Tag>
<Label>v6</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>241</Coordinates>
<Coordinates>321</Coordinates>
<Value>0.5788975954055786</Value>
<Tag>
<Label>v7</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>340</Coordinates>
<Coordinates>154</Coordinates>
<Value>0.38519006967544556</Value>
<Tag>
<Label>v8</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>392</Coordinates>
<Coordinates>327</Coordinates>
<Value>0.23624108731746674</Value>
<Tag>
<Label>v9</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<KeyPoints>
<Coordinates>219</Coordinates>
<Coordinates>457</Coordinates>
<Value>0.07069363445043564</Value>
<Tag>
<Label>v10</Label>
<Direction>L</Direction>
</Tag>
</KeyPoints>
<ImageUrl>http://viapi-test.oss-cn-shanghai-internal.aliyuncs.com/test-team/xuhan/8%E6%9C%88%E4%BB%BD%E5%8C%BB%E7%96%97/sample_png_1.png</ImageUrl>
<OrgName>weiyi</OrgName>
</Data>
</DetectKneeKeypointXRayResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "ADF539E2-893F-490D-9553-F4415331FE4D",
"Data" : {
"OrgId" : 1,
"KeyPoints" : [ {
"Coordinates" : [ 198, 0 ],
"Value" : 0.3920471668243408,
"Tag" : {
"Label" : "v1",
"Direction" : "R"
}
}, {
"Coordinates" : [ 101, 426 ],
"Value" : 0.709830105304718,
"Tag" : {
"Label" : "v2",
"Direction" : "R"
}
}, {
"Coordinates" : [ 146, 103 ],
"Value" : 0.326011061668396,
"Tag" : {
"Label" : "v3",
"Direction" : "R"
}
}, {
"Coordinates" : [ 152, 103 ],
"Value" : 0.5343582630157471,
"Tag" : {
"Label" : "v4",
"Direction" : "R"
}
}, {
"Coordinates" : [ 254, 116 ],
"Value" : 0.681907594203949,
"Tag" : {
"Label" : "v5",
"Direction" : "R"
}
}, {
"Coordinates" : [ 3, 93 ],
"Value" : 0.32550984621047974,
"Tag" : {
"Label" : "v6",
"Direction" : "R"
}
}, {
"Coordinates" : [ 149, 106 ],
"Value" : 0.9705429077148438,
"Tag" : {
"Label" : "v7",
"Direction" : "R"
}
}, {
"Coordinates" : [ 251, 119 ],
"Value" : 0.6277104616165161,
"Tag" : {
"Label" : "v8",
"Direction" : "R"
}
}, {
"Coordinates" : [ 171, 153 ],
"Value" : 0.2979351282119751,
"Tag" : {
"Label" : "v9",
"Direction" : "R"
}
}, {
"Coordinates" : [ 299, 329 ],
"Value" : 0.1713046133518219,
"Tag" : {
"Label" : "v10",
"Direction" : "R"
}
}, {
"Coordinates" : [ 350, 217 ],
"Value" : 0.6529710292816162,
"Tag" : {
"Label" : "v1",
"Direction" : "L"
}
}, {
"Coordinates" : [ 392, 329 ],
"Value" : 0.5352941751480103,
"Tag" : {
"Label" : "v2",
"Direction" : "L"
}
}, {
"Coordinates" : [ 344, 121 ],
"Value" : 0.27702343463897705,
"Tag" : {
"Label" : "v3",
"Direction" : "L"
}
}, {
"Coordinates" : [ 340, 154 ],
"Value" : 0.2746117115020752,
"Tag" : {
"Label" : "v4",
"Direction" : "L"
}
}, {
"Coordinates" : [ 337, 153 ],
"Value" : 0.5176264643669128,
"Tag" : {
"Label" : "v5",
"Direction" : "L"
}
}, {
"Coordinates" : [ 344, 122 ],
"Value" : 0.43878501653671265,
"Tag" : {
"Label" : "v6",
"Direction" : "L"
}
}, {
"Coordinates" : [ 241, 321 ],
"Value" : 0.5788975954055786,
"Tag" : {
"Label" : "v7",
"Direction" : "L"
}
}, {
"Coordinates" : [ 340, 154 ],
"Value" : 0.38519006967544556,
"Tag" : {
"Label" : "v8",
"Direction" : "L"
}
}, {
"Coordinates" : [ 392, 327 ],
"Value" : 0.23624108731746674,
"Tag" : {
"Label" : "v9",
"Direction" : "L"
}
}, {
"Coordinates" : [ 219, 457 ],
"Value" : 0.07069363445043564,
"Tag" : {
"Label" : "v10",
"Direction" : "L"
}
} ],
"ImageUrl" : "http://viapi-test.oss-cn-shanghai-internal.aliyuncs.com/test-team/xuhan/8%E6%9C%88%E4%BB%BD%E5%8C%BB%E7%96%97/sample_png_1.png",
"OrgName" : "weiyi"
}
}
错误码
关于膝关节术前测量的错误码。详情请参见常见错误码。
安全声明
- 请确保上传的图片或文件来源符合相应的法律法规。
- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。