【图像处理】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. 平滑 ...
随机推荐
- PHP的new self() 与new static()
参考链接:[PHP中new static()与new self()的区别异同分析],[PHP中new self()和new static()的区别探究],[PHP中static和self的区别] 要点 ...
- 微信支付报错:time_expire时间过短,刷卡至少1分钟,其他5分钟]
查了下代码: $input->SetTime_expire(date("YmdHis", time() + 600));//二维码过期时间.默认10min 10分钟,没问题. ...
- 详解php 获取文件名basename()函数的用法
PHP 中basename()函数给出一个包含有指向一个文件的全路径的字符串,此函数返回基本的文件名,本篇文章收集了关于使用PHP basename()函数获取文件名的几篇文章,希望对大家理解使用PH ...
- redis 命令select、dbsize、清空数据库、info、client
select 切换库 dbsize 当前库中数据条数 清空数据库 flushdb | flushall 清空数据,一个是清空当前库,一个清空当前实例 查看服务器及redis相关信息 infoinfo ...
- map合并,相同键对应的值相加
最近在做统计钱的计算时遇到的一个需求,需要将一个大类别下的每一种钱进行特定的运算然后获得六年的钱,最后将这些钱按照年份进行汇总,获得总得大类型的六年的钱,在这个过程中采用了这种方法,每次算得钱放在ma ...
- HDFS pipeline写 -- 客户端
上一篇说了datanode端如何处理pipeline写请求的,这里主要看DFSClient. 这里以append为例, write差不多. 创建一个pipeline用于append操作的流程: Fil ...
- The operation names in the portType match the method names in the SEI or Web service implementation class.
The Endpoint validation failed to validate due to the following errors: :: Invalid Endpoint Interfac ...
- swift版的元组
swift版的元组 说明 元组的内容并不多,使用的话跟普通变量类似,以下是测试源码: // // ViewController.swift // Tuples // // Created by You ...
- elastic search报错——“failed to obtain node locks”
启动时报错信息: 这里写图片描述 寻找主要信息:failed to obtain node locks这里写图片描述简单理解为:绑定节点失败!!! 百度后,好多人同样遇到了这个问题,导致的原因可能是因 ...
- Python学习---JSON补充内容[中文编码 + dumps解析]
JSON补充内容[微信解决中文乱码,接上] import json # 英文显示 dic = {"hello": "world"} str = json.dum ...