Menu
Is free
registration
home  /  Multimedia / What is the quality of raw. All you need to know about the RAW format

What is the quality of raw. All you need to know about the RAW format

Raw (English raw - raw, raw) - a digital photo format containing raw data obtained from photomatrix. Such files contain complete information about the stored signal, which does not have a clear specification (standard).

The RAW format in digital photography corresponds to the negative in film: it contains raw pixel information directly from the sensor of a digital camera.

Raw camera files for digital cameras typically contain:
- discrete values \u200b\u200bof the voltage of the matrix elements (before interpolation for matrices using arrays of color filters)
- metadata - camera identification;
- metadata - technical description of the shooting conditions;
- metadata - default processing parameters;
- “preview”, usually medium-quality JPEG.

The RAW file did not even go through dematization.

Dematrization is a complex process, so most digital cameras use quality-related simplifications to convert a RAW file to TIFF or JPEG. A personal computer with a more powerful processor allows you to use more advanced algorithms. The same applies to image sharpness correction, which requires large computational resources. A RAW file simply contains the values \u200b\u200bof red, green, or blue in each of the pixels. Typically, digital cameras process this file, converting it into a full-color JPEG or TIFF file, and write the result to a memory card.

When processing a RAW file, digital cameras must make several fundamental decisions, and therefore the original RAW gives the author more control over how the final JPEG or TIFF will look. The author himself chooses the necessary parameters in the process of converting the RAW format to JPEG on the computer.

The RAW file is converted to the final image in JPEG or TIFF format in several stages, each of which can make an irreversible image correction. One of the key benefits of the RAW format is that it allows the photographer to make corrections on their own, as each image requires.

Types of RAW formats

Each manufacturer of photographic equipment at one time developed its own RAW format for its own camera matrices:

  • .nef, .nrw - Nikon;
  • .crw, .cr2 - Canon;
  • .arw, .srf, .sr2 - Sony;
  • .orf - Olympus;
  • .raw, .rw2 - Panasonic;
  • .raf - Fujifilm;
  • .ptx, .pef - Pentax;
  • .raw, .rwl, .dng - Leica;
  • .srw - Samsung;
  • .dcr, .kdc - Kodak;
  • .mrw - Minolta;
  • .3fr - Hasselblad;
  • .x3f - Sigma;
  • .dng - Adobe;
  • .bay - Casio;
  • .erf - Epson;
  • .r3d - Red One.

Benefits of Converting RAW to JPEG on a Personal Computer

Dematrization

Dematization is a very resource-intensive stage, and therefore the best dematrization algorithms require more processor power than modern digital cameras have. The use of dematrization on a personal computer allows you to use the best algorithms, since its processor is usually much more powerful than a typical digital camera. Better algorithms can squeeze a little more out of your camera’s sensor, providing greater resolution, less noise, more color accuracy and less moire.

Flexible white balance

White balance is the process of eliminating the unnatural color ratio, so objects that are white will be displayed as white in your picture. The color ratio in a JPEG image can often be changed by post-processing, but at the expense of color depth and color gamut. This is due to the fact that the white balance is essentially applied twice: first when converting RAW and then again when post-processing. RAW files give you the opportunity to apply white balance to your photo after shooting - without wasting bit loss.

High capacity

In fact, digital cameras record each color channel with much greater accuracy than 8 bits (256 levels) per channel used in JPEG images (see “What is Bit Depth”). Most modern cameras record each channel with 12-bit accuracy (2 12 \u003d 4096 levels), providing several times more color gradations than can be achieved using JPEG from the camera. High bit depth reduces the susceptibility of the image to posterization and increases flexibility in the choice of color space, as well as in post-processing.

Dynamic range and exposure compensation

The RAW format usually provides a much larger “dynamic range” than JPEG, depending on how the camera creates its JPEG. The dynamic range is defined as the interval of chiaroscuro that the camera can distinguish between completely black and absolutely white. Since the original color data were not logarithmed using curves, exposure to a RAW file may subsequently be exposed to exposure compensation. Exposure compensation allows you to correct the metering error, or it can help to extend details lost in the light or in the shadows.

Enhanced clarity

Since the RAW file was not processed, the camera did not apply sharpness to it. As with dematrization, better sharpening algorithms are more resource intensive. Thus, sharpening performed on a personal computer can cause fewer halo defects with a similar degree of correction.

Since sharpness depends on the expected viewing distance of your image, the RAW format also provides more control over what type and amount of sharpness correction will be applied (at your discretion). Sharpness correction is usually the final step in post-processing, since it cannot be undone, therefore having an already adjusted JPEG is not optimal.

Lossless compression

In the RAW format, lossless compression is used, and therefore it does not suffer from compression defects that are noticeable in the "losing" JPEG compression. RAW files contain more information and are better compressible than TIFF, and without compression defects in JPEG format.

RAW format flaws

  • RAW files are much larger than similar JPEG files, and therefore fill a memory card faster.
  • Processing RAW files takes more time, because they may require manual work at each stage of conversion.
  • RAW files are often written longer to the memory card, resulting in fewer frames per second than when using the JPEG format.
  • RAW files cannot be immediately presented to viewers and customers, because they require special programs to download, and therefore they must first be converted to JPEG.
  • RAW files require a more powerful computer with more RAM.

Other considerations

One of the problems with the RAW format is that it is not standardized. Each camera has its own RAW format, and it may turn out that one program is unable to read all formats. Fortunately, Adobe announced the Digital Negative Specification (DNG), which aims to standardize the RAW format. In addition, any camera that can save RAW files must come with its own program for reading them.

Good RAW conversion programs can do batch processing and often automate all stages of the conversion except the ones you want to change. This can reduce or even eliminate the advantage of ease of use of JPEG files.

Many new cameras are capable of recording both RAW and JPEG at the same time. This allows you to immediately get the final image, but at the same time keep the “negative” in the RAW in case you later want more flexibility.

Summary

So which is better, RAW or JPEG? There is no definite answer, since it depends on the type of shooting. In most cases, RAW files are the best solution due to their technical advantages and the falling cost of large memory cards. RAW files give the photographer much more control, but at the expense of processing speed, footprint and ease of use. Sometimes it’s not worth it for sports and journalism with RAW processing, and landscape and art photographers often choose RAW to get the maximum potential quality out of their digital camera.

Modern man is literally entangled in a variety of stereotypes. This is true for almost any field of activity, and, alas, digital photography is no exception.

One has only to regret that many novice photographers, who decided to acquire more serious equipment, underestimate the opportunities that open when saving pictures in RAW format, and, as usual, continue to record frames exclusively in JPEG. The stereotype that is briefly widespread among amateur enthusiasts can be formulated as follows: yes, theoretically saving images in RAW format allows you to get certain advantages in the image processing process, but in practice this creates a number of additional difficulties and problems for the photographer. Having fallen into the web of this stereotype (on their own or under the influence of more “experienced” and “advanced” colleagues), many do not even try to figure out if this is actually the case, and with little effort adjust the camera to save photos in JPEG format.

Benefits of RAW format

Let's start by examining the fundamental benefits that a photographer gains by storing captured frames as a RAW image. Perhaps the most important of the advantages of this format is the ability to intervene in the process of "developing" a digital picture and change these or those settings at your own discretion after shooting. In this case, the photographer can try many options and in the end choose from them the best. If you save the image in JPEG, this will no longer be possible: in the process of converting the original image of the image into a finished file, the settings set in the camera menu at the time of shooting will be applied to it.

A frame saved in JPEG can be compared to a finished dish purchased at a supermarket. It is enough to warm it up, and you will get what you want. In turn, a RAW image is, figuratively speaking, a piece of raw meat (may readers forgive an involuntary pun). With a competent approach, you can cook dozens of different dishes from it, and with a sufficiently high quality of the source material (and the appropriate qualifications of the cook), even real culinary masterpieces. Of course, another option is also possible: the unattractive pile of coals often becomes the logical result of inept actions of an amateur.

As a result of an error in choosing exposure settings, the picture (left)
it turned out to be a bit overexposed, as a result of which part of the details in the highlights was lost.
In the process of processing the file saved by the camera in JPEG format, it was not possible to restore the details in highlights (in the center).
The desired result was achieved only after processing the RAW image of the image (right)

The same thing happens with photos. With good lighting, the right choice of angle, exposure and other settings, a frame saved in JPEG usually does not require further refinement (except for cropping and scaling) and can be immediately saved in a virtual photo album, sent to friends, published on the Internet, printed on a printer, etc.

It is appropriate to draw parallels with amateur photography of the digital era. The frame saved by the camera in JPEG format is much like a snapshot of a Polaroid. In turn, the image in RAW format can be compared with a negative. Even if any mistakes were made during the shooting, the influence of many of them can be corrected (or at least minimized) in the “dark room” during the printing of photo cards.

Unfortunately, this comparison does not fully reflect the gulf that lies between the pictures stored in JPEG and in RAW. Indeed, unlike the classic film, RAW files provide the photographer much more aboutgreater freedom of action: the same picture can be “developed” many times using different software tools and combinations of settings, and therefore, getting completely different results at the output.

Below is a histogram of the original image,
top - its view after level correction
through color channels.
The appearance of the latter resembles a comb,
indicating a loss of part
useful information during processing

Another important aspect is the provision of more comfortable conditions during the shooting process. Saving frames in RAW, the photographer may not pay attention to the numerous settings of the camera menu, which allows him to concentrate on solving a creative problem. It is enough to pay attention to the correct choice of exposure value, depth of field and focus point. The remaining parameters can be corrected retroactively. This is especially valuable when photographing moving objects or when the weather changes quickly, when you simply have no time to manipulate a lot of settings. Moreover, not all cameras can be reached with one-touch access.

Of course, a JPEG file can also be processed after shooting in a graphical editor in order to correct the undesirable consequences of erroneous settings. However, in this case, you will have to come to terms with the inevitable loss of some of the useful information contained in the original image.

The fact is that cameras record JPEG files in the RGB color model with a resolution of 8 bits per channel. After processing, the image will be saved with exactly the same parameters. As a result, in the process of changing the settings of the black and white points, the shape of tonal curves, as well as brightness, contrast, saturation, some of the useful information contained in the original image will be irretrievably lost. Such losses result in characteristic artifacts in the processed image, such as pronounced gradation on smooth tonal transitions, a violation of color balance (most noticeable in areas with neutral gray and flesh tones), an increase in the level of digital noise in shadows, etc.

The original shot (left) was taken in natural light,
however, due to a photographer’s oversight, the white balance setting was selected in the camera menu,
corresponding to incandescent lamps.
To a JPEG file saved by the camera in Adobe Photoshop
Auto Levels and Auto Color functions were applied, however, it was not possible to completely eliminate the consequences of the error (in the center).
In the case of processing a RAW image to eliminate the consequences of an error without the slightest damage
for technical image quality it was only necessary to change the white balance setting in the RAW converter (on the right)

If the impact on the original image was not very significant and the losses are relatively small, then such artifacts will be subtle and inexperienced users are unlikely to detect them with the naked eye. However, this does not mean at all that in the process of image processing some of the useful information was not lost. Those who do not believe their eyes (or the opinions of others) can be convinced of this with an impartial measuring tool - in other words, view histograms of processed images. A characteristic sign of the loss of some useful information is the disappearance of individual halftones: the appearance of the histogram in this case resembles a comb.

Unlike JPEG, in a RAW file the image of the frame is recorded with the bit depth with which it was digitized by an analog-to-digital converter (ADC) of the camera. In modern models of digital cameras, 12-, 14- or 16-bit ADCs are used, and therefore, a frame image in RAW format contains much more information about the image than standard JPEG. That is why, even after very serious manipulations with the settings from the RAW file, you can get an 8-bit image without characteristic artifacts that would inevitably have arisen under similar influences on a picture saved in JPEG format. For example, the exposure value of a picture recorded as a 12-bit RAW image can be retroactively adjusted within ± 2 EV without loss of detail. Accordingly, when saving RAW with a bit capacity of 14 bits, the “freedom of maneuver” increases to ± 3 EV. Agree, an impressive opportunity.

An example of using software gradient filters to process a RAW image.
Left: source frame with default settings.
Right - Gradient filters applied to the image.
allowed to equalize the tonal balance of the image, as well as to carefully work out
the shape and texture of the parapet balusters in the foreground

One of the illustrative examples illustrating the difference in the post-processing capabilities of pictures saved in JPEG and RAW formats is the correction of an image made with the wrong white balance setting. If the image was saved in RAW format, then to correct this error, just select the white balance value corresponding to the shooting conditions in the RAW converter settings. The ideal result in this case is achieved in one simple action.

If the image with the wrong white balance setting was saved by the camera in JPEG, then you will have to work hard to process this image. Well, if the “miss” was small and its consequences can be corrected by shifting the black and white dots in the color channels (as a rule, just use the Auto Levels function in Adobe Photoshop or similar in other graphic editors). It is much more difficult to correct the error if the photo was taken outdoors on a fine day, and the white balance was set, for example, for shooting in the light of incandescent lamps. Of course, an experienced user in this case, most likely, will be able to get a quite acceptable result, but it will be achieved at the cost of significant loss of useful information.

A very valuable opportunity to save pictures in RAW format is when shooting high-contrast scenes, as well as objects painted in bright colors. In such situations, it is easy to make a mistake in choosing the correct exposure value, and the margin for the safe correction of this parameter during image processing will be very helpful.

In some cases, recording pictures in RAW format will do without additional devices. For example, photographers often use an optical gradient filter to capture landscapes, which allows them to work out details in the sky without compromising the overall tonal balance of the image. Having saved the image in RAW format, the effect of the gradient filter is not difficult to imitate in the same Lightroom. In this case, the photographer gets the opportunity to fine-tune the position and width of the gradient transition, as well as a number of other parameters.

RAW Limitations

In the previous section, we examined a number of examples that clearly illustrate the advantages of the RAW format in the field of image correction and post-processing. Nevertheless, we must not forget that the limits of these manipulations are not unlimited. Although the RAW image contains much more information about the original image than JPEG, its amount is still finite. Although, strictly speaking, this limitation is no longer due to the data recording format, but to the technical capabilities of the camera used, and above all the characteristics of the photosensitive sensor installed in it.

In the Fujifilm X-M1 Camera
there is a built-in image conversion function,
saved as RAW images to JPEG files
with the ability to control the settings of various parameters

Thanks to the rapid development of technology in the production of semiconductor components, the sensors of modern cameras are capable of capturing images with a very wide dynamic range. Nevertheless, if the error in choosing exposure settings during the shooting of high-contrast scenes is too large, then the so-called clipping effect will occur. This means that some areas of the image will turn out to be too dark or, on the contrary, too bright for the elements of the photosensitive sensor to fix any details on them. As a result, such areas will be perceived by the sensor (and therefore recorded in the RAW image of the frame) as uniformly shaded black or white spots. It is clear that no software will help to “show” those details that were not recorded by the camera’s sensor - and therefore, are absent in the original digital image of the frame.

Another aspect to keep in mind is the effect of digital noise. In the process of processing underexposed frames, it is often necessary to “pull out” the details in the shadows by setting a rather large positive value for the exposure correction or lightening the shadows in the settings of the RAW converter. Often a by-product of this processing is a significant increase in the level of digital noise in the resulting image, which is most noticeable in the shadows and in uniformly shaded areas. Naturally, a lot depends on the characteristics of the photosensitive camera sensor, and on the processing algorithms implemented in the application used. In fairness, it should be noted that when you try to perform similar manipulations with frames saved in JPEG, the final result will look much worse.

RAW processing is easy

It is widely believed among digital camera users that processing RAW files requires a significant investment of time and effort. In fact, this is nothing more than a delusion. It is not necessary to control the conversion process of each RAW file: in most modern RAW converters there is a function to save copies of pictures in JPEG (as well as files of other common graphic formats) in batch mode. At the same time, image conversion is performed with the default settings, taking into account the information about the camera settings recorded in EXIF \u200b\u200bat the time of shooting. This way you can get exactly the same JPEG files that the camera would save to the memory card. Given the performance of modern PCs, this will take very little time. In addition, in the process of batch conversion, you can perform a number of other actions - scale the source image to the desired size and / or volume of files, embed "watermarks", information about the date and time of shooting, various labels, etc.

In the process of viewing images obtained after batch conversion, you can select those photos that are of some value due to the successfully “caught” plot, but due to various circumstances were taken with technical marriage. Of course, it will be necessary to conjure manually over the selection of optimal settings for these frames, however, the final result in this case will be favorably different from that which could be obtained after processing the same pictures recorded by the camera immediately in JPEG.

Also, one cannot fail to mention that a number of modern digital cameras (for example, in the Fujifilm X-M1 model) have a built-in function to convert images saved as RAW images to JPEG files with the ability to control the settings of various parameters. Thus, the owners of such cameras do not need a computer to convert RAW images, and you can perform this procedure even in mobile conditions.

Size matters

One of the stones that inexperienced amateur photographers like to throw in the RAW garden is a large volume of files. Indeed, the volume of the RAW image of the image is several times larger compared to its copy in JPEG format, even when choosing the highest quality (that is, the minimum compression ratio). However, as already mentioned, a RAW image contains much more information about the original image than JPEG. And the fact that a RAW file has a larger volume is quite natural. There is another aspect that many inexperienced photographers do not take into account.

In difficult situations - for example, when a photographer is not sure of the correct choice of exposure parameters - shooting in exposure bracketing mode is a logical decision. When choosing this mode, the camera instead of one shot takes a series of three frames in JPEG format with different exposure settings. If you save the image in RAW format, then one frame is quite enough: as already mentioned, even a 12-bit image will allow you to adjust the exposure value within ± 2 EV without loss of detail in highlights and shadows. Thus, in this situation, the difference in file size (one RAW versus three JPEGs) will not be so significant.

It should be noted that many RAW file formats used in modern cameras use compression algorithms without data loss (like ZIP). Thanks to this, it is possible to significantly reduce the amount of stored images without the slightest damage to image quality. In addition, at the current price level for flash memory cards, even a not-so-wealthy photographer can easily afford to purchase media that can accommodate several hundred shots in RAW format.

Compatibility issue

Another aspect that invariably comes into question when comparing the advantages and disadvantages of RAW and JPEG formats is compatibility with various devices and applications.

Undoubtedly, the JPEG format is currently the de facto standard for storing images in electronic form - both in the field of computers and in the field of household appliances. Photos recorded in this format can be opened in almost any web browser, graphic editor and many other applications that support working with graphic files. Most photos and drawings on the Internet are stored in JPEG format. And finally, many devices support working with images of this format: mobile phones, smartphones, tablets, printers and multifunction devices with autonomous printing, portable and stationary digital media players, SmartTV, etc.

Windows 8 native file browser (Explorer)
allows displaying thumbnails of RAW files of various formats

In other words, one of the important advantages of the JPEG format is its versatility. Having a digital photo in JPEG, you can be almost 100% sure that you can easily open it using regular means of the OS of various computers and mobile devices, publish it on a personal page of a social network, print to a printer or a mini-lab and do many other actions.

The fact that the RAW format is much less common and universal than JPEG is an obvious fact, and there is no point arguing with this. The compatibility problem with various applications is further compounded by the fact that there are currently many varieties of RAW files. In fact, each of the major manufacturers of photographic equipment has proprietary recording formats for RAW images: CRW and CR2 for Canon, NEF for Nikon, SR2 and ARW for Sony, RAF for Fujifilm, etc. And the point here is not so much in the ambitions of large companies, but in purely technical differences regarding signal processing algorithms and the internal representation of image data in cameras of different series and manufacturers. In addition, with the improvement of digital photographic equipment, there is a need to modify existing recording formats for RAW images, which further complicates the compatibility problem.

As a result, not a single universal RAW converter (or other application designed to work with files of this format) can open absolutely any RAW file. That is why to cameras with the function of saving images in the form of a RAW image, as a rule, special software for working with RAW files of exactly the format used in this model is attached. It can be either proprietary utilities (usually designed to process RAW files recorded by cameras of this manufacturer only), and special versions of universal RAW converters, such as Adobe Photoshop Lightroom, SILKYPIX Developer Studio, etc.

An attempt to solve this problem globally was made by Adobe. In 2004, she introduced an open format for recording RAW images of digital images, which was called DNG (short for Digital Negative - literally “digital negative”). However, camera manufacturers took this initiative very coolly: leading market players still use their own RAW formats. One of the rare exceptions is Leica, but with all due respect to the history and philosophy of this, without exaggeration of the legendary brand, it should be noted that the market share occupied by its products is currently extremely small and, as they say, does not make any weather.

Thus, the solution to the compatibility problem of RAW files of cameras from different manufacturers lies mainly with the software developers. And in this case we are talking not only about companies that produce universal RAW converters. The number of graphic editors and programs for viewing digital images is gradually increasing, in which the ability to display and process RAW files is implemented (one of the examples is the ACDSee utility, popular in our country). In Windows 7 and 8, a standard file browser allows you to display thumbnails of RAW files of various formats. In general, every year the number of software products that support working with RAW files is increasing.

However, there is an extremely simple way to solve the “JPEG or RAW” dilemma once and for all. Most modern cameras that allow you to record pictures in RAW format have a mode for saving photos simultaneously in both RAW and JPEG. The latter is convenient for “household” purposes and for previewing (as a kind of “control fingerprint”), and the RAW image is useful in case you need to fix technical errors made during the shooting.

Of course, this approach has its drawbacks. One of them is an increase in the volume occupied by images (as compared to recording only in RAW). However, since the JPEG file is much more compact than the RAW image, the reduction in the maximum number of frames that fit on the media will be insignificant, and this can be sacrificed for the sake of new opportunities and convenience.

The second drawback is the slower burst speed. For most modern cameras, the maximum shooting frequency and burst length are more or less dependent on the format in which the images are saved. Saving frames only in JPEG usually allows you to achieve higher speed and save more pictures in one series than when recording in RAW (and even more so in both formats at the same time). Thus, when choosing a burst mode, the photographer will have to decide what is more important at the moment: speed or post-processing capabilities.

Conclusion

Finally, we briefly state the main ideas presented in this article.

The fundamental advantage of the RAW image is that it stores all the image information captured by the camera sensor at the time of shooting. When saving a frame in JPEG format, a significant part of this information will be irretrievably lost. That is why in the process of processing a RAW file, the photographer has much wider possibilities for correcting both his own miscalculations and errors made by the camera’s automation.

The function of saving RAW files is an undoubted advantage of a digital camera, since it allows the photographer to fully realize the potential capabilities of the camera even if the settings were incorrectly set or an error was made when choosing the exposure.

Although the RAW format allows you to save much more information about the image compared to JPEG, the possibilities for manipulating RAW images have their own limitations, due to the technical characteristics of the camera, in particular, the real range of sensitivity of sensor elements, ADC resolution, etc. Therefore, in those cases when gross errors were made in the choice of settings during the shooting, even the presence of a RAW image of the frame does not guarantee a satisfactory result.

Working with RAW files is not as complicated as it might seem at first glance (especially to an inexperienced person). Frames made without technical errors usually do not require additional processing and can be converted to JPEG (or to files of other graphic formats) in batch mode with default settings.

Along with significant disadvantages, the JPEG format also has an undeniable advantage: much better compatibility with software products, as well as with computer and household equipment. That is why the best option is to save each image both in the form of a RAW image of the frame, and in JPEG format (fortunately, in most modern cameras this is provided). And if you are confused by the decrease in the number of frames that fit on an existing memory card in this mode, buy another one. In the end, the New Year is approaching, and everyone has the right to give himself at least a small gift.

