tencentcloud-ocr-licenseplate

腾讯云车牌识别(LicensePlateOCR)接口调用技能。当用户需要对中国大陆机动车车牌进行自动定位和识别时,应使用此技能。支持返回车牌号码、车牌颜色、置信度和像素坐标信息,支持多车牌场景识别,支持图片Base64和URL两种输入方式。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "tencentcloud-ocr-licenseplate" with this command: npx skills add zt1314p-design/tencentcloud-ocr-licenseplate

腾讯云车牌识别 (LicensePlateOCR)

用途

调用腾讯云OCR车牌识别接口,支持对中国大陆机动车车牌的自动定位和识别,返回地域编号和车牌号码与车牌颜色信息。

核心能力:

  • 车牌号码识别:自动定位并识别车牌号码(如:京AF0236)
  • 车牌颜色识别:支持白、黑、蓝、绿、黄、黄绿、临牌、喷漆、其它
  • 车牌类别判断:区分实体车牌与非实体车牌
  • 多车牌识别:支持图片中存在多个车牌的场景,通过 LicensePlateInfos 返回全部车牌信息
  • 坐标定位:返回车牌在原图中的像素坐标框(X, Y, Width, Height)

官方文档:https://cloud.tencent.com/document/api/866/36211

默认接口请求频率限制:10次/秒。

使用时机

当用户提出以下需求时触发此技能:

  • 需要从图片中识别机动车车牌号码
  • 需要获取车牌颜色信息
  • 需要判断车牌类别(实体/非实体)
  • 图片中包含多个车牌需要全部识别
  • 涉及车牌OCR识别的任何场景

环境要求

  • Python 3.6+
  • 依赖:tencentcloud-sdk-python(通过 pip install tencentcloud-sdk-python 安装)
  • 环境变量:
    • TENCENTCLOUD_SECRET_ID:腾讯云API密钥ID
    • TENCENTCLOUD_SECRET_KEY:腾讯云API密钥Key

使用方式

运行 scripts/main.py 脚本完成车牌识别。

请求参数

参数类型必填说明
ImageBase64str否(二选一)图片Base64值,编码后不超过10M,支持PNG/JPG/JPEG,不支持GIF
ImageUrlstr否(二选一)图片URL地址,下载时间不超过3秒。都提供时仅使用ImageUrl
UserAgentstr请求来源标识(可选),用于追踪调用来源,统一固定为Skills

输出格式

识别成功后返回 JSON 格式结果:

{
  "Number": "京AF0236",
  "Confidence": 99,
  "Color": "蓝",
  "LicensePlateCategory": "实体车牌",
  "Rect": {
    "X": 426,
    "Y": 423,
    "Width": 135,
    "Height": 66
  },
  "LicensePlateInfos": [
    {
      "Number": "京AF0236",
      "Confidence": 99,
      "Color": "蓝",
      "Rect": {
        "X": 426,
        "Y": 423,
        "Width": 135,
        "Height": 66
      },
      "LicensePlateCategory": "实体车牌"
    }
  ],
  "PlateCount": 1,
  "RequestId": "5141467c-0a67-4f7c-b1c5-8147d84681a1"
}

响应字段说明:

字段类型说明
Numberstr识别出的车牌号码
Confidenceint置信度,0-100
Colorstr车牌颜色:白/黑/蓝/绿/黄/黄绿/临牌/喷漆/其它
LicensePlateCategorystr车牌类别:实体车牌/非实体车牌
Rectobject车牌在原图中的像素坐标框(X, Y, Width, Height)
LicensePlateInfoslist全部车牌信息列表(多车牌场景)
LicensePlateInfos[].Numberstr车牌号码
LicensePlateInfos[].Confidenceint置信度 0-100
LicensePlateInfos[].Colorstr车牌颜色
LicensePlateInfos[].Rectobject像素坐标框
LicensePlateInfos[].LicensePlateCategorystr车牌类别
PlateCountint检测到的车牌数量
RequestIdstr唯一请求ID

错误码说明

错误码含义
FailedOperation.DownLoadError文件下载失败
FailedOperation.ImageDecodeFailed图片解码失败
FailedOperation.OcrFailedOCR识别失败
FailedOperation.UnKnowError未知错误
FailedOperation.UnOpenError服务未开通
InvalidParameterValue.InvalidParameterValueLimit参数值错误
LimitExceeded.TooLargeFileError文件内容太大
ResourceUnavailable.InArrears账号已欠费
ResourceUnavailable.ResourcePackageRunOut账号资源包耗尽
ResourcesSoldOut.ChargeStatusException计费状态异常

业务逻辑说明

  1. ImageBase64和ImageUrl必须提供其一,都提供时只使用ImageUrl
  2. 图片支持PNG、JPG、JPEG格式,不支持GIF
  3. 图片经Base64编码后不超过10M,下载时间不超过3秒
  4. 使用通用CommonOCR控制器,无特殊业务逻辑
  5. 支持多车牌识别,通过LicensePlateInfos返回全部车牌

调用示例

# 通过URL识别车牌
python scripts/main.py --image-url "https://example.com/car.jpg"

# 通过文件路径(自动Base64编码)识别
python scripts/main.py --image-base64 ./car.jpg

# 通过Base64文本文件识别
python scripts/main.py --image-base64 ./base64.txt

# 指定地域
python scripts/main.py --image-url "https://example.com/car.jpg" --region ap-beijing```

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Session-Memory Enhanced

Session-Memory Enhanced v4.0 - 统一增强版。融合 session-memory + memu-engine 核心功能。特性:结构化提取 + 向量检索 + 不可变分片 + 三位一体自动化 + 多代理隔离 + AI 摘要 + 零配置启动。

Registry SourceRecently Updated
General

PRISM-GEN-DEMO

English: Retrieve, filter, sort, merge, and visualize multiple CSV result files from PRISM-Gen molecular generation/screening. Provides portable query-based...

Registry SourceRecently Updated
General

Video Pro by cza999

专业AI视频生成器,支持文本转高质量短视频,批量处理、多模板和高级自定义语音功能,适合创作者和企业。

Registry SourceRecently Updated
0133
cza999