Gamma矫正原理
GAMMA曲线调整

关于gamm a矫正的共享内容1.前言。
2.Gamma问题的产生。
3.基本知识的准备(色温、色域xy值、白平衡)。
4.Gamma矫正对主观效果有何影响。
5.Gamma曲线的测量。
6.Gamma曲线形态的解读。
7.Gamma矫正的原理以及实现。
8.电视机确定效果参数的一般步骤。
一、前言。
Gamma矫正是显示设备根据主要显示器件本身的特性改善整体显示效果的重要技术,我们较早的机型曾经实现过Gamm a矫正曲线现场可调节并记忆,但由于我们当时大量使用的LG屏内部含有Ga mma矫正电路使其G A MMA性能较好,在后来的一段时间内我们很少调整G a mma参数,由于广辉屏和NEC等屏的选用导致对Gamm a软件矫正需求加强,我们才意识到,实际上这些地方有一些方法可以改善图像细节和色彩的效果。
听说Gamm a矫正效果的调节是日系彩电色彩和细节表现效果好的一个重要原因。
二、Gamma问题的产生。
对于显示设备,输入的信号将在屏幕上产生三种亮度输出,但是显示设备的亮度与输入的信号不成正比,存在一种失真,如果输入的是黑白图像信号,这种失真将使被显示的图像的中间调偏暗,从而使图像的整体比原始场景偏暗,如果输入的是彩色图像信号,这种失真除了使显示的图像偏暗以外,还会使显示的图像的色彩发生偏移。
gamma就是这种失真的度量参数。
对于CRT显示器,无论什么品牌的,由于其物理原理的一致性,其gamma值的趋势几乎是一个常量,为2.5。
(注意,gamma=1.0时不存在失真),由于存在ga mma失真,输入的信号所代表的图像,在屏幕上显示时比原始图像暗。
如下图所示。
(RGB)Gamma1.0时的128阶现象(RGB)Gamma2.5时的128阶现象下面是2.2Gamma曲线的示意图:上图为一典型显示设备的G amma曲线非常接近指数函数(注意上图中输入值为数字化的,即通常的RGB值),归一化后我们通常可以用一个简单的函数表达:O utput=Input^Gamma。
gamma原理

gamma原理
gamma原理是指通过射线照相法测得被照射物体的厚度。
这
种方法利用物质对γ射线的吸收性质,通过测量射线强度的减弱,来推算出物体的厚度。
γ射线是高能量的电磁辐射,在穿
过物体时会与物质相互作用,从而使射线被吸收或散射。
根据射线透射的强度变化,可以得到物体的吸收系数和相应的厚度。
γ射线照相法是一种非接触、非破坏性的测量方法,适用于各
种物体的厚度测量,如金属、塑料、纸张、生物组织等。
其基本原理是利用射线透过物体时的衰减规律来推算出物体的厚度。
因为不需要直接接触物体,所以可以测量比较复杂形状和高温物体的厚度。
实际应用中,测量者需要将射线发射器放置在物体一侧,然后通过探测器测量射线在另一侧的强度。
当射线穿过物体时,其强度会随着物体的厚度增加而减弱。
通过测量射线的强度变化,可以计算出物体的吸收系数和相应的厚度。
尽管γ原理在测量物体厚度方面具有一定的优势,但也存在一些限制。
例如,该方法对于较厚或较密的物体来说,射线的穿透性较差,可能无法得到准确的测量结果。
另外,射线的辐射对人体有一定的危害性,需要注意安全使用。
总之,γ原理是一种常用的测量物体厚度的方法,通过测量γ
射线的强度变化,可以推算出物体的厚度。
这种非接触、非破坏性的测量方法在工业生产和科学研究中得到了广泛应用。
LCD Gamma_和色介绍

液晶电视中Gamma 和色和色温温的应用介绍【摘要摘要摘要】本文首先介绍了Gamma 和色温的基本概念, 然后详细介绍了在液晶电视应用中Gamma 和色温校正的实现手段、调整方法及注意事项。
【关键词关键词关键词】伽玛;色温;伽玛校正;液晶电视The The Introduction of Gamma and Color T Introduction of Gamma and Color T Introduction of Gamma and Color Temperature for LCD Television emperature for LCD Television emperature for LCD Television【Abstract AbstractAbstract】This document introduces the basic concepts of gamma and color temperature. In addition, it describes the realization scheme, adjustment methods and possible artifacts of Gamma and color temperature correction in the application of LCD television.【Key words Key wordsKey words】Gamma;Color temperature;Gamma correction;LCD television随着液晶电视价格的不断走低和性能的提高,液晶电视已经越来越受到普通消费者的欢迎,成为一是否购买的主要因素。
接下来,本文将介绍对液晶电视的亮度和色彩有较大影响的Gamma(伽玛) 和色一、什么是 Gamma?Gamma 是用来表征显示器件亮度响应特性的一个参数。
通常显示器件上显示的亮度与输入电平的关系接近一条指数曲线,如图1所示。
gamma校正算法灰度值

