Dynamic range and photographic latitude. Dynamic range and its practical significance

Dynamic range - in fact, the difference in the values ​​of the camera sensor, the resulting details in bright light and in the absence of light. When it comes directly to the photography process, as a rule, dynamic range values ​​​​are measured in exposure units ( EV). Dynamic range is also something you have to deal with when accessing different photographic file formats. Here, the dynamic range characteristic is determined based on the type of data for a particular file format and the goals pursued during the shooting process. For example, for the jpeg format, dynamic range values ​​are determined based on 8-bit gamma - an adjusted color representation standard sRGB. In this case, for the jpeg format, the dynamic range value is 11.7EV. If we take another format - Rediance HDR, here the dynamic range value is already approaching 256EV.

Often the term in question refers to any difference in the ratio of brightness signals during the photography process. Let’s say the difference in the ratios of the brightness signals of the lightest and darkest tones, the difference in the ratios of the brightness signal of the white and black fields on photographic paper, the difference in the ratios of the optical densities of photographic film, etc. In each specific case, the dynamic range characteristic, in terms of the number of bits required to generate information, should also be considered from different points of view. For example, a digital-to-analog converter of a camera with 10, 12, 14 bits, as a rule, reads values ​​​​on a linear scale, and in cases with photographic file formats, gamma-corrected standard values ​​are used. There are often quite a few individual nuances when the dynamic range measured by the computer format of representing numbers (half-precision numbers) is somewhat wider than the range represented by integers, despite the fact that in both cases we are talking about 16 bits.

Modern photographic cameras and films do not have enough dynamic range to be able to convey any scene without distortion. The disadvantage is especially noticeable when using compact digital cameras and color reversible films. Many modern digital cameras provide bracketing to the user, but are often unable to accurately capture bright landscapes with shadowy objects in daytime shooting conditions. However, the problems of lack of dynamic range are completely solvable. For this purpose, the following are used: correction of illumination of objects, provision of artificial lighting, installation of special operating modes of cameras and other methods. You can also compensate for the lack of dynamic range without taking into account changes in lighting, scene, or angle. In this option, they increase the dynamic range of camera sensors or resort to a combination of images captured from different meanings exposition. The depth of the dynamic range depends on the size of the matrix, the larger it is, the more details On the photo.

Meanwhile, each of the two noted options requires taking into account some points:

Use a specific file format to record an image with a wider brightness range. These formats today include: OpenEXP, Radiance HDR, Photoshop, RAW , Microsoft HD Photo.

Application of the method tone mapping in the process of producing images and photographs, to obtain images with a wide dynamic range.

Using the method tone mapping for the purpose of nonlinear changes in the brightness of individual pixels.

The latest tone mapping technique is now widely used for processing images with a small range of brightness values. Using the tone mapping method, it is possible to increase the local contrast value for such images. Meanwhile, many professional photographers are quite skeptical about the tone mapping technique, considering this method dynamic range expansion " fantastic" The thing is that as a result of processing, the result is, so to speak, photograph 4000 in an image close to the style of images for computer games.

photosensitive sensors of cameras. In this regard, it was also said about the so-called. (film or matrix does not matter).

Now consider the concept dynamic range from a physical point of view, i.e. based on the design of the matrix of a digital camera.

Dynamic range of the CCD matrix.

In order for the sensor to be sensitive to a wide range of illumination of the subject being photographed, i.e., to be able to reproduce both its dark (shadow) sides and light (brightness) sides adequately and proportionally, each pixel must have a potential well of sufficient capacity. Such a potential well should be capable of holding a minimum charge when exposed to light from a dimly illuminated part of the object, and at the same time could accommodate a large charge if the illumination of part of the object is high.

This ability of a potential well to accumulate and hold a charge of a certain magnitude is called the depth of the potential well. It is the depth of the potential well that is determined by the matrix.


Schematic illustration of lateral drainage.

The use of drainage leads to a more complex design of CCD elements, but this is justified by the damage that is caused to the image due to blooming.

Another problem that worsens the quality of the image obtained by a CCD matrix is ​​the so-called. stuck pixels (stuck pixels), we often call them “broken”. These pixels appear at any shutter speed, unlike noise, which is chaotic in nature, and are localized in the same place. They are associated with poorly manufactured CCD elements, in which, even with a minimum illumination time, an avalanche-like breakdown of electrons into a potential well occurs. They appear in each picture in the form of dots that differ significantly in color from those located nearby.

Dynamic range in photography describes the relationship between the maximum and minimum measurable light intensity (white and black, respectively). In nature, there is no absolute white or black - only varying degrees of intensity of the light source and the reflectivity of the object. Because of this, the concept of dynamic range becomes more complex and depends on whether you are describing a recording device (such as a camera or scanner), a playback device (such as a print or computer display), or the object itself.

As with color management, each device in the image chain above has its own dynamic range. In prints and displays, nothing can get brighter than the whiteness of the paper or the maximum pixel intensity, respectively. In fact, another device that was not mentioned above is our eyes, which also have their own dynamic range. Transferring image information between devices in this way may affect its playback. Therefore, the concept of dynamic range is useful for relative comparison the original scene, your camera, and the image on your screen or print.

Effect of light: illumination and reflection

Scenes with high variations in reflected light luminance, such as those containing black objects in addition to strong reflections, may actually have a higher dynamic range than scenes with large variations in incident light. In any of these cases, photos can easily exceed your camera's dynamic range, especially if you don't keep an eye on the exposure.

Accurate measurement of light intensity, or illuminance, is therefore critical to assessing dynamic range. Here we use the term illuminance to define purely incident light. Both illuminance and brightness are usually measured in candelas per square meter(cd/m2). Approximate values ​​for commonly encountered light sources are given below.

Here we see that large variations in incident light are possible since the above diagram is graduated in powers of ten. If the scene is unevenly lit, both directly and diffusely sunlight, this alone can incredibly expand the dynamic range of a scene (as seen in the example of a canyon sunset with a partially lit rock).

Digital cameras

Although physical meaning Dynamic range in the real world is simply the ratio between the most and least illuminated areas (contrast), and its definition becomes more complex when describing measuring instruments such as digital cameras and scanners. Recall from the article on digital camera sensors that light is stored by each pixel in a kind of thermos. The size of each thermos, in addition to how its contents are judged, determines the dynamic range of a digital camera.

Photopixels hold photons the way thermoses hold water. Therefore, if the thermos overfills, the water spills out. An overcrowded photo pixel is called saturated, and it is unable to recognize further incoming photons - thereby determining the camera's white level. For an ideal camera, its contrast would then be determined by the number of photons that can be accumulated by each photo pixel, divided by the minimum measurable light intensity (one photon). If 1000 photons can be stored in a pixel, the contrast will be 1000:1. Since a larger cell can store more photons, DSLR cameras typically have greater dynamic range than compact cameras(due to larger pixel size).

Note: Some digital cameras have an optional low ISO setting that reduces noise but also reduces dynamic range. This is because this setting actually overexposes the images by one stop and subsequently cuts brightness - thereby increasing the light signal. An example is many Canon cameras, which have the ability to shoot at ISO 50 (lower than the usual ISO 100).

In reality, consumer cameras cannot count photons. Dynamic range is limited to the darkest tone for which texture can no longer be discerned - this is called black level. Black level is limited by how accurately the signal in each photo pixel can be measured and is therefore limited below by noise. As a result, dynamic range tends to increase as the ISO speed decreases and for cameras with lower measurement uncertainty.

Note: Even if a photo pixel could count individual photons, the count would still be limited by photon noise. Photon noise is created by statistical fluctuations and represents the theoretical minimum noise. The resulting noise is the sum of photon noise and readout error.

In general, the dynamic range of a digital camera can thus be described as the ratio between the maximum (at pixel saturation) and minimum (at readout error) measurable light intensity. The most common unit of measurement for dynamic range in digital cameras is the f-stop, which describes the difference in brightness in powers of 2. A contrast of 1024:1 in this case can also be described as a dynamic range of 10 f-stops (since 2 10 = 1024). Depending on the application, each f-stage may also be described as a "zone" or "eV".

Scanners

Scanners are rated on the same saturation-to-noise ratio as the dynamic range of digital cameras, except they are described in terms of density (D). This is convenient because it is conceptually similar to how pigments create color in a print, as shown below.

Total dynamic range in terms of density thus looks like the difference between the maximum (D max) and minimum (D min) pigment densities. Unlike powers of 2 for f-stops, density is measured in powers of 10 (same as the Richter scale for earthquakes). Thus, a density of 3.0 represents a contrast of 1000:1 (since 10 3.0 = 1000).

Original dynamic
range

Dynamic
scanner range

Instead of specifying a density range, scanner manufacturers usually specify only the Dmax value, since Dmax - Dmin is usually approximately equal to Dmax. This is because, unlike digital cameras, the scanner controls its light source, ensuring minimal flare.

For high pigment densities, scanners are subject to the same noise limitations as digital cameras (since they both use an array of photopixels for measurement). Thus, the measurable Dmax is also determined by the noise present in the process of reading the light signal.

Comparison

Dynamic range varies so widely that it is often measured on a logarithmic scale, similar to how extremely different earthquake intensities are measured on a single Richter scale. This is the maximum measurable (or reproducible) dynamic range for various devices in any preferred units (f-stops, density and contrast ratio). Hover over each option to compare them.

Select range type:
Seal Scanners Digital cameras Monitors

Note the huge difference between the reproducible dynamic range of printing and that measured by scanners and digital cameras. Compared to the real world, this is the difference between about three f-stops on a cloudy day with almost flat reflected light, and 12 or more f-stops on a sunny day with high-contrast reflected light.

The above figures should be used with caution: in reality, the dynamic range of prints and monitors is highly dependent on lighting conditions. Prints in the wrong lighting may not show their full dynamic range, while monitors require near-total darkness to realize their potential - especially plasma screens. Finally, all of these numbers are just rough approximations; actual values ​​will depend on the operating time of the device or the age of the print, model generation, price range, etc.

Please note that the contrast of monitors is often very high, since there is no manufacturer standard for them. Contrast ratios over 500:1 are often the result of a very dark black point rather than a brighter white point. In this regard, you need to pay attention to both contrast and brightness. High contrast without accompanying high brightness can be completely negated even by diffuse candle light.

Human eye

The human eye can actually perceive a wider dynamic range than is typically possible with a camera. Considering situations in which our pupils dilate and contract to adapt to changes in light, our eyes are capable of seeing over a range of almost 24 f-stops.

On the other hand, for a fair comparison with a single shot (with constant aperture, shutter speed and ISO), we can only consider the instantaneous dynamic range (with constant pupil width). For a complete analogy, you need to look at one point in the scene, let your eyes adapt and not look at anything else. In this case, there is a lot of inconsistency because the sensitivity and dynamic range of our eyes changes depending on brightness and contrast. The most likely range would be 10-14 f-stops.

