RAW photography: dynamic range and contrast

    Hello everyone! Recently we talked about the capabilities of RAW, the topic turned out to be interesting, a lot of questions came to the PM, so keep it up, we will figure out what RAW is and how to fry it properly. The day we’ll start, consider one of the most important aspects that distinguishes RAW files from camera JPEGs: namely, the dynamic range.





    Much of modern digital photography is a legacy of the chemical film era. You won’t believe it, but there are all sorts of ... retro lovers who create special color profiles so that a digital photo gets processing typical for a film of a certain type: color distortion, certain features (typical for specific variants of chemical processes) ... In general, photography, like any another type of art, periodically sighs on the topic “it used to be better” and tries to return to the days when the sun was greener and the grass brighter. So here. The films had different possibilities due to different chemical compositions. Some better conveyed skin tones, some other colors were brighter, while it gave less detail ... In general,

    Instead of the foreword


    The article is intended for beginners. Something is deliberately omitted and can be explained later, something is not described very correctly from the point of view of professionals in the photo industry, but it is understandable to those who still own the camera and not an amateur photographer.

    In this series of posts, we will go through all the basics of photography from the point of view of editing the data received from the matrix, so that in the final post the readers do not have questions on certain aspects of processing and finalizing RAW images. There will be several posts, so get ready, ask questions if something is not clear, send messages in a personal message if you want to improve something or clarify in the article - I will be happy to answer and correct the post if an error or inaccuracy creeps in somewhere .

    As examples, I will use RAW files from the cameraNikon 1 S2 , which I talked about not so long ago , with its standard Canon EOS 6D camera (about a million of all the good and interesting things on the Internet has been written about), as well as the Lumia 930 and Lumia 1020 smartphones to show that it is not size that matters, but skill use it. All RAW-files for experiments will also be shared: indulge, experiment, repeat the steps described, but do not assign yourself the rights to the photo. And then you Mikhalkov with a flashing light on his head for a month will be dreaming. The most usual Adobe Photoshop CC 2014 will act as a graphic editor, the trial version of which for anyone can get for 30 days right now , for free and without SMS.

    image



    RAW file magic


    In the last issue, I already described what RAW files are and how they are good. For those who have not read or forgot everything, I will remind you in a nutshell: the RAW file contains information directly taken from the camera’s matrix. No noise reduction, no post-processing, no "white balances" and other enhancers. Just what the sensors (photosensitive blocks) and information about the shooting conditions in the “accompanying note” have accumulated. There is much more information in such a file than in a regular JPEG, and working with it allows you to get those details that will be irretrievably lost on JPEGs. Most of the additional information allows you to very flexibly adjust the dynamic range of the received frame. We’ll talk about this range today.

    What is dynamic range?


    In simple terms, the dynamic range (otherwise called “photographic latitude”) is a characteristic of the photographic material, showing how many shades and tones this material can transmit between what will be considered completely black and completely white. In the case of digital photography, “photographic material” must be replaced by “photosensitive element”. The dynamic range differs depending on the size of the sensor, their process technology, settings, and other other other things, but all modern manufacturers are striving to expand this range itself.

    DD itself is measured in EV (exposure value) - exposure levels: for the best films, it reached 9 levels for black-and-white images, for special low-contrast ones - more than 11. Modern digital cameras are almost inferior in their characteristics, and specialized cameras (in which the presence of the image is more important than its quality) and completely surpass the capabilities of the film. To make it easier to understand, here's a picture. You all saw her.



    For simplicity of example, roughly remove the entire color component and return to the past, in the era of black and white photography.



    If we have a matrix with an extremely narrow dynamic range, for the description of which 1 bit of information for each point is enough for us, then everything that we can capture will have only two states - darker than a certain mid-gray point or lighter. Depending on the exposure and exposure settings, we can get different results, but in equine-spherical conditions of ideal setting, a photo with a DD that fits in 1 bit will look like this:


    I specifically reduced the contrast and chose two shades of gray - so the picture hurts the eye less, but the essence does not change.

    This image uses only two colors. If we increase the capabilities of the sensor to two bits, that is, four colors, we will have more details: since the photographic material (photosensitive matrix) will be able to distinguish not two shades with maximum and minimum brightness, but already four: maximum, minimum and two intermediate values ​​(33 and 66% brightness).



    If you expand the dynamic range to three bits (8 colors) - the detail of the picture will improve even more: The



    picture has become much closer to the original bleached JPEG'a. By the way, to recover almost all the light information from the original JPEG, 5 bits and 32 colors are quite enough:



    If we remove the source data in the JPEG format from the matrix (we omit even all processing, noise reduction and other delights of camera JPEG), then we will not get more than eight bits per color channel.

    Accordingly, the dynamic range of the frame will be limited to a total of 2 = 8 = 256 shades of red, blue and green in the RGB model. That is, for each of the points we can get one of 16,777,216 colors, which, at first glance, is quite enough, but, as usual, there is one but ... and it spoils everything.

    When you start changing a photo in the editor, some of the data is inevitably lost due to rounding. If you work carelessly, do not follow all areas of the image, roughly change the image using the Levels tool, then sooner or later the following nasty things will come out: clipping, posterization (reduction in the number of levels, expressed by a comb on the histogram), loss of detail and micro-contrast.

    Most of these problems can be avoided by using 10, 12, 14, or 16 bits per channel. Firstly, even a 10-bit version gives us 2 10 * 2 10 * 2 10 colors. And this is 1,073,741,824 different values ​​for each image point, compared to a ridiculous 16 with a small million for ordinary JPEGs. Secondly, in these extra bits of RAW files there is additional data that will allow you to expand the dynamic range and get from it those details that can be considered irretrievably lost on JPEG'e.

    Most camera matrices produce 10 or 14 bits (depending on the camera model and the hardware capabilities of the matrix itself) when shooting in RAW, but processing in the same Photoshop will be done either in 8-bit color space or in 16-bit. And for work it is better to use exactly 16 bits.

    Bar graph and dynamic range


    In almost any modern image editor, you can find a thing called a histogram: it illustrates the distribution of pixels in the image; This is a graph showing the number of pixels at each color intensity level. Working with this tool is well described in the official help Photoshop Adobe and duplicate it here I do not see the point. If you are not at all familiar with this thing - go in, read, it will be useful for the following articles.

    Contrast and dynamic range


    Another term is closely related to the dynamic range - contrast. Wikipedia gives us the following definition:
    Contrast (French contraste) - in optics (sensitometry and photometry), the difference in the characteristics of different parts of the image, the ability of a photographic material or optical system to reproduce this difference, as well as the sensitivity of the eye (visual system) with respect to brightness and color.

    The overall contrast of the picture depends little on the dynamic range: in the case of two bits, the picture can be either high-contrast or non-contrast at all: The



    question is in the settings of the camera / scanner / converter through which the image passes before it becomes a set of colored dots on your monitor. Nevertheless, the wide dynamic range often reduces the microcontrast: clear boundaries between lights and shadows in the middle of the dynamic range, dark and bright objects, any small things that create detail in the picture.

    Note: If your camera produces “faded” and “gray” frames when shooting in RAW, and JPEGs appear contrasting and bright, the “ slarity” slider in the RAW converter will help restore “lost” details .

    Practice


    To get started, let's take this JPEG (the camera (or photographer) made a mistake with the metering and turned out to be a light overexposure) and try to do something with it in Photoshop.


    Download a full-sized image

    If we apply Camera Raw to it as a filter, and try to get rid of all overexposures, then we will see all the disadvantages of JPEG: a lack of information, and eight-bit encoding, and processing effects.



    Here's a good example:



    And an enlarged fragment of the photo, if you did not immediately notice what the problem is:



    If you open the same photo in RAW(23.5 MB), then we will get access to all the same tools, but at the same time we will work with 14-bit color space (in 16-bit mode). To do this, click on the link at the bottom of the converter and select the appropriate mode:



    In this case, the additional information contained in RAW allows, firstly, to stretch all the overexposure on the frame to normal shades without loss of quality, and secondly, to expand the dynamic range : fix underexposed areas on the hair, “dirty neck”, get rid of unpleasant spots that appear when editing JPEG'a. About why overexposure is generally generally bad - read in the last article.



    We adjust the exposure and restore the underexposed areas:



    Eliminate optical distortions and slightly dim the vignetting:



    Adjust colors according to Mother Nature and our own idea of ​​the atmosphere of the image:



    The final image can be sent to retouch (previously saved in an honest sixteen-bit TIFF): get rid of minor skin defects, correct makeup imperfections, add special effects.


    Retouching was not performed, full size. The

    key changes that we have achieved at the current stage are: normal exposure, restoration of parts in dark areas, adequate skin tone, contrasting wall texture, a delicate pink shade of clothes is accurately transmitted.

    Instead of a conclusion


    That’s all for now, tomorrow or the day after tomorrow there will be the second part in which I will continue to cover the problem of the dynamic range and contrast of the image: let's talk about HDR and its methods of obtaining, multiple exposure and other things. To the connection!

    Suggestions for improvement, comments, your ideas on the topic of the following articles send in PM.

    UPD: Thanks to barkalov and AndreyDmitriev for valuable comments, the wording in the article has been corrected so as not to mislead anyone.


    Our reviews:
    » Connect original gamepads to a PC
    » Razer Abyssus: the most affordable Razer
    » Nikon 1 S2: one-button mirrorless
    » Lenovo Miix 3-1030 review
    » Understanding Wacom's art chaos
    » ASUS ZenFone 5, LG L90, HTC Desire 601 - dual sim consumer war, part 1
    » ASUS Transformer Pad
    » Razer Kraken headsets

    Also popular now: