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滤波器的更多相关文章

  1. 图像处理_imgproc笔记(1)

    图像处理_滤波器 (1)图像的平滑处理 图像的平滑也称模糊,平滑处理需要一个滤波器,最常用的滤波器就是线性滤波器,线性滤波器的输出像素值是g(x,y),是输入像素值是  f(x,y)的加权和:    ...

  2. opencv 61篇

    (一)--安装配置.第一个程序 标签: imagebuildincludeinputpathcmd 2011-10-21 16:16 41132人阅读 评论(50) 收藏 举报  分类: OpenCV ...

  3. Win8 Metro(C#)数字图像处理--2.69中点滤波器

    原文:Win8 Metro(C#)数字图像处理--2.69中点滤波器 [函数代码] <strong> /// <summary> /// Mid-point filter. / ...

  4. Win8 Metro(C#)数字图像处理--2.70修正后的阿尔法滤波器

    原文:Win8 Metro(C#)数字图像处理--2.70修正后的阿尔法滤波器 /// <summary> /// Alpha filter. /// </summary> / ...

  5. Win8 Metro(C#)数字图像处理--2.67图像最大值滤波器

    原文:Win8 Metro(C#)数字图像处理--2.67图像最大值滤波器  [函数名称]   最大值滤波器WriteableBitmap MaxFilterProcess(WriteableBi ...

  6. Win8 Metro(C#)数字图像处理--2.68图像最小值滤波器

    原文:Win8 Metro(C#)数字图像处理--2.68图像最小值滤波器 /// <summary> /// Min value filter. /// </summary> ...

  7. 数字图像处理- 3.4 空间滤波 and 3.5 平滑空间滤波器

    3.4 空间滤波基础 • Images are often corrupted by random variations in intensity, illumination, or have poo ...

  8. c语言数字图像处理(八):噪声模型及均值滤波器

    图像退化/复原过程模型 高斯噪声 PDF(概率密度函数) 生成高斯随机数序列 算法可参考<http://www.doc.ic.ac.uk/~wl/papers/07/csur07dt.pdf&g ...

  9. opencv图像处理之常见滤波器

    图像平滑 Smoothing, also called blurring, is a simple and frequently used image processing operation. 平滑 ...

随机推荐

  1. iOS上Delegate的悬垂指针问题

    文章有点长,写的过程很有收获,但读的过程不一定有收获,慎入 [摘要]   悬垂指针(dangling pointer)引起的crash问题,是我们在iOS开发过程当中经常会遇到的.其中由delegat ...

  2. ExpandableListView控件实现二级列表

    效果图如下: 二级列表附有点击事件. 1.布局文件: 此处加了一个自定义的导航RelativeLayout,记得注activity的时候添加 android:theme="@style/Th ...

  3. Pig autocomplete 自动补全

    在pig的grunt环境下,按TAB键可以自动补全命令,用户可以添加自己的补全信息. 在conf目录下创建autocomplete文件,添加如下内容: hdfs://vm1:8020/   在grun ...

  4. Mac下驱动BCM20702A0 USB蓝牙

    偶然高了一个USB蓝牙,查到Mac下能识别,无法驱动,就去找了一下.方法很简单,就是把蓝牙的PID和VID加入到驱动里边去,具体方法和步骤如下: 1. 进入到/System/Libary/Extens ...

  5. 【Kettle】2、文件夹与界面介绍

    1.文件夹介绍 下载Kettle6.1解压后出现下图相关文件夹以及文件夹介绍说明: Lib:存放Kettle的核心(core)jar包.工作引擎(engine)jar包.数据库(DB) jar包.图形 ...

  6. Jquery 保留N位小数,且千位以上用","号隔开

    s:数据Value n:保留小数位数 function jinEFmoney(s, n) { if (s == '' || s == null) return '0.00'; n = n > 0 ...

  7. MySQL 5.7 Reference Manual】15.4.2 Change Buffer(变更缓冲)

    15.4.2 Change Buffer(变更缓冲)   The change buffer is a special data structure that caches changes to se ...

  8. url用法

    url中的name用法: 0.定义主rul.py urlpatterns = [ url(r'^sinfors/', include('sinfors.urls', namespace="s ...

  9. git 代码上传至远程仓库&从远程库克隆到本地

    1.下载安装Git.下载:https://git-scm.com/downloads  安装:可参考文章http://blog.csdn.net/zzfenglin/article/details/5 ...

  10. Atom 绝赞插件

    文件图标: file-icons 根据不同文件后缀名显示不同类型图标 标签栏根据不同文件格式显示色彩: filetype-color 在标签栏不同格式文件显示不同的颜色的标题,支持二度设置. 小地图: ...