The problem with these numbers is that our eyes are extremely adaptive. For extremely dim starlight situations (where our eyes use rods for night vision), they achieve even wider instantaneous dynamic ranges (see "Color perception of the human eye").

Color depth and dynamic range measurement

Even if someone's camera could cover most dynamic range, the precision with which light measurements are converted into numbers can limit the usable dynamic range. The workhorse that converts continuous measurements into discrete numerical values ​​is called an analog-to-digital converter (ADC). The accuracy of an ADC can be described in terms of bit depth, similar to the bit depth of digital images, although it should be remembered that the concepts are not interchangeable. The ADC produces values ​​that are stored in a RAW file.

Note: The above values ​​only reflect the accuracy of the ADC and should not
used to interpret results for 8 and 16-bit image files.
Further, for all values ​​the theoretical maximum is shown, as if there was no noise.
Finally, these figures are only valid for linear ADCs, and the bit capacity
nonlinear ADCs do not necessarily correlate with dynamic range.

As an example, 10 bits of chroma depth is converted to a range of possible luminances of 0-1023 (since 2 10 = 1024 levels). Assuming that each value at the ADC output is proportional to the actual image brightness(that is, doubling the pixel value means doubling the brightness), 10-bit can provide a contrast ratio of no more than 1024:1.

Most digital cameras use 10- to 14-bit ADCs, so their theoretically achievable maximum dynamic range is 10 to 14 stops. However, such a high bit depth only helps to minimize image posterization, since the overall dynamic range is usually limited by noise levels. Just as high bit depth in an image does not necessarily imply greater color depth, having a high-precision ADC in a digital camera does not necessarily mean it is capable of recording a wide dynamic range. In practice, the dynamic range of a digital camera does not even approach the theoretical maximum of the ADC; basically 5-9 stops is all you can expect from a camera.

Effect of Image Type and Color Curve

Can digital image files really capture the full dynamic range of high-end instruments? There is a great deal of misunderstanding on the Internet about the relationship between image depth and recorded dynamic range.

First, we need to figure out whether we are talking about recorded or displayed dynamic range. Even a regular 8-bit JPEG file can conceivably record infinite dynamic range - assuming a chroma curve was applied during conversion from RAW (see the article on applying curves and dynamic range) and the ADC has the required bit depth. The problem lies in the use of dynamic range; if too few bits are spread over too large a range of color, it can result in posterization of the image.

On the other hand, the displayed dynamic range depends on the gamma correction or color curve implied by the image file or the graphics card and monitor used. Using gamma 2.2 (the standard for personal computers), it would be theoretically possible to convey a dynamic range of almost 18 f-stops (the chapter on gamma correction will cover this when written). Even so, he might suffer from severe posterization. The only standard solution today for achieving virtually infinite dynamic range (without visible posterization) is to use high dynamic range (HDR) files in Photoshop (or another program, for example, that supports the OpenEXR format).

Recently, more and more original images have appeared on the Internet, visually very atypical - colorful, extremely detailed, reminiscent of either paintings by realist artists or high-quality illustrations for hand-drawn cartoons. Since its inception, the abbreviation HDR has firmly entered into the everyday life of virtual regulars, having received the transliteration HDR in their jargon. Those who did not know its meaning echoed the experts, carefully writing out capital letters so as not to confuse the KhDR with the GDR or, for good measure, with the KGB. Well, meanwhile, the experts themselves were promoting this new direction in photography with might and main, creating blogs, discussing in forums, and most importantly, posting in online galleries. Actually, what was hidden behind this abbreviation was what made advertising best in itself. Some called hyperreal images a contagious disease, others - evidence of the degeneration of classical photography, and others - a progressive expression of advanced trends in modern digital art.

The debate continues to this day, taking even more extreme forms. True, skeptics of the success and authenticity of the new direction are gradually beginning to accept things as they are. And HDR apologists name the century-old experimenters Man Ray and Laszlo Moholy-Nagy as hypothetical propagandists of the new performance technique, who, if they were alive in our time, would definitely come up with something similar. The point of view of one of the famous HDR photographers, Jesper Christensen, is interesting: “New technical capabilities of modern visual media, including photography, invariably entail attempts and searches by authors in directions corresponding to their spirit for new forms of artistic expression. Moreover, interweaving at the technical level also gives rise to confusion at the plot and aesthetic levels. Hybrid images like HDR are no longer just a phenomenon of our time, but clearly the dominant trend of the future.” But we will probably return to the moral and aesthetic aspects of the topic in the future.
publications In the meantime, we will touch upon, first of all, theoretical foundations and the practical side of obtaining HDR images.

Dynamic range problem

Without theory - nowhere. But we will try to present it in accessible terms. So, the English term HDR contains a qualitative definition of one concept that has long been familiar to us - dynamic range (the literal translation of HDR is “high dynamic range”). Let's break it down piece by piece, starting with the key definition - “high”. What is dynamic range? Surely our regular readers imagine it at least in general terms. Now it's time to get into the details. That's right, DD in photography characterizes the relationship between the maximum and minimum measurable light intensity. But in the real world there is no pure white or pure black, but only different levels of intensity of light sources, varying down to infinitesimal values. Because of this, the DD theory becomes more complicated, and the term itself, in addition to characterizing the real ratio of the illumination intensity of the photographed subject, can be applied to the description of color gradations reproduced by devices for recording visual information - cameras, scanners, or its output devices - monitors, printers.

Man came into this world completely self-sufficient; he is an ideal “product” of evolutionary natural development. In relation to photography, this is expressed in the following: the human eye is able to distinguish a range of light intensity ranging from 10-6 to 108 cd/m2 (candelas per square meter; candela is a unit of measurement of light intensity equal to the intensity of light emitted in a given direction source of monochromatic radiation with a frequency of 540x1012 Hz, which in turn corresponds to the frequency of green color).

It is interesting to look at the following values: the intensity of pure starlight is only 10-3 cd/m2, the intensity of sunset/dawn light is 10 cd/m2, and the intensity of a scene illuminated by direct daylight is 105 cd/m2. The brightness of the sun is approaching a billion candelas per square meter. meter. Thus, it is obvious that the abilities of our vision are simply phenomenal, especially if we contrast them with the capabilities of the information output devices we have invented, such as CRT monitors. After all, they can correctly transmit images with an intensity of only 20 to 40 cd/m2. But this is for general information - for warm-up and comparison. However, let's return to dynamic range, which concerns us digital photographers the most. Its width directly depends on the size of the camera sensor cells.

The larger they are, the wider the DD. In digital photography, f-stops (often referred to as EV) are used to describe its magnitude, each of which corresponds to a doubling of the light intensity. Then, for example, a scene with a contrast level spread of 1:1024 will contain 10 f-stops of dynamic range (210-1024). A SLR digital camera reproduces a DD equal to 8-9 f-stops, plasma TV panels - up to 11, and photo prints can hold no more than 7 f-stops. Whereas the ratio of maximum and minimum contrast for a completely typical scene - bright daylight outside the window, dense partial shade in the room - can reach 1:100,000. It is easy to calculate that this will correspond to 16-17 f-stops. By the way, the human eye simultaneously perceives a contrast range of 1:10,000. Since our vision separately records the intensity of lighting and its color, the gamut of light available to the eye at the same time is 108 (10,000 shades of brightness multiplied by 10,000 shades of color).

Bit depth issues

Please note that the word “color” crept into our conversation, joining the concepts of “intensity” and “contrast”. Let's see what it is in the context of dynamic range. Let's move to the pixel level. Generally speaking, each pixel in an image has two main light characteristics - intensity and color. It's clear. How to measure the number of unique colors that make up the color scheme of a photo? Using bit depth - the number of zeros and ones, bits used to represent each of the colors. When applied to a black and white image, the bit depth determines the number of shades of gray. Pictures with a higher bit depth can capture a greater number of shades and colors because they contain more combinations of zeros and ones. Each color pixel in a digital image represents a specific combination of three colors - red, green and blue, often referred to as color channels. The range of their color intensity is specified in bits per channel.

At the same time, bits per pixel (English abbreviation - bpp) refers to the total amount of bits available in the three channels and actually represents the number of colors in one pixel. For example, when recording color information in 8-bit JPEGs (24 bits per pixel), eight zeros and ones are used to characterize each of the three channels. The intensity of blue, green and red colors is indicated by 256 shades (gradations of intensity). The number 256 is successfully encoded in binary and equals 2:8. If you combine all three colors, then one pixel of an 8-bit image can be described by 16,777,216 shades (256?256?256, or 224). Researchers have found that 16.7 million shades are quite enough to convey photographic quality images. Hence the familiar “true color”. Whether the image will be considered to have a wider DD or not, according to by and large depends on its number of bits per color channel. 8-bit images are considered LDR (low dynamic range) images. 16-bit images obtained after RAW conversion are also classified as LDR. Although their theoretical DD could be 1:65,000 (216). In fact, the RAW images produced by most cameras have a DD of no more than 1:1000. In addition, RAW conversion uses one standard tonal curve, regardless of whether we convert the files to 8- or 16-bit images. Therefore, when working with 16 bits, you will get more clarity in determining shades/gradations and intensity, but you will not get a “gram” of additional DD. To do this, you will need already 32-bit images - 96 bits per pixel! We will call them High Dynamic Range Images - HDR(I).

Solution to all problems

High dynamic range shots... Let's dive into bit theory again. The familiar RGB model is still a universal model for describing images. Color information for individual pixels is encoded as a combination of three numbers corresponding to shade intensity levels. For 8-bit images it will range from 0 to 255, for 16-bit images it will be from 0 to 65,535. According to the RGB model, black is represented as “0,0,0”, that is, a complete absence of intensity, and white - as “255, 255, 255”, that is, the color with the maximum intensity of the three primary colors. Only integer numbers are allowed in the encoding. Whereas the use of real numbers - 5.6 or 7.4, and any fractional floating point numbers, is simply unacceptable within the RGB model. It is on this contradiction that the invention of one of the American computer geniuses Paul Debevec. In 1997, at the annual conference of specialists in the field of computer graphics SIGGRAPH, Paul outlined the key points of his new scientific work, covering ways to extract high dynamic range maps from still images and integrate them into rendered scenes using the new Radiance graphics package. It was then that Paul first suggested shooting the same scene multiple times with varying exposure values ​​and then combining the images into one HDR image. Roughly speaking, the information such images contain corresponds to the physical quantities of intensity and color. Unlike traditional digital images, which consist of colors understood by output devices - monitors, printers.

Specifying illumination values ​​as real numbers theoretically removes any restrictions on dynamic range output. Skeptics might ask, for example, why not just add more and more bits, covering the most extreme range of light and tonal contrast? The fact is that in pictures with a narrow DD for presentation light colors A significantly larger number of bits are used than for dark ones. Therefore, as bits are added, the portion of those that go towards a more accurate description of the above tones will increase proportionally. And the effective DD will remain virtually unchanged. In contrast, floating point numbers, being linear quantities, are always proportional to the actual brightness levels. Due to this, the bits are evenly distributed throughout the entire DD, and not just concentrated in the area of ​​light tones. In addition, such numbers record the values ​​of tones with constant relative accuracy, because the mantissa (digital part), say, of 3.589?103 and 7.655?109, is represented by four digits, although the second is two million times larger than the first.

