May 14, 2009

Filtering in Computer Vision and image processing

滤波器,滤波

高斯滤波 Gaussian
半长度为 hw = 3*sigma,
len = -hw:hw

二维高斯平滑可以分解为一维
conv2(g,g,im)

高斯卷积的性质
因此生成图像金字塔时可以


先把图像上采样,再进行 sigma 平滑,相当于在原图像 sigma/2 平滑
为了减少上采样带来的 aliasing,先把图像进行 sigma=0.5 的平滑(减少aliasing最小的 sigma)

求梯度(一次或二次时),也要先进行平滑,一般 sigma=? (1.0-1.6)

Matlab 代码
Filters:
filterBinomial1d - 1D binomial filter (approximation to Gaussian filter)
filterDog2d - Difference of Gaussian (Dog) Filter.
filterDoog - n-dim difference of offset Gaussian DooG filter (Gaussian derivative).
filterGabor1d - Creates an even/odd pair of 1D Gabor filters.
filterGabor2d - Creates an even/odd pair of 2D Gabor filters.
filterGauss - n-dimensional Gaussian filter.
filterSteerable - Steerable 2D Gaussian derivative filter (for visualization).


Filter bank
USAGE
FB = FbMake( dim, flag, [show] )

INPUTS
dim - dimension
flag - controls type of filterbank to create
- if d==1
1: gabor filter bank for spatiotemporal stuff
- if d==2
1: filter bank from Serge Belongie
2: 1st/2nd order DooG filters. Similar to Gabor filterbank.
3: similar to Laptev&Lindberg ICPR04
4: decent seperable steerable? filterbank
5: berkeley filterbank for textons papers
6: symmetric DOOG filters
- if d==3
1: decent seperable steerable filterbank

0 comments: