-
RAW vs JPG
Hi, I know the general consensus is to shoot in RAW format, but I was wondering whether anyone ever shot in JPG? Ive noticed a real difference when I photograph birds in jpg as they look so much sharper etc. I know RAW isn't sharpened in camera, but what is the comparison between a jpg image sharpened in camera and a RAW file processed in PS? The reason I ask is that if I was to delete images in the field purely from the LCD screen on the camera, then JPG's would win hands down as they just look so much better.
Any opinions?
Thanks, Simon
Last edited by John Chardine; 03-25-2012 at 07:33 AM.
Reason: typo
-
You're only ever getting a jpeg preview from the RAW file on your camera LCD screen http://www.naturescapes.net/docs/index.php/articles/497
It probably varies between models / makes as to whether the in camera processing settings for jpeg files are applied to jpeg previews
Last edited by John Chardine; 03-25-2012 at 07:34 AM.
Reason: typo
-
They are applied to the jpeg previews Andrew, at least on Canons. You can easily check this by changing the settings and looking at the result on the screen.
So Simon- as Andrew says you are always looking at a jpeg preview when you view the LCD screen. I shoot using the neutral Canon Picture Style with sharpening at one notch above none and the contrast and saturation down. The last two settings allow a more accurate idea of blown highlights in the RAW image.
-
Lifetime Member

Originally Posted by
Simon Wantling
Hi, I know the general consensus is to shoot in RAW format, but I was wondering whether anyone ever shot in JPG? Ive noticed a real difference when I photograph birds in jpg as they look so much sharper etc. I know RAW isn't sharpened in camera, but what is the comparison between a jpg image sharpened in camera and a RAW file processed in PS? The reason I ask is that if I was to delete images in the field purely from the LCD screen on the camera, then JPG's would win hands down as they just look so much better.
Simon,
Greetings. RAW is just numerical data and not an image yet... it needs to be processed into an image and then stored in an image format such as jpeg. The in-camera settings for such things a white balance, sharpening, contrast, brightness, etc. are a sort of formula for producing a jpeg from RAW. One should be able to produce a close enough version of the in-camera jpeg from RAW by using the camera manufacturer's converter (CaptureNX for Nikon, Digital Photo Professional for Canon) with the in-camera settings (which is stored in the RAW metadata). With PS (which uses Adobe Camera RAW to convert) you have to approximate your in-camera settings (except for white balance) so it is more difficult to create an out-of-camera conversion from RAW that is identical to the in-camera version.
In any event the in-camera jpeg is just one choice of how to convert. RAW provides the opportunity to alter some of those parameters if one so chooses. That opportunity exists as long as you have the RAW file... who knows, years later you may want a slightly warmer version of that old favorite image
.
Cheers,
-Michael-
-
I see this idea that the histogram is from the jpeg all the time, but it makes no sense. The data processing in the camera is already a huge amount of processing. Why do the extra work to create a jpeg only to then turn around and decompress it it to make a histogram? When camera manufacturers are striving to make their cameras faster, the first and simplest step in the data processing flow would be to cut that (jpeg decompression) step out.
Here is a more likely in camera processing flow:
raw data from the A/D converter (keep raw data in memory)
v
convert to 8-bit (in another memory location)
v
apply what balance
v
apply tone curve (the variable gamma curve) ---> sub-sample ---> generate histogram
v
jpeg compression
v
format raw with embedded jpeg and exif data ---> write raw file if selected
v
write jpeg if selected
So the histogram is generated from the data with white balance and tone curve applied but is really unlikely to be on the jpeg data.
And the histogram is likely generated from 8-bit sub-sampled data as the histogram computation is compute intensive.
Roger
-
-
-
Lifetime Member