The extrabits of HDR images allow an infinitely wide range of brightness to be conveyed. Everything could be ruined by monitors and printers that do not recognize the new HDR language - they have their own fixed brightness scale. But smart people have come up with a process called “tone mapping” - tone mapping or mapping (literally - creating a map), when a 32-bit HDR file is converted into an 8- or 16-bit one, adjusted to the more limited DD of display devices. Essentially, the idea of ​​tone mapping is based on solving the problem of loss of detail and tonality in areas of maximum contrast, expanding them in order to convey the comprehensive color information contained in a 32-bit digital image.

Where does successful HDR begin?

One of our four today's heroes, the Italian Gianluca Nespoli, knows very well about tonal comparisons. He is perhaps the most technically savvy. In addition to Photoshop, he enthusiastically experiments with other professional graphics packages, including some that are specifically designed to optimize HDR results. First of all, this is Photomatix. The program, combining several images with different exposures, creates a 32-bit file with an extended DD, and then subjects it to tone mapping, using one of two algorithms, also called operators: global or local. The global operator matching process boils down to summarizing pixel intensities along with tonal and other image characteristics. In the work of the local operator, in addition, the location of each pixel in relation to the others is also taken into account. In principle, the function of generating HDR images, along with the accompanying “tone mapping”, is also implemented in Photoshop CS2. It is quite enough for the tasks that are being implemented by the Dane Christensen and the young photo artist from St. Petersburg, Mikaella Reinries. Our fourth hero, Gustavo Orenstein, still hasn’t decided which working tool to give preference to, and therefore is inclined to experiment with new software HDR resources.

Below we will look practical nuances working with each of the two main programs, summarizing the recommendations received from these new wave of photo illustrators. For now, let’s figure out what source material is needed to obtain images with extended DD. Obviously, without several pictures with different meanings exposure is indispensable. Will one “raw” RAW be enough? Not really. The total DD obtained after converting even the largest RAW image with different exposure levels cannot be wider than the dynamic range that your camera reproduced. It's the same as cutting a DD image in RAW mode into several parts.

“Raw” files are encoded at 12 bits per channel, corresponding to a contrast spread of 1:4096. And only because of the inconvenience of 12-bit encoding, TIFF images obtained from RAW are assigned 16 bits per channel. You can still somehow get by with RAW alone, if we are not talking about a high-contrast scene. Shooting several frames intended for further combining into one requires compliance with certain procedures for setting exposure parameters, and even the physical installation of the camera itself. In principle, both Photoshop and Photomatix correct minor inconsistencies when superimposing pixel arrays on top of each other, which arise in photographs from the exposure series due to the lack of proper camera fixation. Moreover, it is often very short excerpts and the good shooting speed of the device in automatic bracketing mode (which is especially important if the object in the frame moves) allows you to compensate for possible perspective distortions. But it is still highly desirable to reduce them to nothing, and for this the camera will need reliable support in the form of a good tripod.

Jesper Christensen carries an ultra-light Gitzo carbon fiber tripod everywhere he goes. Sometimes, for greater stability, he hangs a bag from its central column, does not touch the shutter button using the remote control or self-timer, and blocks the mirror of his Canon 20D. In the camera settings, the main thing, in addition to maintaining a constant aperture for all shots that will make up the future HDR image, is to determine their number and exposure range. First, using your camera's spot meter, if you have one, take a reading of the light levels in the darkest and lightest areas of the scene. It is this DD spectrum that you need to record using several exposures. Set ISO sensitivity to its minimum. Any noise from the tone mapping process will be emphasized even more. We have already talked about the diaphragm. The more contrast the scene, the shorter the exposure interval between shots should be. Sometimes you may need up to 10 frames at 1 EV intervals (each exposure unit corresponds to a doubling of the light level). But, as a rule, 3-5 RAW frames, differing from each other by two stops of illumination, are enough. Most mid-range cameras allow you to shoot in exposure bracketing mode, allowing three frames within the +/-2 EV range. The auto bracketing feature can easily be fooled into shooting in a range that is twice as wide. This is done like this: select a suitable central exposure, and before shooting three set frames, set the exposure compensation value to -2 EV. After working them out, quickly move the compensation slider to the +2 EV mark and fire another burst of three frames. This way, after removing the duplicated center exposure, you'll be left with five frames covering the area from +4 EV to -4 EV. The DD of such a scene will approach 1:100,000.

from Photoshop to the world of HDR

With Photoshop available to everyone, high dynamic range images are also accessible. In the Tools menu there is a Merge to HDR command. This is where the path to a presentable HDR image begins. At first, all your combined exposures will appear as one photo in the preview window - this is already a 32-bit image, but the monitor is not yet able to display all its advantages. Remember, a "dumb" monitor is just an 8-bit output device. He, like a careless schoolboy, needs to sort everything into place. But the histogram in the right corner of the window has already stretched out promisingly, becoming like a mountain peak, which speaks of all the DD potential contained in the newly created image. The slider at the bottom of the histogram allows you to see details in a particular tonal range. At this stage, in no case should you set the bit depth to less than 32. Otherwise, the program will immediately cut off the shadows and lights, for the sake of which, in fact, all this fuss.

Having received your go-ahead to create the next HDR miracle, Photoshop will generate an image, opening it in the main working window of the program. The response speed of its algorithms will depend on the power of your processor and the volume random access memory computer. However, with all the terrifying prospects of getting something very massive, multi-megabyte output, a 32-bit HDR (assuming it is assembled from, for example, three images) will only “weigh” about 18 MB, as opposed to a single 30 MB standard TIFF 'u.

In fact, up to this point our actions have been only part preparatory stage. Now it's time to initiate the process of matching the dynamic ranges of the resulting HDR image and the monitor. 16 bits per channel in the Mode menu is our next step. Photoshop performs tone mapping using four various methods. Three of them - exposure and gamma, highlight compression and histogram equalization - utilize less sophisticated global operators and allow you to manually adjust only the brightness and contrast of a photo with an extended DD, narrow the DD, trying to maintain contrast, or cut the highlights so that they fall into the range brightness of a 16-bit image.

The fourth method is of greatest interest - local adaptation. Michaela Reinries and Jesper Christensen work with him. Therefore, a little more about it. The main tool here is the tone curve and brightness histogram. By shifting the curve broken by anchor points, you can redistribute the contrast levels throughout the DD. You will probably need to define multiple tonal areas instead of the traditional division into shadows, midtones, and highlights. The principle of setting this curve is absolutely identical to that on which Photoshop's Curves tool is based. But the functions of the Radius and Threshold sliders in this context are very specific. They control the level of change in local contrast - that is, they improve detail on the scale of small areas of the image. While the curve, on the contrary, adjusts the DD parameters at the level of the entire image. The radius specifies the number of pixels that the tone mapping operator will consider local. For example, a radius of 16 pixels means that the contrast adjustment areas will be very tight. Tonal shifts will take on a clearly noticeable, overly processed character; the HDR image, although it will bloom with a wealth of details, will appear completely unnatural, devoid of even a hint of photography. A large radius is also not a solution - the picture will turn out more natural, but rather boring in terms of details, devoid of life. The second parameter - threshold - sets the limit for the difference in brightness of neighboring pixels, which will allow them to be included in the same local contrast adjustment area. The optimal threshold value range is 0.5-1. After mastering the above components, the “tone mapping” process can be considered successfully completed.

With Photomatix into the world of HDR

Especially for everyone who needs photographs with a very wide DD in 2003, the French came up with the Photomatix program, latest version which is available for free download today (it’s fully functional, it just leaves its own “watermark” on the image). Many fans of HDR seeding consider it more efficient when it comes to adjusting the tonality and intensity of a 32-bit image with the reduced bit depth parameters of output devices. The Italian Gianluca Nespoli also belongs to them. Here are his words: “HDR pictures generated by this program are distinguished by better detail of the sky and trees, they do not look too “plastic”, they show more high level contrast and color tone. The only negative of Photomatix is ​​the enhancement, along with all the advantages and some disadvantages of the image, such as noise and JPEG compression artifacts.” True, the developer company MultimediaPhoto SARL promises to eliminate these nuances, and in addition, with the same noise, for example,
Programs like Neat Image do a good job.

In addition to tone mapping capabilities, Photomatix has several additional exposure level settings, and its tone mapping algorithm can even be applied to 16-bit TIFFs. Just like in Photoshop, you first need to create a 32-bit HDR connection from individual shots with varying exposures. To do this, the program has the Generate HDR option. Confirm your exposure values, select a standard tonal curve (recommended) and Photomatix is ​​ready to present you with its version of the HDR image. The file will weigh about the same as the Photoshop version, and will have the same extension - .hdr or .exr - under which it can be saved before the tone mapping process begins. The latter is initiated by selecting the appropriate command in the main menu of the HDRI program. Its working window contains many different settings that can lead to confusion. In fact, there is nothing complicated here. The histogram shows the distribution of brightness of an image passed through tone mapping. The Strength slider determines the level of local contrast; the Luminosity and Color Saturation parameters are responsible for brightness and color saturation, respectively. The cutoff points for the light and dark areas of the histogram can be left at their default values. Photomatix offers just four contrast smoothing settings, as opposed to Photoshop's more precise settings ranging from 1 to 250. In truth, this level of control isn't always desirable. It is unlikely that a non-professional would care about the difference that will be present between the values ​​of the smoothing radius, say, 70, 71 and 72. Microcontrast adjustment refers to the local level, however, in the case of images that are initially noisy or saturated with all kinds of artifacts, it should not be overused.

When "tone mapping" reconciles the monitor with the HDR image...

...you can use your previous skills in handling Photoshop and edit the HDR image at your own taste, peril and risk. Remember, so far the attitude of the photographic public towards products of artificially created wide-range nature is ambiguous. “If you want to be successful in this field, try to develop your original style“, and don’t practice repetition,” advises Michaela Rainies. “In something as delicate and widely copied at the amateur level as HDR, this is especially important.”

In post-processing following the tone mapping process, the photographer gives preference to layer masks and blurs on them (tools of the Blur group, in particular Gaussian blur). Of the layer blending modes, Michaela loves Overlay and Color, which allow her to achieve the desired level of contrast. Gustavo Orenstein and Jesper Christensen also add Soft Overlay here. Jesper works on this layer with brushes of the Dodge and Burn tools. The first helps to draw details in the shadows more clearly, the second helps to create dramatic contrast. Both Michaela and Gustavo cannot do their work without them. While Gianluca prefers to darken and brighten a regular paint brush in the Overlay layer blending mode with a minimum level of transparency (opacity). To give the images the proper color saturation it works with hue/saturation and selective color settings. Gianluca creates a duplicate layer; He applies a Gaussian blur filter to it (radius 4 pixels, transparency 13%) and overlays it in multiply or overlay mode. He then calls up another duplicate and works on the saturation levels of the individual colors in it, especially white, black and neutral gray, which create an additional sense of wide dynamic range. Of our four experts, only Jesper Christensen actively uses Wacom digital graphics tablets, but he could do just fine without them - he needs the devices for other projects.

