資源簡介
何愷明等人研究出的基于暗通道的經典圖像去霧算法,不僅可以還原圖像的顏色和能見度,同時也能利用霧的濃度來估計物體的距離。
(The classic fog removal algorithm based on dark channel, which was developed by He Kaiming and others, not only can restore the color and visibility of images, but also can estimate the distance of objects by using the concentration of fog.)

代碼片段和文件信息
function?imDst?=?boxfilter(imSrc?r)
%???BOXFILTER???O(1)?time?box?filtering?using?cumulative?sum
%
%???-?Definition?imDst(x?y)=sum(sum(imSrc(x-r:x+ry-r:y+r)));
%???-?Running?time?independent?of?r;?
%???-?Equivalent?to?the?function:?colfilt(imSrc?[2*r+1?2*r+1]?‘sliding‘?@sum);
%???-?But?much?faster.
[hei?wid]?=?size(imSrc);
imDst?=?zeros(size(imSrc));
%cumulative?sum?over?Y?axis
imCum?=?cumsum(imSrc?1);
%difference?over?Y?axis
imDst(1:r+1?:)?=?imCum(1+r:2*r+1?:);
imDst(r+2:hei-r?:)?=?imCum(2*r+2:hei?:)?-?imCum(1:hei-2*r-1?:);
imDst(hei-r+1:hei?:)?=?repmat(imCum(hei?:)?[r?1])?-?imCum(hei-2*r:hei-r-1?:);
%cumulative?sum?over?X?axis
imCum?=?cumsum(imDst?2);
%difference?over?Y?axis
imDst(:?1:r+1)?=?imCum(:?1+r:2*r+1);
imDst(:?r+2:wid-r)?=?imCum(:?2*r+2:wid)?-?imCum(:?1:wid-2*r-1);
imDst(:?wid-r+1:wid)?=?repmat(imCum(:?wid)?[1?r])?-?imCum(:?wid-2*r:wid-r-1);
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-10-10?16:29??Image?fogging\
?????文件?????????927??2017-09-19?20:35??Image?fogging\boxfilter.m
?????文件????????1027??2017-09-19?20:34??Image?fogging\guidedfilter.m
?????文件????????2440??2017-09-19?20:34??Image?fogging\guidedfilter_color.m
?????文件????????1680??2017-09-19?20:43??Image?fogging\main.m
?????文件????????1845??2017-09-19?20:35??Image?fogging\maxfilt2.m
?????文件????????1845??2017-09-19?20:36??Image?fogging\minfilt2.m
?????文件????????1529??2017-09-19?20:54??Image?fogging\test_save.m
?????文件????????4811??2017-09-19?20:42??Image?fogging\vanherk.m
- 上一篇:PMSM simuli
nk電機矢量控制模型 - 下一篇:matlab圖像融合工具箱
評論
共有 條評論