RAW and JPEG: The truth is out there

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

bullshark

Guest
Messages
72
Reaction score
27
The signal to noise ratio in another thread has plumetted to zero. The following are facts, not opinions.

.
  • The cells of a camera sensor cannot detect color; only shades of gray from black to white.
  • Each cell of the sensor converts brightness or luminance to an electrical voltage on a fixed scale.
  • Through physical or electronic means the camera imposes red, green, and blue filters in front of individual cells.
  • By this means individual cells measure the intensity of red green and blue light creating a mosaic of individual red, blue and green cell values, and (usually) not in equal proportions.
  • This mosaic comprises the image data in a RAW file.
  • The RAW image data is supplemented with information needed to interpret it, such as sensor size and optical characteristics.
  • Thumbnails and other useful information such as exposure data are also included in the RAW file.
  • Any viewable pixel image (tiff,png,jpg or other) is far far removed and many times different from RAW data.
.

In order to produce a viewable image of any sort, the RAW data must be de-mosaiced using a highly developed mathematical schema that is highly adjustable. The process is far from simplistic since the cells, though very small, are physically separate from their neighbors. If you have a common box grater, you can visualize the problems of the process by laying it on its side. Viewed from directly over head, you see one thing. If you move your head around the zenith you see things differently, some things become more distinct some less so. There are subtle changes in contrast and relative size. This is problem is compounded by the sensor being flat and light striking it obliquely. Your eye is round, not flat, so the image light is automatically scaled and sheared to proportion. Since the image sensor is flat this has to be done algorithmically.

There simply isnt anything like a single pixel with red green and blue color values in the sensor. It must be synthesized. In order to produce an image as jpg would see it, the de-mosaicing process has to interpret the point of view of the individual cells to simulate the effect of each cell being in the same place. There are many ways to accomplish this, and different methods will enhance or suppress some characteristics in the image at the expense of others. Super-duper scientific cameras employ microscanning, where the sensor is moved around so that each cell actually does experience the same light level at the same location as its neighbor.

In many P&S cameras this is taken a step further. Using still more sophisticated mathematics the processor simulates more cells than there actually are on the sensor and predicts what each of those cells would have seen had they actually been there. Modern computational science and semiconductor magic have made this cheap and fast enough that many low end cameras have extraordinary pixel counts. The results are quite good, usually right up until you compare to an image that actually has that many cells.

In addition there are many qualitative filters that are applied to convert the RAW into an image; "White Balance" is just one of them. The following represent just some of the filters that must/will be applied in the translation from RAW to image (jpg or otherwise):

.
  • Dynamic Range
  • Exposure
  • Contrast
  • Brightness
  • Sharpness
  • Saturation
  • Hue
  • Luminance
  • Chrominance
  • Clarity
  • Vibrance
  • Tint
  • Noise
  • Moire
  • Black level
  • and of course, White balance
.

These "filters" are really just stages in the transition from Raw to pixel image with adjustable inputs. Many modern P&S cameras have a "Scene" position on the program dial. In selecting scenes, the camera is using preset combinations of these with specific inputs along with mechanical aspects of the composition to produce pleasant automatic exposures.

These filters all must be applied and choices made about their relative values (sometimes under menu control) to make any image out of the RAW data. All of these information channels have been permanently and irrevocably altered in every format except RAW. Once the die is cast in JPG (or other pixel format) the original relationships are gone forever. Even though many of these can be re-applied later, their use is not as effective nor is control of their interaction as finely-grained as it is in the RAW circumstance. The order of application can be significant. You can't sharpen something that isn't there anymore because something else has subdued it.

.
  • JPEG is lossy. It is almost never a perfect reproduction of the input. It is an estimate.
  • Any JPEG file, including the first recorded image on your camera is an estimate of the image sensor data.
  • Any format other that RAW is greatly and repeatedly interpreted and far removed from the image sensor data.
  • Thousands of quantitative and qualitative interpretations have been applied making any image far-removed from the RAW file.
