• 大小: 1.68KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-03-28
  • 语言: Matlab
  • 标签: matlab  

资源简介


现在图片一般都有很多去雾算法对图片进行处理,但是对图片增加雾的代码却少之又少,本代码就是用matlab代码实现了对图片的加雾处理。

资源截图

代码片段和文件信息


clear;clc; 
% close all; 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

img_name=‘.\sourcePicture\frame179.bmp‘;
I=imread(img_name);

I1 = imresize(I[240320]);
%  subplot(221);
figure(1);
imshow(I1);
imagesc(I1);
I1=double(I1)/255;

I = I1; 
% figure;imagesc(I);  %һͼ

Im_dealt = I;
[rowcolz] = size(Im_dealt);

landline = 0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Iw = I; 
A = 0.8;
m=100;
n=300;

tidx = 2; 
% for beta = 0.05:0.05:0.15
for beta = 0.20:0.05:0.30
    for i=1:3
         for j=landline+1:row
             for l=1:col    
              d(jl) = 1/((j-landline)^.05 + 0.0001);
                 d2(jl) = d(jl)*8;
                if j < landline 
                     d(jl) = -0.04*landline + 18;    
               

评论

共有 条评论