Koreksi gamma , atau sering hanya gamma , adalah operasi nonlinier yang digunakan untuk menyandikan dan memecahkan kode luminansi atau nilai tristimulus dalam sistem video atau gambar diam. Koreksi gamma, dalam kasus yang paling sederhana, ditentukan oleh ekspresi kuasa hukum berikut:
di mana nilai input nyata non-negatif dinaikkan that pangkat danzikik denotes constant A, untuk mendapatkan nilai output . Dalam kasus umum A = 1 , input dan output biasanya dalam rentang 0-1.
Nilai gamma kadang-kadang disebut pengkodean gamma , dan proses pengkodean dengan non-linear kekuatan-hukum tekan ini disebut kompresi gamma ; sebaliknya nilai gamma disebut decoding gamma dan penerapan non-linear kekuatan hukum ekspansif disebut ekspansi gamma .
Video Gamma correction
Description
Image gamma encoding is used to optimize the use of bits when encoding images, or bandwidth used to transport images, by taking advantage of the non-linear way in which humans perceive light and color. The human perception of brightness, under general illumination conditions (not solid black or brightly lit), follows the predictive power function (note: it has nothing to do with the gamma function), with greater sensitivity to the relative distinction between darker tones than the more lightweight, consistent with the law of Stevens' power for perception of brightness. If images are not gamma-encoded, they allocate too many bits or too much bandwidth to highlight that humans can not distinguish, and too little bit or too little bandwidth to the shadow value that humans are sensitive to and will require more bits/bandwidth to maintain the same visual quality. Gamma encoding of floating-point images is not required (and possibly counterproductive), since the floating-point format already gives a linear approximation of piecewise logarithmic curves.
Although gamma coding was originally developed to compensate for the input-output characteristics of cathode ray tubes (CRTs), which are not the main objectives or advantages of modern systems. In the CRT display, the intensity of light varies non-linearly with the electron-gun voltage. Changing the input signal with gamma compression can cancel this nonlinearity, so that the output image has the desired luminance. However, the gamma characteristics of the display device do not play a factor in coding gamma images and video - they require gamma encoding to maximize the visual quality of the signal, regardless of the gamma characteristics of the display device. The resemblance of CRT physics to the opposite of the gamma encoding required for video transmission is a combination of coincidence and engineering, which simplifies electronics in an early television set.
Maps Gamma correction
General gamma
Konsep gamma dapat diterapkan untuk setiap hubungan nonlinier. Untuk hubungan kekuasaan-hukum , kurva pada plot log-log adalah garis lurus, dengan kemiringan di mana sama dengan gamma (kemiringan diwakili di sini oleh operator turunan):
That is, gamma can be visualized as the slope of the input-output curve when plotted on the logarithmic axis. For the power-law curve, the slope is constant, but the idea can be extended to all types of curves, where gamma (specifically, "gamma point") is defined as the slope of the curve in a given region.
Movie photography
When a photographic film is exposed to light, the exposure results can be represented on a graph showing exposure logs on the horizontal axis, and density, or transmittance logs, on the vertical axis. For the film formulation and the given processing method, this curve is a characteristic or Hurter-Driffield curve. Since both axes use a logarithmic unit, the slope of the linear part of the curve is called a gamma film. Negative films usually have less than 1 gamma; positive film (slide film, reversal film) usually has a gamma greater than 1.
Film photography has a much greater ability to record good color differences than can be reproduced on photo paper. Similarly, most video screens are incapable of displaying a range of brightness levels (dynamic range) that can be captured by ordinary electronic cameras. For this reason, considerable artistic effort is invested in choosing a reduced form in which the original image should be presented. Gamma correction, or contrast selection, is part of the photographic repertoire used to adjust the reproduced image.
Analogously, digital cameras record light using electronic sensors that usually respond in a linear fashion. In the process of rendering raw linear data to conventional RGB data (eg for storage to JPEG image formats), color space transformation and rendering transformation will take place. In particular, almost all standard RGB color space and file formats use non-linear encoding (gamma compression) of the primary color intensity intensity of photo reproduction; In addition, the intended reproduction is almost always non-linearly related to the intensity of the measured scene, through nonlinear tone reproduction.
Windows, Mac, sRGB, and standard gammas TV/video
In most computer display systems, the image is encoded with a gamma of about 0.45 and is decoded with a 2.2 reciprocal gamma. The notable exception, until the release of Mac OS X 10.6 (Snow Leopard) in September 2009, was a Macintosh computer, encoded with 0.55 gamma and translated with gamma 1.8. In any case, binary data in a still image file (such as JPEG) is explicitly encoded (that is, they carry gamma-encoded values, not linear intensity), as are motion picture files (such as MPEG). Optional systems can further manage both cases, through color management, if a better match with the gamma output device is required.
The sRGB color space standard used with most cameras, PCs and printers does not use the simple non-linear legal force as above, but has a gamma decoding value close to 2.2 more than its range, as shown in the plot to the right. Below the compression value of 0.04045 or linear intensity 0.00313, the curve is linear (encoded value is proportional to the intensity), so ? = 1 . The black dashed curve behind the red curve is the standard power-law curve ? = 2.2 , for comparison.
Outputs for CRT-based televisions and monitors typically do not require further gamma correction, since standard video signals transmitted or stored in image files combine gamma compression that provides a pleasant image after the expansion of gamma CRT (not the right inverse). For television signals, the actual gamma values ââare determined by video standards (NTSC, PAL or SECAM), and always fixed and well-known values.
Legal power for video view
A gamma characteristic is the power of attorney close to the relationship between the luma encoded in the television system and the actual desired image lumination.
With this nonlinear relationship, the same steps in the encoded luminance correspond roughly with the same steps subjectively in the brightness. Ebner and Fairchild use 0.43 exponents to convert the linear intensity into luma (neutral) to neutral; reciprocity, approximately 2.33 (close enough to the 2.2 figure cited for a typical display subsystem), was found to provide an approximation of near-optimal perception of gray.
The following illustration shows the difference between the scale and the increase in linearly increased coding signals (linear gamma-compressed luma inputs) and the scale with intensity scale that increases linearly (linear luminant output).
In most displays (which have a gamma of about 2.2), one can observe that the scale of linear intensity has a big jump in the perceived brightness between the intensity values ââof 0.0 and 0.1, while the steps at the higher end of the scale are almost not visible. The gamma-encoded scale, which has an increased non-linear intensity, will show even more steps in perceived brightness.
Sebuah tabung sinar katoda (CRT), misalnya, mengubah sinyal video menjadi cahaya dengan cara nonlinier, karena intensitas senjata elektron (kecerahan) sebagai fungsi tegangan video yang diterapkan tidak linier. Intensitas cahaya I terkait dengan tegangan sumber V s menurut
where ? is a Greek gamma. For CRTs, the gamma connecting brightness to voltage is usually in the range of 2.35 to 2.55; video search tables on computers typically adjust gamma systems up to the range of 1.8 to 2.2, residing in areas that make a uniform encoding difference give uniform perceptual brightness differences, as illustrated in the diagram at the top of this section.
For simplicity, consider an example of a monochrome CRT. In this case, when the video signal 0.5 (representing mid-gray) is fed to the screen, the intensity or brightness is about 0.22 (resulting in mid-gray, about 22% white intensity). Pure black (0,0) and pure white (1.0) are the only colors not affected by gamma.
To compensate for this effect, the inverted transfer function (gamma correction) is sometimes applied to the video signal so that the response is tip to linear edge. In other words, the transmitted signal is deliberately distorted so that, once it is distorted again by the display device, viewers see the correct brightness. Inversion of the above function is:
where V c is the corrected voltage and V s is the source voltage, for example from the image sensor changing the photo charge linearly to voltage. In our CRT example 1/? is 1/2.2 or 0.45.
The color CRT receives three video signals (red, green, and blue) and in general each color has its own gamma value, denoted ? R , ? G or ? B . However, in a simple display system, one value is ? is used for all three colors.
Other display devices have different gamma values: for example, the Game Boy Advance screen has a gamma between 3 and 4 depending on the lighting conditions. In LCDs as in laptop computers, the relationship between signal voltages V s and intensity I is very nonlinear and can not be explained by gamma value. However, the display implements a correction to the signal voltage to get the behavior? = 2.5 standard. In the NTSC television recording, ? = 2.2 .
The power-law function, or the reverse, has an infinite slope of zero. This causes problems in converting from and to the color space of gamma. For this reason, most formally defined color spaces such as sRGB will define a straight-line segment approaching zero and add an increase of x K (where > K is a constant) to a force so that the curve has a continuous slope. This straight line does not represent what the CRT does, but makes the rest of the curve closer to the effect of ambient light on the CRT. In such expressions, the exponent is not gamma; for example, the sRGB function uses 2.4 powers in it, but more resembles a power-law function with exponent 2.2, with no linear part.
Methods for performing gamma correction display in computation
Up to four elements can be manipulated to achieve gamma encoding to improve the image to be displayed on a 2.2- or 1.8-gamma computer screen:
- The pixel intensity value in a given image file; that is, binary pixel values ââare stored in the file in such a way that they represent the intensity of light through the compressed values ââof gamma and not the linear encoding. This is done systematically with digital video files (such as those in DVD movies), to minimize step-decoding of gamma while playing, and maximize image quality for given storage. Similarly, pixel values ââin standard image file formats are usually gamma-compensated, either for gamma sRGB (or equivalent, typical inherited inheritance gammas monitors), or according to some gamma determined by metadata such as ICC profiles. If the gamma coding does not match the gamma of the reproduction system, further correction can be made, either on the display or to create a modified image file with a different profile.
- The render software writes a pixel binary value that is gamma-encoded directly to the video memory (when color/truecolor mode is used) or in the CLUT hardware register (when the indexed color mode is used) from the display adapter. They drive the Digital-to-Analog Converters (DAC) that output a proportional voltage to the screen. For example, when using 24-bit RGB colors (8 bits per channel), write 128 values ââ(midpoints round from range 0-255 bytes) in video memory it's proportional output ? 0.5 voltage to the screen, which is displayed darker due to monitor behavior. Or, to reach ? 50% intensity , a gamma encoded lookup table can be applied to write values ââclose to 187 instead of 128 by rendering software.
- The modern display adapter has dedicated CLUT calibration, which can be loaded once with the appropriate gamma-correction correction table to modify the digitally encoded signal before the DAC generates the voltage to the monitor. Setting up this table to be true is called hardware calibration .
- Some modern monitors allow users to manipulate their gamma behavior (as if it were just another brightness/contrast-like setting), encode their own input signal before it is displayed on the screen. This is also a hardware calibration technique but is done on analogue electrical signals rather than reprinting digital values, as in the previous case.
In properly calibrated systems, each component will have a certain gamma for input and/or encoding the output. Stages can change the gamma to correct different requirements, and eventually the output device will perform decoding or gamma correction as needed, to achieve linear intensity domains. All the coding and correction methods can be superimposed on the ground, without knowing each other these facts between different elements; if done incorrectly, this conversion may cause highly distorted results, but if done correctly as specified by the standards and conventions will lead to a well-functioning system.
In a common system, for example from a camera via a JPEG file to display, the role of gamma correction will involve several parts that work together. The camera encodes images displayed into JPEG files using one of the standard gamma values ââsuch as 2.2, for storage and transmission. The display computer can use a color management machine to convert to a different color space (such as the space = 1.8 long before entering the pixel values ââinto its video memory. the gamma correction itself to match the gamma CRT to that used by the video system Coordinate the components through a standard interface with standard gamma standard values ââallows to get the system properly configured.
Simple monitor test
To see if one's computer monitor is set up correctly and can display the shadow details in the sRGB image correctly, they should see the left half of the circle in the big black box very faintly but the right half should be clearly visible. Otherwise, one can adjust the contrast and/or brightness settings of their monitor. This changes the gamma that the monitor perceives. The picture is best viewed against a black background.
This procedure is not suitable for monitor calibration or printing. This can be useful for making the monitor display sRGB images roughly correctly, on systems where profiles are not used (for example, Firefox browsers before version 3.0 and many others) or in systems that assume unsaved source images are in the sRGB color space.
On some operating systems running the X Window System, one can set the gamma correction factor (applied to existing gamma values) by issuing the xgamma -gamma 0.9
command to set the gamma correction factor to 0.9, and < code> xgamma to ask the current value of that factor (default is 1.0). In OS X systems, gamma and other related screen calibrations are made through System Preferences. Microsoft Windows versions prior to Windows Vista lacked calibration tools developed by the first party.
In the test pattern to the right, the linear intensity of each solid bar is the average of the linear intensity around the striped stripes; Therefore, ideally, the solid squares and merges will look as bright in a well-adjusted sRGB system.
Terminology
Intensity refers to the amount of light emitted per unit of time and per unit of surface, in units of lux. However, it should be noted that in many fields this quantity science is called the expenditure of light, as opposed to the intensity of light, which is a different quantity. These differences, however, are largely irrelevant for gamma compression, which applies to any kind of normalized linear intensity scale.
"Luminance" can mean several things even in video and imaging contexts:
- luminance is the photometric brightness of an object, taking into account the wavelength-dependent sensitivity of the human eye (in units of cd/mÃ,ò);
- relative luminance is the luminance relative to the white level, used in color-space coding;
- luma is the encoded video brightness signal, that is, similar to the signal voltage V S .
One contrast of luminance is relative in terms of color (no gamma compression) with luma in video meaning (with gamma compression), and shows relative luminance by Y and luma by Y , the main symbol (?) that shows gamma compression. Note that luma is not calculated directly from luminance, it is a weighted (somewhat arbitrary) number of RGB components that are compressed gamma.
Likewise, brightness is sometimes applied to a variety of sizes, including light levels, although it is more appropriate for subjective visual attributes.
Gamma correction is a type of legal force function whose exponent is Greek gamma (? ). Should not be confused with Gamma mathematical functions. Gamma lowercase, ? , is a parameter of the former; uppercase letters,?, are the last (and used) symbols (as in? ( x )). To use the word "function" in relation to gamma correction, one can avoid confusion by saying "the function of common law powers."
Without context, values ââthat are labeled gamma can be either coding or decoding values. Attention must be taken to correctly interpret the value as would be applied-for-compensation or compensated-by-applying its inverse. In common language, on many occasions the decoding value (such as 2.2) is used as if it is an encoding value, not the reverse (1/2 in this case), which is a real value which should be applied to encode gamma.
See also
References
External links
General information
- Gamma Rehabilitation by Charles Poynton
- Frequently Asked Questions about Gamma
- CGSD - Gamma Correction Page Page by Computer Graphics Systems Development Corporation
- Stanford University CS 178 Flash interactive demo about gamma correction.
- Standard Color Standard Space for Internet - sRGB, defines and describes view gamma , gamma camera , gamma CRT , gamma LUT and show gamma
- Alvy Ray Smith (September 1, 1995). Gamma Correction (PDF) (Technical Memo 9). Microsoft.
Monitor gamma device
- Lagom LCD monitor's testing page
- Gamma adjustment page
- Monitor the test pattern for correct gamma correction (by Norman Koren)
- QuickGamma
Source of the article : Wikipedia