【图像处理】Schmid滤波器
Schmid也是一种类Gabor图像滤波器,在这篇文章[1]中有详细推导和介绍。
一种更简洁的表达公式是:
当中,r为核半径,Z为归一化參数,τ和σ是比較重要的參数,在ReID提取TextFeature中,常常使用例如以下一系列參数:
(2,1), (4,1), (4,2), (6,1), (6,2), (6,3), (8,1), (8,2), (8,3), (10,1), (10,2), (10,3), (10,4)
此外,还结合前面的Gabor滤波器,γ,θ,λ,σ的參数分别使用:(0.3,0,4,2), (0.3,0,8,2), (0.4,0,4,1), (0.4,0,4,1), (0.3,π/2,4,2), (0.3,π/2,8,2), (0.4,π/2 ,4,1), (0.4,π/2,4,1)
下面是11个滤波核的示意图:
生成Schmid核函数代码:
Mat getSchmidFilter(float tao, float sigma){
float r = sigma/(4.0f*tao);
float sigma2 = sigma*sigma;
//int half_filter_size = int(r+0.5);
int half_filter_size = 10;
int filter_size = 2*half_filter_size+1;
Mat schmid = Mat::zeros(filter_size,filter_size,CV_32F);
float filter_sum = 0.0f;
for(int i=0;i<filter_size;i++){
float* s = schmid.ptr<float>(i);
for(int j=0;j<filter_size;j++){
float x = i-half_filter_size;
float y = j-half_filter_size;
r = sqrt(x*x+y*y);
float tmp = 2*PI*tao*r/sigma;
float tmp2 = r*r/(2.0f*sigma2);
s[j] = cos(tmp)*exp(-tmp2);
filter_sum += s[j];
}
}
//cout<<filter_size<<" "<<filter_sum<<endl;
//cout<<schmid<<endl;
if(abs(filter_sum-0.0f)<1e-6){
return schmid;
}
for(int i=0;i<filter_size;i++){
float* s = schmid.ptr<float>(i);
for(int j=0;j<filter_size;j++){
s[j]/=filter_sum;
}
}
return schmid;
}
对图像进行卷积滤波效果如图:
參考文献:
[1] Schmid, Cordelia. "Constructing models for content-based image retrieval."Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on. Vol. 2. IEEE, 2001.
[2] Gray, Douglas, and Hai Tao. "Viewpoint invariant pedestrian recognition with an ensemble of localized features." Computer Vision–ECCV 2008. Springer Berlin Heidelberg, 2008. 262-275.
(转载请注明作者和出处:http://blog.csdn.net/xiaowei_cqu 未经同意请勿用于商业用途)
【图像处理】Schmid滤波器的更多相关文章
- 图像处理_imgproc笔记(1)
图像处理_滤波器 (1)图像的平滑处理 图像的平滑也称模糊,平滑处理需要一个滤波器,最常用的滤波器就是线性滤波器,线性滤波器的输出像素值是g(x,y),是输入像素值是 f(x,y)的加权和: ...
- opencv 61篇
(一)--安装配置.第一个程序 标签: imagebuildincludeinputpathcmd 2011-10-21 16:16 41132人阅读 评论(50) 收藏 举报 分类: OpenCV ...
- Win8 Metro(C#)数字图像处理--2.69中点滤波器
原文:Win8 Metro(C#)数字图像处理--2.69中点滤波器 [函数代码] <strong> /// <summary> /// Mid-point filter. / ...
- Win8 Metro(C#)数字图像处理--2.70修正后的阿尔法滤波器
原文:Win8 Metro(C#)数字图像处理--2.70修正后的阿尔法滤波器 /// <summary> /// Alpha filter. /// </summary> / ...
- Win8 Metro(C#)数字图像处理--2.67图像最大值滤波器
原文:Win8 Metro(C#)数字图像处理--2.67图像最大值滤波器 [函数名称] 最大值滤波器WriteableBitmap MaxFilterProcess(WriteableBi ...
- Win8 Metro(C#)数字图像处理--2.68图像最小值滤波器
原文:Win8 Metro(C#)数字图像处理--2.68图像最小值滤波器 /// <summary> /// Min value filter. /// </summary> ...
- 数字图像处理- 3.4 空间滤波 and 3.5 平滑空间滤波器
3.4 空间滤波基础 • Images are often corrupted by random variations in intensity, illumination, or have poo ...
- c语言数字图像处理(八):噪声模型及均值滤波器
图像退化/复原过程模型 高斯噪声 PDF(概率密度函数) 生成高斯随机数序列 算法可参考<http://www.doc.ic.ac.uk/~wl/papers/07/csur07dt.pdf&g ...
- opencv图像处理之常见滤波器
图像平滑 Smoothing, also called blurring, is a simple and frequently used image processing operation. 平滑 ...
随机推荐
- phpAdmin修改密码后拒绝访问
[phpMyadmin没配置正确] 解决方法: 1.打开 phpMyadmin 目录找到config.inc.php文件2.查找到$cfg['Servers'][$i]['password']=''3 ...
- Re:LieF ~親愛なるあなたへ~ 后感
遇到烦恼就能有个安逸的地方逃避.这个想法真好.遗憾现实并不能如此.若是觉得这款纯爱作有些许的感人之处,那定时因为受众玩家正在通过玩游戏来逃避现实.“虚拟世界的感情是真实的.” 这件事在旁人看来或许是笑 ...
- node-sass 解决 no such file or directory
在使用node-sass编译的时候出现以下情况 Error: ENOENT: no such file or directory, scandir 'D:\xxxx\node_modules\.npm ...
- a标签 按钮化使用
a标签 按钮化使用 a href="javascript:void(0);" onclick="js_method()" a href="javasc ...
- 解决 There are no resources that can be added or removed from the server
网上下载了一个项目,在eclipse中部署时,加载项目到tomcat中项目名称无法显示,报出There are no resources that can be added or removed fr ...
- 转:C#中的多态
封装.继承.多态,面向对象的三大特性,前两项理解相对容易,但要理解多态,特别是深入的了解,对于初学者而言可能就会有一定困难了.我一直认为学习OO的最好方法就是结合实践,封装.继承在实际工作中的应用随处 ...
- Ubuntu安装 和 python开发
在ubuntu上安装pycharm 可以好几种下载办法 1.pycharm之linux版本下载地址: https://download.jetbrains.8686c.com/python/pycha ...
- 在 vSphere 5.x/6.0 中配置 Network Dump Collector 服务 (2002954)
vmware KB: https://kb.vmware.com/s/article/2002954?lang=zh_CN 重点配置命令: 使用 vSphere Client 连接到 vCenter ...
- (matlab)plot画图的颜色线型(转)
http://wenku.baidu.com/link?url=SVVMVH8QlDIu2hVKDtoBYs6l0CnQvFnFHJJ9yexmYVKQqhz47qIr7aK7LOf8nN0qNdy8 ...
- (转)如何安装 easy installer+pip
http://blog.csdn.net/wuxiaobingandbob/article/details/42457807