opencv特征检测之角点检测

来源:互联网 发布:淘宝货到付款流程 编辑:程序博客网 时间:2024/05/17 21:37

    说到角点检测,  首先就要提什么是角点?  怎样定义角点?    看看wiki关于角点 计算机视觉方面的定义

  • A corner can be defined as the intersection of two edges.A corner can also be defined as a point for which there are two dominant and different edge directions in a local neighbourhood of the point.

     角点有什么用途? 下面是wiki的原文,  我就不翻译了.  如果你用opencv或matlab标定过相机,  尤其matlab会让你选择棋盘格上的点,  第一张图片点过4个点后,  其他的点都能自动的提取出来,  而且之后几乎不怎么需要手动重新取点,   那个就是利用了角点. 角点定位很精确,  甚至能够达到亚像素级.

  •  Corner detection is frequently used inmotion detection,image registration,video tracking,image mosaicing,panorama stitching,3D modelling and object recognition. Corner detection overlaps with the topic of interest point detection.

    怎样判断是否是角点呢?下面是opencv使用的harris cornor 检测法

        首先,  (x , y)像素点的与周围临近点像素差的均方值的和为

                             R ≈ ∑ ( I ( x + u , y + v ) − I ( x, y) )^2     

                  对I(x+u, y+v)进行泰勒展开

                             R ≈ ∑ ( I ( x, y) +(δI/ δx) + (δI/ δy) − I ( x, y) )^2  

                  

                   更正一下阿, 上面那个矩阵右下角是δy,  而且 它是实对称矩阵

                    既然是实对称矩阵,  那就可以一定对角化喽~(不懂翻翻永乐宝典去)

                           特征值有什么性质来着?

                                    一个是             n阶矩阵的行列式 = 特征值的乘积

                                    一个是             矩阵的迹              = 特征值的和

                    行列式用det()表示,  迹用tr(),  这里有个参数k,  就是opencv中的  k – Harris detector free parameter

                              dst (x, y) = detM (x,y) − k · (trM(x,y))︁^ 2

                   opencv中的cv::cornerHarris就是对每个点计算上面的式子.-----------------------opencv docs 

 判定法


http://docs.opencv.org/2.4/doc/tutorials/features2d/trackingmotion/harris_detector/harris_detector.html

http://www.cse.psu.edu/~rtc12/CSE486/lecture06.pdf

http://web.stanford.edu/class/cs231m/references/harris-stephens.pdf


                    

                    



推导具体细节.   其中I(x+u,y+v)泰勒展开成下面的式子                       -----------2016.04.12


视频来源http://crcv.ucf.edu/videos/lectures/2012.php



写到这里,  想起这两天查资料的感触.   一定要看英文阿,  平时少用百度,  可以少走很多弯路





---------------------------------------------------------------------------------------------------------------

    第一篇文章就说,  重要的是学习图像处理算法,  忘了说相关的书.

    在我系统的桌面上天天放着这些讲计算机视觉算法的书,  最近却很少看过,  因为面临找工作的压力么,  看书太慢看过印象还不深,  现在先用到哪学哪吧

    相关的书有Computer Vision: Algorithms and Applications                     (这个和下面一本都是知乎大v们推荐的)

                      Computer Vision A Modern Approach 2nd Edition

                      Feature Extraction & Image Processing

                        Computer and machine vision

                      Algorithms for Image Processing and Computer Vision 2nd(使用了opencv1)

                      ................

    我的兴趣在立体视觉部分,  所以下面的

                      An Introduction For 3D Computer Vision Algorithm

                      3D Computer Vision

                      Multiple View Geometry in Computer Vision.2nd Edition      (经典教材, 应该说包括所有立体视觉的内容,  包括从过去到现在的SLAM)

-----------------------------------------------------------------------------------------------------------------




0 0
原创粉丝点击