You have probably heard about the “digital” negatives - the RAW format ( approx. translator - from the English.raw - "raw") However, the inconsistency of the presentation of what the RAW format is, can cause difficulties when working with it. Part of them is the lack of a single standard. The RAW format has many specifications, for example: .CRW or .CR2 for Canon, .MRW for Minolta, ORF for Olympus, various versions of .NEF for Nikon. But they all have common properties. So that you can "sort through" your knowledge of "digital" negatives, I will tell you how the image is formed in a digital camera.

RAW format. What is it, where is it used and why is it needed

The RAW file contains data obtained directly from the camera’s photosensitive sensor. The structure of this data may vary, but in all cases they completely, without loss, reflect the result of the conversion of light energy into electrical signals. So, let's clarify what happens when light hits the sensor.

There are several digital imaging technologies that fall under the concept of a “digital camera." Almost all of them generating RAW files belong to “mosaic” cameras or digital cameras with an array of color filters (the “color filter array” - CFA).

In “mosaic” cameras, two-dimensional (flat) platforms are used that “capture” and “take into account” photons. The pads consist of the same cells arranged in rows and columns, thus forming a matrix. Each cell is a photosensitive detector constructed using one of two technologies: a charge-coupled device (CCD) or a complementary metal oxide semiconductor (CMOS). Usually, each cell defines one pixel of the final image.

The matrix. Each matrix element is one pixel of the image.

Each cell on the site - a photosensitive sensor - just "counts" the number of photons. The electric charge generated by the cell is directly proportional to the energy of the "captured" photons. The main feature of the process is that the matrix forms an image in shades of gray - the RAW file does not contain information about the color.

Convert a black and white image to color

The role of the array of color filters is to “colorize” a colorless RAW image. The cells of the matrix are “covered” with color filters. Thus, each cell catches only either “red”, or “green”, or “blue” photons. In most photosensitive sensors, the filters are ordered according to the Bayer principle. The figure below shows this order:

A color filter is installed above each cell, so it perceives only one of three colors: red (R) green (G) or blue (B) The order of the filters follows the Bayer pattern. There are 2 times more green filters than blue and red ones. The retina of the human eye, which is most sensitive to green light, is similarly arranged.

Also, other color filters and their orders are applied. Some cameras use sensors with CMY filters ( approx. translator - an abbreviation derived fromCyan-Magenta-Yellow - “cyan-magenta-yellow” - the color “palette” used in printing, for example, in offset printing.), instead of RGB filters. CMY filters absorb more light - the final image is brighter. Some cameras may use sensors with a filter of an additional - fourth - color.

All types of color filter arrays are united by one. It does not matter what colors are perceived and in what quantity. The important thing is that each cell perceives only one color. The cell, “covered” with a green filter, calculates the lightness of the green component of the light flux reaching the sensor. The cell, “covered” with a red filter, calculates the lightness of the red component of the light flux reaching the sensor. A cell “covered” with a blue filter calculates the lightness of the blue component of the light flux reaching the sensor.

A RAW file contains two types of data. The first type includes the lightness values \u200b\u200bof each cell, and the second type includes metadata.

Metadata (literally, “data about data”) is generated by the camera processor for each shot. For example, both JPEG and RAW formats contain EXIF \u200b\u200bdata (EXIF - Exchangeable Image Format), which reflects such shooting parameters as the model and serial number of the camera, shutter speed and aperture value, lens focal length and fact flash fires at the time of shooting.

RAW files also contain special information that programs that interpret RAW files into RGB images use.

In addition to the lightness values \u200b\u200bcorresponding to each pixel cell, the RAW interpreter reads information about the location of color filters from the RAW file. Using this data, the program establishes the correspondence of the cell and the color of the filter that covers it. Then the RAW converter constructs the RGB image by interpolation: the color of each pixel in the final image is calculated taking into account the color and lightness of the analyzed cell corresponding to the pixel, as well as the colors and lightness of its “neighbors”.

RAW-interpreter converts colored “mosaics” into an image based on data in RAWfile.

The process of converting colored "mosaics" into an image is the main action that the RAW interpreter implements. But not the only one. The RAW interpreter performs the following tasks in addition to the main action:

1.White Balance Determination

The white balance value set by the digital camera at the time of shooting does not affect the data stored in the file. It is simply written to the appropriate metadata field. Some interpreters read this value and use it in the formation of the final image. At the request of the user, the white balance can be easily changed. Other interpreters can ignore the value “sewn” into the file and determine the color ratio by analyzing the -file.

2. Color rendering

Each value in the -file sets the lightness of one of the three basic colors: red, green or blue. But “red”, “green”, “blue” are loose concepts. If you could see other people's thoughts and ask a hundred people to imagine red, then you would find a hundred different shades of red. Color filter matrices may vary depending on the model of digital camera. Therefore, the RAW interpreter tries to identify “pure” red, green and blue colors in a device-independent color space, for example, CIE XYZ. It is developed taking into account the peculiarities of human color perception.

3. The purpose of the corrective gamma function

The tone distribution of the scene is perceived by the photosensitive sensor linearly (gamma function is 1). This perception is very different from the human and "film". The interpreter applies a corrective gamma function to the image so that the distribution of glare, penumbra and shadow on the final image matches the way a person sees the light. The linearity of perception of the photosensitive sensor is a key factor in calculating exposure during shooting. The topic is discussed by me in the article "RAW, exposure and linear perception of light."

4. Digital noise reduction, smoothing and sharpening

Difficulties may arise with very small image details. If a part is “captured” only by a “red” or “blue” cell, it is difficult for an interpreter to calculate the color of this part in the image. Also, simple algorithms for converting “mosaics” into images may encounter difficulties in determining the boundaries of two color-uniform regions. In addition to algorithms for reducing digital noise and increasing clarity in order to reduce color distortion in the final image, many interpreters are equipped with algorithms that combine two opposite functions: border recognition and smoothing.

