Compare commits
316 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a0a9f3c3f6 | 8 years ago |
|
|
f9273e1359 | 8 years ago |
|
|
f894e2a6f4 | 9 years ago |
|
|
03ac09ab2b | 9 years ago |
|
|
c5dae14655 | 9 years ago |
|
|
d63df1bf34 | 9 years ago |
|
|
e1817fcee3 | 9 years ago |
|
|
7e7abf06a4 | 9 years ago |
|
|
711d4de63f | 9 years ago |
|
|
c2098f3acd | 9 years ago |
|
|
9bd41fe75d | 9 years ago |
|
|
598cbb63f1 | 9 years ago |
|
|
6372c7182a | 9 years ago |
|
|
3554cd7c0d | 9 years ago |
|
|
4b2cbca168 | 9 years ago |
|
|
d070bd7e23 | 9 years ago |
|
|
aed577bcb6 | 9 years ago |
|
|
e5c36af9b4 | 9 years ago |
|
|
be18955cb2 | 9 years ago |
|
|
766be482e6 | 9 years ago |
|
|
85229d3de8 | 9 years ago |
|
|
c683d4864a | 9 years ago |
|
|
e5afc0e085 | 9 years ago |
|
|
38218f06a1 | 9 years ago |
|
|
48685b8cd1 | 9 years ago |
|
|
fe366e542f | 9 years ago |
|
|
1636e8cb4e | 9 years ago |
|
|
b0b0c05f08 | 9 years ago |
|
|
291e40726d | 9 years ago |
|
|
eeac753214 | 9 years ago |
|
|
19a2aaa4b7 | 9 years ago |
|
|
db253f2979 | 9 years ago |
|
|
14384a81f0 | 9 years ago |
|
|
a366a0b950 | 9 years ago |
|
|
1e604768db | 9 years ago |
|
|
029e014a51 | 9 years ago |
|
|
c4808131ea | 9 years ago |
|
|
b68b1b20ec | 9 years ago |
|
|
e65ac910df | 9 years ago |
|
|
ae198c9593 | 9 years ago |
|
|
86e13ef0fc | 9 years ago |
|
|
b5ea07a88b | 9 years ago |
|
|
ed445e97eb | 9 years ago |
|
|
c805ac50a7 | 9 years ago |
|
|
3a8f35dfe5 | 9 years ago |
|
|
767c4fd15a | 9 years ago |
|
|
f13fad31c4 | 9 years ago |
|
|
caeff9d8f7 | 10 years ago |
|
|
61ad3329a1 | 10 years ago |
|
|
d75e55c37f | 10 years ago |
|
|
705b733931 | 10 years ago |
|
|
0bc4b5fb05 | 10 years ago |
|
|
b030ee5793 | 10 years ago |
|
|
387e975b4a | 10 years ago |
|
|
b792608f0e | 10 years ago |
|
|
1a53c070b2 | 10 years ago |
|
|
b57a269643 | 10 years ago |
|
|
4bfa48f2a1 | 10 years ago |
|
|
aec8ddab43 | 10 years ago |
|
|
6a0af0c83b | 10 years ago |
|
|
89e04d8496 | 10 years ago |
|
|
52d6eb62e7 | 10 years ago |
|
|
6460637b6e | 10 years ago |
|
|
295468e422 | 10 years ago |
|
|
c0b8b6eb4b | 10 years ago |
|
|
a6dff9e022 | 10 years ago |
|
|
80932d344a | 10 years ago |
|
|
6c2bc54966 | 10 years ago |
|
|
9692c0558f | 10 years ago |
|
|
a35124b8b4 | 10 years ago |
|
|
aa05f7d365 | 10 years ago |
|
|
3bd2c1b5c5 | 10 years ago |
|
|
ef23850cef | 10 years ago |
|
|
0cf3f76cca | 10 years ago |
|
|
6cd6fa8ce3 | 10 years ago |
|
|
2bc2bd53fc | 10 years ago |
|
|
d02b7dc7e9 | 10 years ago |
|
|
826ff7b5fb | 10 years ago |
|
|
a73217309d | 10 years ago |
|
|
516217ae4a | 10 years ago |
|
|
c941e8f858 | 10 years ago |
|
|
b49caf765d | 10 years ago |
|
|
e75597680f | 10 years ago |
|
|
1be83756b0 | 10 years ago |
|
|
e1fa2cd459 | 10 years ago |
|
|
21193b41f9 | 10 years ago |
|
|
4fb7c87f60 | 10 years ago |
|
|
68b408143c | 10 years ago |
|
|
94755feec8 | 10 years ago |
|
|
f2629b60f3 | 10 years ago |
|
|
389364fb82 | 10 years ago |
|
|
a1e084b2ce | 10 years ago |
|
|
af0804b519 | 10 years ago |
|
|
a34b1fcb5f | 10 years ago |
|
|
e5fa937ca1 | 10 years ago |
|
|
34fe9d35cf | 10 years ago |
|
|
9a8efb9ef9 | 10 years ago |
|
|
a1045d1633 | 10 years ago |
|
|
75305f105d | 10 years ago |
|
|
51d8d07ccd | 10 years ago |
|
|
2afac3c7a6 | 10 years ago |
|
|
8dbb8104d2 | 10 years ago |
|
|
98421a2007 | 10 years ago |
|
|
30c3211cf7 | 10 years ago |
|
|
4520282957 | 10 years ago |
|
|
d3d063266a | 10 years ago |
|
|
8e88ee7c09 | 10 years ago |
|
|
032659f437 | 10 years ago |
|
|
8e19220e9a | 10 years ago |
|
|
3f19e0596c | 10 years ago |
|
|
d8bdd87b38 | 10 years ago |
|
|
fffb964322 | 10 years ago |
|
|
e66a344f65 | 10 years ago |
|
|
b47a0add78 | 10 years ago |
|
|
a5ad51890a | 10 years ago |
|
|
014d355278 | 10 years ago |
|
|
35674b7b6d | 10 years ago |
|
|
8ee0731a3a | 10 years ago |
|
|
336baf7c30 | 10 years ago |
|
|
7ecbf4749a | 10 years ago |
|
|
96b7865b1c | 10 years ago |
|
|
9a85c7e84d | 10 years ago |
|
|
822fafa0e4 | 10 years ago |
|
|
38fa1b402c | 10 years ago |
|
|
11c47d5192 | 10 years ago |
|
|
84d11a6fa8 | 10 years ago |
|
|
6f70b1c256 | 10 years ago |
|
|
045ed78542 | 10 years ago |
|
|
297c54f337 | 10 years ago |
|
|
fc7b4eff34 | 10 years ago |
|
|
9acd40213c | 10 years ago |
|
|
2509bfe296 | 10 years ago |
|
|
87081ebfb1 | 10 years ago |
|
|
9d5df44cc9 | 10 years ago |
|
|
469e572d23 | 10 years ago |
|
|
657c96289c | 10 years ago |
|
|
79de3be046 | 10 years ago |
|
|
02d2c1a9c9 | 10 years ago |
|
|
d508d79f76 | 10 years ago |
|
|
ef6ff1fc03 | 10 years ago |
|
|
b10e23e787 | 10 years ago |
|
|
d695f7fd74 | 10 years ago |
|
|
3f4823427d | 10 years ago |
|
|
8bbcf763a4 | 10 years ago |
|
|
55ca237811 | 10 years ago |
|
|
a60aaf9519 | 10 years ago |
|
|
453fb5faf1 | 10 years ago |
|
|
dafe058d2e | 10 years ago |
|
|
586f9fdb69 | 10 years ago |
|
|
519a9cd94c | 10 years ago |
|
|
d2af6b0464 | 10 years ago |
|
|
669bea3817 | 10 years ago |
|
|
510f019cae | 10 years ago |
|
|
b8af57c3d8 | 10 years ago |
|
|
a9b8506931 | 10 years ago |
|
|
be5b098c0d | 10 years ago |
|
|
92b3bab054 | 10 years ago |
|
|
e55565ce7b | 10 years ago |
|
|
893797bcb2 | 10 years ago |
|
|
b9b249eba5 | 10 years ago |
|
|
04f4cab35f | 10 years ago |
|
|
dc5e669e92 | 10 years ago |
|
|
725262aa5f | 10 years ago |
|
|
488a523e72 | 10 years ago |
|
|
6c9e2be3c6 | 10 years ago |
|
|
fb3b38e6bf | 10 years ago |
|
|
c878b702ca | 10 years ago |
|
|
435bc38e71 | 10 years ago |
|
|
4c2fda9c0e | 10 years ago |
|
|
891b1c3c4d | 10 years ago |
|
|
ea8d40429c | 10 years ago |
|
|
765afd4eb8 | 10 years ago |
|
|
7c8fb5553c | 10 years ago |
|
|
eaa6604031 | 10 years ago |
|
|
9fc21b47f7 | 10 years ago |
|
|
e1df2fff3a | 10 years ago |
|
|
29d6c15ec4 | 10 years ago |
|
|
dd43a000e2 | 10 years ago |
|
|
09a60e8a7a | 10 years ago |
|
|
dd00e60d55 | 10 years ago |
|
|
c1c459bf48 | 10 years ago |
|
|
188d821f4e | 10 years ago |
|
|
480df262b6 | 10 years ago |
|
|
df607b82b8 | 10 years ago |
|
|
649a31dce7 | 10 years ago |
|
|
5aa281a925 | 10 years ago |
|
|
60bacab2b9 | 10 years ago |
|
|
345749c1b9 | 10 years ago |
|
|
9ec49badcf | 10 years ago |
|
|
cf33fca08b | 10 years ago |
|
|
ad45ffac85 | 10 years ago |
|
|
2b4ea5800e | 10 years ago |
|
|
e12bdbb488 | 10 years ago |
|
|
8ac2546681 | 10 years ago |
|
|
bd28606352 | 10 years ago |
|
|
68fc98414c | 10 years ago |
|
|
285fdc03b0 | 10 years ago |
|
|
0b45579e12 | 10 years ago |
|
|
15adce0a93 | 10 years ago |
|
|
93f8337539 | 10 years ago |
|
|
f91b2e6c82 | 10 years ago |
|
|
ea5ee79cf2 | 10 years ago |
|
|
902a02f884 | 10 years ago |
|
|
e962b57969 | 10 years ago |
|
|
6221185b6f | 10 years ago |
|
|
b711a149e6 | 10 years ago |
|
|
569e7642c2 | 10 years ago |
|
|
eb54c4caf1 | 10 years ago |
|
|
15e9ddec58 | 10 years ago |
|
|
b88966bf75 | 10 years ago |
|
|
1a415aed3b | 10 years ago |
|
|
2de9c013e6 | 10 years ago |
|
|
fc7c08a5c3 | 10 years ago |
|
|
968aca27b0 | 10 years ago |
|
|
7a8d801143 | 10 years ago |
|
|
75e797e6c1 | 10 years ago |
|
|
3e99b3ff84 | 10 years ago |
|
|
e4e3bef1a4 | 10 years ago |
|
|
63105427fc | 10 years ago |
|
|
3c05d95a8d | 10 years ago |
|
|
e24bac5bb2 | 10 years ago |
|
|
e00d9c85fd | 10 years ago |
|
|
488fd9b855 | 10 years ago |
|
|
5435e16e58 | 10 years ago |
|
|
49e2049e5b | 10 years ago |
|
|
a7e87a3b71 | 10 years ago |
|
|
10d9b28e1c | 10 years ago |
|
|
dc994adfeb | 10 years ago |
|
|
5dd7319481 | 10 years ago |
|
|
5d3cd897f0 | 10 years ago |
|
|
fc49dbdee1 | 10 years ago |
|
|
fe751ec4d3 | 10 years ago |
|
|
e12547917f | 10 years ago |
|
|
2a772b8eec | 10 years ago |
|
|
cf3372137d | 10 years ago |
|
|
0331a9c0d6 | 10 years ago |
|
|
a197f44b43 | 10 years ago |
|
|
d6a2441f5a | 10 years ago |
|
|
7f99931019 | 10 years ago |
|
|
b52870ff02 | 10 years ago |
|
|
508bade946 | 11 years ago |
|
|
e14caaaf4e | 11 years ago |
|
|
477fffbf5b | 11 years ago |
|
|
b2708b75fc | 11 years ago |
|
|
9801b67f61 | 11 years ago |
|
|
32b0560872 | 11 years ago |
|
|
d6ad832d50 | 11 years ago |
|
|
80e426a687 | 11 years ago |
|
|
619200f97b | 11 years ago |
|
|
bfe928bec9 | 11 years ago |
|
|
5990d4a2b0 | 11 years ago |
|
|
cac3427261 | 11 years ago |
|
|
7cf0392991 | 11 years ago |
|
|
d9fc6240c5 | 11 years ago |
|
|
c4163f9167 | 11 years ago |
|
|
0dbf8e7f05 | 11 years ago |
|
|
cb30317731 | 11 years ago |
|
|
40f3d5c5f3 | 11 years ago |
|
|
b06fec5c4d | 11 years ago |
|
|
25adeea4ef | 11 years ago |
|
|
7c3439db97 | 11 years ago |
|
|
527cafd7eb | 11 years ago |
|
|
311a11b9e3 | 11 years ago |
|
|
9e4b6eb71b | 11 years ago |
|
|
66adeedf5d | 11 years ago |
|
|
530676df52 | 11 years ago |
|
|
36921a421f | 11 years ago |
|
|
677576a010 | 11 years ago |
|
|
fd252131f2 | 11 years ago |
|
|
7ab8e2b5f0 | 11 years ago |
|
|
1525d09808 | 11 years ago |
|
|
655ec5330d | 11 years ago |
|
|
e940e3c469 | 11 years ago |
|
|
ff26102ff8 | 11 years ago |
|
|
44b311b642 | 11 years ago |
|
|
526d0b2cef | 11 years ago |
|
|
8bf553cd76 | 11 years ago |
|
|
eded576d80 | 11 years ago |
|
|
f439aca28b | 11 years ago |
|
|
44027ceee8 | 11 years ago |
|
|
9afd435190 | 11 years ago |
|
|
c2069d1272 | 11 years ago |
|
|
0e35129b7e | 11 years ago |
|
|
8627e66a3a | 11 years ago |
|
|
f5f45759e3 | 11 years ago |
|
|
67fd93400a | 11 years ago |
|
|
09e5cc2155 | 11 years ago |
|
|
9b43a4f519 | 11 years ago |
|
|
e3945ba3d7 | 11 years ago |
|
|
31bd6fce10 | 11 years ago |
|
|
f5fee0e1cc | 11 years ago |
|
|
beee37a9b5 | 11 years ago |
|
|
a1cace8b14 | 11 years ago |
|
|
1b50a278ed | 11 years ago |
|
|
7875364f14 | 11 years ago |
|
|
023519af0a | 11 years ago |
|
|
7f6ed737a8 | 11 years ago |
|
|
f67b38b0d3 | 11 years ago |
|
|
fd3a242265 | 11 years ago |
|
|
d1581d9262 | 11 years ago |
|
|
447bd5798a | 11 years ago |
|
|
b747c641bb | 11 years ago |
|
|
8cc64eab8b | 11 years ago |
|
|
5343d626bf | 11 years ago |
|
|
366f8c1a42 | 11 years ago |
|
|
4f75e35463 | 11 years ago |
|
|
a0d3741f09 | 11 years ago |
|
|
738d4bb48c | 11 years ago |
|
|
4e4396542d | 11 years ago |
|
|
85613522ee | 11 years ago |
|
|
a985ad40cf | 11 years ago |
|
|
e856cc7634 | 11 years ago |
|
|
c753e74935 | 11 years ago |
|
|
fd350cab25 | 11 years ago |
|
|
cdc5af72b8 | 11 years ago |
|
|
6860993307 | 11 years ago |
@ -0,0 +1,39 @@
|
||||
**I'm submitting a ...** (check one with "x")
|
||||
|
||||
```
|
||||
[ ] bug report
|
||||
[ ] help wanted
|
||||
[ ] feature request
|
||||
```
|
||||
|
||||
**Current behavior**
|
||||
|
||||
|
||||
|
||||
**Expected/desired behavior**
|
||||
|
||||
|
||||
|
||||
**Reproduction of the problem**
|
||||
|
||||
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce.
|
||||
|
||||
|
||||
|
||||
**What is the expected behavior?**
|
||||
|
||||
|
||||
|
||||
**What is the motivation / use case for changing the behavior?**
|
||||
|
||||
|
||||
|
||||
**Please tell us about your environment:**
|
||||
|
||||
* **System:** CentOS
|
||||
|
||||
* **Compiler version/IDE:** gcc4.8
|
||||
|
||||
* **CMake version:** 3.5.1
|
||||
|
||||
* **OpenCV version:** [2.4.9 | 2.4.10 | 2.4.11 | 2.4.12 | 2.4.13 | 3.0 ALPHA | 3.0 BETA | 3.0 RC1 | 3.0 | 3.1 ]
|
||||
@ -1,157 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件\easypr">
|
||||
<UniqueIdentifier>{9bb276ae-c7dc-4518-9674-bad84e57b9ac}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="头文件\easypr\preprocess">
|
||||
<UniqueIdentifier>{6d263c48-a60a-4d68-8c2d-be376356168a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\core">
|
||||
<UniqueIdentifier>{bab97015-644d-43a0-a50a-a10567a88dbe}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\preprocess">
|
||||
<UniqueIdentifier>{9a417cf1-7356-4acc-8b03-2b23009aa1ff}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\train">
|
||||
<UniqueIdentifier>{46477ca6-b57a-48af-b8a7-49b05c42319f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="源文件\util">
|
||||
<UniqueIdentifier>{53a5d227-5ea7-45e4-9533-ed69bff250fb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\easypr.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\api.hpp">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\chars_identify.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\chars_recognise.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\chars_segment.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\core_func.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\feature.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\plate.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\plate_detect.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\plate_judge.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\plate_locate.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\plate_recognize.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\program_options.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\svm_train.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\util.h">
|
||||
<Filter>头文件\easypr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\preprocess\deface.h">
|
||||
<Filter>头文件\easypr\preprocess</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\preprocess\gdts.h">
|
||||
<Filter>头文件\easypr\preprocess</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\easypr\preprocess\mc_data.h">
|
||||
<Filter>头文件\easypr\preprocess</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\core\chars_identify.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\chars_recognise.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\chars_segment.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\core_func.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\train\ann_train.cpp">
|
||||
<Filter>源文件\train</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\train\svm_train.cpp">
|
||||
<Filter>源文件\train</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\util\util.cpp">
|
||||
<Filter>源文件\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\util\program_options.cpp">
|
||||
<Filter>源文件\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\feature.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\plate.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\plate_detect.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\plate_judge.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\plate_locate.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\core\plate_recognize.cpp">
|
||||
<Filter>源文件\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\preprocess\deface.cpp">
|
||||
<Filter>源文件\preprocess</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\preprocess\gdts.cpp">
|
||||
<Filter>源文件\preprocess</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\preprocess\mc_data.cpp">
|
||||
<Filter>源文件\preprocess</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="resources\model\ann.xml">
|
||||
<Filter>资源文件</Filter>
|
||||
</Xml>
|
||||
<Xml Include="resources\model\svm.xml">
|
||||
<Filter>资源文件</Filter>
|
||||
</Xml>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="关于版权.txt" />
|
||||
<Text Include="resources\image\使用说明.txt" />
|
||||
<Text Include="resources\image\GDSL.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j8
|
||||
@ -0,0 +1,158 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# EasyPR auto configure script
|
||||
# --------------------------------------------------------------------
|
||||
#
|
||||
# This script configures OpenCV3.1 for Visual Studio
|
||||
# on Windows.
|
||||
#
|
||||
# You are required to have Python3.* installed, and python.exe must
|
||||
# be added to your PATH (C:\Python34 for example).
|
||||
#
|
||||
# You can use it by executing:
|
||||
#
|
||||
# C:\> cd path\to\EasyPR
|
||||
# C:\> python configure.py
|
||||
#
|
||||
# Note: compatible with python3, haven't been tested on python2.
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
kProjectDir = "vcprojs"
|
||||
|
||||
kProjects = ["libeasypr.vcxproj", "demo.vcxproj"]
|
||||
|
||||
kProjectTemplates = ["libeasypr.vcxproj.template", "demo.vcxproj.template"]
|
||||
|
||||
kOpenCVConfig = "OpenCVConfig-version.cmake"
|
||||
|
||||
kConfig = {
|
||||
"build": "",
|
||||
"include": "",
|
||||
"library": "",
|
||||
"link": ["opencv_world310"],
|
||||
"bit": "",
|
||||
"vs": ""
|
||||
}
|
||||
|
||||
kPatterns = {
|
||||
"include": "(<AdditionalIncludeDirectories>)(.*?)(</AdditionalIncludeDirectories>)",
|
||||
"library": "(<AdditionalLibraryDirectories>)(.*?)(</AdditionalLibraryDirectories>)",
|
||||
"link": "(<AdditionalDependencies>)(.*?)(</AdditionalDependencies>)"
|
||||
}
|
||||
|
||||
kReplacements = {
|
||||
"include": r"\1%s;\2\3",
|
||||
"library": r'\1%s\3',
|
||||
"link": r'\1%s;\2\3'
|
||||
}
|
||||
|
||||
|
||||
def configure():
|
||||
for i in range(2):
|
||||
print(">> creating %s" % kProjects[i])
|
||||
tpath = os.path.join(kProjectDir, kProjectTemplates[i])
|
||||
fp = open(tpath, encoding="utf-8")
|
||||
try:
|
||||
# read from disk
|
||||
original = fp.read()
|
||||
nstring = ""
|
||||
if 0 == i:
|
||||
nstring = configure_libeasypr(original)
|
||||
elif 1 == i:
|
||||
nstring = configure_demo(original)
|
||||
|
||||
# write to disk
|
||||
wpath = os.path.join(kProjectDir, kProjects[i])
|
||||
writer = open(wpath, mode="wb")
|
||||
try:
|
||||
writer.write(nstring.encode())
|
||||
finally:
|
||||
writer.close()
|
||||
finally:
|
||||
fp.close()
|
||||
print(">> all done! Open EasyPR.sln and have fun!")
|
||||
|
||||
|
||||
def configure_libeasypr(buffer):
|
||||
# additional include dir
|
||||
pattern = re.compile(kPatterns["include"])
|
||||
return pattern.sub(kReplacements["include"] %
|
||||
(kConfig["include"][:2] + re.escape(kConfig["include"][2:])),
|
||||
buffer)
|
||||
|
||||
|
||||
def configure_demo(buffer):
|
||||
# additional include dir
|
||||
pattern = re.compile(kPatterns["include"])
|
||||
nstring = pattern.sub(kReplacements["include"] %
|
||||
(kConfig["include"][:2] + re.escape(kConfig["include"][2:])),
|
||||
buffer)
|
||||
# additional library dir
|
||||
pattern = re.compile(kPatterns["library"])
|
||||
nstring = pattern.sub(kReplacements["library"] %
|
||||
(kConfig["library"][:2] + re.escape(kConfig["library"][2:])),
|
||||
nstring)
|
||||
# additional dependencies
|
||||
#lib_string = ""
|
||||
#for lib in kConfig["link"]:
|
||||
# lib_string += (lib + "d.lib")
|
||||
|
||||
#pattern = re.compile(kPatterns["link"])
|
||||
#return pattern.sub(kReplacements["link"] % lib_string, nstring)
|
||||
|
||||
return nstring
|
||||
|
||||
|
||||
def check_opencv_version():
|
||||
file = os.path.join(kConfig["build"], kOpenCVConfig)
|
||||
print(">> Checking ", file)
|
||||
fp = open(file)
|
||||
opencv_version = 0
|
||||
try:
|
||||
fline = fp.readline()
|
||||
match = re.search(r"OpenCV_VERSION (\d)\.(\d)\.(\d{,2})", fline)
|
||||
if match is not None:
|
||||
opencv_version = match.group(1) + "." + match.group(2)
|
||||
finally:
|
||||
fp.close()
|
||||
return opencv_version
|
||||
|
||||
|
||||
def cli():
|
||||
while True:
|
||||
root_ = input(r"Where is your opencv root path? (e.g, C:\path\to\opencv3): ")
|
||||
if os.path.exists(root_):
|
||||
kConfig["build"] = os.path.join(root_, "build")
|
||||
kConfig["include"] = os.path.join(kConfig["build"], "include")
|
||||
break
|
||||
else:
|
||||
print("Invalid path")
|
||||
|
||||
if check_opencv_version() != "3.1":
|
||||
print("requires opencv 3.1")
|
||||
exit()
|
||||
|
||||
kConfig["bit"] = "x64"
|
||||
|
||||
while True:
|
||||
vc = input("Which Visual Studio you are using? (vs2013 or vs2015): ")
|
||||
if vc == "vs2013":
|
||||
kConfig["vs"] = "vc12"
|
||||
break
|
||||
elif vc == "vs2015":
|
||||
kConfig["vs"] = "vc14"
|
||||
break
|
||||
else:
|
||||
print("Please type vs2013 or vs2015")
|
||||
|
||||
kConfig["library"] = os.path.normpath("%s/%s/%s/lib/" % (kConfig["build"], kConfig["bit"], kConfig["vs"]))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cli()
|
||||
configure()
|
||||
@ -1,12 +1,13 @@
|
||||
#ifndef EASYPR_EASYPR_H
|
||||
#define EASYPR_EASYPR_H
|
||||
|
||||
#include "easypr/plate_recognize.h"
|
||||
#include "easypr/svm_train.h"
|
||||
#include "easypr/preprocess/mc_data.h"
|
||||
#include "easypr/preprocess/gdts.h"
|
||||
#include "easypr/preprocess/deface.h"
|
||||
#include "easypr/util.h"
|
||||
#include "easypr/core/plate_recognize.h"
|
||||
#include "easypr/train/svm_train.h"
|
||||
#include "easypr/train/ann_train.h"
|
||||
#include "easypr/train/annCh_train.h"
|
||||
#include "easypr/util/util.h"
|
||||
#include "easypr/util/program_options.h"
|
||||
#include "easypr/api.hpp"
|
||||
#include "easypr/config.h"
|
||||
|
||||
#endif //EASYPR_EASYPR_H
|
||||
|
||||
@ -0,0 +1,148 @@
|
||||
#ifndef EASYPR_CONFIG_H_
|
||||
#define EASYPR_CONFIG_H_
|
||||
|
||||
#define CV_VERSION_THREE_ZERO
|
||||
|
||||
namespace easypr {
|
||||
|
||||
enum Color { BLUE, YELLOW, WHITE, UNKNOWN };
|
||||
|
||||
enum LocateType { SOBEL, COLOR, CMSER, OTHER };
|
||||
|
||||
enum CharSearchDirection { LEFT, RIGHT };
|
||||
|
||||
enum
|
||||
{
|
||||
PR_MODE_UNCONSTRAINED,
|
||||
PR_MODE_CAMERPOHNE,
|
||||
PR_MODE_PARKING,
|
||||
PR_MODE_HIGHWAY
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PR_DETECT_SOBEL = 0x01, /**Sobel detect type, using twice Sobel */
|
||||
PR_DETECT_COLOR = 0x02, /**Color detect type */
|
||||
PR_DETECT_CMSER = 0x04, /**Character detect type, using mser */
|
||||
};
|
||||
|
||||
static const char* kDefaultSvmPath = "model/svm_hist.xml";
|
||||
static const char* kLBPSvmPath = "model/svm_lbp.xml";
|
||||
static const char* kHistSvmPath = "model/svm_hist.xml";
|
||||
|
||||
static const char* kDefaultAnnPath = "model/ann.xml";
|
||||
static const char* kChineseAnnPath = "model/ann_chinese.xml";
|
||||
static const char* kGrayAnnPath = "model/annCh.xml";
|
||||
|
||||
//This is important to for key transform to chinese
|
||||
static const char* kChineseMappingPath = "model/province_mapping";
|
||||
|
||||
typedef enum {
|
||||
kForward = 1, // correspond to "has plate"
|
||||
kInverse = 0 // correspond to "no plate"
|
||||
} SvmLabel;
|
||||
|
||||
static const int kPlateResizeWidth = 136;
|
||||
static const int kPlateResizeHeight = 36;
|
||||
|
||||
static const int kShowWindowWidth = 1000;
|
||||
static const int kShowWindowHeight = 800;
|
||||
|
||||
static const float kSvmPercentage = 0.7f;
|
||||
|
||||
static const int kCharacterInput = 120;
|
||||
static const int kChineseInput = 440;
|
||||
static const int kAnnInput = kCharacterInput;
|
||||
|
||||
static const int kCharacterSize = 10;
|
||||
static const int kChineseSize = 20;
|
||||
static const int kPredictSize = kCharacterSize;
|
||||
|
||||
static const int kNeurons = 40;
|
||||
|
||||
static const char *kChars[] = {
|
||||
"0", "1", "2",
|
||||
"3", "4", "5",
|
||||
"6", "7", "8",
|
||||
"9",
|
||||
/* 10 */
|
||||
"A", "B", "C",
|
||||
"D", "E", "F",
|
||||
"G", "H", /* {"I", "I"} */
|
||||
"J", "K", "L",
|
||||
"M", "N", /* {"O", "O"} */
|
||||
"P", "Q", "R",
|
||||
"S", "T", "U",
|
||||
"V", "W", "X",
|
||||
"Y", "Z",
|
||||
/* 24 */
|
||||
"zh_cuan" , "zh_e" , "zh_gan" ,
|
||||
"zh_gan1" , "zh_gui" , "zh_gui1" ,
|
||||
"zh_hei" , "zh_hu" , "zh_ji" ,
|
||||
"zh_jin" , "zh_jing" , "zh_jl" ,
|
||||
"zh_liao" , "zh_lu" , "zh_meng" ,
|
||||
"zh_min" , "zh_ning" , "zh_qing" ,
|
||||
"zh_qiong", "zh_shan" , "zh_su" ,
|
||||
"zh_sx" , "zh_wan" , "zh_xiang",
|
||||
"zh_xin" , "zh_yu" , "zh_yu1" ,
|
||||
"zh_yue" , "zh_yun" , "zh_zang" ,
|
||||
"zh_zhe"
|
||||
/* 31 */
|
||||
};
|
||||
|
||||
static const int kCharactersNumber = 34;
|
||||
static const int kChineseNumber = 31;
|
||||
static const int kCharsTotalNumber = 65;
|
||||
|
||||
static bool kDebug = false;
|
||||
|
||||
static const int kGrayCharWidth = 20;
|
||||
static const int kGrayCharHeight = 32;
|
||||
static const int kCharLBPGridX = 4;
|
||||
static const int kCharLBPGridY = 4;
|
||||
static const int kCharLBPPatterns = 16;
|
||||
|
||||
static const int kCharHiddenNeurans = 64;
|
||||
|
||||
static const int kCharsCountInOnePlate = 7;
|
||||
static const int kSymbolsCountInChinesePlate = 6;
|
||||
|
||||
static const float kPlateMaxSymbolCount = 7.5f;
|
||||
static const int kSymbolIndex = 2;
|
||||
|
||||
// Disable the copy and assignment operator for this class.
|
||||
#define DISABLE_ASSIGN_AND_COPY(className) \
|
||||
private:\
|
||||
className& operator=(const className&); \
|
||||
className(const className&)
|
||||
|
||||
// Display the image.
|
||||
#define SET_DEBUG(param) \
|
||||
kDebug = param
|
||||
|
||||
// Display the image.
|
||||
#define SHOW_IMAGE(imgName, debug) \
|
||||
if (debug) { \
|
||||
namedWindow("imgName", WINDOW_AUTOSIZE); \
|
||||
moveWindow("imgName", 500, 500); \
|
||||
imshow("imgName", imgName); \
|
||||
waitKey(0); \
|
||||
destroyWindow("imgName"); \
|
||||
}
|
||||
|
||||
// Load model. compatitable withe 3.0, 3.1 and 3.2
|
||||
#ifdef CV_VERSION_THREE_TWO
|
||||
#define LOAD_SVM_MODEL(model, path) \
|
||||
model = ml::SVM::load(path);
|
||||
#define LOAD_ANN_MODEL(model, path) \
|
||||
model = ml::ANN_MLP::load(path);
|
||||
#else
|
||||
#define LOAD_SVM_MODEL(model, path) \
|
||||
model = ml::SVM::load<ml::SVM>(path);
|
||||
#define LOAD_ANN_MODEL(model, path) \
|
||||
model = ml::ANN_MLP::load<ml::ANN_MLP>(path);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // EASYPR_CONFIG_H_
|
||||
@ -0,0 +1,131 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Name: CHARACTER Header
|
||||
// Version: 1.0
|
||||
// Date: 2016-06-14
|
||||
// Author: liuruoze
|
||||
// Copyright: liuruoze
|
||||
// Desciption:
|
||||
// An abstract class for car character in plate.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#ifndef EASYPR_CORE_CHARACTER_H_
|
||||
#define EASYPR_CORE_CHARACTER_H_
|
||||
|
||||
#include "opencv2/opencv.hpp"
|
||||
|
||||
using namespace cv;
|
||||
|
||||
/*! \namespace easypr
|
||||
Namespace where all the C++ EasyPR functionality resides
|
||||
*/
|
||||
namespace easypr {
|
||||
|
||||
class CCharacter {
|
||||
public:
|
||||
CCharacter()
|
||||
{
|
||||
m_characterMat = Mat();
|
||||
m_characterGrayMat = Mat();
|
||||
m_characterPos = Rect();
|
||||
m_characterStr = "";
|
||||
m_score = 0;
|
||||
m_isChinese = false;
|
||||
m_ostuLevel = 125;
|
||||
m_center = Point(0, 0);
|
||||
m_index = 0;
|
||||
}
|
||||
|
||||
CCharacter(const CCharacter& other)
|
||||
{
|
||||
m_characterMat = other.m_characterMat;
|
||||
m_characterGrayMat = other.m_characterGrayMat;
|
||||
m_characterPos = other.m_characterPos;
|
||||
m_characterStr = other.m_characterStr;
|
||||
m_score = other.m_score;
|
||||
m_isChinese = other.m_isChinese;
|
||||
m_ostuLevel = other.m_ostuLevel;
|
||||
m_center = other.m_center;
|
||||
m_index = other.m_index;
|
||||
}
|
||||
|
||||
inline void setCharacterMat(Mat param) { m_characterMat = param; }
|
||||
inline Mat getCharacterMat() const { return m_characterMat; }
|
||||
|
||||
inline void setCharacterGrayMat(Mat param) { m_characterGrayMat = param; }
|
||||
inline Mat getCharacterGrayMat() const { return m_characterGrayMat; }
|
||||
|
||||
inline void setCharacterPos(Rect param) { m_characterPos = param; }
|
||||
inline Rect getCharacterPos() const { return m_characterPos; }
|
||||
|
||||
inline void setCharacterStr(String param) { m_characterStr = param; }
|
||||
inline String getCharacterStr() const { return m_characterStr; }
|
||||
|
||||
inline void setCharacterScore(double param) { m_score = param; }
|
||||
inline double getCharacterScore() const { return m_score; }
|
||||
|
||||
inline void setIsChinese(bool param) { m_isChinese = param; }
|
||||
inline bool getIsChinese() const { return m_isChinese; }
|
||||
|
||||
inline void setOstuLevel(double param) { m_ostuLevel = param; }
|
||||
inline double getOstuLevel() const { return m_ostuLevel; }
|
||||
|
||||
inline void setCenterPoint(Point param) { m_center = param; }
|
||||
inline Point getCenterPoint() const { return m_center; }
|
||||
|
||||
inline void setIndex(int param) { m_index = param; }
|
||||
inline int getIndex() const { return m_index; }
|
||||
|
||||
inline bool getIsStrong() const { return m_score >= 0.9; }
|
||||
inline bool getIsWeak() const { return m_score < 0.9 && m_score >= 0.5; }
|
||||
inline bool getIsLittle() const { return m_score < 0.5; }
|
||||
|
||||
bool operator < (const CCharacter& other) const
|
||||
{
|
||||
return (m_score > other.m_score);
|
||||
}
|
||||
|
||||
bool operator < (const CCharacter& other)
|
||||
{
|
||||
return (m_score > other.m_score);
|
||||
}
|
||||
|
||||
private:
|
||||
//! character mat
|
||||
Mat m_characterMat;
|
||||
|
||||
//! character gray mat
|
||||
Mat m_characterGrayMat;
|
||||
|
||||
//! character rect
|
||||
Rect m_characterPos;
|
||||
|
||||
//! character str
|
||||
String m_characterStr;
|
||||
|
||||
//! character likely
|
||||
double m_score;
|
||||
|
||||
//! weather is chinese
|
||||
bool m_isChinese;
|
||||
|
||||
//! ostu level
|
||||
double m_ostuLevel;
|
||||
|
||||
//! center point
|
||||
Point m_center;
|
||||
|
||||
//! the postion in the plate, from 1 to 7 normal
|
||||
int m_index;
|
||||
|
||||
////! m_score >= 0.9
|
||||
//bool isStrong;
|
||||
|
||||
////! m_score < 0.9 && m_score >= 0.5
|
||||
//bool isWeak;
|
||||
|
||||
////! m_score < 0.5
|
||||
//bool isLittle;
|
||||
};
|
||||
|
||||
} /*! \namespace easypr*/
|
||||
|
||||
#endif // EASYPR_CORE_PLATE_H_
|
||||
@ -0,0 +1,58 @@
|
||||
#ifndef EASYPR_CORE_CHARSIDENTIFY_H_
|
||||
#define EASYPR_CORE_CHARSIDENTIFY_H_
|
||||
|
||||
#include <memory>
|
||||
#include "opencv2/opencv.hpp"
|
||||
|
||||
#include "easypr/util/kv.h"
|
||||
#include "easypr/core/character.hpp"
|
||||
#include "easypr/core/feature.h"
|
||||
|
||||
namespace easypr {
|
||||
|
||||
class CharsIdentify {
|
||||
public:
|
||||
static CharsIdentify* instance();
|
||||
|
||||
int classify(cv::Mat f, float& maxVal, bool isChinses = false, bool isAlphabet = false);
|
||||
void classify(cv::Mat featureRows, std::vector<int>& out_maxIndexs,
|
||||
std::vector<float>& out_maxVals, std::vector<bool> isChineseVec);
|
||||
void classify(std::vector<CCharacter>& charVec);
|
||||
|
||||
void classifyChinese(std::vector<CCharacter>& charVec);
|
||||
void classifyChineseGray(std::vector<CCharacter>& charVec);
|
||||
|
||||
std::pair<std::string, std::string> identify(cv::Mat input, bool isChinese = false, bool isAlphabet = false);
|
||||
int identify(std::vector<cv::Mat> inputs, std::vector<std::pair<std::string, std::string>>& outputs,
|
||||
std::vector<bool> isChineseVec);
|
||||
|
||||
std::pair<std::string, std::string> identifyChinese(cv::Mat input, float& result, bool& isChinese);
|
||||
std::pair<std::string, std::string> identifyChineseGray(cv::Mat input, float& result, bool& isChinese);
|
||||
|
||||
bool isCharacter(cv::Mat input, std::string& label, float& maxVal, bool isChinese = false);
|
||||
|
||||
void LoadModel(std::string path);
|
||||
void LoadChineseModel(std::string path);
|
||||
void LoadGrayChANN(std::string path);
|
||||
void LoadChineseMapping(std::string path);
|
||||
|
||||
private:
|
||||
CharsIdentify();
|
||||
annCallback extractFeature;
|
||||
static CharsIdentify* instance_;
|
||||
|
||||
// binary character classifer
|
||||
cv::Ptr<cv::ml::ANN_MLP> ann_;
|
||||
|
||||
// binary character classifer, only for chinese
|
||||
cv::Ptr<cv::ml::ANN_MLP> annChinese_;
|
||||
|
||||
// gray classifer, only for chinese
|
||||
cv::Ptr<cv::ml::ANN_MLP> annGray_;
|
||||
|
||||
// used for chinese mapping
|
||||
std::shared_ptr<Kv> kv_;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // EASYPR_CORE_CHARSIDENTIFY_H_
|
||||
@ -0,0 +1,84 @@
|
||||
#ifndef EASYPR_CORE_CHARSSEGMENT_H_
|
||||
#define EASYPR_CORE_CHARSSEGMENT_H_
|
||||
|
||||
#include "opencv2/opencv.hpp"
|
||||
#include "easypr/config.h"
|
||||
|
||||
using namespace cv;
|
||||
using namespace std;
|
||||
|
||||
namespace easypr {
|
||||
|
||||
class CCharsSegment {
|
||||
public:
|
||||
CCharsSegment();
|
||||
//! using ostu algotithm the segment chars in plate
|
||||
int charsSegment(Mat input, std::vector<Mat>& resultVec, Color color = BLUE);
|
||||
|
||||
//! using methods to segment chars in plate
|
||||
int charsSegmentUsingOSTU(Mat input, std::vector<Mat>& resultVec, std::vector<Mat>& grayChars, Color color = BLUE);
|
||||
int charsSegmentUsingMSER(Mat input, vector<Mat>& resultVec, vector<Mat>& grayChars, Color color = BLUE);
|
||||
|
||||
//! using project
|
||||
int projectSegment(const Mat& input, Color color, vector<int>& out_indexs);
|
||||
|
||||
bool verifyCharSizes(Mat r);
|
||||
|
||||
// find the best chinese binaranzation method
|
||||
void judgeChinese(Mat in, Mat& out, Color plateType);
|
||||
void judgeChineseGray(Mat in, Mat& out, Color plateType);
|
||||
|
||||
Mat preprocessChar(Mat in);
|
||||
|
||||
//! to find the position of chinese
|
||||
Rect GetChineseRect(const Rect rectSpe);
|
||||
|
||||
//! find the character refer to city, like "suA" A
|
||||
int GetSpecificRect(const std::vector<Rect>& vecRect);
|
||||
|
||||
//! Do two things
|
||||
// 1.remove rect in the left of city character
|
||||
// 2.from the city rect, to the right, choose 6 rects
|
||||
int RebuildRect(const std::vector<Rect>& vecRect, std::vector<Rect>& outRect,
|
||||
int specIndex);
|
||||
|
||||
int SortRect(const std::vector<Rect>& vecRect, std::vector<Rect>& out);
|
||||
|
||||
inline void setLiuDingSize(int param) { m_LiuDingSize = param; }
|
||||
inline void setColorThreshold(int param) { m_ColorThreshold = param; }
|
||||
|
||||
inline void setBluePercent(float param) { m_BluePercent = param; }
|
||||
inline float getBluePercent() const { return m_BluePercent; }
|
||||
inline void setWhitePercent(float param) { m_WhitePercent = param; }
|
||||
inline float getWhitePercent() const { return m_WhitePercent; }
|
||||
|
||||
static const int DEFAULT_DEBUG = 1;
|
||||
|
||||
static const int CHAR_SIZE = 20;
|
||||
static const int HORIZONTAL = 1;
|
||||
static const int VERTICAL = 0;
|
||||
|
||||
static const int DEFAULT_LIUDING_SIZE = 7;
|
||||
static const int DEFAULT_MAT_WIDTH = 136;
|
||||
static const int DEFAULT_COLORTHRESHOLD = 150;
|
||||
|
||||
inline void setDebug(int param) { m_debug = param; }
|
||||
|
||||
inline int getDebug() { return m_debug; }
|
||||
|
||||
private:
|
||||
|
||||
int m_LiuDingSize;
|
||||
|
||||
int m_theMatWidth;
|
||||
|
||||
int m_ColorThreshold;
|
||||
float m_BluePercent;
|
||||
float m_WhitePercent;
|
||||
|
||||
int m_debug;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // EASYPR_CORE_CHARSSEGMENT_H_
|
||||
@ -0,0 +1,159 @@
|
||||
#ifndef EASYPR_CORE_COREFUNC_H_
|
||||
#define EASYPR_CORE_COREFUNC_H_
|
||||
|
||||
#include "opencv2/opencv.hpp"
|
||||
#include "easypr/core/plate.hpp"
|
||||
#include "easypr/core/character.hpp"
|
||||
|
||||
using namespace cv;
|
||||
using namespace std;
|
||||
|
||||
/*! \namespace easypr
|
||||
Namespace where all the C++ EasyPR functionality resides
|
||||
*/
|
||||
namespace easypr {
|
||||
|
||||
//! find binary image match to color
|
||||
//! input rgb, want match color ( blue or yellow)
|
||||
//! out grey, 255 is match, 0 is not match
|
||||
|
||||
Mat colorMatch(const Mat& src, Mat& match, const Color r,
|
||||
const bool adaptive_minsv);
|
||||
|
||||
//Mat mserMatch(const Mat& src, Mat& match, const Color r,
|
||||
// std::vector<RotatedRect>& plateRect, std::vector<Rect>& out_charRect);
|
||||
|
||||
bool plateColorJudge(const Mat& src, const Color r, const bool adaptive_minsv,
|
||||
float& percent);
|
||||
|
||||
bool bFindLeftRightBound(Mat& bound_threshold, int& posLeft, int& posRight);
|
||||
bool bFindLeftRightBound1(Mat& bound_threshold, int& posLeft, int& posRight);
|
||||
bool bFindLeftRightBound2(Mat& bound_threshold, int& posLeft, int& posRight);
|
||||
|
||||
bool clearLiuDing(Mat& img);
|
||||
void clearLiuDingOnly(Mat& img);
|
||||
void clearLiuDing(Mat mask, int& top, int& bottom);
|
||||
|
||||
Color getPlateType(const Mat& src, const bool adaptive_minsv);
|
||||
|
||||
Mat histeq(Mat in);
|
||||
Rect GetCenterRect(Mat& in);
|
||||
Mat CutTheRect(Mat& in, Rect& rect);
|
||||
int ThresholdOtsu(Mat mat);
|
||||
|
||||
// project histogram
|
||||
Mat ProjectedHistogram(Mat img, int t, int threshold = 20);
|
||||
|
||||
Mat showHistogram(const Mat& hist);
|
||||
|
||||
Mat preprocessChar(Mat in, int char_size);
|
||||
|
||||
Rect GetChineseRect(const Rect rectSpe);
|
||||
|
||||
bool verifyCharSizes(Rect r);
|
||||
bool verifyPlateSize(Rect mr);
|
||||
bool verifyRotatedPlateSizes(RotatedRect mr, bool showDebug = false);
|
||||
|
||||
// non-maximum suppression
|
||||
void NMStoCharacter(std::vector<CCharacter> &inVec, double overlap);
|
||||
|
||||
// draw rotatedRectangle
|
||||
void rotatedRectangle(InputOutputArray img, RotatedRect rect,
|
||||
const Scalar& color, int thickness = 1,
|
||||
int lineType = LINE_8, int shift = 0);
|
||||
|
||||
// ostu region
|
||||
void spatial_ostu(InputArray _src, int grid_x, int grid_y, Color type = BLUE);
|
||||
|
||||
// Scale to small image (for the purpose of comput mser in large image)
|
||||
Mat scaleImage(const Mat& image, const Size& maxSize, double& scale_ratio);
|
||||
|
||||
// Scale back RotatedRect
|
||||
RotatedRect scaleBackRRect(const RotatedRect& rr, const float scale_ratio);
|
||||
|
||||
//! use verify size to first generate char candidates
|
||||
void mserCharMatch(const Mat &src, std::vector<Mat> &match, std::vector<CPlate>& out_plateVec_blue, std::vector<CPlate>& out_plateVec_yellow,
|
||||
bool usePlateMser, std::vector<RotatedRect>& out_plateRRect_blue, std::vector<RotatedRect>& out_plateRRect_yellow, int index = 0, bool showDebug = false);
|
||||
|
||||
// computer the insert over union about two rrect
|
||||
bool computeIOU(const RotatedRect& rrect1, const RotatedRect& rrect2, const int width, const int height, const float thresh, float& result);
|
||||
float computeIOU(const RotatedRect& rrect1, const RotatedRect& rrect2, const int width, const int height);
|
||||
|
||||
bool computeIOU(const Rect& rect1, const Rect& rect2, const float thresh, float& result);
|
||||
float computeIOU(const Rect& rect1, const Rect& rect2);
|
||||
|
||||
/** @brief convert form mser point to image.
|
||||
|
||||
The function created first by Hailiang Xu.
|
||||
Modified by Ruoze Liu.
|
||||
|
||||
@param
|
||||
*/
|
||||
Mat adaptive_image_from_points(const std::vector<Point>& points,
|
||||
const Rect& rect, const Size& size, const Scalar& backgroundColor = Scalar(0, 0, 0),
|
||||
const Scalar& forgroundColor = Scalar(255, 255, 255), bool gray = true);
|
||||
|
||||
// Calculate a rect have same length and width and remains the center
|
||||
Rect adaptive_charrect_from_rect(const Rect& rect, int maxwidth, int maxheight, bool useExtendHeight = false);
|
||||
|
||||
// calc safe rect
|
||||
bool calcSafeRect(const RotatedRect& roi_rect, const Mat& src,
|
||||
Rect_<float>& safeBoundRect);
|
||||
bool calcSafeRect(const RotatedRect &roi_rect, const int width, const int height,
|
||||
Rect_<float> &safeBoundRect);
|
||||
|
||||
// uniform resize all the image to same size for the next process
|
||||
Mat uniformResize(const Mat &result, float& scale);
|
||||
|
||||
// uniform resize all the plates to same size for the next process
|
||||
Mat uniformResizePlates(const Mat &result, float& scale);
|
||||
|
||||
// show detect results
|
||||
void showDectectResults(const Mat& img, const std::vector<CPlate> &plateVec, size_t num);
|
||||
|
||||
// show the results
|
||||
Mat showResult(const Mat &result, int img_index = 0);
|
||||
|
||||
// enlarge the char rect
|
||||
Rect rectEnlarge(const Rect& src, const int mat_width, const int mat_height);
|
||||
Rect rectFit(const Rect &src, const int mat_width, const int mat_height);
|
||||
|
||||
// write images to temp folder
|
||||
void writeTempImage(const Mat& outImg, const string path, int index = 0);
|
||||
|
||||
// remove small hor lines in the plate
|
||||
bool judegMDOratio2(const Mat &image, const Rect &rect, std::vector<Point> &contour, Mat &result, const float thresh = 1.f,
|
||||
bool useExtendHeight = false);
|
||||
|
||||
// clear top and bottom borders
|
||||
void clearBorder(const Mat &img, Rect& cropRect);
|
||||
|
||||
//! non-maximum surpresion for 1d array
|
||||
template<typename T>
|
||||
void NMSfor1D(const vector<T>& arr, vector<int>& index) {
|
||||
// prepare
|
||||
int size = (int)arr.size();
|
||||
index.resize(size);
|
||||
for (int j = 0; j < size; j++)
|
||||
index.at(j) = 0;
|
||||
|
||||
// nms
|
||||
int i = 1;
|
||||
while (i < size - 1) {
|
||||
if (arr.at(i) > arr.at(i + 1)) {
|
||||
if (arr.at(i) >= arr.at(i - 1))
|
||||
index.at(i) = 1;
|
||||
}
|
||||
else {
|
||||
while (i < size - 1 && arr.at(i) <= arr.at(i + 1))
|
||||
i = i + 1;
|
||||
if (i < size - 1)
|
||||
index.at(i) = 1;
|
||||
}
|
||||
i = i + 2;
|
||||
}
|
||||
}
|
||||
|
||||
} /*! \namespace easypr*/
|
||||
|
||||
#endif // EASYPR_CORE_COREFUNC_H_
|
||||
@ -0,0 +1,59 @@
|
||||
#ifndef EASYPR_CORE_FEATURE_H_
|
||||
#define EASYPR_CORE_FEATURE_H_
|
||||
|
||||
#include "opencv2/opencv.hpp"
|
||||
|
||||
using namespace cv;
|
||||
|
||||
namespace easypr {
|
||||
|
||||
//! 获得车牌的特征数
|
||||
cv::Mat getHistogram(cv::Mat in);
|
||||
|
||||
//! EasyPR的getFeatures回调函数
|
||||
//! 用于从车牌的image生成svm的训练特征features
|
||||
typedef void (*svmCallback)(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! EasyPR的getFeatures回调函数
|
||||
//! convert from images to features used by gray char ann
|
||||
typedef void (*annCallback)(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! gray and project feature
|
||||
void getGrayPlusProject(const cv::Mat& grayChar, cv::Mat& features);
|
||||
|
||||
//! EasyPR的getFeatures回调函数
|
||||
//! 本函数是获取垂直和水平的直方图图值
|
||||
void getHistogramFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取SIFT特征子
|
||||
void getSIFTFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取HOG特征子
|
||||
void getHOGFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取HSV空间量化的直方图特征子
|
||||
void getHSVHistFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! LBP feature
|
||||
void getLBPFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! color feature
|
||||
void getColorFeatures(const cv::Mat& src, cv::Mat& features);
|
||||
|
||||
//! color feature and histom
|
||||
void getHistomPlusColoFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! get character feature
|
||||
cv::Mat charFeatures(cv::Mat in, int sizeData);
|
||||
cv::Mat charFeatures2(cv::Mat in, int sizeData);
|
||||
|
||||
//! LBP feature + Histom feature
|
||||
void getLBPplusHistFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! grayChar feauter
|
||||
void getGrayCharFeatures(const cv::Mat& grayChar, cv::Mat& features);
|
||||
|
||||
void getGrayPlusLBP(const Mat& grayChar, Mat& features);
|
||||
} /*! \namespace easypr*/
|
||||
|
||||
#endif // EASYPR_CORE_FEATURE_H_
|
||||
@ -0,0 +1,96 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Name: params Header
|
||||
// Version: 1.0
|
||||
// Date: 2016-07-01
|
||||
// Author: liuruoze
|
||||
// Copyright: liuruoze
|
||||
// Desciption:
|
||||
// An abstract class for runtime algorithm params in easypr.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#ifndef EASYPR_CORE_PARAMS_H_
|
||||
#define EASYPR_CORE_PARAMS_H_
|
||||
|
||||
/*! \namespace easypr
|
||||
Namespace where all the C++ EasyPR functionality resides
|
||||
*/
|
||||
namespace easypr {
|
||||
|
||||
class CParams {
|
||||
public:
|
||||
static CParams* instance();
|
||||
|
||||
CParams(const CParams& other) {
|
||||
m_isUpdate = other.m_isUpdate;
|
||||
|
||||
m_param1f = other.m_param1f;
|
||||
m_param2f = other.m_param2f;
|
||||
m_param3f = other.m_param3f;
|
||||
|
||||
m_param1i = other.m_param1i;
|
||||
m_param2i = other.m_param2i;
|
||||
m_param3i = other.m_param3i;
|
||||
|
||||
m_param1b = other.m_param1b;
|
||||
m_param2b = other.m_param2b;
|
||||
m_param3b = other.m_param3b;
|
||||
}
|
||||
|
||||
inline void setIsUpdate(bool param) { m_isUpdate = param; }
|
||||
inline bool getIsUpdate() const { return m_isUpdate; }
|
||||
|
||||
inline void setParam1f(float param) { m_param1f = param; }
|
||||
inline float getParam1f() const { return m_param1f; }
|
||||
|
||||
inline void setParam2f(float param) { m_param2f = param; }
|
||||
inline float getParam2f() const { return m_param2f; }
|
||||
|
||||
inline void setParam3f(float param) { m_param3f = param; }
|
||||
inline float getParam3f() const { return m_param3f; }
|
||||
|
||||
inline void setParam1i(int param) { m_param1i = param; }
|
||||
inline int getParam1i() const { return m_param1i; }
|
||||
|
||||
inline void setParam2i(int param) { m_param2i = param; }
|
||||
inline int getParam2i() const { return m_param2i; }
|
||||
|
||||
inline void setParam3i(int param) { m_param3i = param; }
|
||||
inline int getParam3i() const { return m_param3i; }
|
||||
|
||||
inline void setParam1b(bool param) { m_param1b = param; }
|
||||
inline bool getParam1b() const { return m_param1b; }
|
||||
|
||||
inline void setParam2b(bool param) { m_param2b = param; }
|
||||
inline bool getParam2b() const { return m_param2b; }
|
||||
|
||||
inline void setParam3b(bool param) { m_param3b = param; }
|
||||
inline bool getParam3b() const { return m_param3b; }
|
||||
|
||||
private:
|
||||
CParams() {
|
||||
m_isUpdate = false;
|
||||
}
|
||||
|
||||
static CParams* instance_;
|
||||
|
||||
// weather update;
|
||||
bool m_isUpdate;
|
||||
|
||||
//! float params
|
||||
float m_param1f;
|
||||
float m_param2f;
|
||||
float m_param3f;
|
||||
|
||||
//! int params
|
||||
int m_param1i;
|
||||
int m_param2i;
|
||||
int m_param3i;
|
||||
|
||||
//! bool params
|
||||
bool m_param1b;
|
||||
bool m_param2b;
|
||||
bool m_param3b;
|
||||
};
|
||||
|
||||
} /*! \namespace easypr*/
|
||||
|
||||
#endif // EASYPR_CORE_PARAMS_H_
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue