自适应同态光照补偿

自适应同态光照补偿
自适应同态光照补偿

Matlab代码做光线补偿

Matlab代码,做光线补偿 clear all clc close all rgb_image1=imread('01.bmp'); figure,subplot(311),imshow(rgb_image1); %提取分量图像。 fR1=double(rgb_image1(:,:,1)); fG1=double(rgb_image1(:,:,2)); fB1=double(rgb_image1(:,:,3)); rgb_image2=imread('00.bmp'); subplot(312),imshow(rgb_image2); fR2=double(rgb_image2(:,:,1)); fG2=double(rgb_image2(:,:,2)); fB2=double(rgb_image2(:,:,3)); %还原图像 %rgb_image4=cat(3,fR1,fG1,fB1); %figure,imshow(uint8(rgb_image4)); %取图像大小 [r,c]=size(fR1); %计算两幅图像各自的R、G、B分量的均值和方差 R1=mean(mean(fR1));%均值 G1=mean(mean(fG1)); B1=mean(mean(fB1)); r1=mean(var(fR1));%方差 g1=mean(var(fG1)); b1=mean(var(fB1)); R2=mean(mean(fR2)); G2=mean(mean(fG2)); B2=mean(mean(fB2)); r2=mean(var(fR2)); g2=mean(var(fG2)); b2=mean(var(fB2)); %转换图像 gray1=rgb2gray(rgb_image1); gray2=rgb2gray(rgb_image2); %计算图像的亮度均值 M1=mean(mean(gray1)); M2=mean(mean(gray2)); fR3=zeros(r,c); fG3=zeros(r,c); fB3=zeros(r,c); %进行补偿

基于CCD图像的OLED光学补偿算法研究与实现

Abstract Abstract Organic Light Emitting Diode (OLED) has the advantages of flatness, active light, high brightness, wide viewing angle and fast response. With the development direction of large size, light weight, low power consumption, high-resolution, the probability of defects in OLED display is greatly increased. Due to the low contrast of the Mura (Japanese, original stain or stain) itself, there is no clear edge and the whole screen brightness shows a great non-uniformity. The traditional detection methods by human eyes are affected by subjective psychological factors and other external environment, so that the method of manual testing is difficult to meet the requirements of product quality and production efficiency. To carry out various types of OLED display defect detection and compensation for OLED, the significance is that to find the OLED display surface defects meanwhile repair them in order to improve the life of OLED screen. The overall compensation program mainly includes two parts of OLED luminous uniformity measurement and external drive current adjustment. Specifically, the light intensity information of the self-luminous point of the OLED is received by the light-sensitive surface of the high-resolution CCD camera and converted into the corresponding luminous intensity value of the screen. Compared with the standard brightness data of the corresponding gray level, the adjustment of the input analog signal of the sub-pixel is calculated. The signal generator is used to drive the compensation module to adjust the input signal. Aiming at the problem of the accuracy of optical measurement in the external optical compensation of OLED display, this dissertation introduces the algorithm of pixel location and brightness extraction. In view of the characteristics of independent display of OLED pixels, the structure of image processing algorithm is designed to obtain a series of image preprocessing algorithms including pixel brightness of display screen and planar field correction. The threshold method is used to realize image binaryzation. Then the morphological cornea swelling method is used to get the center of the pixel, and then the original vector recursion method is used to accurately locate all the pixels. Compared with the existing methods, the proposed imaging positioning algorithm can be accurate to the sub-pixel level, and ultimately improve the compensation effect for improving the display uniformity of the OLED screen. According to the luminescence regularity of Gamma linearity of OLED pixels, a polynomial model of brightness-grayscale relation was proposed, which solves the problem of low fitting efficiency and slow algorithm adaptively. According to the characteristics of human visual system, Human eye visual assessment of the law, to achieve the assessment of uniformity before and after compensation. Keywords: OLED, defect, linear output of CCD, visual characteristics of human eyes

水下图像光照补偿预处理方法研究

V 〇1.23,N 〇.8,2016 创新与实践 TECHNOLOGYANDMARKET 水下图像光照补偿预处理方法研究 韩江鸿,王谋,吴丹阳,李杰美惠,王惠刚 (西北工业大学航海学院,陕西西安710072) 摘要:光照条件的变化、光照不均匀以及水体对不同波长光的散射,会影响水下图像的质量,进而影响对水下图像的分 析、识别等。为了获得清晰的水下图像用于水下资源勘测等领域,通常要对图像进行光照补偿预处理。依托西北工业大 学高峰体验计划,对光照补偿的G am m a 算法及其非线性改进算法进行了分析,实现对不同光照情况矫正的自适应;在水 下散射和光照的特殊环境下分析了 Retinex 算法,补偿水下图像蓝色色调的影响和光照条件的影响。通过两种方法的结 合达到较好的水下图像光照补偿的预处理效果。关键词:非线性G am m a 矫正算法;Retinex 算法;光照补偿 doi : 10. 3969/j . issn . 1006 - 8554.2016. 08. 005〇引言 随着海洋领域研究的不断深人,水下图像科研、军事和经 济领域的应用逐渐广泛,如水下资源勘探、水下机器人研究 等[1],对水下图像采集、处理和分析提出了更高的要求。但由 于水下光照不充足以及水下光传播的特殊性[2],水下成像系统 很难达到令人满意的成像效果。为了获得较为清晰的水下图 像,通常在水下图像采集系统中使用人工光源,然而人工光源 在成像过程中具有很大的灵活性和不确定性,这就使得水下图 像的光照不均匀情况更加显著,成像光强分布出现较大差异, 照明光最强点成像光强最强,并以其为中心向周围逐渐衰 减[3]。因此在对水下图像进行分析、识别或进行水下目标跟踪 之前,要对图像进行光照补偿预处理。 Gamma 算法常用于图像的光照补偿,在弱化光照影响方面 具有一定的优势[4]。本文对传统的Gamma 矫正算法以及非线 性Gamma 算法的改进进行分析,并结合水下光传播的特殊环 境,分析了 Retinex 算法在补偿水下图像色彩方面的作用。1 传统Gamma 矫正算法 Gamma 矫正是一种参数值,用来表达C R T 的非线性特性。 由于人的视觉系统对亮度的感觉是对数关系,因此即使CRT 是线性的,Gamma 校正也是必要的[]。传统的Gamma 矫正方 法提出了像素值与Gamma 值之间的映射关系,令P 代表像素 值区间[0,255],/2为角度值区间[0,n ],厂表示Gamma 值区 间,,为一个像素的数值〇X e P ),取X m 为区间P 的中间点,则 定义P 到D 的映射为: n = \ (〇\c 〇 = ip(x ) ( (1) rnx /2xm , /m o 到厂的映射为r r =\y \y =h (x )( (2) {"(x ) =1 +/1〇) U (() =ctcos (p (x )) a 是加权系数,取值在0到1之间。由上述关系,每一个 像素值都能确定一个Gamma 数值一一对应。矫正函数为 ^(x ) =255(x /255)1/y (x ) (3) 其中: 传统方法中虽然通过G a mma 值对像素值进行了修正,但 在G a mma 值区间内G a mm a 数值还缺乏适应图像的高光区、过 渡区和阴影区的光照适应能力。通过(3)式补偿的结果使整个 图片的亮度增强或减弱,对于高光区而言,亮度增强会影响图 像的可识别能力。 针对同一图像上存在的不同亮度的区域,可以采取不同的 G a mma 值进行亮度修正。在传统G a mma 矫正算法的基础上, 一种非线性的G a mma 矫正算法可以提高G a mma 值曲线对光 照变化的适应能力。选取两个非线性函数对G a mma 数值进行 修正: \f i (x ) =(^(^ ) +6)cosa +^ s i na i /3(x )=尺(x )Sn (n (( _xm ),255) 其中:K (x ) =psin (4nx /255),a = arctan ( -6/x ),_/?(x )= c l \/x - 1 \。通过(x )可以使Gamma 值曲线在高光区和阴 影区的幅值较大而过渡区幅值较小。因此令 G O ) =/1(x) +/2(x) +/3(x) (5)则修正后的G a mma 值函数为:y (x ) =1 + G (x ) (6) 实验可知,非线性改进后的Gamma 函数能够更好地适应光照情况的变化,提高了 Gamma 矫正方法的矫正能力。对于 Gamma 矫正算法改进的研究已经能够较好适应空气环境中的 图像光照补偿情况,对于水中光线传播和水中光照条件的特殊 性,本文在改进的非线性Gamma 矫正算法基础上对水下光成 像的色彩进行矫正。 2水下图像色彩补偿的Retinex 算法 水下成像过程中,散射是对图像质量的关键影响因素。水 对不同波长的散射系数随波长的增大而减小,因此红光波段的 散射比蓝绿光波段的散射较弱,所以水中采集的图像色调偏 蓝。对图像色彩的修正采用Retinex 理论,将图像/(x ,y )表示 为反射和照度分量的乘积,即 /〇,,)=尺(x ,y ) X _L (x ,y ) (7) 尺和^分别代表反射和照射分量。通过R e in x 理论可以 除去照射分量对图像颜色的影响,改善图像的色彩。通过多尺 度Retinex 算法,可以得到图像增强的数学模型为:log [/?((,y )]=^^」log [/((,y )]-log [/((,y )*F ;((,y )] (8) 其中,表示总环绕函数F (x ,y )的个数,F ;(,y )表示第f 14

亮通道先验Retinex对低照度图像的光照补偿

第26卷 第5期 2018年5月 光学精密工程 Optics and Precision Engineering Vol .26 No .5 May .2018 收稿日期:2017-08-21;修订日期:2017-09-26. 基金项目:国家自然科学基金资助项目(No .61401425,No .61602432)文章编号 1004-924X (2018)05-1191-10 亮通道先验R e tinex 对低照度图像的光照补偿 李赓飞1,2*,李桂菊1,韩广良1,刘培勋1,江 山1 (1.中国科学院长春光学精密机械与物理研究所,吉林长春130033; 2.中国科学院大学,北京100049) 摘要:针对光照不足导致图像质量退化的问题,提出了亮通道先验的Retinex 算法用来补偿图像的光照强度。该算法假设局部恒常的光照可以初步满足光照均匀并与场景相似,以亮通道运算对光照分量进行粗估计;通常解决局部处理带来的分块效应问题是采用引导滤波方法,但这会使补偿后的图像纹理模糊甚至丢失细节,为此设计了基于图像结构相似性的融合策略。最后使用Retinex 理论模型对光照进行补偿。实验结果表明:所提算法简单高效,能够对图像阴影或夜间图像的低照度区域进行快速地光照补偿,在峰值信噪比(PNSR )上较传统算法提高了5dB 左右,在结构相似性(SSIM )上比传统算法提高了7%以上。算法在纯软件系统的PC 机上处理640×360的彩色视频时能达到6~12ms /帧,处理320×256的红外视频时达到4~10ms /帧,可满足工程需要。 关 键 词:Retinex ;亮通道先验;光照补偿 中图分类号: 文献标识码:A doi :10.3788/OPE .20182605.1191 Illumination compensation using Retinex model based on bright channel prior LI Geng -fei 1,2*,LI Gui -j u 1,HAN Guang -liang 1,LIU Pei -xun 1,JIANG Shan 1 (1.Chan g chun Institute o f O p tics ,Fine Mechanics and Ph y sics , Chinese A cadem y o f Sciences ,Chan g chun 130033,China ; 2.Universit y o f Chinese A cadem y o f Sciences ,Bei j ing 100049,China ) *Corres p onding author ,E -mail :killcolours @126.com Abstract :Aiming at the problem of image quality degradation caused by insufficient illumination ,a retractive algorithm of bright channel was proposed to compensate the illumination intensity of the image .T he algorithm assumed that the local constant light could initially satisfy the uniformity of illumination and was similar to the scene ,and the bright channel operation was used to estimate the weight of the light component .T he problem of blocking was usually solved by the local processing ,but this would make the compensation image texture blurred or even lost ,and the fusion strategy based on image structure similarity was designed .Finally ,the Retinex theoretical model was used to compensate for the light .T he experimental results show that the proposed algorithm is simple and efficient ,and can compensate for the low illumination area of image shadow s or nighttime images .Compared with the traditional algorithm ,the peak signal to noise ratio (PNSR )is improved by about 万方数据

Matlab代码光线补偿

Matlab代码,做光线补偿clear all clc close all rgb_image1=imread('01.bmp'); figure,subplot(311),imshow(rgb_image1); %提取分量图像。 fR1=double(rgb_image1(:,:,1)); fG1=double(rgb_image1(:,:,2)); fB1=double(rgb_image1(:,:,3)); rgb_image2=imread('00.bmp'); subplot(312),imshow(rgb_image2); fR2=double(rgb_image2(:,:,1)); fG2=double(rgb_image2(:,:,2)); fB2=double(rgb_image2(:,:,3)); %还原图像 %rgb_image4=cat(3,fR1,fG1,fB1); %figure,imshow(uint8(rgb_image4)); %取图像大小 [r,c]=size(fR1); %计算两幅图像各自的R、G、B分量的均值和方差 R1=mean(mean(fR1));%均值 G1=mean(mean(fG1)); B1=mean(mean(fB1)); r1=mean(var(fR1));%方差 g1=mean(var(fG1)); b1=mean(var(fB1)); R2=mean(mean(fR2)); G2=mean(mean(fG2)); B2=mean(mean(fB2)); r2=mean(var(fR2)); g2=mean(var(fG2)); b2=mean(var(fB2)); %转换图像 gray1=rgb2gray(rgb_image1); gray2=rgb2gray(rgb_image2); %计算图像的亮度均值 M1=mean(mean(gray1)); M2=mean(mean(gray2)); fR3=zeros(r,c); fG3=zeros(r,c); fB3=zeros(r,c); %进行补偿

相关主题
相关文档
最新文档