gamma校正算法灰度值
Gamma校正是一种非线性操作,用于调整图像的灰度值,使其更符合人眼的视觉特性。
在数字图像处理中,Gamma校正通常用于改善图像的对比度和亮度,使得图像看起来更加自然和舒适。
Gamma校正的原理是基于人眼对亮度的感知是非线性的,即人眼对亮度的感知随着亮度的增加而加速增加,随着亮度的减小而减缓减小。
因此,通过将图像的灰度值进行非线性变换,可以更好地匹配人眼的感知特性,提高图像的可视效果。
在数学上,Gamma校正通常使用以下公式实现:
O=I^gamma
其中 O 是校正后的灰度值,I 是原始灰度值,gamma 是校正系数。
当gamma 大于 1 时,图像的对比度会增强,当 gamma 小于 1 时,图像的
对比度会降低。
在实现上,通常需要将输入的灰度值进行映射变换,以得到校正后的灰度值。
这个映射关系可以用一个曲线来表示,这个曲线就是Gamma校正曲线。
Gamma校正的方法有很多种,包括简单的幂函数、分段函数、多项式函数等。
不同的方法可以适用于不同的场景和需求,需要根据具体情况选择适合的方法。
Gamma校正及其实现

Gamma校正及其实现图2中左图为原图,中图为gamma = 1/2.2在校正结果,原图中左半侧的灰度值较⾼,右半侧的灰度值较低,经过gamma = 1/2.2校正后(中图),左侧的对⽐度降低(见胡须),右侧在对⽐度提⾼(明显可以看清⾯容),同时图像在的整体灰度值提⾼。
右图为gamma = 2.2在校正结果,校正后,左侧的对⽐度提⾼(见胡须),右侧在对⽐度降低(⾯容更不清楚了),同时图像在的整体灰度值降低。
值得⼀提的是,⼈眼是按照gamma < 1的曲线对输⼊图像进⾏处理的。
参考资料:[1] /wiki/Gamma_correction[2] /tutorials/gamma-correction.htm[3] https:///bytefish/opencv/blob/master/misc/tan_triggs.cpp代码:[cpp] view plain copy1. #include <opencv2/core/core.hpp>2. #include <opencv2/imgproc/imgproc.hpp>3. #include <opencv2/highgui/highgui.hpp>4.5. #include <iostream>6.7. using namespace cv;8. using namespace std;9.10. // Normalizes a given image into a value range between 0 and 255.11. Mat norm_0_255(const Mat& src) {12. // Create and return normalized image:13. Mat dst;14. switch(src.channels()) {15. case 1:16. cv::normalize(src, dst, 0, 255, NORM_MINMAX, CV_8UC1);17. break;18. case 3:19. cv::normalize(src, dst, 0, 255, NORM_MINMAX, CV_8UC3);20. break;21. default:22. src.copyTo(dst);23. break;24. }25. return dst;26. }27.28. int main(int argc, const char *argv[]) {29. // Get filename to the source image:30. if (argc != 2) {31. cout << "usage: " << argv[0] << " <image.ext>" << endl;32. exit(1);33. }34. // Load image & get skin proportions:35. //Mat image = imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE);36. Mat image = imread(argv[1], CV_LOAD_IMAGE_COLOR);37. // Convert to floating point:38. Mat X;39. image.convertTo(X, CV_32FC1);40. //image.convertTo(X, CV_32F);41. // Start preprocessing:42. Mat I;43. float gamma = 1/2.2;44. pow(X, gamma, I);45.46.47. // Draw it on screen:48. imshow("Original Image", image);49. imshow("Gamma correction image", norm_0_255(I));50. //imwrite("origin.jpg", image);51. imwrite("gamma_inv2.2.jpg", norm_0_255(I));52. // Show the images:53. waitKey(0);54. // Success!55. return 0;56. }。
武汉精测电子集团股份有限公司昆山Auto Gamma(OLED)说明书

讲师:***武汉精测电子集团股份有限公司C O N T E N T S Gamma 原理01目录OLED 特点02软件框架介绍03硬件框架04小结05认识Gamma校正1、Gamma源于CRT(显示器/电视机)的响应曲线,即其亮度与输入电压的非线性关系。
2、人对自然界刺激的感知,是非线性的,外界以一定的比例加强刺激,对人来说,这个刺激是均匀增长的。
为什么会有gamma:这是和显示设备的原理有关的,所有CRT显示设备都有幂-律转换特性,如果生产厂家不加说明,那么它的γ 值大约等于2.5。
用户对发光的磷光材料的特性可能无能为力去改变,因而也很难改变它的γ值在所有广播电视系统中,γ 校正是在摄像机中完成的。
最初的NTSC电视标准需要摄像机具有γ =1/2.2=0.45的幂函数,现在采纳γ=0.5的幂函数。
也就是说NTSC的片源都在摄像机的时候就做了GAMMA校正,因此得到的图像实际上也是gamma预校正过的。
这有几个好处:一是可以让gamma校正自己完成,可以直接进行显示;另外一个好处就是gamma校正后的曲线有bit压缩作用,带宽可以更小。
举例:以光为例,若在一小黑屋中,点亮了一支蜡烛A,这支蜡烛对屋内的贡献是显著的,在视觉上也感受到极大的明度提升。
但是若是屋内已经点亮了1000支蜡烛,此时再点亮一支蜡烛B的话,从物理能量贡献上,这支新蜡烛B与蜡烛A 的物理贡献是一样大的,但是在人的视觉中,B引起的“明度”变化,远远不如A。
为什么?很好理解:对于某事物,同样的变化量△a,总量少的时候,变化显著,容易被人感知,事物总量大了,再变化同样的△a,就不那么容易被察觉了。
认识OLED1、有机发光二极管(Organic Light-Emitting Diode, OLED)又称为有机电激光显示、有机发光半导体。
由美籍华裔教授邓青云(Ching W.Tang)于1979年在实验室中发现。
OLED显示技术具有自发光、广视角、几乎无穷高的对比度、较低耗电、极高反应速度等优点。
了解伽马(GAMMA、伽马值、光度、灰度系数)

了解伽马(GAMMA、伽马值、光度、灰度系数)来源:pconline 日期:2007—08—26 00:05一. 在哪见过、听说过Gamma?* 还用说,Adobe Gamma* 常听说MAC的默认Gamma是1。
8,PC的是2。
2* 我的显卡驱动程序里有Gamma调节*我下载了一个软件,也可以调节显示器的Gamma* WinDVD播放器带Gamma校正功能* ACDSEE的曝光调节里可以调Gamma* ACDSEE的选项中有Enable Gamma Correction* XV Viewer 能以参数—gamma 2。
2 启动(x window也可以)* PNG文件里有Gamma校正* Photoshop里当然也有* ICC Profile也和Gamma有关?* 摄像头、数码相机、扫描仪?胶片?……中也有提到Gamma的……这些都是怎么回事?图:显卡(驱动程序)上的Gamma设置图:ACDSEE中的曝光调节二. 什么是Gamma?2。
1. 显示器Gamma曲线Gamma可能源于CRT(显示器/电视机)的响应曲线,即其亮度与输入电压的非线性关系。
图:一典型显示器的响应曲线,非常接近指数函数(说明:上图中输入值为数字化的,即通常的RGB值,但可以理解数/模转换是线性的,所以它和输入电压是等效的)归一化后,我们通常可以用一简单的函数来表示:output = input ^ gammagamma就是指数函数中的幂。
图:归一化的Gamma曲线注意上图曲线的一些特性:*端点是不变的,即不管gamma值如何变化,0对应的输出始终是0,1的输出始终是1(这一特性会被用到)。
这可能是gamma又被叫作“灰度”系数的原因吧。
* gamma > 1时,曲线在gamma=1斜线的下方;反之则在上方.另外说明一下,虽然是以显示器作为例子,但可扩展到一般的图像相关的输入/输出设备。
Gamma曲线应该是普遍存在的,即使它不是严格的指数关系,可能还是会这么通称。
白平衡算法——gamma算子