All RAW interpreters solve these problems. However, decision algorithms can vary greatly. This is why the resulting images obtained from the same RAW file may have some differences depending on the RAW interpreter used. Some programs will generate images with smoother tone transitions. Thus, they “free up space” for further processing. The rest of the RAW interpreters assign a steeper tone curve, approximating the appearance of the final image to the type of film photography.

There is no “correct” RAW interpreter. Software manufacturers create algorithms for their subjective opinions about which result is “best.”

How a JPEG image differs from a RAW image

When you shoot in JPEG format, the built-in RAW interpreter in the camera performs all the above steps to form the final image. Then it applies the JPEG compression algorithm to it. Some cameras provide the ability to control. For example, you can choose a color space (sRGB or AdobeRGB), a degree of sharpening, and sometimes a tonal curve and contrast. If you take pictures at a fast pace, then it’s inconvenient to specify all these parameters for each frame during shooting. Therefore, in the case of JPEG, the camera restricts you in its own way interpreting the scene being shot.

JPEG images have extremely little editing potential. Active tone and color correction displays 8x8-pixel fragments in the image, which are generated during the conversion of the image to JPEG-format. JPEG-conversion tries to preserve the distribution of tones in the image, in return strongly distorts the colors. Therefore, when editing JPEG images, you may encounter an incorrect display of skin tones and smooth tone transitions.

When you photograph in RAW format, you have the incomparable opportunity for flexible interpretation of the image. When shooting in RAW format, only the camera settings that affect the exposure: sensitivity, shutter speed and aperture value, determine the data stored in the RAW file. Management of all other parameters remains in your hands in the process of RAW interpretation on the computer. Operating in a huge range of changes, you can redefine white balance, select a color space and adjust color balance, distribute tones, adjust image detail (degree of increase in clarity and degree of decrease in digital noise). At certain limits (depending on the RAW interpreter), you can adjust the exposure.

Almost all digital cameras create a 12-bit image: they can save 4096 levels of lightness per pixel. A JPEG image stores only 8 bits of color information per color channel for each pixel. Thus, when photographing in JPEG format, you rely on the RAW interpreter built into the camera. You can only hope that it will discard a large amount of useful information in an optimal way, while maintaining image quality.

The situation is aggravated by the following trend. Many camera manufacturers apply an incredibly steep tone curve to enhance contrast with RAW-JPEG conversion. They strive to create a JPEG image that looks like a positive slide. During the conversion, the available dynamic range is shortened by about 1 EV. However, you cannot determine which tones will be lost and to what extent.

In a sense, creating a JPEG image is similar to a positive process, while shooting in RAW format resembles a negative process. Taking pictures in JPEG, similar to a positive process, you need to choose the right camera settings at the time of shooting. At the processing stage, you will have few opportunities to change anything.

Shooting in RAW format provides significant flexibility in the distribution of tones in the image. A negative opportunity provides a similar opportunity. Developed conditions for color correction and work with saturation appear here. Also, when interpreting a RAW file, you can control the detail of the image - reducing graininess and increasing clarity. This is an additional advantage to processing according to the principles of a “film” negative process.

Shooting in RAW format has another potential advantage, which may not be so easy to demonstrate, but nonetheless. If you photograph in RAW format, then improving the algorithms of RAW interpreters opens up more and more opportunities for you.

Digital photography is developing: it is no longer a “green fruit”, but also not “ripe”, not to mention the mature “freshness”. Everyone who has been working with digital photography technology for at least two years knows that the software is being improved with every new version. JPEG images are relatively flexible. We can see improvements in the algorithms that operate with them, but these improvements are quite restrained. In contrast, RAW interpreters have undergone significant changes since the advent of cameras with color filter matrices. It makes sense to think that they continue to improve in the future. When shooting in RAW format, you will be able to take advantage of these improvements when they become available.

I welcome you to my blog again. You’re in touch, Timur Mustaev. As soon as the novice photographer has mastered the management of his camera, he begins to wonder what the RAW format of photography is. In this article, you will find out what it is, why it is better to photograph in RAW format and what advantages can you get from this for yourself? We proceed to the analysis in order.

Definition of a concept

Let's start with the simplest question. What is the raw format?

RAW (from the English word raw - raw) - one of the data formats containing raw information that is obtained directly from the photomatrix. That is, the file stores complete information about the image.

In the world of photography, the "raw" format is perfect, since only serious cameras allow you to use this format.

Important! RAW is a common format name. But you should know that in Nikon, the RAW format is NEF, and in Canon - CR2.

Pros and cons of this format

Benefits:

  • The bit depth of files varies from 12 to 14 bits, while JPEG has only 8 bits. What does this parameter give? It prevents the appearance of pasteurization - the appearance of color jumps when the brightness changes instead of smooth transitions.
  • can be configured either before shooting, or after it, in other words, can be later processed in the editor.
  • Many shooting parameters become raw material for sculpting the perfect image. They can be easily changed. What are these options?
  1. Digital noise (eliminating it is much easier than in other formats);
  2. The presence of sharpness (increase indicator);
  3. Brightness;
  4. Saturation;
  5. Colour contrast.
  • Correction can correct even difficult optical imperfections, such as vignetting or aberration.
  • Using all the features will allow you to normalize photos in terms of brightness, that is, to avoid overexposure or dark areas in which information about the details is completely absent.
  • The initial information while editing remains untouched, you can always start a new file conversion.
  • Different converters present the RAW file in different ways, so the photographer can easily find for himself suitable for both management and creative criteria.
  • The photographic latitude of a RAW file is significantly higher than that of JPEG. This helps in contrast shooting and when shooting in bright sunny noon.

Disadvantages of the format:

  • The write speed to the camera’s memory card is slow, so shooting more than 6 frames / sec will fail.
  • It takes up more memory than JPEG because it has more image information.
  • A quick view of these pictures does not work, because it is opened only through the converter - a special program that reads this format.
  • A “raw” file cannot be sent to social networks, to a blog, sometimes even sending by e-mail fails. This will become available only after converting the file.
  • You need to try several programs to view the "raw" files in order to choose the best option for yourself.

