Feature Description
The vehicle license plate detection feature uses a synchronous request method. You can use this interface to detect vehicles in images and identify information such as the vehicle's brand, color, position, and license plate location.
Note:
This interface is a GET request, uses a synchronous request method, and requires carrying a signature. For specific signature settings, please see Request Signature. Unsupported for processing images of archive storage type and deep archive storage type on COS. If you need to process such images, please first restore archived file. Authorization Description
When used by a sub-account, the ci:CreateLicensePlateJob permission is required. For details, see Cloud Infinite action. Service Activation
Using this feature requires enabling Cloud Infinite in advance and binding a bucket. For details, see Bind bucket. Use Limits
When using this API, please confirm the relevant restrictions first. For details, see Usage limits. Supported image formats: PNG, JPG, JPEG.
Image size: The downloaded image after encoding must not exceed 4MB.
Image pixels: It is advisable to be larger than 50*50 pixels; otherwise, it will affect the recognition effect.
Aspect ratio: It is advisable that the ratio of the long side to the short side is less than 5:1.
Fee Description
Request
Request sample:
GET /<ObjectKey>?ci-process=DetectCar HTTP/1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Request parameters
|
ObjectKey | object filename, for example: folder/document.jpg | String | Yes |
ci-process | Cloud Infinite processing capability, vehicle identification fixed as DetectCar | String | Yes |
Request header.
Request body.
The request does not have a request body.
Response
Response Headers
Response Body
The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<RequestId></RequestId>
<CarTags>
<Serial></Serial>
<Brand></Brand>
<Type></Type>
<Color><Color>
<Confidence></Confidence>
<Year></Year>
<CarLocation>
<X></X>
<Y></Y>
</CarLocation>
<PlateContent>
<Plate></Plate>
<Color></Color>
<Type></Type>
<PlateLocation>
<X></X>
<Y></Y>
</PlateLocation>
</PlateContent>
</CarTags>
</Response>
The data are as follows:
|
Response | None. | Container for saving results | Container |
The content of Response
|
RequestId | Response | Unique request ID, which is returned for each request. RequestId is required for locating a problem. | String |
CarTags | Response | Result array of vehicle attribute recognition, support returning multiple vehicle information | Container |
content of the CarTags node
|
Serial | CarTags | Car series | String |
Brand | CarTags | Vehicle brand | String |
Type | CarTags | Vehicle type | String |
Color | CarTags | Vehicle color | String |
Confidence | CarTags | Confidence degree, 0 - 100 | Int |
Year | CarTags | Year, return 0 if the year cannot be identified | Int |
CarLocation | CarTags | Coordinate information of the vehicle in the image, may return multiple coordinate points | Container |
PlateContent | CarTags | license plate information, including license plate number, license plate color, and license plate location. Supports returning multiple license plates. | Container |
content of the CarLocation node
|
X | CarLocation | Horizontal coordinate x | Int |
Y | CarLocation | Vertical coordinate y | Int |
content of the PlateContent node
|
Plate | PlateContent | License plate number information | String |
Color | PlateContent | Color of the license plate | String |
Type | PlateContent | Type of license plate, such as ordinary blue plate | String |
PlateLocation | PlateContent | LocatioC of the license plate | Container |
content of the PlateLocation node
|
X | PlateLocation | X coordinates of the license plate's upper-left, upper-right, lower-left, and lower-right corners | Int |
Y | PlateLocation | Y coordinates of the license plate's upper-left, upper-right, lower-left, and lower-right corners | Int |
Error Codes
This request returns common error responses and error codes. For more information, see Error Codes. Examples
Request
GET test.jpg?ci-process=DetectCar HTTP/1.1
Authorization: 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
Response
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 414641
Date: Thu, 15 Jun 2017 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****
<Response>
<RequestId>NjE1MzEyMDlfOTBmYTUwNjRfNzUz****</RequestId>
<CarTags>
<Serial>Mercedes-Benz S-Class</Serial>
<Brand>Mercedes-Benz</Brand>
<Type>Sedan</Type>
<Color>Black</Color>
<Confidence>98</Confidence>
<Year>0</Year>
<CarLocation>
<X>8</X>
<Y>364</Y>
</CarLocation>
<CarLocation>
<X>8</X>
<Y>5</Y>
</CarLocation>
<CarLocation>
<X>637</X>
<Y>5</Y>
</CarLocation>
<CarLocation>
<X>637</X>
<Y>364</Y>
</CarLocation>
<PlateContent>
<Plate>Shaanxi ASxxxL</Plate>
<Color>Blue</Color>
<Type>Ordinary blue plate</Type>
<PlateLocation>
<X>263</X>
<Y>309</Y>
</PlateLocation>
<PlateLocation>
<X>263</X>
<Y>239</Y>
</PlateLocation>
<PlateLocation>
<X>459</X>
<Y>239</Y>
</PlateLocation>
<PlateLocation>
<X>459</X>
<Y>309</Y>
</PlateLocation>
</PlateContent>
</CarTags>
<CarTags>
<Serial>Wuling Hongguang</Serial>
<Brand>Wuling</Brand>
<Type>Van</Type>
<Color>White</Color>
<Confidence>0</Confidence>
<Year>0</Year>
<CarLocation>
<X>0</X>
<Y>228</Y>
</CarLocation>
<CarLocation>
<X>0</X>
<Y>81</Y>
</CarLocation>
<CarLocation>
<X>73</X>
<Y>81</Y>
</CarLocation>
<CarLocation>
<X>73</X>
<Y>228</Y>
</CarLocation>
</CarTags>
</Response>