和跨平台相关的几点建议
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.4k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
最近在自个写的[Rose工具链](https://zhuanlan.zhihu.com/p/28822642)中内置了EasyPR去实现车牌识别,写出的app要同时支持Windows、iOS、Android。用的是EasyRP 1.6alpha + OpenCV 3.3。
为实现车牌识别,对EasyPR源码只关心[三个目录](https://github.com/freeors/aismart/tree/master/aismart-src/aismart/aismart/easypr):include(去掉train目录)、src(去掉train目录)、thirdparty(去掉xmlParser)。虽然这些代码只需非常少改动就能支持跨平台了,但还是把自个认为不足的写出来。
1、去除依赖highgui模块。为调试等目的,EasyPR的一些地方在用highgui相关代码,像plate_judge.cpp中存在imshow。对一个商业app,imshow功能有限,往往会有自个的gui函数去代替。为减少最终尺寸,app还有可能就不编译highgui模块。
2、getPlateStr返回utf-8字符。当前getPlateStr返回中文是gb2312,要支持跨平台基本是不会用这字符集的。当然有人会使用unicode16,不过个人更倾向utf-8。
3、重写Kv::load函数。该函数读取用的是ifstream。ifstream有两个问题,一是当文件名路径中含有中文时,不支持utf-8编码。二是它不能读取Android资产中文件,这意味着必须把model中文件放到外部存储。当然,opencv中的ann模块也可能在用ifstream。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing plate_judge.cpp, getPlateStr, and Kv::load, then trace any OpenCV ann file-loading paths. Check the existing EasyPR 1.6alpha and OpenCV 3.3 integration on Windows, iOS, and Android. Done means highgui is not required, returned Chinese text is UTF-8, and model files can be loaded from paths and Android assets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, opencv
- Domain
- computer-vision, desktop-dev, mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100