.

Every photographic circumstance is a unique combination of light, shadow, subject and color. Though engineers strive to post process the RAW data in useful ways, it not just improbable, but impossible for them to pre-determine the optimal interpretation for every possible photograph. The existence of "Scene" modes on cameras bears testimony to that; in spades.

While many default interpretations of RAW data are quite acceptable, none are optimal. That is, any photo that is recorded in a non-RAW format could be improved upon by developing from the RAW data.

In the past RAW was objectionable because of costs both in camera response and especially data storage. I recently purchased a 32 GB Class 10 SDHC for $32.00. Newer cameras have faster and faster processors. Case Closed.

In the past, RAW was objectionable because of high costs to process both in time/effort. Today, even a lowly netbook has a multi-core, multi Gigahertz processor and gigabytes of RAM. Programs such as Adobe Lightroom offer your cameras post-processing characteristics on import by default. That is, Lightroom's interpretation of your RAW data is very close to, if not exactly the same as your camera would have it. With that as a starting point and untainted RAW data as a basis, the full potential of any photograph may be realized. Case Closed.

Someone exclaimed that anyone using photoshop or anything else to process their raw photo was not a phtographer, but a post processing image engineer. Guilty as charged. Better me than some little squad of pencil-neck geeks that not only never saw the image I captured; they've never even been underwater, let alone examined or processed thousands of images captured in every imaginable condition there. Like it or not, your RAW data is post-processed by a bunch of generalized assumptions pre-programmed into the camera, or by you. Case Closed.

Someone else claimed that there is nothing gained from RAW since there will be data loss when you export it anyway. As can already be seen, it will be quite a different source in the first place, and that person clearly forgot that the image can be exported in many formats that are not lossy such as TIF or PNG.

Someone else believed that JPG is much better today than in the past. That would be a "No". JPG algorithms have improved. They are more efficient, smaller and faster. But lossy is lossy and the quality setting still tops out at 90 or so. JPEG is lossy by design; that's how it saves space. The preservation of original images in modern software is a by-product of super fast computers today that can apply all the editing transformations to your image every time you look at it. You can edit the image multiple times because it is always starting with the original, converting it to a lossless format for display (e.g. BMP), applying all your prior editing commands and then applying new ones. JPEG is storage format only and is converted to something else for display and editing. JPG is still lossy, even the first cut. Repeated saves to a new generations will still turn into a puddle of blurred mud. The conversion from RAW has made assumptions and altered the data of the image in many unrecoverable ways.

Some people object to RAW because they can't browse them on their computers. Canon, Nikon, Panasonic and others offer codecs that will make that possible. Just download and install them and you can browsr the same as any other image. Case Closed.

Going forward, the RAW data can always be re-interpreted to enhance or supress original undisturbed data channels while the JPG (or other) pixel image cannot. It is the truth, the whole truth and nothing but the truth.

Going forward, RAW data can be reinterpreted by newly enhanced or invented interpretations with all available data channels intact while the pre-processed pixel image (jpg) cannot.

If you just want snap shots JPG is fine. If they look fine to you, that's A-OK, too. Don't think for even a minute that they haven't been post-processed. Even if you like the outcome, a better quality outcome could be acheived starting from RAW, because you were there.

If you want your best pictures to be the finest images they can be, you need RAW and need to learn to use it. Case closed.
 
Last edited:
I agree mostly; the theoretical considerations are unassailable. BUT in many cases (I shoot raw and JPEG) the JPEG image that Canon decided is a good representation of the scene is as good (to my eyes) as the raw converter in Lightroom, Aperture, Canon Image Browser, Photoshop, Bibble or any other raw converter that I have tried. Don't forget we are at the mercy of the raw converter guys. Some from Canon/Nikon/Sony etc. or from Adobe or Apple or others and their algorithms also depend on some engineering considerations. Saying JPEG is lossy is fine but not terribly useful since you have to remember that we don't often have choices in raw conversion either and in about half of the pics that I take Canon's version of JPEG is as good (to my eyes) as anything I can get out of LR. That doesn't mean they are the same but just as good. I think the real value of raw is that in a few years there will be better raw converters out there that will allow more efficient and better development of your pics, once the JPEG has been made it is really hard to go backwards.
Bill
 
As for the claim of loss, you may be referring to me and if you are you have missunderstood what I tried to express.
Once you save a raw as a jpeg there IS a loss, but its a 1st generation loss, whereas editing a jpeg you incurr a 2nd generation loss when you save it. If you use the jpeg as-is from the camera, you also suffer only the 1st generation loss.
 
:medal: Very well explained bullshark. Thanks for taking the time and energy to lay that all out. Anyone wanting to know the dif between JPEG and RAW needs to read your post. It is in simple understandable English :cheers:
 
As for the claim of loss, you may be referring to me and if you are you have missunderstood what I tried to express.
Once you save a raw as a jpeg there IS a loss, but its a 1st generation loss, whereas editing a jpeg you incurr a 2nd generation loss when you save it. If you use the jpeg as-is from the camera, you also suffer only the 1st generation loss.
Plus the loss that Canon/Nikon incurred by making the JPEG. I still think for most folks in this forum and anyone shooting for the web as their primary means of showing pics, JPEG in many cases is more than good enough. I think we all need to take more pictures, try to get them right in the camera and show more pics be they raw or jpeg driven. If you are shooting JPG and you think your pictures are OK then there is NO reason to buy a new camera that shoots in raw. Most bad pics that I see (and I see a lot) aren't bad because of a poor JPG conversion. IN fact if you are teaching folks to shoot underwater, shooting in JPG is often a great pedagogical tool since you can't go back and fix white balance/other bits and pieces. One instructive approach is to show an entire dive's worth of pics right out of the camera and see how much work they need. Mostly pics benefit more from considerations of composition, strobe position, negative space, lighting and composition than they will by some tweaks in LR.

Bill
 
No. If you use a JPEG as-is you only get the 1st generation loss from the camera.
If you take the RAW, edit it and then save it as JPEG you still get the 1st generation loss, but from your editing software instead.
Its once you edit and save any of the two JPEGs youll start getting 2nd generation loss.
 
So if you edit the RAW file and save it back as a RAW file and then edit that file and save it as a JPG and then edit that JPG and save it again, is that 4th generation or would it be like 3rd generation, once removed?

:D
 
After much research, I opted to go RAW a few months prior to an extended trip to Indonesia. I committed to learning LR and PS RAW and worked hard at getting to understand the workflow needed to generate both initial JPEGs while on the trip and final processed photos on return from the trip. I shot RAW only for about two-thirds of the trip (~40 of 60+ dives). After significant frustration with the process - and seeing no real benefit to the quality of the finished product - I switched to shooting RAW + JPEG Fine. I can honesty look at photos where I start from RAW and work to finished and where I start with the JPEG Fine and work to finished and find no difference in the output - only the workflow (and amount of work) needed to get there. I have taken the same photos and worked RAW through PS RAW and JPEG Fine through PS... I find my results in PS to be both easier to process and the output more visually pleasing. It may be that I failed to learn the best RAW conversion shortcuts, but I think I gave it a fair shot.

While I agree with the tecnical side of what BullShark puts forth, I have to side with bvanant and say there are so many other factors that lead to a good photograph, the difference between RAW and JPEG are insignificant.

That said, I continue to shoot RAW + JPEG Fine for two reasons: 1 - In case I have an incorrect setting in the camera - say, white balance. The RAW makes that mistake meaningless (I have done this on one day of diving since 2007). And 2 - As others have said, there may be advances in RAW conversion algorithms in the future. Is it worth it? I sincerely doubt it. But packrat as I am, I'll likely continue to waste drive space because it's cheap insurance for what I don't know today.
 

Back
Top Bottom