资源简介
测试可用的MATLAB图像去雾源代码,附带原理论文
代码片段和文件信息
% CORRESPONDENCE INFORMATION
% This code is written by Gaofeng MENG
%
% Gaofeng MENG:
% National Laboratory of Pattern Recognition
% Institute of Automation Academy of Sciences Beijing 100190
% Comments and bug reports are welcome. Email to gfmeng@nlpr.ia.ac.cn
%
% WORK SETTING:
% This code has been compiled and tested by using MATLAB R2009a
%
% For more detials please see our paper:
% Gaofeng MENG Ying WANG Jiangyong DUAN Shiming XIANG Chunhong PAN.
% Efficient Image Dehazing with Boundary Constraint and Contextual Regularization
% ICCV Sydney Australia pp.617-624 3-6 Dec. 2013.
%
% Last Modified: Feb. 14 2014 By Gaofeng MENG
%
function A = Airlight(HazeImg method wsz)
% estimating the global airlight
%
if strcmp(method ‘manual‘)
h = figure imshow(HazeImg []);
title(‘manual airlight estimation: left click to pick a most hazy pixel. ‘)
[x y] = ginput(1);
A = HazeImg(round(y) round(x) :);
A = double(A) -1;
A = min(A 255);
close(h);
elseif strcmp(method ‘he‘)
A = airlight_he(HazeImg wsz);
elseif strcmp(method ‘our‘)
A = airlight_our(HazeImg wsz);
else
error(‘parameter error.‘);
end
%%
function A = airlight_our(HazeImg wsz)
% estimating A channel by channel separately
for k = 1 : 3
minImg = ordfilt2(double(HazeImg(: : k)) 1 ones(wsz) ‘symmetric‘);
A(k) = max(minImg(:));
end
%%
function A = airlight_he(HazeImg wsz)
% estimating A using He‘s method
hsv = rgb2hsv(HazeImg);
GrayImg = hsv(: : 3);
[nRows nCols bt] = size(HazeImg);
% computing dark channel
DarkImg = min(double(HazeImg) [] 3);
DarkImg = ordfilt2(DarkImg 1 ones(wsz) ‘symmetric‘);
%
topDark = sort(DarkImg(:) ‘descend‘);
idx = round(0.001 * length(topDark));
val = topDark(idx);
id_set = find(DarkImg >= val); % the top 0.1% brightest pixels in the dark channel
BrightPxls = GrayImg(id_set);
iBright = find(BrightPxls >= max(BrightPxls));
id = id_set(iBright); id = id(1);
row = mod(id nRows);
col = floor(id / nRows) + 1;
% A is a vector
A = HazeImg(row col :);
A = double(A(:));
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2165 2014-02-17 09:51 dehaze_code\Airlight.m
文件 1469 2014-02-17 09:51 dehaze_code\Boundcon.m
文件 2913 2014-02-17 09:51 dehaze_code\CalTransmission.m
文件 1375311 2014-12-16 12:48 dehaze_code\dehaze.pdf
文件 1185 2014-02-17 09:51 dehaze_code\Dehazefun.m
文件 1524 2015-04-10 11:00 dehaze_code\demo.m
文件 199545 2011-08-19 14:08 dehaze_code\examples\sam_1.bmp
目录 0 2015-06-02 21:11 dehaze_code\examples
目录 0 2015-01-08 20:42 dehaze_code
----------- --------- ---------- ----- ----
1584112 9
- 上一篇:MATLAB与机器学习
- 下一篇:稀疏编码算法
相关资源
- 暗影通道去雾matlab代码直接可用
- 何凯明_暗通道去雾_matlab源码
- 基于可见边的去雾图像质量评价
- matlab基于暗通道原理去雾算法
- 计算mse psnr 以及用直方图均衡化,H
- 基于matlabGUI的暗通道图像去雾程序
- 水下去雾去燥饱和度matlab图像处理
- matlab去雾算法合集图像处理毕设
- 何凯明去雾MATLAB代码(.M).zip
- 图像处理,matlab程序,retinex_frankle_
- 何恺明图像去雾Matlab代码
- 基于直方图优化的图像去雾技术.zip
- matlab去雾程序,单尺度和多尺度同态
- 经典去雾算法matlab实现
- 暗通道去雾matlab
- 何凯明去雾MATLAB代码
- matlab基于多尺度retinex算法的图像去雾
- 基于直方图均衡化,暗通道先验,r
- 用于实现图像去雾的代码,很有效,
- 数字图像去噪(去雾)效果客观指标
- 基于暗通道先验的图像去雾MATLAB算法
- 直方图均衡化去雾算法
- 暗通道先验+引导滤波MATLAB代码
- 单一图像去雾
- MATLAB图像去雾处理
- MATLAB车牌去雾+识别.rar
- MATLAB图像去雾程序.m
- 暗原色先验图象去雾改进算法matlab代
- 何凯明暗原色先验去雾的MATLAB代码(
- matlab传统方法图像去雾
评论
共有 条评论