【图像处理】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. 平滑 ...
随机推荐
- egg.js连接和使用Mongodb
一.Egg连接Mongodb方法一 Cnpm i egg-momgo-native --save Plugin.js中配置 exports.mongo = { enable: true, pack ...
- Pig安装与应用
1. 参考说明 参考文档: http://pig.apache.org/docs/r0.17.0/start.html#build 2. 安装环境说明 2.1. 环境说明 CentOS7.4+ ...
- jQuery轮播图(手动点击轮播)
下面来看看最终做的手动点击轮播效果: 一.原理说明 (1)首先是轮播图的架构,我采用了一个最外边的大div包住两个小div,一个小div里面放四张图片,另一个小div里面放四个数字按钮 (2)对最外边 ...
- Android属性动画:插值器与估值器
声明:本篇文章部分内容来自<Android开发艺术探索>. 我们都知道对于属性动画可以对某个属性做动画,而 插值器(TimeInterpolator)和 估值器(TypeEvaluator ...
- flutter 生命周期
前言:生命周期是一个组件加载到卸载的整个周期,熟悉生命周期可以让我们在合适的时机做该做的事情, flutter中的State生命周期和android以及React Native的生命周期类似. 先看一 ...
- get_digits
# coding=utf-8# 一.def digits(n): list1 = [] for each in n: list1.append(each) return list1print(digi ...
- redis订阅与发布(把redis作为消息中间件)
订阅频道127.0.0.1:6379> subscribe chat1Reading messages... (press Ctrl-C to quit)1) "subscribe&q ...
- Pig foreach用法举例
foreach:一行一行的遍历数据,处理一行的数据,然后返回一个tuple. users = load '/users.data'; 1)别名引用 f = foreach users genera ...
- Others
1.可迭代对象可以被for循环获取 2.可变与不可变对象 不可变对象:数字 字符串 元组 所谓不可变是值和身份都不变 赋值时开辟新内存空间生成新值 可变 对象:列表 字典 集合 ...
- GreenPlum 5.0的安装
基本环境: server IP MDW 172.16.16.31 SDW1 172.16.16.34 SDW2 172.16.16.35 1:检查操作系统是否符合要求,以及系统设置. 我这里使用的系统 ...