When should you shoot in raw format?

  1. You have more time to process your photo.
  2. You do not have memory limits for storing photos.
  3. You have a desire and confidence in what you see and can convey the world better than a soulless camera.
  4. You love the deep, long creative processing of your images. In this case, an excess of information will act as supporting material for you.
  5. You want to use all the features of the camera and use the dynamic range. Those objects that are not in the dynamic range appear either overexposed, or very darkened, that is, they lose all the details.
  6. You do not like pictures taken in JPEG format. You are sure to get the best quality RAW photos.

Opening a raw file

How to open a file?

One of the simplest methods is to double-click on this file. In this case, Windows must choose the program to open such files by default.

If the file does not open, what should I do? The main reason is the lack of an application program for viewing and processing such "raw" extensions. Therefore, you need to install it!

Converters

How to open RAW format?

The simplest program for opening and processing should be provided by the manufacturer of the SLR camera in the kit on the disk. So, Nikon has Nikon Imaging and Capture NX, and Canon has Canon Utilities RAW Image Converter.

If we talk about more professional programs, the most popular utility is Adobe Photoshop Lightroom. It will help not only process the photo, but also send it to the publication for sale.

The second most popular is considered the well-known Photoshop. I would like to note that one installation of the program does not get off. You need to install the auxiliary plug-in Adobe Camera RAW, which will translate information for Photoshop into an accessible language.

Today, this plugin already includes a default Photoshop photo editor, so you can not worry about additional downloads.

The main drawback of both Lightrum and Photoshop is the price of the license.

Now I want to make a list of free programs that are less common:

  • « Microsoft Camera Codec Pack"- the official file, suitable only for Windows! Includes many formats. Easy to download from the official site and allows you to view any photo.
  • Xnview - A free utility that supports 500 formats and has some simple processing functions, for example, changing the brightness and resolution of the image.
  • Irfanview - A free program for viewing and small editing. Has batch image conversion. To expand the capabilities of the program, there are many plugins.
  • ACDSee - A paid program, worth $ 99.99. It is used not only for viewing, but also for editing and even sorting images. In addition to everything, you get your own cloud storage.

  1. Take pictures in RAW format, taking into account the subsequent processing in a graphical editor.
  2. You get only material for your future photo - remember this!
  3. Set the white balance using the available modes, i.e. approximately. More fine tuning can be configured later.

Personally, I photograph in 2 formats at the same time, this is RAW + JPEG of good quality. What is the advantage? Everything is simple. After hundreds of captured images, viewing and selection is required. Therefore, in JPEG format, I look through all the photographs taken and delete unnecessary ones (including raw ones). Then with the rest, you can work, that is, process and bring to mind.

Important! Be aware that any photograph taken either by an amateur SLR camera or a professional one needs processing.

Finally, my advice to you is that. If you really want to learn how to take high-quality photographs and process them correctly, develop and improve in this area, do not stand still. It will bring you more emotions and positive photography experiences.

Here are some videos of courses to begin your development with:

  1. or My first MIRROR. This video course, a big cheat sheet, for the development of all the nuances of photographing and mastering the SLR. This is your assistant in the world of high-quality photos. The course is very simple, and contains practical examples.
  2. Lightroom - an indispensable tool for a modern photographer. A good video course is that everything is described in detail with examples, in a very simple and understandable language. All processing examples are shown in RAW format. Highly recommend, especially for beginners!
  3. Photoshop from scratch in the VIP 3.0 video format. For people who want to learn how to work in Photoshop. All the basics for becoming a professional in processing.
  4. Photoshop for the photographer 3.0. VIP. This course is for photographers who do not stand still, but want to get masterpieces from their photos. Processing, retouching and much more you will find in this video course. All the secrets of processing photos in one course.

My first MIRROR - for fans of the CANON camera.

Beginner Digital SLR 2.0 - for fans of the NIKON camera.

This concludes my detailed article on the topic of the "raw" format. Remember that professional photographers choose the RAW format, as it is the material for transforming their creative ideas! Share on social networks, and subscribe to further update my blog.

All the best to you, Timur Mustaev.

What are RAW images? Raw is a raw digital camera format. Shooting in this format is considered essential for most modern users of digital cameras.

The RAW format in digital photography corresponds to the negative in film: it contains raw, “raw” pixel information directly from the sensor of a digital camera. The RAW file did not even go through the demo, and therefore simply contains the values \u200b\u200bof red, green, or blue in each of the pixels. Typically, digital cameras process this file, converting it into a full-color JPEG or TIFF file, and write the result to a memory card. When digital cameras have to make some fundamental decisions, and therefore the original RAW gives you more control over how the resulting JPEG or TIFF will look. This article is intended to illustrate the technical advantages of RAW files, and also provides tips on when to use them.

The RAW file is converted to the final image in JPEG or TIFF format in several stages, each of which can make an irreversible image correction. One of the key advantages of the RAW format is that it allows the photographer to postpone these adjustments, giving him the opportunity to apply them independently with greater flexibility, as this is most suitable for each image. The following diagram illustrates the processing sequence:

  1. Demosaic
    White balance
  2. Tonal curves
    Contrast
  3. Color saturation
    Sharpness
  4. 8 bit conversion
    JPEG compression, tiff

Demosaics and white balance include the interpretation and conversion of data from the Bayer matrix into an image with all three basic colors in each pixel and are carried out in one step. It is the Bayer matrix that makes the first image look more grainy than the other two, and also gives the image an excess of green.

Our eye perceives the difference in illumination logarithmically, and therefore when the light intensity increases fourfold, we perceive this as a doubling of illumination. A digital camera otherwise records the difference in illumination, linearly - doubling the light intensity doubles the information received by the camera sensor. That's why the first and second images look much darker than the third. In order for the data read from the camera’s matrix, recorded by a digital camera, to be converted as we perceive it, it is necessary to apply tonal compression.

Color saturation and contrast can also be changed, depending on your camera’s settings. The image is then sharpened to compensate for the anti-aliasing caused by demosaicing, which is noticeable in the second image.

