feat-特殊车牌生成器
This commit is contained in:
1 parent
c0cc5904c9
commit
003f9efa6d
244 files changed
+1588
No files matched your search
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 leijd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,81 @@
|
||||
# 中国车牌模拟生成器
|
||||
|
||||
基于 GA36-2018《中华人民共和国机动车号牌》规范的中国车牌图片生成工具。
|
||||
|
||||
## 支持类型
|
||||
|
||||
| 底板参数 | 类型 | 底色 | 字符色 | 尺寸 | 说明 |
|
||||
|----------|------|------|--------|------|------|
|
||||
| `yellow` | 大型汽车 | 黄 | 黑 | 440×140 | 7位,普通大型客/货车 |
|
||||
| `yellow` | 教练车 | 黄 | 黑 | 440×140 | 7位,末位"学"字 |
|
||||
| `white` | 警用汽车 | 白 | 黑("警"红) | 440×140 | 7位,末位"警"字红色 |
|
||||
| `white_army` | 军队/武警 | 白 | 黑 | 440×140 | 7位,首位为规范军车字母 |
|
||||
| `black` | 港澳入出境 | 黑 | 白 | 440×140 | 7位,末位"港"/"澳" |
|
||||
| `black` | 领馆(旧版) | 黑 | 白("领"红) | 440×140 | 7位,省A·XXXX领 |
|
||||
| `black` | 领馆(新版) | 黑 | 白 | 440×140 | 7位,省XXX·XX领 |
|
||||
| `black_shi` | 使馆(旧版) | 黑 | 白("使"红) | 440×140 | 7位,使XXX·XXX |
|
||||
| `black_shi` | 使馆(新版) | 黑 | 白 | 440×140 | 7位,XXX·XXX使 |
|
||||
| `green_truck` | 大型新能源 | 黄绿双拼 | 黑 | 480×140 | 8位,大型新能源客车/货车 |
|
||||
|
||||
> 已移除:蓝牌(小型汽车)、小型新能源(green_car)、挂车双层
|
||||
|
||||
## 安装
|
||||
|
||||
```bash
|
||||
pip install opencv-python numpy tqdm
|
||||
```
|
||||
|
||||
## 使用
|
||||
|
||||
### 批量随机生成
|
||||
|
||||
```bash
|
||||
python generate_multi_plate.py --number 100 --save-adr output
|
||||
```
|
||||
|
||||
每类等概率随机抽取,号码格式自动匹配底板颜色。
|
||||
|
||||
### 指定车牌生成
|
||||
|
||||
```bash
|
||||
python generate_special_plate.py --plate-number 京A12345 --bg-color yellow
|
||||
```
|
||||
|
||||
| 参数 | 说明 | 默认值 |
|
||||
|------|------|--------|
|
||||
| `--plate-number` | 车牌号码 | `云999999` |
|
||||
| `--bg-color` | 底板颜色 | `blue` |
|
||||
| `--double` | 是否双层(已废弃) | `False` |
|
||||
|
||||
## 军车字母规范
|
||||
|
||||
首位从以下 8 个字母中选取,符合 2013/2019 式军用号牌:
|
||||
|
||||
| 字母 | 单位 |
|
||||
|------|------|
|
||||
| V | 中央军委 |
|
||||
| L | 陆军 |
|
||||
| H | 海军 |
|
||||
| K | 空军 |
|
||||
| J | 火箭军 |
|
||||
| Z | 战略支援部队 |
|
||||
| B | 联勤保障部队 |
|
||||
| W | 武警 |
|
||||
|
||||
## 使领馆新旧版本
|
||||
|
||||
| 版本 | 使馆格式 | 领馆格式 | 红字 |
|
||||
|------|----------|----------|------|
|
||||
| 旧版 (≤2017.1.9) | `使XXX·XXX` | `省A·XXXX领` | 使/领为红色 |
|
||||
| 新版 (2017.1.9~) | `XXX·XXX使` | `省XXX·XX领` | 使/领为白色 |
|
||||
|
||||
## 文件结构
|
||||
|
||||
```
|
||||
├── generate_multi_plate.py # 核心类 + 批量随机生成
|
||||
├── generate_special_plate.py # 指定号码生成单张
|
||||
├── plate_number.py # 字符集 + 各类号牌号码函数
|
||||
├── plate_model/ # 底板模板图片
|
||||
├── font_model/ # 字符字体图片
|
||||
└── LP_Standard.md # GA36-2018 号牌标准文档
|
||||
```
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loaded 100 of 244 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user