图像局部不变性特征描述

来源:互联网 发布:mac文件夹在哪 编辑:程序博客网 时间:2024/05/16 03:47

chapter 2

2.2.1 multi scale and multi resolution (size of image)
pyramid – multi resolution
scale space – same resolution – 图像局部结构可以用简单形式在不同尺度上描述出来
2.2.2 尺度空间
2.3 scale selection
原因:
2.3.1 思路:
规范化坐标
低频- 一次规范化极值对应大尺度 – (规范化高斯导数的原因: 避免二次导数随方差增大而衰减)
2.3.2 准则
2.4 斑点检测
– w1 LOG ; w2 DOH
– basic step: convolution -> find extrema in scale space(26 neighbors)
2.4.1 1D :
method1: convolution with first derivative of Gaussian function – find maximum
method2: convolution with second derivative of Gaussian function – find zero point
2.4.2 LOG detection:
Laplacian of Guassian – 二维高斯函数求二次导
+
卷积
图像和某一函数的卷积=求图像和某一函数的相似性
当斑点尺寸和高斯函数二次导 的形状趋近一致是 图像的拉普拉斯相应最大

2.4.3 DOH Detection??
determinant of hessian(metric of second derivative) – detect the blob
对细长结构的斑点有较好的抑制作用?– compare to log
scale space中的空间和尺度

2.5 edge detection – 三维函数极大值 x,y,σ–对应的characteristic scale = σ2
目标: 找到亮度变化剧烈的像素点集

困难: 如何设定阙值来判定边缘

局部坐标系 at each point P0 –
(u,v) u: direction of the gradient ; v: perpendicular to u – 一阶方向导数=0
旋转不变性

边缘连接:领域连通性
边缘曲线强度:= 曲线上所有边缘点的强度之和或积分

2.6 corner detecion
角点:=d1 两个边缘的交点;d2 领域内具有两个主方向的特征点
角点检测:三类算法– 基于模板、边缘特征、亮度变化三种
for d1 两个边缘的交点 – 高斯微分算子 - 采用局部坐标系
角点微分算子 := 曲线曲率Luu(大曲率=边缘交点) 和灰度梯度(大梯度=边缘点)
检测出角点之后需要定位: 在检测出的尺度(粗糙)中图像被模糊
2.6.1 角点定位算法
…对定位的结果自动选择一个特征尺度…尺度归一化
2.6.2 角点检测效果
the comer detection is robust to noise – corner can be detected accurately even in the image of bad quality(many noise) (when noise is increasing, the estimate scale tend to be large)
这种定位算法可以去除noise的影响
尖锐角点- 在多尺度下都可能有strong response;不尖锐- 粗糙尺度下有strong response

chapter 3 点和边缘的检测

    角点检测方法- 主要有基于图像边缘、图像灰度两种
基于图像边缘: 需要对边缘进行编码,依赖于图像分割和边缘提取,难度和计算量大。
有Rosenfeld; Freeman; CCS etc
基于图像灰度:计算曲率和梯度
Harris; SUSAN
-
    边缘检测方法- 计算图像微分
梯度方法- 一阶微分
Sobel; Prewitt; Canny
拉普拉斯方法- 二阶微分
Marr; Lindeberg
(检测到边缘可以定位+测量物体)
3.1 Harris 角点检测法
basic: 移动小窗口,如果在各个方向上,窗口内的图像灰度发生了较大变化 – 遇到角点
c(x,y,Δx=u,Δy=v)=<w(x,y)>[u,v]M(x,y)[u,v]T

c=椭圆函数,eigenvalue of M is related to the radius of the ellipse, the direction of the ellipse is determined by the direction of eigenvalues of M
R :=detM-α(trace M)2
R related to eigenvalues - by value of R , can decide whether the point is on the edge, on the corner or in the plat region
…detail - see the slides of UCF-URCV or P49

Harris corner detection algo:
1. for I(x,y) cal Ix,Iy
2. cal Ixx,Iyy,Ixy
3. apply Gaussian function to Ixx,Iyy,Ixy– 高斯加权, form M
4. cal R(角点响应值), reset R to 0 is R is smaller than some threshold t
5. in 3*3 or 5*5 neighborhood of the pixel, conduct: non-maximum suppression, then the local maximum is the corner

there is parameter α is c(x,y,u,v) function, it will affect the R value,(therefore the choice of the threshold?) – it will affect the numbers of the corner points detected
large α, smaller R, 角点检测灵敏性降低,less points at the corner will be detected

3.2 尺度不变性Harris角点
3.2.1 尺度不变性问题
Harris algo for corner detection 对图像亮度和对比度有部分不变性
微分运算对图像的密度拉缩or亮度变化不敏感

对亮度和对比度的仿射变换(affine transformation)不改变Harris 相应的极值点的位置 – invariance
但threshold会影响角点数量

Harris algo for corner detection 有旋转不变性
Harris用二阶矩阵–椭圆,长短轴=eigenvalue 的倒数– 椭圆转动eigenvalue不变– R 不变–Harris algo旋转不变-covariance