Originally Posted by
Roger Clark
And attached is a 512x400 pixel section of the raw image enlarged 2x so it is easier to see the individual pixels. The pattern is caused by the red, green and blue pixels responding at different intensities to the sunset colors.
Roger
Dcraw -D is still converting to an image (even though it's not interpolating/demosaicing) and -T is for a TIFF which is an image format.
The some calculation here part of the raw file before it can be sent to an output device is the part that makes it not an image in my mind (not to mention the requirement of raw being cooked in some way before display).
Cheers,
-Michael-
-

Originally Posted by
Michael Gerald-Yamasaki
Dcraw -D is still converting to an image (even though it's not interpolating/demosaicing) and -T is for a TIFF which is an image format.
The some calculation here part of the raw file before it can be sent to an output device is the part that makes it not an image in my mind (not to mention the requirement of raw being cooked in some way before display).
Cheers,
-Michael-
dcraw -D -4 -T -j -t 0 C45I5278.CR2
-D Same as -d, but totally raw (no color scaling).
-4 Linear 16-bit, same as -6 -W -g 1 1.
-T Write TIFF with metadata instead of PGM/PPM/PAM.
-j this option guarantees that each output pixel corresponds to one raw pixel.
-t 0 disables all flipping.
The only conversion with these options do are putting 14-bit data into 16-bit words and organizing the data with a tiff header with all the exif data. Raw formats are really no different than any other image formats. There is a bunch of header information, and a linear stream of bytes representing the image. If you want to argue raw data is not an image, than neither is tiff, jpeg or any other format.
Roger
-
Lifetime Member

Originally Posted by
Roger Clark
dcraw -D -4 -T -j -t 0 C45I5278.CR2
-D Same as -d, but totally raw (no color scaling).
-4 Linear 16-bit, same as -6 -W -g 1 1.
-T Write TIFF with metadata instead of PGM/PPM/PAM.
-j this option guarantees that each output pixel corresponds to one raw pixel.
-t 0 disables all flipping.
The only conversion with these options do are putting 14-bit data into 16-bit words and organizing the data with a tiff header with all the exif data. Raw formats are really no different than any other image formats. There is a bunch of header information, and a linear stream of bytes representing the image. If you want to argue raw data is not an image, than neither is tiff, jpeg or any other format.
Roger
Raw formats differ from image formats (jpeg, tiff, etc.) in as much as a number of processing steps must be accomplished in order to produce a format useable by video display and other output devices (printers). Among the processing steps are demosaicing and white balance which have a significant impact on the appearance of the "image". There are many options for how the processing is applied to the raw data to transform it to a format useable by video display and other output devices. Regarding the OP, I was trying to indicated the difference between saving a raw file and a jpeg. I think they are pretty different (didn't even mention jpeg compression).
I not interested in arguing whether raw data is an image.
Cheers,
-Michael-
-

Originally Posted by
Michael Gerald-Yamasaki
Raw formats differ from image formats (jpeg, tiff, etc.) in as much as a number of processing steps must be accomplished in order to produce a format useable by video display and other output devices (printers). Among the processing steps are demosaicing and white balance which have a significant impact on the appearance of the "image". There are many options for how the processing is applied to the raw data to transform it to a format useable by video display and other output devices. Regarding the OP, I was trying to indicated the difference between saving a raw file and a jpeg. I think they are pretty different (didn't even mention jpeg compression).
I not interested in arguing whether raw data is an image.
I understand you are no longer interested in pursuing this thread, but I feel there is remaining confusion for others reading, so I'll try to clear that up for those readers.
Raw format is a valid image format and no computational processing is needed to retrieve a black and white or color image except for decompressing the data. One reads on the net that raw files are not images and that is simply incorrect. Demosaicing is not a necessary step to retrieve an image, even a color image. I showed one such image as a black and white to show all the original data. I could have reorganized the data with no computation and produced a color image. Of course, post processing, including demosaicing can certainly improve the apparent resolution and color balance of an image, depenging on the algorithm and subject.
Roger
-
Lifetime Member
Roger,
Similarly, as to not confuse readers... From the Adobe DNG Specification:
Camera raw formats offer both advantages and disadvantages. One advantage is increased artistic control for the end user. The user can precisely adjust a range of parameters, including white balance, tone mapping, noise reduction, sharpening and others, to achieve a desired look.
One disadvantage is that unlike JPEG and TIFF files which are ready for immediate use, camera raw files must be processed before they can be used, typically through software provided by the camera manufacturer or through a converter like the Camera Raw plug-in for Adobe Photoshop® software.
Cheers,
-Michael-
-

Originally Posted by
Michael Gerald-Yamasaki
Roger,
One disadvantage is that unlike JPEG and TIFF files which are ready for immediate use, camera raw files must be processed before they can be used, typically through software provided by the camera manufacturer or through a converter like the Camera Raw plug-in for Adobe Photoshop® software.
That is simply because the standard image processing and viewing packages available to consumers do not have the software to read the raw file directly, so the need for a translation package. They could just as easily provide readers that would read the raw data directly. These facts do not make the raw data not an image. I have many spacecraft data formats (e.g fits, vicar, isis and others) that photoshop and other consumer image viewers can not read. That does not make them not images. On linux and unix machines, there are data formats like ppm, pbm, pnm, and xwd that photoshop and windows programs can not read. That doesn't make them not images.
In adobe's statement above, by "immediate" use, it is only in the context of what they support in their software. It doesn't mean that because they don't support it that it is not an image.
Roger
-
Super Moderator
Good discussion. One note abut in-camera histogram. In all consumer digital cameras on the market (I am not sure about medium format backs) the histogram is generated from the JPEG preview files. The camera does not keep RAW data in buffer after it has been written to CF card because it needs to empty buffer as soon as possible for the next shot. Once the RAW file is saved the camera reads the embedded JPEG to generate the histogram, this is much faster than generating histogram from RAW data again plus the camera should be able to display histogram when output is set to JPEG only in which RAW data has been discarded after writing.
The Picture Style settings in Canon cameras affect JPEG and therefore the displayed histogram and sometimes can give you a false feel for the image, that's why I set all my cameras to neutral and disable ALO despite the fact that I shoot RAW only.
Last edited by arash_hazeghi; 03-26-2012 at 10:01 AM.
-
Lifetime Member

Originally Posted by
arash_hazeghi
Once the RAW file is saved the camera reads the embedded JPEG to generate the histogram, this is much faster than generating histogram from RAW data again [...].
Arash,
Greetings. Do you know what the "luminance" histogram is showing?
Cheers,
-Michael-
-
Super Moderator

Originally Posted by
Michael Gerald-Yamasaki
Arash,
Greetings. Do you know what the "luminance" histogram is showing?
Cheers,
-Michael-
just the luminosity distribution for pixels.
-
Lifetime Member

Originally Posted by
arash_hazeghi
just the luminosity distribution for pixels.
What I meant is do you know how this is calculated in camera? I'm guessing it's one of the formulas that just adds r + g + b at a particular ratio such as (0.2126*R) + (0.7152*G) + (0.0722*B).
If so, one would need to demosaic & white balance (at least) to collect such values from RAW, so collecting that info from the jpeg would be somewhat easier than from RAW. Oh, you'd have to demosaic & wb to get the individual r, g, b values, as well.
I'd so much prefer to see a value (as in hsv) histogram, which would show if any one of the three channels was close to being blown. But that's just me.
Value is max(r, g, b).
Cheers,
-Michael-
-
Super Moderator

Originally Posted by
Michael Gerald-Yamasaki
What I meant is do you know how this is calculated in camera? I'm guessing it's one of the formulas that just adds r + g + b at a particular ratio such as (0.2126*R) + (0.7152*G) + (0.0722*B).
If so, one would need to demosaic & white balance (at least) to collect such values from RAW, so collecting that info from the jpeg would be somewhat easier than from RAW. Oh, you'd have to demosaic & wb to get the individual r, g, b values, as well.
I'd so much prefer to see a value (as in hsv) histogram, which would show if any one of the three channels was close to being blown. But that's just me.
Value is max(r, g, b).
Cheers,
-Michael-
yup it's weighted average (same as photoshop) and yes it is calculated from 8Bit RGB values.
-
Post a Thank You. - 1 Thanks