The high bit depth of the RAW image is then converted to 8 bits per channel and subjected to JPEG compression based on the compression settings of your camera. Up to this point, RAW image data is still in the buffer memory of a digital camera.

There are several advantages to using any of the above steps of converting RAW subsequently to a personal computer as opposed to processing in a digital camera. The following sections describe how using RAW files can improve the quality of these conversions.

RGB \u003d demosaic converts the encoded image of a Bayer I pattern into a truecolor RGB image using linear gradient-interpolated interpolation.

A Bayer filter demo or color filter matrix refers to the arrangement of color filters that allow each pixel in the matrix of a digital camera to record only red, green, or blue data. The patterns emphasize the number of green sensors that simulate the greater sensitivity of the human eye to green light. The function uses interpolation to convert two-dimensional Bayer encoded data into a full color image.

This is a very resource-intensive process, and therefore the best demosaicing algorithms require a lot of processor power, so digital cameras are endowed with a processor. Most digital cameras convert files with a reasonable reduction in quality so that this happens in a reasonable amount of time. The use of demosaics on a personal computer allows you to use the best algorithms, since its processor is usually much more powerful than a typical digital camera. Better algorithms can squeeze a little more out of your camera’s sensor, providing greater resolution, less noise, more color accuracy and less moire.

The JPEG image from the camera is unable to resolve as close lines as RAW. And even digital negativity does not allow achieving an ideal display of lines, since the process of demosaicing always introduces some smoothing into the image. Only sensors that receive all three colors in each pixel could achieve the perfect image (such as Foveon).

Flexible white balance

White balance is the process of eliminating the unnatural color ratio so that objects that are white appear as white in your picture. The color ratio in a JPEG image can often be changed by post-processing, but at the expense of color depth and color gamut. This is due to the fact that the white balance is essentially applied twice: first when converting equal and then again when post-processing. Digital negatives give you the power to apply white balance to your photo after shooting - without wasted bit loss.

High capacity

In fact, digital cameras record each color channel with much greater accuracy than 8 bits (256 levels) per channel used in JPEG images (see “What is Bit Depth”). Most modern cameras record each channel with 12-bit accuracy (2 12 \u003d 4096 levels), providing several times more color gradations that can be achieved using JPEG from the camera. High bit depth reduces exposure to posterization and increases flexibility in the choice of color space in post-processing.

Dynamic range and exposure compensation

The RAW format usually provides a much larger “dynamic range” than JPEG, depending on how the camera creates its JPEG. The dynamic range is defined as the interval of chiaroscuro that the camera can distinguish between completely black and absolutely white. Since the original color data were not logarithmed using curves (see the introduction), exposure to a RAW file may subsequently be exposed to exposure compensation. Exposure compensation allows you to correct the metering error, or it can help to extend details lost in the light or in the shadows. The following example was shot in the direction of the sun and shows the same RAW file with a correction of -1 step, 0 (without correction) and +1 step. Hover over captions to see how exposure compensation affects your image.

Note: +1 and -1 step means an increase or decrease in illumination by half, respectively.

Exposure compensation can also be recorded as eV, for example, +1 eV.

Note the large amount of detail in the light and in the shadows in these three images. Similar results could not be achieved simply by highlighting or darkening the JPEG file - neither in the dynamic range, nor in the shades. For better transmission, this wide dynamic range can be used.

Enhancing RAW image clarity

Since the RAW file was not processed, the camera did not apply sharpness to it. As with dematrization, better sharpening algorithms are often much more resource intensive. Thus, sharpening performed on a personal computer can cause fewer halo defects with a similar degree of correction (for examples of sharpening defects, see the chapter “Sharpening with the help of a“ blur mask ”).

Since sharpness depends on the expected viewing distance of your image, the RAW format also provides more control over what type and amount of sharpness correction will be applied (at your discretion). Sharpness correction is usually the final step in post-processing, since it cannot be undone, therefore having an already adjusted JPEG is not optimal.

Lossless compression

Compression:

Lossless

With losses

In the RAW format, lossless compression is used, and therefore it does not suffer from compression defects that are noticeable in the "losing" JPEG compression. RAW files contain more information and are better compressible than TIFF, and without compression defects in JPEG format.

Note: Kodak and Nikon use a low-loss RAW compression algorithm, although in this case, any defects are much smaller than in a similar JPEG image. In addition, the compression efficiency of the RAW format depends on the manufacturer of the digital camera. Image shown at 200%. Compression of JPEG with saving of 60% in Adobe Photoshop.

Disadvantages of RAW Image

  1. RAW files are much larger than similar JPEG files, and therefore fill a memory card faster.
  2. Processing RAW files takes more time, because they may require manual work at each stage of conversion.
  3. RAW files are often written longer to the memory card, resulting in fewer frames per second than when using the JPEG format.
  4. RAW files cannot be immediately presented to viewers and customers, because they require special programs to download, and therefore they must first be converted to JPEG.
  5. RAW files require a more powerful computer with more RAM.

Other considerations

One of the problems with the RAW format is that it is not standardized. Each camera has its own RAW format, and it may turn out that one program is unable to read all formats. Fortunately, Adobe announced the Digital Negative Specification (DNG), which aims to standardize the RAW format. In addition, any camera that can save RAW files must come with its own program for reading them.

Good RAW conversion programs can do batch processing and often automate all stages of the conversion except the ones you want to change. This can reduce or even eliminate the advantage of ease of use of JPEG files.

Many new cameras are capable of recording both RAW and JPEG at the same time. This allows you to immediately get the final image, but at the same time keep the “negative” in the RAW in case you later want more flexibility.

So which is better, RAW or JPEG? There is no definite answer, since it depends on the type of shooting. In most cases, RAW files are the best solution due to their technical advantages and the falling cost of large memory cards. RAW files give the photographer much more control, but at the expense of processing speed, footprint and ease of use. Sometimes it’s not worth it for sports and journalism with RAW processing, and landscape and art photographers often choose RAW to get the maximum potential quality out of their digital camera.