更新CNN参数和图像显示方式。

This commit is contained in:
xinyang
2019-05-04 11:34:15 +08:00
parent 218a4b56c6
commit 99a771da90
11 changed files with 12335 additions and 12333 deletions

View File

@@ -154,7 +154,7 @@ bool judge_light_color(std::vector<LightBlob> &light, std::vector<LightBlob> &co
bool ArmorFinder::stateSearchingTarget(cv::Mat &src) { bool ArmorFinder::stateSearchingTarget(cv::Mat &src) {
cv::Mat split, src_bin; cv::Mat split, src_bin;
LightBlobs light_blobs, light_blobs_, light_blobs_real; LightBlobs light_blobs, light_blobs_, light_blobs_real;
std::vector<cv::Rect2d> armor_boxes, boxes_number[9]; std::vector<cv::Rect2d> armor_boxes, boxes_number[10];
armor_box = cv::Rect2d(0,0,0,0); armor_box = cv::Rect2d(0,0,0,0);
cv::cvtColor(src, src_gray, CV_BGR2GRAY); cv::cvtColor(src, src_gray, CV_BGR2GRAY);

View File

@@ -27,29 +27,14 @@ void showArmorBoxClass(std::string window_names, const cv::Mat &src, vector<cv::
{ {
image2show = src.clone(); image2show = src.clone();
} }
if(!boxes[0].empty()){ for(int i=0; i<10; i++){
for(auto box : boxes[0]){ if(!boxes[i].empty()){
cv::rectangle(image2show, box, Scalar(255, 0, 0), 1); for(auto box : boxes[i]){
} char buff[2] = {0};
}else if(!boxes[1].empty()){ buff[0] = i + '0';
for(auto box : boxes[1]){ rectangle(image2show, box, Scalar(0, 255, 0), 1);
cv::rectangle(image2show, box, Scalar(0, 255, 0), 1); putText(image2show, buff, Point(box.x+2, box.y+2), cv::FONT_HERSHEY_TRIPLEX, 1, Scalar(255,0,0));
} }
}else if(!boxes[2].empty()){
for(auto box : boxes[2]){
cv::rectangle(image2show, box, Scalar(0, 0, 255), 1);
}
}else if(!boxes[3].empty()){
for(auto box : boxes[3]){
cv::rectangle(image2show, box, Scalar(0, 255, 255), 1);
}
}else if(!boxes[4].empty()){
for(auto box : boxes[4]){
cv::rectangle(image2show, box, Scalar(255, 0, 255), 1);
}
}else if(!boxes[5].empty()){
for(auto box : boxes[5]){
cv::rectangle(image2show, box, Scalar(255, 255, 0), 1);
} }
} }
imshow(window_names, image2show); imshow(window_names, image2show);

View File

@@ -41,7 +41,7 @@ CONV2_OUTPUT_CHANNELS = 10
FC1_OUTPUT_NODES = 16 FC1_OUTPUT_NODES = 16
# 第二层全连接宽度(输出标签类型数) # 第二层全连接宽度(输出标签类型数)
FC2_OUTPUT_NODES = 8 FC2_OUTPUT_NODES = 6
# 输出标签类型数 # 输出标签类型数
OUTPUT_NODES = FC2_OUTPUT_NODES OUTPUT_NODES = FC2_OUTPUT_NODES

View File

@@ -1,7 +1,7 @@
6 6
-0.37225634 0.25190517
-0.2478522 -0.064696774
-0.47375765 -1.1652193
0.009908229 -1.3264673
0.69579834 2.689583
-0.05971829 -1.1748564

View File

@@ -2,453 +2,453 @@
6 6
5 5
5 5
-0.7337494 0.11777049
-0.6937527 -0.5483178
-0.67101884 -1.5183663
-0.60440236 -1.955216
-0.73606586 -2.2450504
-0.7478304 0.32459745
-0.8085305 -0.12860261
-0.6904055 -0.6772694
-0.7651195 -1.1496266
-0.7084718 -1.407309
-0.9906155 0.3899166
-0.87745357 0.04115204
-0.7000051 -0.24398778
-0.8715864 -0.64736384
-0.7446616 -0.6999237
-0.8037889 0.20561443
-0.618627 0.5234183
-0.6325674 0.23787054
-0.59341496 -0.00951052
-0.62959474 -0.17350924
-0.014231296 0.34422565
-0.08161524 0.777099
-0.2579513 0.72901505
-0.4687266 0.6422372
-0.24779701 0.06915906
-0.22118886 -0.12754185
-0.31540632 -0.07318786
-0.21255392 -0.096245185
0.01073099 -0.08512626
-0.15033825 -0.0075299093
-0.32471213 -0.0027510952
-0.12707588 -0.23676533
-0.17916436 -0.083034575
-0.028622292 0.029986175
-0.05188435 -0.026513737
-0.12553264 -0.09559005
-0.0946007 -0.0024623247
-0.06460633 0.0054135886
-0.041471746 0.0006651991
0.015563008 0.01763169
-0.26039425 -0.014942897
-0.079619355 -0.014311972
-0.1205842 -0.0002753004
0.094940566 0.03573563
-0.1750217 0.021622038
-0.2796452 -0.1374828
-0.19023262 -0.12651409
-0.055042416 -0.16061573
-0.050695155 -0.223415
-0.044094857 -0.10300647
-0.9086073 0.15447244
-0.35235822 0.07344577
0.30365855 0.049101837
1.000589 0.16945939
1.2184463 0.30799115
-0.7277262 -0.09038234
-0.27227914 0.074387975
0.51391685 -0.14628443
0.93604887 0.012496472
1.1217358 0.10561814
-0.8503647 -0.06538503
-0.1529237 0.24966498
0.7071794 0.07688923
1.0232986 0.0063741454
0.9231354 0.0680113
-1.1999215 -0.0591892
-0.26001996 0.08900544
0.31989247 0.08578229
0.49021512 -0.045412317
0.4707462 0.17189993
-1.3921645 -0.23383571
-0.7652607 0.14361341
-0.32385713 0.14279735
-0.0044978694 0.108869225
0.12107601 0.29616848
-0.2628682 0.88802135
-0.040824424 0.9322744
-0.4928625 0.6169363
-1.1108128 0.053218577
-2.1292882 -0.4893802
-0.43092158 1.1701009
0.039630573 1.309293
-0.19942534 0.7900595
-1.1754087 0.13494617
-2.0381243 -0.53572536
-0.45808747 1.7119668
0.019034432 1.5477047
-0.40220654 1.2634932
-1.216894 0.5294498
-2.1285393 -0.26089707
-0.6753537 1.8120517
-0.17457765 2.0142252
-0.19739395 1.6433445
-0.8989531 0.6699045
-1.7085532 0.025381207
-0.67778856 2.2189493
-0.2841309 2.2740376
-0.20467272 1.7443526
-0.6957597 1.200576
-1.3799949 0.6334228
-1.221984 0.15523954
-1.047475 -0.01665401
-0.5553654 -0.118368655
-0.5047841 -0.35727102
-0.48746312 -0.42292374
-0.82557076 0.32598874
-0.40178424 -0.21099696
-0.14857721 -0.20522207
-0.05297258 -0.25549328
-0.536673 -0.17338459
-0.5235084 0.10133018
0.052303962 -0.13074248
-0.023993408 -0.11154948
-0.31840283 -0.15071136
-0.9369167 -0.22535364
-0.5166214 0.33406344
-0.1376763 -0.036810637
0.0063631153 0.099401385
-0.12015801 -0.20969932
-1.2773997 -0.13488947
-0.72208375 0.16889526
-0.24810186 0.074462764
-0.26033 -0.16236131
-0.46964744 -0.046184797
-1.557477 0.023801776
-0.0126399975 -0.9323588
-0.2124332 -0.58124906
0.07490671 0.18694697
-0.08790178 0.2679367
-0.11780411 0.33944207
0.042807758 -0.79266095
0.008334734 -0.17053536
0.060645778 0.114198804
-0.14671083 0.4833294
-0.16901183 0.37498808
-0.22304396 -0.90027314
-0.0769471 -0.49293894
-0.009709285 0.01712811
-0.14782685 0.31062165
-0.095943585 0.3294721
0.020692833 -1.3969829
-0.14911899 -0.9609437
-0.15973799 -0.4146537
-0.03142608 -0.12628987
0.104167305 0.09289634
-0.20708825 -2.01327
-0.05318397 -1.6878839
-0.07113983 -1.020883
-0.13408132 -0.51367843
-0.11653387 -0.25005263
-0.7500504 0.3150389
-0.7248431 -1.0783674
-0.61835104 -2.7555757
-0.45383522 -3.983991
-0.16763654 -4.5347676
-0.61524427 0.6119982
-0.7349246 -0.41981643
-0.8378667 -1.6696591
-0.5694857 -2.7729795
-0.45536998 -3.2745647
-0.76552916 0.9486962
-0.851986 0.14917418
-0.85871804 -0.67725325
-0.7100276 -1.3731288
-0.49703908 -1.9631144
-0.64794004 0.853969
-0.50571287 0.54386574
-0.6866874 0.1226466
-0.40854928 -0.43811196
-0.5622537 -0.99324924
0.07620155 1.1727126
-0.0787729 0.92385554
-0.19114618 0.9976169
-0.16987182 0.50470996
-0.17041641 -0.16251346
-0.27857593 0.111192286
-0.121658556 -0.0311233
-0.085185595 -0.06703233
-0.08372851 -0.0056416607
-0.14375111 -0.13427663
-0.37070906 -0.0059515433
-0.14901304 -0.10615259
-0.054120127 -0.09087167
0.038107906 0.072213285
-0.07748371 -0.09585085
-0.20931405 -0.12161211
-0.1937567 0.05298058
0.14340971 -0.04786352
-0.053399563 -0.05641162
-0.083370306 0.073793665
-0.21443273 -0.05133933
-0.080105215 0.0063234954
-0.10266688 -0.11314615
0.10945406 -0.075407416
-0.18393016 -0.16874631
-0.16443613 0.0452455
0.017121822 0.047273546
0.04672509 0.022022702
0.09892883 -0.1461922
-0.11781335 -0.07056173
-1.161838 -0.0926505
-0.8175547 -0.2730682
-0.44016403 -0.26554346
0.090491325 -0.34648055
0.8639599 -0.11837572
-0.49316305 0.05535075
0.25248703 -0.15645643
0.3574456 -0.34763718
0.791709 -0.551588
1.0159097 -0.3841269
0.108047605 0.1616999
0.72324693 -0.067517325
1.0133348 -0.44082755
1.2196273 -0.5951961
0.8379106 -0.48410118
0.12326059 -0.017882127
0.6342552 -0.20971838
0.91193444 -0.4876452
0.69442016 -0.5433759
0.5248603 -0.66698676
0.06752323 0.076961294
0.22544046 -0.16057712
0.21614142 -0.32178354
-0.033874128 -0.4739331
-0.35373747 -0.43045306
1.2651725 -0.7695584
1.0176816 0.120984636
0.63459647 0.562472
-0.68232757 0.41816708
-2.055359 0.17464462
1.2116768 -0.54170316
1.0648314 0.21317379
0.79537696 0.24528086
-0.44271514 0.26707074
-2.0117953 0.13246953
1.2231245 -0.44595376
1.1929921 0.21264245
0.5311513 0.2402921
-0.62809414 0.1721093
-2.1078017 0.008216559
0.8818138 -0.20339474
1.0870899 0.14848676
0.7286623 0.37409306
-0.21488012 0.17518179
-1.6681597 -0.11521746
0.7761452 0.3209798
1.039942 0.60100836
0.7954326 0.44183603
0.22737303 0.33679137
-1.0519534 0.15469958
-1.4585321 -0.5839434
-1.2353656 -0.4227066
-1.00755 -0.49117723
-0.40541697 -0.48467872
-0.241744 -0.56445146
-0.2468871 -1.1456538
-0.124388404 -0.6834423
0.034186 -0.654748
0.15726992 -0.22800747
-0.2593506 -0.022758592
0.21214157 -1.0613276
0.60234964 -0.6385294
0.48045504 -0.05707361
0.08620858 0.16950387
-0.45957863 0.20175189
0.79536515 -0.9398203
1.0071297 -0.15568656
0.6323838 0.3859468
-0.05272095 0.39794713
-1.2025502 0.36458206
0.8740463 -0.69859344
0.9715014 -0.17326379
0.6848851 0.20072784
-0.20320709 0.390084
-1.7574068 0.555071
-0.04044696 -0.04178154
-0.08917504 0.21562038
-0.070345305 0.37848094
-0.23287608 0.14019106
-0.10763591 0.14371184
0.10209269 0.47437635
-0.049792744 0.90888536
-0.07547748 1.168888
0.10696673 0.60219216
-0.16306788 0.3251563
0.088507146 0.7930082
0.02865851 1.2972649
-0.13394779 1.0530943
-0.10253158 0.77613246
-0.036603633 0.5001188
-0.20971416 0.5152648
-0.051816575 0.978894
0.18494779 0.94284105
-0.020245025 0.45030168
-0.07630297 0.2261107
-0.12080981 -0.022718275
-0.12838727 0.28039193
0.07689702 0.34578055
-0.1401755 0.21017691
-0.047443036 0.1464505
-0.4872008 1.2343447
-0.755767 0.18821116
-0.90513796 -0.71521515
-0.6640466 -1.3032252
-0.509753 -1.9630777
-0.4808521 1.4947205
-0.5807188 0.9587029
-0.6151164 0.24647994
-0.5550288 -0.097875305
-0.4243716 -0.1934879
-0.40014786 1.7100966
-0.25531605 1.5319225
-0.26900706 1.3799523
-0.35961694 1.1618152
-0.31855944 1.0889668
-0.06904432 1.7062534
0.08449408 1.7905279
-0.04440668 1.8558458
0.05930122 2.0603085
0.0011873574 1.8906013
0.7064937 2.0001564
0.49867254 2.1912053
0.6776411 2.3792198
0.8048061 2.7369244
0.5733196 2.4438667
-0.19441545 -0.2246463
-0.005778725 -0.00516572
-0.0071499897 -0.14353351
0.08352753 0.010834271
-0.13246052 0.035946842
-0.033308238 -0.09643716
0.065881364 0.07274415
-0.1476445 -0.10339336
-0.17577946 -0.24220358
-0.20313627 -0.10307691
-0.026538868 -0.079659574
0.10845672 -0.016755452
0.12951013 -0.10323182
-0.054592907 -0.008980153
-0.054286536 -0.13084923
0.0909873 -0.1536615
0.07470816 0.029471084
2.0157931e-05 -0.18607274
-0.075895675 -0.10420174
-0.0631687 0.008845984
0.1139621 -0.15205318
0.13023847 0.0593492
0.07489004 -0.12890756
0.1949782 -0.032627933
0.02820571 -0.0911684
0.40668908 -0.008783043
-0.000711774 -0.16778614
-0.744561 -0.29719573
-0.5027803 -0.41922522
0.20088871 -0.18285862
0.96308225 0.036619943
0.92510736 -0.05505202
0.5134376 -0.21583575
0.25474888 -0.6781076
0.4503637 -0.47871277
1.6561543 0.12350094
1.8223486 -0.12206157
1.2207514 -0.41703764
0.7662908 -0.58151656
0.38526574 -0.5163836
1.4918652 0.30518386
1.6164081 -0.07088575
1.0311278 -0.24859065
0.3336429 -0.6786162
-0.15712811 -0.5492481
1.4385474 0.11020481
1.0327717 0.15241854
0.056643657 -0.19148083
-0.74796945 -0.22238904
-0.96597683 -0.5883373
1.1695682 -1.9134296
1.2116307 -1.3091345
0.67098075 -1.1205245
0.061276477 -0.9423058
-1.1508046 -0.9971371
1.1278331 -2.0924008
1.0747397 -1.5225571
0.81522405 -1.4351251
-0.024527794 -1.181539
-0.95285547 -1.1995114
0.8995342 -1.6696789
1.0385815 -1.6131642
0.71533716 -1.4193718
-0.045309864 -1.2528512
-1.1234874 -1.3836057
0.619687 -1.4543215
0.90204847 -1.1393946
0.6468797 -1.1318659
0.33503526 -1.3406729
-0.66591007 -1.4267716
0.50283337 -0.56939834
0.6998083 -0.8572612
0.7065805 -0.86178756
0.5727497 -0.86870027
0.04260265 -1.1124083
-0.4851468 -0.030429596
-0.20692436 -0.015162346
0.19345768 -0.23064966
1.0645467 -0.63212466
1.5191267 -0.8233778
0.8372995 -0.6971651
0.7781821 -0.89806795
1.028298 -1.1291697
1.4177388 -1.1876353
1.4664948 -1.0566497
1.3292006 -1.141609
1.3957899 -1.0472245
1.5092078 -0.9446792
1.3398026 -1.2598085
0.997704 -1.1849722
1.5843834 -0.7953462
1.6184856 -0.4807137
1.5397934 -0.74657875
1.256475 -1.1390802
0.34014988 -1.1091293
1.5893154 -0.30506095
1.544945 -0.086611256
1.0299425 -0.50039047
0.6678114 -0.92477053
-0.1956785 -0.7466115
-0.10900813 0.7484353
-0.11298105 1.099887
-0.016902497 1.0560677
-0.1565643 1.0539607
-0.054204118 0.80640066
-0.034246 1.355793
-0.2205075 1.6745459
-0.058389995 1.5189409
0.044116203 1.397477
-0.14663707 1.011761
-0.026256435 1.5243987
-0.10222199 1.8741314
-0.25303757 1.7208973
-0.12922764 1.2180593
-0.09234042 0.8020791
-0.16156028 1.3893685
0.119986236 1.6558268
-0.010263173 1.5869464
-0.04062929 1.0812482
-0.024711546 0.817395
0.024872124 1.0296667
-0.037144 1.2454413
-0.10166565 1.027977
0.0026121684 0.6484715
-0.20799841 0.5705967

View File

@@ -1,11 +1,11 @@
10 10
-1.3008373 2.339627
-0.09357162 1.8759418
-1.0318826 -0.70012397
-0.18906969 -0.13009475
-0.31774887 0.17396869
-1.4002659 2.766548
-0.36336994 -1.4850869
3.8660808 -2.6339962
1.2288735 -0.12728444
0.97610044 0.14405365

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,17 @@
16 16
-0.10046868 -1.0079371
-0.048594907 -0.21348575
-0.18817224 -0.047885668
-0.17443945 1.3191578
-0.475507 -0.18780966
-0.014380081 7.9113836
-0.08149044 -0.07285687
-2.158695 -4.019421
-4.6233006 -0.9552737
-0.6036441 -0.41599488
5.3300047 -0.13497822
-0.009695345 -1.286887
-0.008206175 1.954279
-0.068684034 -0.377049
-0.023278365 -0.2319671
3.647335 -5.739259

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,7 @@
5 6
5.166837 7.672486
-1.2788563 -2.1727772
-1.4764651 -1.6976244
-1.0171041 -0.39480045
-4.429165 -4.701963
-4.060234

View File

@@ -1,82 +1,98 @@
16 16
5 6
3.3546818e-34 5.294904e-34
-5.0533795e-34 4.1071474e-34
-2.9876767e-35 3.5979983e-34
-5.747061e-34 -4.8111744e-34
-1.2654221e-33 3.0298388e-34
3.1982972e-34 4.727617e-34
9.094423e-35 4.2841314e-34
7.818431e-34 -7.448757e-34
6.1448995e-34 -1.3280983e-34
1.2132283e-33 -3.4998216e-34
-8.594385e-34 1.1480016e-34
4.8569645e-34 2.4329347e-34
1.8429814e-34 -3.8421887e-34
1.1041889e-33 6.131607e-34
2.012101e-34 3.2127673e-35
0.00033738822 4.036833e-34
-6.27447e-05 -4.4449285e-34
3.181418e-09 -1.3033124e-34
5.5260244e-08 -0.0063951695
-4.1039914e-09 0.006757953
-0.29261625 0.026418086
-0.09727536 -0.014205176
0.59134495 0.04418388
0.18011163 0.062677905
-0.16496071 -5.2201886e-34
-4.434109e-34 1.1684014e-33
-2.3553354e-35 -4.5119606e-34
1.0642948e-33 5.0112353e-34
4.470902e-34 7.1335205e-34
-7.44183e-35 3.8090283e-34
7.1034632e-34 0.61706346
6.991907e-34 0.12671919
-1.5644636e-35 -0.05489751
1.4569e-34 -0.03665739
-4.247144e-34 -0.2387121
-0.10007951 -0.19392832
0.6292724 4.400894e-34
-0.11631892 3.3940071e-34
-0.2893417 -3.2267908e-34
-0.060249113 4.2374877e-34
-0.10115793 3.7673267e-34
-0.05707638 -4.2796806e-34
-0.021602122 0.09789613
-0.18273582 -0.37246978
0.4733028 -0.09926232
-0.32697493 0.054989994
0.0043840045 0.5217698
-0.42484373 -0.020826261
0.6746338 4.7286482e-15
0.061171096 -1.3830426e-15
0.76072145 5.8647296e-35
-0.24171914 1.1566057e-33
-0.18183002 1.2851214e-33
-0.06504542 -4.4416296e-33
-0.23874648 2.4679793e-34
1.1150656e-34 -8.546679e-34
5.1261775e-34 -6.019269e-34
-4.443484e-34 -4.7928078e-34
-3.415351e-35 -2.6198876e-35
-5.0846646e-34 -1.5769217e-36
6.830828e-13 -1.0960844e-33
1.3946587e-21 -1.1464184e-33
5.382798e-34 -4.9895474e-34
6.7468184e-11 -1.2327797e-33
-3.8273462e-34 6.3556863e-34
-8.327467e-34 3.949529e-36
5.3624216e-35 -0.44523916
-1.1396765e-33 -0.048138373
-9.036933e-34 0.49848852
-6.1432046e-34 0.67901206
1.0177867e-33 -0.035957992
8.3691855e-34 -0.36799058
-2.4372232e-34 0.07924421
-1.14444385e-33 -0.23662093
3.8171564e-34 0.409469
0.121070996 -0.60837746
-0.054560866 -0.14665303
-0.062351264 0.685228
0.012382605 -2.1080804e-34
0.22265062 8.089918e-34
-3.8773814e-34
-1.2162282e-34
3.8192135e-34
5.806797e-34
1.9141679e-34
5.46885e-34
-9.801028e-34
8.670833e-34
2.838885e-34
1.2663823e-34
-0.21810062
0.7242532
-0.07114903
-0.066113256
-0.054350372
-0.18786566