What does raw shooting mean?
The truth is that we are always shooting raw… even using the simplest compact cameras or mobile phones with camera. The difference is what happens inside the camera just after shooting.
Shooting raw means that the camera register in the card the data directly captured by the sensor without any kind of processing of that data. So the raw data contains the values just after the analog-digital conversion (to the bit depth or that A/D converter, 10, 12 or 14 bits as we already seen in the sensor article)[1].
Every digital camera has a microprocessor that, as well as controlling the general camera functions, is specialized in image processing. In fact, many new features incorporated to the cameras in the last years (face and smile detection, in camera tone mapping (d-lighting and similar), etc.) are improvements achieved by the constantly increasing power of cameras image processors.

So, when we do not shot raw, the camera uses that image processor to save it as a JPEG (jpg extension file). This image processing in the camera covers some stages (once obtained the digital data and not necessary in this order, although it may be the logical one):
- Black point subtraction (as we seen in the sensor article, even in the total absence of light,the sensor returns greater than zero values). If it is not subtracted from the raw data the image looks dull. In that raw shot took with my Canon A-540 compact camera[2] it is very evident[3]:

| Without subtracting the black point | After black point subtraction |
- White balance. White balancing consists in raising or lowering each of the three channels (red, green[4] and blue) trying to neutralize the image grays. This is necessary because the different light sources produces different colors when the light they emits reflects in the neutral surfaces of the images (the grays). Our brains are able to do that adjustment in a very efficient manner (otherwise, outdoor everything would have a cyan tint, because of the blue light scattering produced by the sky) because they know what should look neutral (pure experience) but the camera is not so smart and we have to tell it what colors should be considered neutral, unless we want to introduce creative color shifts in the image. It is not the camera registering the colors wrong, it sees light as it is, but our brain expects another thing. On the other hand, the fact that the sensor has double green sensels in comparison with reds and blues, makes the camera much more sensitive to green light, so an white unbalanced image looks too green.

| Without white balance | With camera automatic white balance | With dcraw automatic white balance |
- Interpolation. As we show in the sensor article, the raw data needs to be interpolated before presenting a complete image:

| Without interpolation | Interpolated in dcraw with AHD | Interpolated in dcraw with PPG and postprocessed in Photoshop |
Interpolated and processed by the camera[5] |
- In some cameras, tone mapping. As well as happens with white balance, our brain is very efficient doing tone mapping. In very contrasted situations, it is able to adapt very fast and give as a good register from shadows to highlights. Some camera tries to do something similar, raising the shadows and lowering the higher lights.
- In some cameras[6], lens distortion and vignetting correction.
- In some cameras, cropping.
- Output space color conversion and output gamma correction (typically reflex cameras let the user choose between sRGB and AdobeRGB, although compact cameras allow sRGB only). The purpose of this step is to prepare the image for visualization in a render device with limited color rendering. Specifically sRGB was designed for CRT monitors. As for the gamma correction, the need for it is caused by the non lineal response of computer monitors. The shadows are raised using an exponential function, that produces a non-linear image that looks linear to us in fact. Using the above image:


| sRGB color space, gamma 1.0 (without gamma) | sRGB color space, gamma sRGB |
- Saturation increase.
- Contrast increase.
- Sharpening increase.
- Image stile and artistic filters applying, generally the includes at least some saturation, contrast and sharpening preadjustments.
The final result is a JPEG image processed in a record time and with a good quality (even more in the reflex cameras and high end compact cameras, that have more powerful image processors), although the quality varies quite a lot from some cameras to anothers.
So, why should we want the raw file for if the camera is able to do a good quality processing? I believe the answer is already in the question: some of us do not settle in a “good quality processing” and want the best possible one.
And, what advantages and disadvantages raw shooting has? That is for another article in this series.
What does raw shooting mean?,- [1] Unfortunately, some cameras are already processing the raw data. I say unfortunately because that corruptes the spirit of shooting raw, that, as we will see, implies having the full control of the process in order to achieve the maximum possible quality from our Camera. For example, Nikon cameras are subtracting the black point from the raw data, that makes later noise reduction more difficult; and some Sony cameras are filtering the green channels when using high ISO values, at least with the default parameters. ↩
- [2] Using the great CHDK, I have a pending article about it, in order to be able to shoot raw. ↩
- [3] It is more notorious than in a reflex camera because the black point, 31, is closer to the saturation point, 1023 (it uses a 10 bits A/D converter) than it will be in a reflex camera. ↩
- [4] The two greeen channels are usually processed alone at this stage. ↩
- [5] As well as being interpolated, the camera image processor has done some other image adjustments. It is very evident the noise reduction, the contrast increase and the sharpening. ↩
- [6] For instance, Olympus reflex cameras correct lens vignetting. ↩