传统CRT:
二、基于伽马变换的图像增强
原理步骤:
归一化
补偿
反归一化
二、伽马变换原理
归一化: y cr , r [0,1]
将像素值转换为 0 ~ 1 之间的实数。 算法如下 :r= ( i + 0. 5)/256 这里包含 1 个除 法和 1 个加法操作。对于像素 A 而言 , 其对应的归一化值为 0. 783203 。
LUT[i] = intTemp; }
二、程序的实现
//单通道 if (resultImage->nChannels == 1) {
for (int i = 0; i < resultImage->height; i++) {
for (int j = 0; j < resultImage->width; j++) {
假设像素值 i=200
1 1 0.4545
gamma 2.2 0.783203 0.894872
二、伽马变换原理
反归一化:
将经过预补偿的实数值反变换为 0 ~ 255 之间的整数值。具体算法为 : f*256 - 0.
5 此步骤包含一个乘法和一个减法运算。续前 例 , 将 A 的预补偿结果 0. 894872
float f = (i + 0.5f) / 255; f = (float)(pow(f, kFactor)); int intTemp = f*255.0f - 0.5f; if(intTemp<0) {
intTemp=0; } else if(intTemp>255) {
intTemp=255; }
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
23 What’s the transfer function of offset printing? 12
24 References 13
2
1 What is brightness?
Grayscale image data is normally based upon luminance. Color image data is normally based upon tristimulus values. Usually, image data is coded nonlinearly: luminance, or tristimulus values, are subject to a nonlinear transfer function that mimics the lightness perception of human vision.
2 Whluminous intensity?
4 What is luminance?
Frequently Asked Questions About Gamma
3
In a grayscale image, each pixel value represents what is loosely called brightness. However, brightness is defined formally as the attribute of a visual sensation according to which an area appears to emit more or less light. This definition is obviously subjective, so brightness is an inappropriate description of, or metric for, image data.
20 How should I adjust my monitor’s BLACK LEVEL and PICTURE CONTROLS? 11
21 Should I do image processing operations on linear or nonlinear image data? 11
In physics, radiant intensity and radiance are integrated across a wide range of wavelengths. In color science, we are interested in power only in the visible band. Radiant intensity, weighted by the spectral sensitivity associated with the brightness sensation of vision, is luminous intensity. It is expressed in units of candelas (cd). The weighting curve is defined numerically and standardized by the CIE; it is called the luminous efficiency of the Standard Observer. It is all-positive, and peaks at about 555 nm.
Table of Contents
1 What is brightness? 3 2 What is intensity? 3 3 What is luminous intensity? 3 4 What is luminance? 3 5 What is lightness? 4 6 What is Value? 4 7 What is luma? 4 8 What is gamma? 4 9 What is gamma correction? 5 10 Does NTSC use a gamma of 2.2? 6 11 Does PAL use a gamma of 2.8? 7 12 I pulled an image off the net and it looks murky. 7 13 I pulled an image off the net and it looks a little too contrasty. 7 14 What is contrast ratio? 8 15 How many bits do I need to smoothly shade from black to white? 8
Luminance is luminous intensity per unit projected area. It is expressed in candelas per meter squared (cd•m-2).
Luminance, denoted Y, is proportional to power; in that sense it resembles intensity. However, its spectral composition is intimately related to the lightness sensitivity of human vision. To learn about the relationship between physical spectra and perceived brightness, and other color issues, refer to the companion Frequently Asked Questions about Color.
Frequently Asked Questions about Gamma
Charles Poynton
/~poynton poynton@
In video, computer graphics, and image processing, the gamma symbol γ
© 1999-12-30 Charles Poynton. All rights reserved.
1 of 13
2
Frequently Asked Questions About Gamma
16 How is gamma handled in video, computer graphics, and desktop computing? 9
This document is available on the Internet from Toronto at: <http:// /~poynton/>
I retain copyright to this note. You have permission to use it, but you may not publish it.
represents a numerical parameter that describes the nonlinear relationship between pixel value and luminance (or what you might loosely call “intensity”). Having a good understanding of the theory and practice of gamma will enable you to get good results when you create, process and display pictures.
Radiant intensity refers to radiant power (flux) in a particular, specified direction. Formally, it is the rate at which radiant energy is transferred, per unit solid angle. Radiant intensity is expressed in watts per steradian (W•sr-1). It is what I call a linear-light measure.
17 Voltage relates to luminance through a 2.5-power function, but how do RGB code values relate to voltage? 10
18 What is the gamma of a Macintosh? 10
19 Does the gamma of CRTs vary wildly? 10
To understand the relationship between pixel values and luminance (or tristimulus values), you must have some familiarity with these terms: radiant intensity, radiance, luminous intensity, luminance, and lightness. If you are familiar with these terms, proceed to What is gamma? in section 8.
Strictly speaking, luminance should be expressed in units such as candelas per meter squared. In practice, luminance is often normalized to 1 or 100 units with respect to the luminance of a specified or implied white reference. For example, a studio broadcast monitor has a white reference whose luminance is about 100 cd•m-2, and Y = 1 refers to this value. So in image science, luminance is more properly called relative luminance. (A different quantity, luma, is often carelessly referred to as luminance, as I will explain below under the question What is luma?)