cos:GetObject, ci:CreateDetectQRcodeJob.cos:PutObject in the authorization policy.PUT /<ObjectKey> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth StringPic-Operations: <PicOperations>
Parameter Name | Description | Type | Required or Not |
is_pic_info | Whether to return original image information, 0 means no, 1 means yes, default is 0 | Int | No |
rules | Processing rules, one rule corresponds to one processing result (a maximum of five rules are currently supported). If left blank, image processing will not be performed. | Array | No |
Parameter Name | Description | Type | Required or Not |
bucket | The destination bucket for storing results, with the format BucketName-APPID. If not specified, it defaults to the current bucket. | String | No |
fileid | The file path name of the processing result. For example, if it starts with /, it will be stored in the specified folder; otherwise, it will be stored in the same directory as the original image file. | String | No |
rule | process parameter, see Cloud Infinite image processing API. If processed with a specified style, start with style/, followed by the style name.For example, if the style name is test, the rule field is style/test. | String | Yes |
QRcode/cover/<mode>
Parameter Name | Description | Type | Required or Not |
cover | QR code override feature. Can be 0 or 1. 0 indicates that QR code overwrite is disabled. 1 indicates enabling QR code override After the feature is enabled, it will overlay a mosaic on the recognized QR code. Default value is 0. | Int | No |
bar-type | QR/barcode recognition feature: overlays a mosaic on recognized QR/barcodes. Value is 0, 1, or 2. 0 means all are recognized. 1. Means scanning QR code 2 means to scan barcode. Default value 0. | Int | No |
segment | Common slice switch parameter, specifies whether slicing is required, valid value: 0 (means no slicing) 1 (means slicing) Default value 0. When slicing is required, the backend will perform slice recognition based on image dimensions. | Int | No |
size | This parameter takes effect when segment is set to 1. The default value is 1000 pixels, with a value range of integers equal to or greater than 500. If the value specified by size is greater than the image pixel size, slicing will not be performed and direct recognition will be carried out. | Int | No |
Parameter Name | Type | Description |
UploadResult | Container | Image information |
Parameter Name | Type | Description |
OriginalInfo | Container | Image information |
ProcessResults | Container | Image Processing result |
Node Name | Type | Description |
Key | String | Original Image File Name |
Location | String | image path |
ImageInfo | Container | Original Image Information |
Node Name | Type | Description |
Format | String | Format |
Width | Int | image width |
Height | Int | image height |
Quality | Int | image quality |
Ave | String | dominant color of the image |
Orientation | Int | image rotation angle |
Node Name | Type | Description |
Object | Container | process result of each image |
Node Name | Type | Description |
Key | String | File Name |
Location | String | image path |
Format | String | image format |
Width | Int | image width |
Height | Int | image height |
Size | Int | image size |
Quality | Int | image quality |
codeStatus | Int | QR code recognition result. 0 means no QR codes recognized, 1 means recognize QR code. |
QRcodeInfo | Container | QR code recognition result, multiple possible |
Node Name | Type | Description |
codeUrl | String | Content of the QR code. May not be recognized. |
codelocation | Container | Position coordinates of the QR code identified in the figure |
Node Name | Type | Description |
point | String | QR code coordinate point |
PUT /picture.jpg HTTP/1.1Host: examplebucket-1250000000.cos.ap-chengdu.myqcloud.comDate: Tue, 03 Apr 2018 09:06:15 GMTAuthorization:XXXXXXXXXXXXPic-Operations: {"is_pic_info":1,"rules":[{"fileid":"test.jpg","rule":" QRcode/cover/1"}]}Content-Length: 64[Object]
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 645Date: Tue, 03 Apr 2018 09:06:16 GMTStatus: 200 OKx-cos-request-id: NWFjMzQ0MDZfOTBmYTUwXzZkZV8z****<UploadResult><OriginalInfo><Key>picture.jpg</Key><Location>examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/picture.jpg</Location><ImageInfo><Format>JPEG</Format><Width>640</Width><Height>427</Height><Quality>100</Quality><Ave>0xa18454</Ave><Orientation>1</Orientation></ImageInfo></OriginalInfo><ProcessResults><Object><Key>picture-2.jpg</Key><Location>examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/picture-2.jpg</Location><Format>png</Format><Width>640</Width><Height>427</Height><Size>463092</Size><Quality>100</Quality><codeStatus>1</codeStatus><QRcodeInfo><CodeUrl>xxxxxxxxxxxxx</CodeUrl><CodeLocation><Point>100,100</Point><Point>100,200</Point><Point>200,200</Point><Point>200,100</Point></CodeLocation></QRcodeInfo><QRcodeInfo><CodeUrl>xxxxxxxxxxxxx</CodeUrl><CodeLocation><Point>1000,1000</Point><Point>1000,2000</Point><Point>2000,2000</Point><Point>2000,1000</Point></CodeLocation></QRcodeInfo></Object></ProcessResults></UploadResult>
GET /<ObjectKey>?ci-process=QRcode&cover=<cover> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
Parameter Name | Description | Required or Not | Type |
ObjectKey | object filename, for example folder/sample.jpg | Yes | String |
ci-process | Wanxiang processing capability QR code recognition is fixed as QRcode | Yes | String |
cover | QR code overlay feature, which overlays a mosaic on the recognized QR code. The value is 0 or 1. 0 means the QR code overlay is disabled, and 1 means it is enabled. Default value is 0. | No | Int |
<Response><CodeStatus>1</CodeStatus><QRcodeInfo><CodeUrl>xxxx</CodeUrl><CodeLocation><Point>xxx,xxx</Point><Point>xxx,xxx</Point><Point>xxx,xxx</Point><Point>xxx,xxx</Point></CodeLocation></QRcodeInfo><ResultImage>base64-encoded image</ResultImage></Response>
Node Name (Keyword) | Parent Node | Description | Type |
Response | None. | Container to save results | Container |
Node Name (Keyword) | Parent Node | Description | Type |
CodeStatus | Response | QR code recognition result. 0 means no QR codes recognized, 1 means recognize QR code. | Int |
QRcodeInfo | Response | QR code recognition result, multiple possible | Container |
ResultImage | Response | Processed image base64 data, returned when request parameter cover is 1 | String |
Node Name (Keyword) | Parent Node | Description | Type |
CodeUrl | QRcodeInfo | Content of the QR code. May not be recognized. | String |
CodeLocation | QRcodeInfo | Position coordinates of the QR code identified in the figure | Container |
Node Name (Keyword) | Parent Node | Description | Type |
Point | CodeLocation | QR code coordinate point (X coordinate, Y coordinate) | String |
GET /<ObjectKey>?ci-process=QRcode&cover=1 HTTP/1.1Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=**************************************Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 414641Date: Thu, 15 Jun 2017 12:37:29 GMTServer: tencent-cix-cos-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****<Response><CodeStatus>1</CodeStatus><QRcodeInfo><CodeUrl>xxxxxxxxxxxxx</CodeUrl><CodeLocation><Point>100,100</Point><Point>100,200</Point><Point>200,200</Point><Point>200,100</Point></CodeLocation></QRcodeInfo><QRcodeInfo><CodeUrl>xxxxxxxxxxxxx</CodeUrl><CodeLocation><Point>1000,1000</Point><Point>1000,2000</Point><Point>2000,2000</Point><Point>2000,1000</Point></CodeLocation></QRcodeInfo><ResultImage>base64-encoded image</ResultImage></Response>
Feedback