双层车牌处理

This commit is contained in:
we0091234 2022-10-17 21:49:55 +08:00
parent 513fafa95d
commit 7d4c2426f0
3 changed files with 17 additions and 0 deletions

View File

@ -78,6 +78,23 @@ python exportonnx.py --image_path images/test.jpg --checkpoint saved_model/best
```
导出onnx文件为 saved_model/best.onnx
## 双层车牌
双层车牌这里采用拼接成单层车牌的方式:
```
def get_split_merge(img):
h,w,c = img.shape
img_upper = img[0:int(5/12*h),:]
img_lower = img[int(1/3*h):,:]
img_upper = cv2.resize(img_upper,(img_lower.shape[1],img_lower.shape[0]))
new_img = np.hstack((img_upper,img_lower))
return new_img
```
![Image text](image/tmp55DE.png) 通过变换得到 ![Image text](image/new.jpg)
## References
- https://github.com/meijieru/crnn.pytorch

BIN
image/new.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
image/tmp55DE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB