Results 1 to 18 of 18

Thread: RAW vs JPG

  1. #1
    Forum Participant
    Join Date
    Jul 2011
    Location
    Northamptonshire, UK
    Posts
    451
    Threads
    152
    Thank You Posts

    Default 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

  2. #2
    BPN Viewer
    Join Date
    Aug 2010
    Location
    Bournemouth, Dorset, UK.
    Posts
    22
    Threads
    2
    Thank You Posts

    Default

    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

  3. #3
    Forum Participant
    Join Date
    Jan 2008
    Location
    Canada
    Posts
    6,588
    Threads
    643
    Thank You Posts

    Default

    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.

  4. #4
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Quote Originally Posted by Simon Wantling View Post
    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-

  5. #5
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    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

  6. #6
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Attached Images Attached Images
     
    Quote Originally Posted by Michael Gerald-Yamasaki View Post

    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.
    I guess one could say that even a jpeg file is not an image. After all, it is just a compressed set of numbers linearly laid on on the disk/memory card. But back to the raw data. The data came off of an imaging chip. One can view the raw data as an image. I took one of my recent sunset images and extracted the raw data with dcraw using the command:


    dcraw -D -4 -T -j -t 0 C45I5278.CR2

    The resulting image is attached. The options extract the data pack it into 16 bits pixels, and ensure each output pixel came from one input pixel from the sensor with no interpolations. It looks like a normal image. This is the full frame. For presentation, I did stretch the image because 14 bits from the camera out of 16 in the file looks dark in photoshop (4 stops dark). Then of course I downsized for BPN.

    If the image had more color, it would look more "specally" because the red green and blue pixels are interleaved, but the image is always apparent.

    Roger

  7. #7
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Attached Images Attached Images
     
    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

  8. #8
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Quote Originally Posted by Roger Clark View Post
    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-

  9. #9
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Quote Originally Posted by Michael Gerald-Yamasaki View Post
    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

  10. #10
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Quote Originally Posted by Roger Clark View Post
    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-

  11. #11
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Quote Originally Posted by Michael Gerald-Yamasaki View Post
    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

  12. #12
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    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-

  13. #13
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Quote Originally Posted by Michael Gerald-Yamasaki View Post
    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

  14. #14
    Super Moderator arash_hazeghi's Avatar
    Join Date
    Oct 2008
    Location
    San Francisco, California, United States
    Posts
    18,545
    Threads
    1,318
    Thank You Posts

    Default

    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.
    New! Sony Capture One Pro Guide 2022
    https://arihazeghiphotography.com/Gu.../Sony_C1P.html


    ------------------------------------------------
    Visit my blog
    http://www.arihazeghiphotography.com/blog

  15. #15
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Quote Originally Posted by arash_hazeghi View Post
    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-

  16. #16
    Super Moderator arash_hazeghi's Avatar
    Join Date
    Oct 2008
    Location
    San Francisco, California, United States
    Posts
    18,545
    Threads
    1,318
    Thank You Posts

    Default

    Quote Originally Posted by Michael Gerald-Yamasaki View Post
    Arash,

    Greetings. Do you know what the "luminance" histogram is showing?

    Cheers,

    -Michael-
    just the luminosity distribution for pixels.
    New! Sony Capture One Pro Guide 2022
    https://arihazeghiphotography.com/Gu.../Sony_C1P.html


    ------------------------------------------------
    Visit my blog
    http://www.arihazeghiphotography.com/blog

  17. #17
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Quote Originally Posted by arash_hazeghi View Post
    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-



  18. #18
    Super Moderator arash_hazeghi's Avatar
    Join Date
    Oct 2008
    Location
    San Francisco, California, United States
    Posts
    18,545
    Threads
    1,318
    Thank You Posts

    Default

    Quote Originally Posted by Michael Gerald-Yamasaki View Post
    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.
    New! Sony Capture One Pro Guide 2022
    https://arihazeghiphotography.com/Gu.../Sony_C1P.html


    ------------------------------------------------
    Visit my blog
    http://www.arihazeghiphotography.com/blog

  19. Thanks David Stephens thanked for this post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Web Analytics