Not scale invariance–传统Harris 不具有尺度不变性

3.2.2 Harris 改进- Harris-Laplace corner detection - 有尺度不变性 - 多尺度二阶矩
M=u(x,σ1,σD) - multi scale
Harris-Laplace algo: s1: 在多尺度下用Harris检测角点 s2: 自动搜索角点的特征尺度值
1. 预先定义一组尺度,对于给定的尺度空间值进行Harris找角点
2. 在位置空间上,对找到的点的8*8领域进行角点响应最大值搜索=非最大值抑制 non-maximum suppression
3. 在尺度空间上,重复2
4. 找特征尺度值: 位置空间上- 拉普拉斯响应计算(??) (二阶导数?R?)–满足绝对值>threshold;; 尺度空间上: 比较相邻的尺度的L响应值

对同一个景物,成像分辨率不同->特征尺度值不同
但特征尺度值对应的区域-> r=3 sigma 的圆 相同-》Harris角点有尺度不变性

3.2.4 多尺度Harris角点精化 基本看不懂 0 0

尺度空间内搜索local extrema, if not exist, reject it
non-max suppression - find the x where harris respones is strongest, cal it 拉普拉斯响应, if 不满足绝对值>threshold, reject it
3.3 仿射不变性Harris角点
看不懂看不懂看不懂看不懂看不懂看不懂啊
3.4 SUSAN corner detection
Smallest univalue segment assimilating nucleus
对局部噪声不敏感,抗干扰能力强
3.5 边缘检测
3.5.1 一阶微分 边缘算子 – 图像梯度在边缘取得局部极大值
mag of gradient -> intensity information of the edge
direction of gradient -> the direction of the edge

Roberts : Ix=I(i,j)I(i+1,j+1),Iy=..

Prewitt: 模板 mx=

111000111
Sobel: 模板 mx=
121000121

3.5.2 二阶微分 边缘算子 = 过零点算子 = 拉普拉斯算子
mx=

010141010

缺点:对noise敏感+没有direction of the edge
优化:LOG - Laplacian of Gaussian
模板=先高斯平滑\卷积 + 再求二次导 = 和高斯二次导卷积 ,size = 6σ
3.5.3 canny 边缘检测 = 一阶微分+非最大值抑制+双阙值(边缘连通则不reject)
1. gaussian smooth - remove the noise
2. cal gradient and 方向角(梯度方向归并)
3. non maxi surrpress – in the direction of gradient, only keep the point with the maximum gradient mag
4. 2 threshold
5. “4连通8连通细化图像不知道是干什么来的”
keypoint 检测方法 斑点检测 LOG(1st),DOH(2nd) 角点检测 Harris; SUSAN 边缘检测 一阶微分边缘算子(canny 边缘检测)、二阶微分边缘算子(LOG) 直线检测 Hough变换函数
steps for image recognition process
1. blob detection
2. description for the blob\feature\keypoint
3. matching of the feature
for sift, it optimize s1: use DoG to approximate LoG
for surf, it optimize s1: use integral image and approximation of DoH to detect blob efficiently

4.1 sift

4.1.1 DoG scale space
Gaussian function:
G(x,y,σ)=1/2πσ2e(x2+y2)/2σ2
image convolution with Gaussian–Gaussian smooth:
L(x,y,σ)=G(x,y,σ)I(x,y)
D(x,y,σ)=L(x,y,kσ)L(x,y,σ)=(G(x,y,kσ)G(x,y,σ))I(x,y)
for laplacian of Gaussian – first convolution with Gaussian and then take the second derivative –> LoG -
σ22G=σσ2G=σGσσG(x,y,kσ)G(x,y,σ)kσσ=G(x,y,kσ)G(x,y,σ)k1
DoGD(x,y,σ)=(G(x,y,kσ)G(x,y,σ))I(x,y)
G(x,y,kσ)G(x,y,σ)(k1)σ22GLoG
DOG is approximation of LOG
compare to DOH, Harris etc 检测方法: LOG斑点检测稳定性强,抗噪性好 -> DoG 也有这个性质
compare to LOG(需要使用两个方向高斯卷积核),DOG直接使用-> 计算量小
DOG 保留了各个Gaussian scale space 的图像,easy to find the corresponding σ value

4.1.2 search for feature point(=blob=keypoint)

when use DOG to detect the keypoint, the searching is done by building image pyramid - O group(octave) and s level for each octave
相邻octave - 隔点降采样,目的:减少卷积运算工作量
DOG = G上-G下
5层image of different σ 4层DOG blob detection on the DOG result find the point which is local extrema of the 26 neighborhood

1.为了图像反走样需要,输入图像的σ=0.5, 第一层要用bilinear 插值法让σ=1
2. 以上极值点实在离散空间中搜索到的,要用插值法得到连续空间的极值点-子像元插值

离散连续,泰勒展开
for 2D function

