Detects barcodes and QR codes in an image.
Operation description
-
For supported image encoding formats, see Limits on images.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:DetectImageCodes |
none |
*Project
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The name of the project. You can obtain it from the response of the CreateProject operation. |
test-project |
| SourceURI |
string |
Yes |
The OSS URI of the image file. Format: oss://${Bucket}/${Object}. |
oss://test-bucket/test-object.jpg |
| CredentialConfig | CredentialConfig |
No |
Leave this parameter empty unless you have specific requirements. Authorization chain settings. For more information, see Use authorization chains to access resources of other entities. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| Codes |
array |
The barcodes or QR codes. |
|
| Codes |
The barcode or QR code information. |
||
| RequestId |
string |
The request ID. |
6E93D6C9-5AC0-49F9-914D-E02678D3**** |
Examples
Success response
JSON format
{
"Codes": [
{
"Content": "https://www.example.com",
"Confidence": 0.9,
"Boundary": {
"Width": 200,
"Height": 300,
"Left": 10,
"Top": 30,
"Polygon": [
{
"X": 10,
"Y": 10
}
]
},
"Type": "qrcode"
}
],
"RequestId": "6E93D6C9-5AC0-49F9-914D-E02678D3****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.