资源简介
图像局部对比度增强的文章,内附原文paper以及matlab代码和几幅示例图像,效果不错。
代码片段和文件信息
% This code is written according to the following paper
% “A Space-Variant Luminance Map based Color Iamge Enhancement“Sungmok Lee
% etal.
% This algorithm can enhance the luminance while preserving details.
clear all;
close all;
% 显示文件打开对话框
[FileNamePathName]=uigetfile({‘*.png‘;‘*.jpg‘}‘Open an Image File‘);
img = imread([PathName FileName]);
figureimshow(img);
img=double(img);
Rimg=img(::1);
Gimg=img(::2);
Bimg=img(::3);
Lum=0.299*Rimg+0.587*Gimg+0.114*Bimg;
% 高斯滤波
sigma=15;
w=31;
w1=31;
[x y]=meshgrid(-w:w-w1:w1);
%高斯函数
G=1/(2*pi*sigma^2)*exp(-(x.^2+y.^2)/(2*sigma^2));
LumSmooth=imfilter(LumG‘conv‘);
% figureimshow(uint8(LumSmooth));
% 亮度增强
r=0.25.^((128.0-LumSmooth)/128.0);
Lumout=255.0*(Lum/255.0).^r;
figureimshow(uint8(Lumout));
% 对比度增强
sigma1=std2(Lum(:));
if sigma1<=70
P=2.4;
else if sigma1>100
P=1.0;
else
P=-0.025*sigma1+3;
end
end
E=(LumSmooth./(Lumout+eps(0.005))).^P;
S=255*((Lumout/255).^E)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 618597 2014-03-21 09:35 A Space-Variant Luminance Map ba
文件 148135 2014-03-21 09:37 A Space-Variant Luminance Map ba
文件 942091 2005-03-26 18:06 A Space-Variant Luminance Map ba
文件 1378 2014-12-11 15:46 A Space-Variant Luminance Map ba
- 上一篇:NPCR_and_UACI
- 下一篇:intercell_interference
评论
共有 条评论