光照归一化算法——DoG滤波,自商图
来源:互联网 发布:多普达t5399软件 编辑:程序博客网 时间:2024/05/20 23:05
DoG code:function pic=DoG(I)if size(I,3)==3 I=rgb2gray(I);endI=double(I);h1=fspecial('gaussian',15,1);h2=fspecial('gaussian',15,2);m=filter2(h2,I)-filter2(h1,I);R=m;mi=min(min(R));ma=max(max(R));newR=(R-mi)*255/(ma-mi);pic=uint8(newR);
处理效果:
理论:
Given a m-channels, n-dimensional image
The difference of Gaussians (DoG) of the image is the function
obtained by subtracting the image convolved with the Gaussian of variance from the imageconvolved with a Gaussian of narrower variance , with. In one dimension, is defined as:
and for the centered two-dimensional case :
which is formally equivalent to:
which represents an image convoluted to the difference of two Gaussians, which approximates aMexican Hat function.
自商图code:
function [pic,ipic]=selfQuotient(I)if size(I,3)==3G=rgb2gray(I);else G=I;endG=double(G);G=(G-min(min(G)))/(max(max(G))-min(min(G)))*255;%对比度拉升% thr=mean(G);% w=zeros(rows,cols);% for i=1:rows% for j=1:cols% if(I(i,j)>thr)% w(i,j)=0;% else% w(i,j)=1;% end% end% endh1=fspecial('gaussian',7,1);% h1=h1.*w;f1=filter2(h1,G);R=G./f1;mi=min(min(R));ma=max(max(R));newR=(R-mi)*255/(ma-mi);pic=uint8(newR);ipic=uint8(f1);处理效果图:
ps:
自商图求滤波器h1的时候,赋了权值,不过实验中发现不设置权值效果似乎更佳,所以注释掉了权值部分。权值的设置应该是一个值得探讨的部分。
- 光照归一化算法——DoG滤波,自商图
- 光照归一化算法——DCT
- 光照归一化算法——TT
- 光照归一化算法
- OpenCV学习——物体跟踪的粒子滤波算法实现之权重归一化
- 机器学习算法——归一化数值
- 图像匹配—NCC算法,即归一化互相关匹配
- 技术积累 — 加权平均值滤波算法
- 自归一化神经网络
- OpenCV对图像的光照归一化处理
- OpenGL学习笔记 (7) —— 三种不同的纹理滤波方式,光照和键盘控制
- matlab归一化和反归一化函数——mapminmax
- matlab归一化和反归一化函数——mapminmax
- hdu2768——Cat vs. Dog
- 计算机视觉—DoG和LoG算子
- 机器学习之k近邻算法——4、特征值归一化
- 算法提高 复数归一化
- 数据归一化算法
- 倒排索引
- Linux 下几个文件操作命令的代码实现,myfind find 查找命令 实现
- 企业IT规划
- 字符串的全排列和组合算法
- MapReduce :Simpliyed Data Processing on Large Clusters 总结
- 光照归一化算法——DoG滤波,自商图
- mapreduce调试查询System.out的结果
- J2EE Exception:WELD-001408 Unsatisfied dependencies for type [SelectModelFactory] with qualifiers [@
- [go]基于协程的并发ping(2)
- 巧用WINRAR和DOS命令处理压缩数据
- 将手绘地图或自制地图显示在网页上(利用百度API)
- div+css解决图片垂直居中问题
- title && tile
- 34个SEO问题解答from百度站长俱乐部Lee