-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
2084 lines (1460 loc) · 192 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<link rel="dns-prefetch" href="http://yoursite.com">
<title>Voyager-1</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="Born in net, Consort with revolution">
<meta property="og:type" content="website">
<meta property="og:title" content="Voyager-1">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="Voyager-1">
<meta property="og:description" content="Born in net, Consort with revolution">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="Alan Li">
<meta name="twitter:card" content="summary">
<link rel="alternative" href="/atom.xml" title="Voyager-1" type="application/atom+xml">
<link rel="icon" href="/favicon.png">
<link rel="stylesheet" type="text/css" href="/./main.0cf68a.css">
<style type="text/css">
#container.show {
background: linear-gradient(200deg,#a0cfe4,#e8c37e);
}
</style>
<meta name="generator" content="Hexo 5.4.0"></head>
<body>
<div id="container" q-class="show:isCtnShow">
<canvas id="anm-canvas" class="anm-canvas"></canvas>
<div class="left-col" q-class="show:isShow">
<div class="overlay" style="background: #4d4d4d"></div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img src="http://image.zhuojia.tech/avatar/Mary2.jpg" class="js-avatar">
</a>
<hgroup>
<h1 class="header-author"><a href="/"></a></h1>
</hgroup>
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/tags/Collection/">系列总集</a></li>
<li><a href="/tags/OpenCV/">OpenCV</a></li>
<li><a href="/tags/CMake/">CMake</a></li>
<li><a href="/tags/iOS/">iOS</a></li>
<li><a href="/tags/Java/">Java</a></li>
<li><a href="/tags/FrontEnd/">前端</a></li>
</ul>
</nav>
<nav class="header-smart-menu">
<a q-on="click: openSlider(e, 'innerArchive')" href="javascript:void(0)">所有文章</a>
<a q-on="click: openSlider(e, 'aboutme')" href="javascript:void(0)">关于我</a>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/AlanLi7991" title="github"><i class="icon-github"></i></a>
</div>
</nav>
</header>
</div>
</div>
<div class="mid-col" q-class="show:isShow,hide:isShow|isFalse">
<nav id="mobile-nav">
<div class="overlay js-overlay" style="background: #4d4d4d"></div>
<div class="btnctn js-mobile-btnctn">
<div class="slider-trigger list" q-on="click: openSlider(e)"><i class="icon icon-sort"></i></div>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<div class="profilepic">
<img src="http://image.zhuojia.tech/avatar/Mary2.jpg" class="js-avatar">
</div>
<hgroup>
<h1 class="header-author js-header-author"></h1>
</hgroup>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/AlanLi7991" title="github"><i class="icon-github"></i></a>
</div>
</nav>
<nav class="header-menu js-header-menu">
<ul style="width: 70%">
<li style="width: 14.285714285714286%"><a href="/">主页</a></li>
<li style="width: 14.285714285714286%"><a href="/tags/Collection/">系列总集</a></li>
<li style="width: 14.285714285714286%"><a href="/tags/OpenCV/">OpenCV</a></li>
<li style="width: 14.285714285714286%"><a href="/tags/CMake/">CMake</a></li>
<li style="width: 14.285714285714286%"><a href="/tags/iOS/">iOS</a></li>
<li style="width: 14.285714285714286%"><a href="/tags/Java/">Java</a></li>
<li style="width: 14.285714285714286%"><a href="/tags/FrontEnd/">前端</a></li>
</ul>
</nav>
</header>
</div>
<div class="mobile-mask" style="display:none" q-show="isShow"></div>
</nav>
<div id="wrapper" class="body-wrap">
<div class="menu-l">
<div class="canvas-wrap">
<canvas data-colors="#eaeaea" data-sectionHeight="100" data-contentId="js-content" id="myCanvas1" class="anm-canvas"></canvas>
</div>
<div id="js-content" class="content-ll">
<article id="post-OpenCV00读书笔记" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2020/03/20/OpenCV00%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">OpenCV读书笔记</a>
</h1>
<a href="/2020/03/20/OpenCV00%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/" class="archive-article-date">
<time datetime="2020-03-19T15:00:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2020-03-20</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="致谢"><a href="#致谢" class="headerlink" title="致谢"></a>致谢</h2><ul>
<li>感谢 <a target="_blank" rel="noopener" href="http://kiorisyshen.github.io/">沈同学</a> 在学习过程中的指导</li>
<li>感谢 陆赫冉 对英文语法的校正和修改工作</li>
</ul>
<h2 id="OpenCV-自学源码和部分笔记"><a href="#OpenCV-自学源码和部分笔记" class="headerlink" title="OpenCV 自学源码和部分笔记"></a>OpenCV 自学源码和部分笔记</h2><p>所有<a target="_blank" rel="noopener" href="https://docs.opencv.org/master/d6/d00/tutorial_py_root.html">OpenCV-Python Tutorials</a>内的教程</p>
<p>所有章节均使用Python完成实现,并且发布代码至<a target="_blank" rel="noopener" href="https://github.com/AlanLi7991/opencv-turtorial-notes">opencv-turtorial-notes</a></p>
<p>其中几个比较核心知识点的笔记,在代码备注中存在一份,单独整理出来如下</p>
<h3 id="Feature-特征点"><a href="#Feature-特征点" class="headerlink" title="Feature 特征点"></a>Feature 特征点</h3><p><a href="/2020/03/01/OpenCV01SIFTNotes/">Scale-Invariant Feature Transform</a></p>
<p><a href="/2020/03/02/OpenCV02SURFNotes/">Speeded-Up Robust Features</a></p>
<p><a href="/2020/03/03/OpenCV03FASTNotes/">Features from Accelerated Segment Test</a></p>
<p><a href="/2020/03/04/OpenCV04BRIEFNotes/">Binary Robust Independent Elementary Features</a></p>
<p><a href="/2020/03/05/OpenCV05ORBNotes/">Oriented FAST and Rotated BRIEF</a></p>
<h3 id="Camera-相机"><a href="#Camera-相机" class="headerlink" title="Camera 相机"></a>Camera 相机</h3><p><a href="/2020/03/06/OpenCV06CameraCalibrationNotes/">Camera Calibration</a></p>
<p><a href="/2020/03/07/OpenCV07PoseEstimationNotes/">Pose Estimation</a></p>
<p><a href="/2020/03/08/OpenCV08EpipolarGeometryNotes/">Epipolar Geometry</a></p>
<h3 id="Machine-Learning-机器学习"><a href="#Machine-Learning-机器学习" class="headerlink" title="Machine Learning 机器学习"></a>Machine Learning 机器学习</h3><p><a href="/2020/03/09/OpenCV09KNNNotes/">K-Nearest Neighbour</a></p>
<p><a href="/2020/03/10/OpenCV10SVMNotes/">Support Vector Machines</a></p>
<p><a href="/2020/03/11/OpenCV11KMeansNotes/">K-Means Clustering</a></p>
<h2 id="OpenCV-思维导图"><a href="#OpenCV-思维导图" class="headerlink" title="OpenCV 思维导图"></a>OpenCV 思维导图</h2><p><img src="https://raw.githubusercontent.com/AlanLi7991/opencv-turtorial-notes/master/xmind/OpenCV.jpg" alt="OpenCV"></p>
<h2 id="後記"><a href="#後記" class="headerlink" title="後記"></a>後記</h2><p>故事还要从2015年5月说起,那一年的夏天,我硕士生毕业了。毕业答辩上我的带有一行行错别字的作文,被老师评了80多分。</p>
<p>说实话这个分并不算差,能得这么高分的原因,大概也是因为毕业作文的题目和在座的诸位一样,读起来那是相当的朗朗上口,平仄有律,就一点不太好,不太容易看懂。</p>
<p>当初大概除了我,还有另外一个人能看懂,很可惜,这个人并不是我导师,而是万能的主。</p>
<p>时光荏苒,白驹过隙,五年过去之后,回过头来,应该只有主能看懂了。</p>
<p>每当梦境进行到这一幅画面时,我内心的想法仿佛是这个电影的画面音一样,一点点增大增大再增大,直到音量扭曲了整个胶卷和画面,只剩下卓别林式的一行话</p>
<p>“因为老子也不知道我论文里写的啥JB玩意啊。。。。。”</p>
<p>工作中每每看到这些曾经伴随我校园时光的名词术语时,总会有一丝丝的遗憾</p>
<p>为了不愧对于我的“通信与信息系统——工学硕士”这个张薄纸,我只好 <del>加入了9.9学Python 走上职场巅峰</del> 一点点啃官方教程</p>
<p>在啃教程的时间里,终于有一个人叩门而入,并向我喊道:</p>
<p>“<del>全世界的无产阶级,联合起来</del> Огонь по готовности!”</p>
<p>在共同打守望先锋打友谊下,达瓦西里·<a target="_blank" rel="noopener" href="http://kiorisyshen.github.io/">沈</a>教授了我过去遗失的技能。</p>
<p>终于,在2020年疫情还未散去的春天,樱花飘满了目黑川的东京,我终于知道我硕士毕业论文写的是什么了!</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">Collection</a>
</li>
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">OpenCV</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/Tutorial//" class="article-tag-list-link color4">Tutorial</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2020/03/20/OpenCV00%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-OpenCV11KMeansNotes" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2020/03/11/OpenCV11KMeansNotes/">OpenCV Machine Learning Note(III) K-Means</a>
</h1>
<a href="/2020/03/11/OpenCV11KMeansNotes/" class="archive-article-date">
<time datetime="2020-03-10T15:00:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2020-03-11</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="Q1-What-is-Clustering"><a href="#Q1-What-is-Clustering" class="headerlink" title="Q1: What is Clustering?"></a>Q1: What is Clustering?</h2><p>find k labels of a set of data and divide data to k by labels<br>like T-shirt size example in document</p>
<h2 id="Q2-Why-do-we-need-clustering"><a href="#Q2-Why-do-we-need-clustering" class="headerlink" title="Q2: Why do we need clustering?"></a>Q2: Why do we need clustering?</h2><p>it gives a label to the raw data</p>
<p>considering in knn, svm training data stage, we need some responses to tell us what is data, how can we get responses?</p>
<ol>
<li>assign data one by one manually</li>
<li>some algorithm categorizes data set automatically</li>
</ol>
<p>clustering is the second choice</p>
<h2 id="Q3-Why-does-k-means-sound-so-familiar"><a href="#Q3-Why-does-k-means-sound-so-familiar" class="headerlink" title="Q3: Why does k-means sound so familiar?"></a>Q3: Why does k-means sound so familiar?</h2><p>in video chapter, we use mean-shift track motive object track.actually, mean-shift and k-means clustering have some similar points</p>
<ol>
<li>they all calculate the mean value and repeat</li>
<li>they all need criteria to stop repeat</li>
<li>they all shit the center in every repeat</li>
</ol>
<h2 id="Q4-What’s-the-main-problem-of-k-means-clustering"><a href="#Q4-What’s-the-main-problem-of-k-means-clustering" class="headerlink" title="Q4: What’s the main problem of k-means clustering?"></a>Q4: What’s the main problem of k-means clustering?</h2><p>they are two problems of k-means clustering</p>
<ol>
<li>how to choose the category number k</li>
<li>how to choose the initial centroids of each category</li>
</ol>
<h2 id="Q5-Do-we-have-other-clustering-algorithms"><a href="#Q5-Do-we-have-other-clustering-algorithms" class="headerlink" title="Q5: Do we have other clustering algorithms?"></a>Q5: Do we have other clustering algorithms?</h2><p>yes, something like</p>
<ul>
<li>Mean-Shift Clustering</li>
<li>Density-Based Spatial Clustering of Applications with Noise (DBSCAN)</li>
<li>Expectation–Maximization (EM) Clustering using Gaussian Mixture Models (GMM)</li>
<li>Agglomerative Hierarchical Clustering</li>
</ul>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">OpenCV</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/Tutorial//" class="article-tag-list-link color4">Tutorial</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2020/03/11/OpenCV11KMeansNotes/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-OpenCV10SVMNotes" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2020/03/10/OpenCV10SVMNotes/">OpenCV Machine Learning Note(II) SVM</a>
</h1>
<a href="/2020/03/10/OpenCV10SVMNotes/" class="archive-article-date">
<time datetime="2020-03-09T15:00:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2020-03-10</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="Q1-What-is-SVM-Support-Vector-Machines"><a href="#Q1-What-is-SVM-Support-Vector-Machines" class="headerlink" title="Q1: What is SVM(Support Vector Machines)?"></a>Q1: What is SVM(Support Vector Machines)?</h2><p>from the document</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"So what SVM does is to find a straight line (or hyperplane) with largest minimum distance to the training samples."</span><br></pre></td></tr></table></figure>
<p>SVM just like KNN, it is also a “classification algorithms”</p>
<h2 id="Q2-What-problem-does-SVM-want-to-solve"><a href="#Q2-What-problem-does-SVM-want-to-solve" class="headerlink" title="Q2: What problem does SVM want to solve?"></a>Q2: What problem does SVM want to solve?</h2><ul>
<li>save the memory!!!</li>
</ul>
<p>like document refer( according to the document,)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"In kNN, for a test data, we used to measure its distance to all the training samples and take the one with minimum distance. It takes plenty of time to measure all the distances and plenty of memory to store all the training-samples......., should we need that much?"</span><br></pre></td></tr></table></figure>
<h2 id="Q3-What-concepts-in-SVM"><a href="#Q3-What-concepts-in-SVM" class="headerlink" title="Q3: What concepts in SVM?"></a>Q3: What concepts in SVM?</h2><ul>
<li><p>Decision Boundary:</p>
<p>the imaging line boundary that can separate samples on plane</p>
</li>
<li><p>Linear Separable/Non-Linearly Separable:</p>
<p>“Linear Separable” means if all samples locate on a plane, it can be separated by line but if the dimensional of sample data is not 2D, how can we separate it by line?</p>
<p>this situation called “Non-Linearly Separable”</p>
</li>
<li><p>Support Vectors:</p>
<p>the problem svm want to solve is knn need large memory can save all samples distance, svm only need the samples near the “Decision Boundary”, the samples take part in calculating “Decision Boundary” is “Support Vectors” which means “support to calculate”</p>
</li>
<li><p>Support Planes:</p>
<p>the imaging lines which plus positive/negative offset with “Decision Boundary”, or the lines passing through “Support Vectors”</p>
<p>it can improve the classify result accuracy by beyond the planes.</p>
</li>
</ul>
<ul>
<li><p>Weight Vector/Feature Vector/Bias:</p>
<p>“Decision Boundary” is a line, we can present it as </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ax+by+c = 0</span><br></pre></td></tr></table></figure>
<p>or more professional </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">w1x1 + w2x2 + b = 0 => w^Tx + b = 0</span><br></pre></td></tr></table></figure>
<p>which</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">w^T = [w1, w2]</span><br><span class="line">x = [x1, x2]</span><br><span class="line">w is "Weight Vector"</span><br><span class="line">x is "Feature Vector"</span><br><span class="line">b is "Bias"</span><br></pre></td></tr></table></figure>
<p>if sample data dimension not 2D, the length of w,x can be n</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">w = [w1, w2 ... wn], x = [x1, x2 ... xn]</span><br></pre></td></tr></table></figure></li>
<li><p>C:</p>
<p>a constant value by samples distribution or experience<br>just like the k of KNN, magic number in most of the time</p>
</li>
<li><p>ξ:</p>
<p>the error value of misclassification data, from document:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">"It is the distance from its corresponding training sample to their correct decision region.</span><br><span class="line"></span><br><span class="line">For those who are not misclassified .... their distance is zero."</span><br><span class="line"></span><br></pre></td></tr></table></figure></li>
</ul>
<p> it means if a sample is correctly classified, the</p>
<pre><code> 1. classified: ξ = 0
2. misclassified: ξ = distance to "Support Planes"
</code></pre>
<ul>
<li><p>Gamma:</p>
<p>the parameter γ of a kernel function during decrease dimension to 2D</p>
</li>
</ul>
<h2 id="Q4-How-to-deal-with-“Non-Linearly-Separable”"><a href="#Q4-How-to-deal-with-“Non-Linearly-Separable”" class="headerlink" title="Q4: How to deal with “Non-Linearly Separable” ?"></a>Q4: How to deal with “Non-Linearly Separable” ?</h2><p>for the data not 2-dimensional which can’t be divided into two with a straight line.</p>
<p>we can just map it to 2D model(!!), so we can separate it by line.</p>
<ul>
<li><p>d < 2(one dimension):</p>
<p>map it with added dimension, like (x) => (x, x^2)</p>
</li>
<li><p>d > 2(three or higher dimension):</p>
<p>decrease the higher dimension to 2-dimension via “kernel function”, like the document example</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">attention:</span><br><span class="line">!! the document write wrong here, lose pow symbols in line (*)</span><br><span class="line"></span><br><span class="line">2d point:</span><br><span class="line"> p=(p1,p2), q=(q1,q2).</span><br><span class="line"></span><br><span class="line">3d point:</span><br><span class="line"> ϕ(p) = (p21, p22, 2sqrt(p1p2) ),</span><br><span class="line"> ϕ(q)=(q21, q22, 2sqrt(p1p2) )</span><br><span class="line"></span><br><span class="line">define a "kernel function" K(p,q)</span><br><span class="line"></span><br><span class="line">which does a dot product between two 3d points:</span><br><span class="line"></span><br><span class="line">K(p,q) = ϕ(p).ϕ(q)</span><br><span class="line"> = (p21, p22, 2sqrt(p1p2) ).(q21, q22, 2sqrt(p1p2) )</span><br><span class="line"> = (p1q1)^2 + (p2q2)^2 + 2p1q1p2q2 *</span><br><span class="line"> = (p1q1+p2q2)^2</span><br><span class="line"> = (pq)^2</span><br></pre></td></tr></table></figure>
<p>It means,a dot product in three-dimensional space can be achieved using squared dot to product in two-dimensional space.</p>
</li>
</ul>
<h2 id="Q5-What’s-the-main-problem-of-SVM"><a href="#Q5-What’s-the-main-problem-of-SVM" class="headerlink" title="Q5: What’s the main problem of SVM?"></a>Q5: What’s the main problem of SVM?</h2><p>How to pick the C value</p>
<p>from document</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"How ( In which way?)should the parameter C be chosen? It is obvious that the answer to this question depends on how the training data is distributed. (Obviously, the ....) Although there is no general answer."</span><br></pre></td></tr></table></figure>
<ul>
<li><p>formula:</p>
<p>min L(w,b0) = ||w||^2 + C * ∑(ξ)</p>
</li>
<li><p>Large values of C:</p>
<ol>
<li>less misclassification errors but a smaller margin.</li>
<li>in this case it is expensive to make misclassification errors.</li>
<li>since the aim of the optimization is to minimize the argument, few misclassifications errors are allowed.</li>
</ol>
</li>
<li><p>Small values of C:</p>
<ol>
<li>bigger margin and more classification errors.</li>
<li>in this case the minimization does not consider that much the term of the sum.</li>
<li>so it focuses more on finding a hyperplane with big margin.</li>
</ol>
</li>
</ul>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">OpenCV</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/Tutorial//" class="article-tag-list-link color4">Tutorial</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2020/03/10/OpenCV10SVMNotes/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-OpenCV09KNNNotes" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2020/03/09/OpenCV09KNNNotes/">OpenCV Machine Learning Note(I) kNN</a>
</h1>
<a href="/2020/03/09/OpenCV09KNNNotes/" class="archive-article-date">
<time datetime="2020-03-08T15:00:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2020-03-09</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="Q1-What-is-kNN-k-Nearest-Neighbor"><a href="#Q1-What-is-kNN-k-Nearest-Neighbor" class="headerlink" title="Q1: What is kNN(k-Nearest Neighbor)?"></a>Q1: What is kNN(k-Nearest Neighbor)?</h2><p>from the document</p>
<ul>
<li>“kNN is one of the simplest classification algorithms available for supervised learning.”</li>
</ul>
<h2 id="Q2-What-problem-does-KNN-want-to-solve"><a href="#Q2-What-problem-does-KNN-want-to-solve" class="headerlink" title="Q2: What problem does KNN want to solve?"></a>Q2: What problem does KNN want to solve?</h2><ul>
<li>“classification algorithms” is the key point</li>
</ul>
<p>take one unclassified input data in to some predefined classes is a classification</p>
<h2 id="Q3-What-concepts-in-KNN"><a href="#Q3-What-concepts-in-KNN" class="headerlink" title="Q3: What concepts in KNN?"></a>Q3: What concepts in KNN?</h2><ul>
<li><p>train data:</p>
<p>because kNN need predefined pairs during the algorithms,<br>the data making pairs is training data</p>
</li>
<li><p>responses:</p>
<p>responses are training data classified results, responses size should be equal to train data</p>
</li>
<li><p>test data:</p>
<p>a list of input data, each input data should be classified as one result of responses</p>
</li>
<li><p>labels:</p>
<p>the result of test data, same as responses, but with a different name</p>
</li>
<li><p>distance:</p>
<p>the number for judging neighbors, k nearest denote k minimums</p>
</li>
</ul>
<h2 id="Q4-What’s-the-main-problem-with-kNN"><a href="#Q4-What’s-the-main-problem-with-kNN" class="headerlink" title="Q4: What’s the main problem with kNN?"></a>Q4: What’s the main problem with kNN?</h2><p>from document</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"But there is a problem with that. Red Triangle may be the nearest. But what if there are a lot of Blue Squares near to him? "</span><br></pre></td></tr></table></figure>
<p>if the number of red/blue are equal, the location of red/blue distribute maybe not, is it import?</p>
<ol>
<li>how to choose the import k?</li>
<li>we are supposing all k neighbors are with equal importance? Is it justice?</li>
</ol>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">OpenCV</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/Tutorial//" class="article-tag-list-link color4">Tutorial</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2020/03/09/OpenCV09KNNNotes/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-OpenCV08EpipolarGeometryNotes" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2020/03/08/OpenCV08EpipolarGeometryNotes/">OpenCV Camera Note(III) Epipolar Geometry</a>
</h1>
<a href="/2020/03/08/OpenCV08EpipolarGeometryNotes/" class="archive-article-date">
<time datetime="2020-03-07T15:00:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2020-03-08</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="Q1-What-problem-does-epipolar-geometry-want-to-solve"><a href="#Q1-What-problem-does-epipolar-geometry-want-to-solve" class="headerlink" title="Q1: What problem does epipolar geometry want to solve"></a>Q1: What problem does epipolar geometry want to solve</h2><p>use more than one camera to find the depth information loosen by taking an image using a pin-hole camera</p>
<h2 id="Q2-How-to-understand-epipolar-means"><a href="#Q2-How-to-understand-epipolar-means" class="headerlink" title="Q2: How to understand epipolar means"></a>Q2: How to understand epipolar means</h2><p>the prefix “epi” from Greek epi ‘upon, near to, in addition’. which denote the concept “space around”</p>
<p>“polar” from the word “pole”</p>
<p>“pole” means “a long, slender, rounded piece of wood or metal, typically used with one end placed in the ground as a support for something”</p>
<p>so the “polar” in geometry field is explained in “the straight line joining the two points at which tangents from a fixed point touch a conic section.”</p>
<p>the final explanation of “epipolar geometry” is the geometry use the thin line(polar) to find the space information(epi-)</p>
<h2 id="Q3-What-concepts-in-this-algorithm"><a href="#Q3-What-concepts-in-this-algorithm" class="headerlink" title="Q3: What concepts in this algorithm"></a>Q3: What concepts in this algorithm</h2><ul>
<li><p>EPILINE:</p>
<p>document refers</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"The projection of the different points on OX form a line on the right plane (line l′)."</span><br></pre></td></tr></table></figure>
<p>the point is the projection on the right image, it is pixels on image coordinate epiline corresponding to the point x on the left image it can be described as “epipolar constraint”</p>
</li>
<li><p>EPIPOLAR CONSTRAINT:</p>
<p>from the document</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"It means, to find the point x (correspond pixel location) on the right image,search along this epiline. It should be somewhere on this line"</span><br></pre></td></tr></table></figure>
<p>the document adds</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"Think of it this way, to find the matching point in other images, you need not to search the whole image, just search along the epiline.So it provides better performance and accuracy"</span><br></pre></td></tr></table></figure></li>
<li><p>EPIPOLAR PLANE:</p>
<p>all points will have its corresponding epilines in the other image. look at the image on the document to understand</p>
</li>
<li><p>EPIPOLE:</p>
<p>right camera projection pixel location on left image called “epipole”</p>
</li>
</ul>
<h2 id="Q4-How-to-find-epipolar-lines-and-epipoles-above"><a href="#Q4-How-to-find-epipolar-lines-and-epipoles-above" class="headerlink" title="Q4: How to find epipolar lines and epipoles above?"></a>Q4: How to find epipolar lines and epipoles above?</h2><p>to find them, we need two more ingredients, Fundamental Matrix (F) and Essential Matrix (E).</p>
<h2 id="Q5-The-difference-between-Fundamental-amp-Essential"><a href="#Q5-The-difference-between-Fundamental-amp-Essential" class="headerlink" title="Q5: The difference between Fundamental & Essential"></a>Q5: The difference between Fundamental & Essential</h2><ul>
<li><p>Essential Matrix :</p>
<p>contains information about translation and rotation, which describes the location of the second camera, relative to the first in global coordinates.</p>
</li>
<li><p>Fundamental Matrix :</p>
<p>contains the same information as Essential Matrix in addition to the information about the intricacies of both cameras, so that we can relate the two cameras in pixel coordinates.</p>
<p>(If we are using rectified images and normalize the point by dividing by the focal lengths, F=E).</p>
</li>
</ul>
<p>because Essential is a subset of Fundamental, we can say Fundamental Matrix F maps a point in one image to a line (epiline) in the other image.</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">OpenCV</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/Tutorial//" class="article-tag-list-link color4">Tutorial</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2020/03/08/OpenCV08EpipolarGeometryNotes/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-OpenCV07PoseEstimationNotes" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2020/03/07/OpenCV07PoseEstimationNotes/">OpenCV Camera Note(II) Pose Estimation</a>
</h1>
<a href="/2020/03/07/OpenCV07PoseEstimationNotes/" class="archive-article-date">
<time datetime="2020-03-06T15:00:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2020-03-07</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="Q1-Why-do-we-need-to-pose-estimation"><a href="#Q1-Why-do-we-need-to-pose-estimation" class="headerlink" title="Q1: Why do we need to pose estimation?"></a>Q1: Why do we need to pose estimation?</h2><p>from document referring to “how the object is situated in space, like how it is rotated”, what means to know how an object place in 3D space, but render on 2D plane image, the core idea is converting a 3D point to a 2D pixel point it is a project from 3D coordinate to 2D coordinate</p>
<h2 id="Q2-How-to-estimate"><a href="#Q2-How-to-estimate" class="headerlink" title="Q2: How to estimate?"></a>Q2: How to estimate?</h2><p>convert the problem to “where the camera position in 3D space, if shot the image(chessboard) vertical in Z, and parallel in XY plane” then from the document said “we can assume Z=0, such that, the problem now becomes how the camera is placed in space to see our pattern image.”</p>
<h2 id="Q3-How-does-it-work"><a href="#Q3-How-does-it-work" class="headerlink" title="Q3: How does it work?"></a>Q3: How does it work?</h2><ol>
<li>we just prepare some vertex</li>
<li>find rotate & transform vectors from camera matrix & distort coefficients</li>
<li>then project vertex to pixel use vectors</li>
<li>draw those vertexes</li>
</ol>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">OpenCV</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/Tutorial//" class="article-tag-list-link color4">Tutorial</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2020/03/07/OpenCV07PoseEstimationNotes/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-OpenCV06CameraCalibrationNotes" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2020/03/06/OpenCV06CameraCalibrationNotes/">OpenCV Camera Note(I) Calibrate</a>
</h1>
<a href="/2020/03/06/OpenCV06CameraCalibrationNotes/" class="archive-article-date">
<time datetime="2020-03-05T15:00:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2020-03-06</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="Q1-Why-need-to-calibrate"><a href="#Q1-Why-need-to-calibrate" class="headerlink" title="Q1: Why need to calibrate?"></a>Q1: Why need to calibrate?</h2><p>Because photo will be distorted after camera shot, the reason is light refract</p>
<h2 id="Q2-What-kinds-of-distortion-exist"><a href="#Q2-What-kinds-of-distortion-exist" class="headerlink" title="Q2: What kinds of distortion exist?"></a>Q2: What kinds of distortion exist?</h2><p>Two major kinds of distortion are RADIAL DISTORTION(径向畸变) and TANGENTIAL DISTORTION(切向畸变).</p>
<h2 id="Q3-Which-distortion-will-effect-image"><a href="#Q3-Which-distortion-will-effect-image" class="headerlink" title="Q3: Which distortion will effect image"></a>Q3: Which distortion will effect image</h2><ol>
<li>Radial distortion causes straight lines to appear curved.</li>
<li>Tangential distortion causes “some areas in the image may look nearer than expected.”</li>
</ol>
<h2 id="Q4-What-caused-distortion"><a href="#Q4-What-caused-distortion" class="headerlink" title="Q4: What caused distortion?"></a>Q4: What caused distortion?</h2><p>The actual reason is pinhole cameras theory design, the physical reason is light refraction</p>
<ol>
<li>radial distortion occurs because light has different lengths to pinhole via different refraction</li>
<li>tangential distortion occurs because the image-taking lens is not aligned perfectly parallel to the imaging plane.</li>
</ol>
<h2 id="Q5-What-is-needed-for-correct-distortion"><a href="#Q5-What-is-needed-for-correct-distortion" class="headerlink" title="Q5: What is needed for correct distortion?"></a>Q5: What is needed for correct distortion?</h2><p>Need intrinsic and extrinsic parameters</p>
<ul>
<li>Intrinsic parameters are specific to a camera.</li>
<li>Extrinsic parameters correspond to rotation and translation vectors</li>
</ul>
<p>which translates a coordinates of a 3D point to a coordinate system.</p>
<h2 id="Q6-Intrinsic-parameters-contain"><a href="#Q6-Intrinsic-parameters-contain" class="headerlink" title="Q6: Intrinsic parameters contain?"></a>Q6: Intrinsic parameters contain?</h2><p>They include information like focal length (fx,fy) and optical centers (cx,cy).</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">OpenCV</a>
</li>
</ul>
</div>
<div class="article-category tagcloud">
<i class="icon-book icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="/categories/Tutorial//" class="article-tag-list-link color4">Tutorial</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2020/03/06/OpenCV06CameraCalibrationNotes/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>