f(x,y)=f(0,0)+(fxx+fyy)+1/2(2fxxx2+2fxyxy+2fyyy2)
matrixform=f([xy])f([00])+[fxfy][xy]+12[xy]Hassian[xy]
vectorform=f(0^)+fTv^v^+12v^T2fTv^2v^

vector form work for all dimension of functin, if 3D x,y,σ, look for extrema -> first derivative of function=0,
D(v^)=D+12v^T2DTv^2v^

3.若v相对插值中心点的偏移量在任何方向上大于0.5 -> 插值中心点偏移到临近点, 这样的点要删除

1st-删掉low contrast的点:
if |D(v^)|<0.03 (range of gradient is 0-1.0), then the response is too small, the point is not stable enough, reject it

4.1.4 delete the edge points by the ratio λ1/λ2 from the hessian,which indicate the location

edge point have strong response ->will be detected by DOG but it is unstable -> it is hard to localize and 易受噪声影响
for edge : have strong DOG response(曲率 gradient value) in one direction and a small response in the perpendicular direction
cal the 主曲率by 2*2 Hessian
H=[Dxx(x,y)Dxy(x,y)Dxy(x,y)Dyy(x,y)]

compare the ratio of the eigenvalue of H to a threshold to see whether the ratio of the 曲率 is large, if larger then thr, then delete it
4.2 surf
simplify and approximation to DOH detection
use box filter to approximate the 1st and 2nd order of gaussian derivatives
4.2.1 intergral image
- 把(x,y)左上角的所有点对应的value相加,赋给(x,y), 求任何矩形区域的sum of value只要看四个顶点的值即可
-可用于box filter的运算–简化运算

4.2.2 DOH approximation

for (x,y) in the image, it is σ scale Hessian matrix is defined as : 二次高斯函数二次导数的卷积矩阵

H=[Lxx(x,y)Lxy(x,y)Lxy(x,y)Lyy(x,y)]=2x2g(σ)2xyg(σ)2xyg(σ)2y2g(σ)
?
给定(x,y),I(x,y)在x处和σ的尺度空间Hessian矩阵为
H(x,σ)=[Lxx(x,σ)Lxy(x,σ)Lxy(x,σ)Lyy(x,σ)]=2x2g(σ)2xyg(σ)2xyg(σ)2y2g(σ)

Lxx(x,σ)是Gaussian function对x的二阶偏导数在x处和I(x,y)的卷积
简化DOH by changing it into box filter -> all value of H become -1,0,1
简化之后变成
Happrox=[Dxx(x,y)Dxy(x,y)Dxy(x,y)Dyy(x,y)]

由于二阶高斯模板被离散和剪裁,图像旋转奇数倍的π/4时候,repeatability 降低

approximation of DOH– 为了快点算出滤波响应值
1. 简单粗暴的说 就是让Det(Happrox)=DxxDYY(0.9Dxy)2 – 0.9是神奇的得到的
2. 然后不知道从哪里冒出来一个|X|F:=Frobenius范数。实际算的时候,要对模板盒子尺寸(面积)进行归一化处理,以保证使用同一的一个Frobenius范数可以适应所有的滤波尺寸。
有人这么解释的:filter的响应还要根据filter的大小做一个归一化。这样做就可以保证对于任意大小的filter其F范数是统一的(这对于尺度不变性是有必要的)— 其实就是Det(Happrox)=Det(Happrox)/L
4. 举个栗子,9*9模板的Lxx,Lyy盒子面积为15,Lxy的盒子面积为9
5. 总之就是,好像用了box filter去approximate DOH,然后就可以开心的用integral image 去算response这个东西啦,而且运算量是independent of size of 模板的

4.3.2 尺度空间表示

通常想获取不同scale的blob,必须建立图像的尺度空间金字塔。
一般都是用不同σ的Gaussian function来smooth\filter image,然后重采样图像获得更高一层的金字塔图像(another octave,重采样难道就是改变pixel之间的距离吗?)。–sift的做法,然后sift还把它们减了一下弄出DOG来检测
但是surf因为用了box和integral image所以不用直接建立图像金字塔(why),而是间接建立:by 不断增大盒子滤波模板尺寸的- integral image-cal Hessian-3D non maximum suppression

sift surf Gauss滤波器大小不变,改变的是图像的大小 图像大小保持不变,改变的是滤波器的大小。(反正滤波器大小改变运算量一样,这样算起来快很多!) for different octave SURF的尺度空间也是按组(Octaves)划分的。每一个Octave里是对输入图像用size不断增加的filter进行滤波后得到的一系列响应。 对于连续的level,采用的filter(小白块)的size大小增加的最小量是2,以保证filter的边长始终是奇数,(奇数可以保证filter有中心点)。这样使得Mask以2*3=6个像素为单位进行扩充。

这里写图片描述
宽分别+2,2*3=6 in total;长都是+2,2*2=4 intotal
如果1st derivative的approximation - for edge, 模板尺寸增大的方式有一点不同,总之是在保证奇数边长下,大一点点

0 0