Generally speaking, post-processing of HDR images is, of course, a purely personal question, depending not so much on the technical capabilities of the program, but on the subjective creative vision of the artist. And it would be pointless to talk about the hundreds of individual preferences of each of today's authors. Some people, like Michaella, strive for simplicity in choosing tools for implementing visual tasks. For her, for example, Photoshop's shadow/highlight is more expensive than all the most expensive and sophisticated plugins. And someone, like maestro Orenstein, continues to experiment with Photomatix, HDR Shop, Light Gen and similar DD extenders. For experienced users of graphic editors, it is probably more important to concentrate not on mastering new software products, but on developing their own style and nurturing a holistic creativity within themselves. Whereas I would like to advise beginners not to get lost in technical aspects, but to try to start with the formation of a high artistic vision and place of work for this amazing and promising genre of photo illustration.

November 16, 2009

Wide dynamic range video cameras

Wide dynamic range (WDR) cameras are designed to provide high-quality images in backlight conditions and in the presence of both very bright and very dark areas and details in the frame. This prevents bright areas from being saturated and dark areas from appearing too dark. Such cameras are usually recommended for monitoring an object located opposite windows, in a door or gate illuminated from behind, and also when there is a high contrast of objects.

The dynamic range of a video camera is usually defined as the ratio of the brightest part of an image to the darkest part of the same image, that is, within a single frame. This ratio is otherwise called maximum image contrast.

Dynamic range problem

Unfortunately, the actual dynamic range of video cameras is strictly limited. It is significantly narrower than the dynamic range of most real objects, landscapes, and even film and photographic scenes. In addition, the conditions for using surveillance cameras in terms of lighting are often far from optimal. Thus, objects of interest to us may be located against the backdrop of brightly lit walls and objects or backlight. In this case, objects or their details in the image will be too dark, since the video camera automatically adapts to the high average brightness of the frame. In some situations, the observed “picture” may contain bright spots with too large gradations of brightness , which are difficult to convey with standard cameras. For example, an ordinary street in sunlight and with shadows from houses has a contrast from 300:1 to 500:1, for dark passages of arches or gates with a sunlit background the contrast reaches 10,000:1, the interior dark room against windows has a contrast of up to 100,000:1.

The width of the resulting dynamic range is limited by several factors: the ranges of the sensor itself (photodetector), the processing processor (DSP) and the display (video control device). Typical CCDs (CCD matrices) have a maximum contrast of no more than 1000:1 (60 dB) in intensity. The darkest signal is limited by thermal noise or "dark current" of the sensor. The brightest signal is limited by the amount of charge that can be stored in an individual pixel. Typically CCDs are built so that this charge is approximately 1000 dark charges due to the temperature of the CCD.

Dynamic range can be significantly increased for special camera applications, such as scientific or astronomical research, by cooling the CCD and using special reading and processing systems. However, such methods, being very expensive, cannot be widely used.

As stated above, many tasks require a dynamic range size of 65-75 dB (1:1800-1:5600), so when displaying a scene even with a range of 60 dB, details in dark areas will be lost in noise, and details in bright areas will be lost. for saturation, or the range will be cut off on both sides at once. Readout systems, analog amplifiers, and analog-to-digital converters (ADCs) for real-time video limit the CCD signal to a dynamic range of 8 bits (48 dB). This range can be expanded to 10-14 bits through the use of appropriate ADCs and analog signal processing. However, this solution often turns out to be impractical.

Another alternative type of circuit uses a nonlinear transform in the form of a logarithmic function or its approximation to compress the 60 dB CCD output signal to an 8-bit range. Typically, such methods suppress image detail.

The last (mentioned above) limiting factor is the display of the image. The dynamic range for a normal CRT monitor operating in a bright room is about 100 (40 dB). An LCD monitor is even more limited. A signal generated by the video path, even limited to a contrast of 1:200, will be reduced in dynamic range when displayed. To optimize display, the user must often adjust the monitor's contrast and brightness. And if he wants to get an image with maximum contrast, he will have to sacrifice some of the dynamic range.

Standard solutions

There are two main technology solutions that are used to provide cameras with high dynamic range:

  • multiple frame display - the video camera captures several complete images or individual areas of it. Moreover, each “picture” displays a different area of ​​the dynamic range. The camera then combines these different images to produce a single high dynamic range (WDR) image;
  • the use of nonlinear, usually logarithmic, sensors - in this case, the degree of sensitivity at different lighting levels is different, which allows for a wide dynamic range of image brightness in one frame.

Various combinations of these two technologies are used, but the most common is the first.

To obtain one optimal image from several, 2 methods are used:

  • parallel display by two or more sensors of an image formed by a common optical system. In this case, each sensor captures a different part of the dynamic range of the scene due to different exposure times (accumulation), different optical attenuation in the individual optical path, or through the use of sensors of different sensitivities;
  • sequential image display by a single sensor with different exposure (accumulation) times. In extreme cases, at least two mappings are made: one with the maximum, and the other with more short time accumulation.

