资源简介
自适应直方图均衡(AHE)算法的实现,提供了样图进行对比。
代码片段和文件信息
%ahe which I implemented
function img_new=ahe(imggridlimit)
img_new=img; %img_new is the img after AHE
[mn]=size(img);
%ECR
grid_cols=grid;
grid_rows=grid;
grid_width=int32(fix(m/grid_cols));
grid_height=int32(fix(n/grid_rows));
map=zeros(grid_colsgrid_rows256);
%for each gridwe create their mapping function
for i=1:grid_cols
for j=1:grid_rows
map(ij:)=MakeHistogram(img1+(i-1)*grid_width1+(j-1)*grid_heightgrid_widthgrid_heightlimit);
end
end
%interpolate
%boundary cases I followed the Karel Zuiderveld‘s implement(C version)
xi = 1;
for i = 1:grid_cols+1
if i == 1
subx = grid_width/2;
xu = 1;
xd = 1;
elseif i == grid_cols+1
subx = grid_width/2;
xu = grid_cols;
xd = grid_cols;
else
subx = grid_width;
xu = i - 1;
xd = i;
end
yi = 1;
for j = 1:grid_rows+1
if j == 1
suby = grid_height/2;
yl = 1;
yr = 1;
elseif j == grid_rows+1
suby = grid_height/2;
yl = grid_rows;
yr = grid_rows;
else
suby = grid_height;
yl = j - 1;
yr = j;
end
UL = map(xuyl:);
UR = map(xuyr:);
DL = map(xdyl:);
DR = map(xdyr:);
subimg = img(xi:xi+subx-1yi:yi+suby-1);
subimg = Interpolate(subimgULURDLDRsubxsuby);
img_new(xi:xi+subx-1yi:yi+suby-1) = subimg;
yi = yi + suby;
end
xi = xi + subx;
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-11-04 23:29 bonus2\
文件 79888 2014-11-04 23:20 bonus2\ahe 16grids.jpg
文件 140546 2014-11-04 23:20 bonus2\ahe 256grids.jpg
文件 129478 2014-11-04 23:20 bonus2\ahe 64grids.jpg
文件 100165 2014-11-04 23:20 bonus2\ahe with limit 150.jpg
文件 114298 2014-11-04 23:20 bonus2\ahe with limit 300.jpg
文件 129478 2014-11-04 23:20 bonus2\ahe without clipping.jpg
文件 1930 2014-11-04 23:12 bonus2\ahe.asv
文件 1779 2014-11-04 23:19 bonus2\ahe.m
文件 105113 2014-11-04 23:20 bonus2\he.jpg
文件 882 2014-11-03 09:19 bonus2\he.m
文件 661 2014-11-04 23:12 bonus2\Interpolate.asv
文件 599 2014-11-04 23:20 bonus2\Interpolate.m
文件 548 2014-11-04 23:27 bonus2\main.asv
文件 546 2014-11-04 23:09 bonus2\main.m
文件 1222 2014-11-02 17:24 bonus2\MakeHistogram.asv
文件 1631 2014-11-04 22:52 bonus2\MakeHistogram.m
文件 54649 2014-11-04 20:22 bonus2\source.jpg
相关资源
- 5th WENO Matlab Example 计算流体力学 五阶
- GridStorageBatt
-
matlab/simuli
nk仿真的无刷直流电机( - matlab编写的船舶动力定位PID控制函数
- matlab多聚焦图像融合(contourlet)
- clutter 模拟杂波的生成
- Final_PMSM_model
- ESPRIT DOA算法的稀疏表示求解(L1 SRA
- 透射反射曲线(transmission line )求解
- SOM算法的matlab程序
-
定速风电机组的Matlab/Simuli
nk模型仿 - ARIMA ARIMA模型全称为差分自回归移动平
- matlab ARIMA模
- 轴承故障检测(bearing envelope analysis
- rotordynamic matlab code 转子动力学分析相
- BCS贝叶斯压缩感知和分布式贝叶斯压
- 医学图像处理MRI脑仿真库BrainWeb
- MATLAB多自由度弹塑性动力时程分析程
- STATCOM仿真
- 混沌算法(Chaos Algorithm)入门和代码
- ELM 极限学习机matlab以及Python程序
- 主成分分析方法中临界故障检测幅值
- 深度学习模型代码
- MIMO雷达发射方向图设计源码
- kalman_filter2 北航研究生课程卡尔曼滤
- FMCW_RADAR
- matlab实现我爱你(I love You)3D图
- matlab求股票的var、cvar
- 求解带时间窗的车辆路径问题的程序
- 混沌理论多尺度熵matlab实现函数
评论
共有 条评论