[...] captados directamente por el sensor de la cámara sin ningún
tipo de procesado de esos datos[1], es decir, que un archivo
raw contiene los datos tal cual salen del conversor
analógico-digital [...]
CommentPingback by ¿Qué es disparar en raw?- Focal Estudio - — December 27, 2012 - 07:43
[...] ¿Qué es disparar en RAW? (Rawness) [...]
CommentPingback by Capitulo 1×05: Vuelta al Cole | Proceso Cruzado — September 23, 2010 - 07:06
De nada. Tú comenta y sugiere y otros experimentamos por ti
.
Un saludo.
Comment by Manuel Llorens García — April 22, 2010 - 19:23
Ok, gracias por aclararme al respecto. La insuficiencia de tiempo y documentación no me permiten experimentar en algo tan interesante y aplicable en mi campo profesional. Gracias otra vez.
Saludos
Comment by Ariel — April 22, 2010 - 18:03
Hola Ariel.
Hay más verde porque en el postprocesado de la interpolación con PPG he afinado un poco más los colores, pero, en principio, AHD no tiene porqué producir un tono distinto de PPG; de hecho, estoy seguro de que no lo hace. Los colores son idénticos salvo a nivel de píxel, claro, en donde sí se pueden encontrar diferencias.
AHD da malos resultados cuando hay algo de ruido presente, pero sus resultados son mucho mejores que los de PPG cuando no lo hay. PPG es muy rápido para obtener buenos previews rápidos. Sin embargo ninguno de ellos es un algoritmo realmente bueno.
AHD es un algoritmo que ha tenido muy buena fama por su relación calidad/velocidad y porque Paul Lee y Dave Coffin lo implementaron en dcraw hace ya bastante tiempo. La versión implementada en RawTherapee, EAHD, es especialmente buena (y desde hace poco tienes el código fuente disponible), como se verá en una comparativa más completa que estoy preparando. No de extrañar, por tanto, que muchas cámaras y reveladores implementen variaciones de AHD.
En el ejemplo de arriba eliminé el ruido con Noise Ninja, solo se trataba de mostrar en este artículo introductorio que la calidad que se puede obtener disparando en raw puede ser superior al JPEG de la cámara. En una cámara compacta como la mía, en la que el procesador no es demasiado potente, los algoritmos de reducción de ruido y de enfoque son especialmente burdos. Cuando disparo en JPEG con esa compacta siempre lo hago con los ajustes al mínimo, para enfocar luego en PS. Aún así la reducción de ruido no la puedo desactivar (y esa foto se tomó con ISO 80, que es el mínimo de la cámara. Aunque no estaba expuesta a la derecha del histograma y eso se nota mucho en una compacta).
El estado actual de mi algoritmo de eliminación de ruido es más experimental que otra cosa, dado que su velocidad es increíblemente lenta. El objetivo fundamental para desarrollarlo era demostrar que el nivel actual de los reveladores comerciales en ese aspecto está muy lejos del ideal y que se pueden lograr resultados muy buenos con un poco de investigación. Tengo que volver a él más adelante, cuando amplíe el artículo de ruido en la zona de “expertos”.
Al respecto de la reducción de ruido, la línea de investigación de Emil Martinec es la que mejores resultados globales está dando. En la versión de dcraw de Jacques Desmis, puedes probar sus algoritmos y los míos, así como una versión muy preliminar de AMaZE (el algoritmo de interpolación de Emil y Paul Lee. Es preliminar como implementación en ANSI-C, porque el algoritmo está acabado).
Comment by Manuel Llorens García — April 22, 2010 - 16:46
Hola
Veo que con el algoritmo AHD “hay más verde” que con PPG, siempre he revelado con AHD y me sucede lo mismo, demasiado verde en las plantas, veo que PPG dá un aspecto más real, aunque el procesado de la cámara viene siendo parecido a AHD, probaré usar PPG en los RAW de mi canon.
Como curiosidad, para eliminar el ruido usaste el algoritmo que comentaste en tu artículo o algun plugin, acción en photoshop?
Saludos
Comment by Ariel — April 22, 2010 - 15:45
[...] This post was mentioned on Twitter by . said: [...]
CommentPingback by Tweets that mention ¿Qué es disparar en raw? « rawness | digital photography science -- Topsy.com — April 19, 2010 - 18:56