Sequential display, as the simplest solution, is commonly used in industry. Long-term accumulation ensures the visibility of the darkest parts of the object, but the brightest fragments may not be processed and even lead to saturation of the photodetector. A picture obtained with low accumulation adequately displays light fragments of the image without processing dark areas that are at the noise level. The camera's image signal processor combines both images, taking the bright parts from the "short" picture and the dark parts from the "long" picture. The combination algorithm that allows you to create a smooth image without a seam is quite complex, and we will not touch on it here.

The first to present the concept of combining two digital images obtained at different acquisition times into a single image with a wide dynamic range was a group of developers led by Professor I.I. Zivi from Tech-nion, Israel. In 1988, the concept was patented ("Wide Dynamic Range Camera" by Y.Y. Zeevi, R. Ginosar and O. Hilsenrath), and in 1993 it was used to create a commercial medical video camera.


Modern technical solutions

In modern cameras, to expand the dynamic range based on obtaining two images, Sony double scan matrices (Double Scan CCD) ICX 212 (NTSC), ICX213 (PAL) and special image processors, for example SS-2WD or SS-3WD, are mainly used. It is noteworthy that such matrices cannot be found in the SONY assortment and not all manufacturers indicate their use. In Fig. 1 schematically represents the principle of double accumulation. Time is indicated in NTSC format.

The diagrams show that if a typical camera accumulates a field of 1/60 s (PAL-1/50 s), then a WDR camera compiles a field of two images obtained by accumulation in 1/120 s (PAL-1/100 s) for few illuminated details and over a period of 1/120 to 1/4000 s for highly illuminated details. Photo 1 shows frames with different exposures and the result of summation (processing) of the WDR mode.

This technology allows you to “bring” the dynamic range to 60-65 dB. Unfortunately, WDR numbers are usually provided only by top manufacturers price category, the rest are limited to information about the presence of the function. The existing adjustment is usually graduated in relative units. Photo 2 shows an example of comparative testing of a standard and WDR camera for oncoming light from a glass display case and doors. There are camera models whose documentation states that they operate in WDR mode, but there is no mention of the required special element base. In this case, the question may naturally arise, is the declared WDR mode what we expect? The question is fair, since even cell phones already use an automatic brightness control mode for the image of the built-in camera, called WDR. On the other hand, there are models with a declared dynamic range expansion mode, called Easy Wide-D or EDR, which work with standard CCDs. If in this case the expansion value is indicated, then it does not exceed 20-26 dB. One way to expand the dynamic range is Panasonic's Super Dinamic III technology. It is also based on double exposure of the frame at 1/60 s (1/50C-PAL) and 1/8000 s (followed by histogram analysis, dividing the image into four options with different gamma correction and their intelligent summation in the DSP). In Fig. Figure 2 presents the generalized structure of this technology. Such a system expands the dynamic range up to 128 times (42 dB).

The most promising technology for expanding the dynamic range of a television camera today is the Digital Pixel System™ (DPS) technology, developed at Stanford University in the 1990s. and patented by PIXIM Inc. The main innovation for DPS is the use of an ADC to convert the photocharge value into its digital value directly in each pixel of the sensor. CMOS (CMOS) sensor matrices prevent signal quality degradation, which increases the overall signal-to-noise ratio. DPS technology allows signal processing in real time.

PIXIM technology uses a technique known as multisampling to create an image highest quality and provide a wide dynamic range of the converter (light/signal). PIXIM DPS technology uses five-level multisampling, which allows you to receive a signal from the sensor with one of five exposure values. During exposure, the illumination value of each pixel of the frame is measured (for a standard video signal - 50 times per second). The image processing system determines optimal time exposure and saves the resulting value until the pixel becomes oversaturated and further charge accumulation stops. Rice. 3 explains the principle of adaptive accumulation. The light pixel value is retained at exposure time T3 (before the pixel is 100% saturated). The dark pixel accumulated charge more slowly, which required additional time; its value was retained at time T6. The stored values ​​(intensity, time, noise level) measured in each pixel are simultaneously processed and converted into a high-quality image. Since each pixel has its own built-in ADC and the light parameters are measured and processed independently, each pixel effectively acts as a separate camera.


PIXIM imaging systems based on DPS technology consist of a digital image sensor and an image processor. Modern digital sensors use 14 and even 17 bit quantization. Relatively low sensitivity, as the main disadvantage of CMOS technology, is also characteristic of DPS. The typical sensitivity of cameras of this technology is ~1 lux. The typical signal-to-noise ratio for the 1/3" format is 48-50 dB. The declared maximum dynamic range is up to 120 dB s typical value 90-95 dB. The ability to regulate the accumulation time for each pixel of the sensor matrix allows, when forming an image, to use such a unique signal processing method as the method of aligning local histograms, which can dramatically increase the information content of the image. The technology allows you to completely compensate for background illumination, highlight details, and evaluate the spatial position of objects and details located not only in the foreground, but also in the background of the image. Photos 3, 4 and 5 show frames taken with a standard CCD camera and a PIXIM camera.

Practice

So, we can conclude that today, if necessary, conduct video surveillance in difficult conditions With high-contrast lighting, you can choose a camera that adequately conveys the entire range of brightness of objects. For this purpose, it is most preferable to use video cameras with PIXIM technology. Quite good results are provided by systems based on double scanning. As a compromise, we can consider cheap television cameras based on standard matrices and electronic systems EWD and multi-zone BLC. Naturally, it is desirable to use equipment with specified characteristics, and not just with a mention of the presence of a particular mode. Unfortunately, in practice, the results of specific models do not always correspond to expectations and advertising statements. But this is a topic for another discussion.