Jump to content

Compressed versus Uncompressed


t024484

Recommended Posts

Advertisement (gone after registration)

Chris started a thread on this topic, showing two pictures of exactly the same composition, one in compressed form, the other one uncompressed.

I could very well see differences between the two, one of the differences being the edge of the lamp being much sharper in the uncompressed version, but in general the uncompressed version has less noise.

I made a grapical presentation of both pictures, to visualise the effect of compression.

Chris I took the liberty of using your pictures for this test , I hope you don't mind.

 

What you see is the magnitude of all 5216 pixels per line for all 3472 lines in a two dimensional representation. The picture starts with the pixels left above, and ends with the pixels right under.

 

First you see the compressed image. Because of the black level of 106, which is 21 "Leica coded" to 8 bits, the magnitude goes from 21 to 255. The value of 106 belongs to ISO 400 of this picture, and varies with ISO.The higher the ISO, the higher this value.

 

Second you see the decompressed picture expanded with Cornerfix. Cornerfix already substracts the black level, so the range goes now from 0 to 16383.

 

Last picture is what you get with a picture that was uncompressed from the beginning, still having all 16.383 levels, with a black level of 106 still to be substracted by the RAW processor.

 

Differences are quite well visible between the second and the third picture, but it is mainly meant as a visualisation of what compression does to a picture.

 

I also investigated the current compression scheme that Leica is using. It is still exactly the same as with the M8, being a SQRT compression.

The difference is though that a black level is now included eating some part of the available range, meaning less dynamic range left for the picture which is visible at roughly 10.500.000 in the second picture.

The other effect of course is the added noise to the picture.

 

Hans

 

Welcome, dear visitor! As registered member you'd see an image here…

Simply register for free here – We are always happy to welcome new members!

 

 

Link to post
Share on other sites

I made a grapical presentation of both pictures, to visualise the effect of compression.

Wouldn’t a logarithmic scale for the x axis give a better impression? With a linear scale the highlights are very prominent, leaving very little room for the shadows.

 

The difference is though that a black level is now included eating some part of the available range, meaning less dynamic range left for the picture which is visible at roughly 10.500.000 in the second picture.

Actually the dynamic range doesn’t suffer, it is just that the representation of tonal values within the limits set by the sensor’s dynamic range isn’t as fine as it could have been. Which is bad enough: when you have a mere 256 slots at your disposal for a “best of” collection of the original 16384 values, you don’t want to leave any of those slots unused. Arguably that is a bug and should be rectified in due course, bringing the compression scheme in line with the one used by the M8 that doesn’t share this deficiency.

Link to post
Share on other sites

Wouldn’t a logarithmic scale for the x axis give a better impression? With a linear scale the highlights are very prominent, leaving very little room for the shadows.

That would be possible, but I made a straight out of the box 1:1 presentation, displaying how one domain is projected on another domain.

Actually the dynamic range doesn’t suffer, it is just that the representation of tonal values within the limits set by the sensor’s dynamic range isn’t as fine as it could have been. Which is bad enough: when you have a mere 256 slots at your disposal for a “best of” collection of the original 16384 values, you don’t want to leave any of those slots unused. Arguably that is a bug and should be rectified in due course, bringing the compression scheme in line with the one used by the M8 that doesn’t share this deficiency.

I do not fully agree.

If the dynamic range is defined as largest value divided through smallest step,

the M8 has: LOG2 {Int (255*255/4)=16.256 / Int(2*2/4)=1} giving a theoretical 14.0 stops compared to

the M9 at ISO 400: LOG2 {Int(255*255/4)=16.256 / Int ( 21*21/4) = 110} Hence DR = 7.2 stops

 

The 14 stops are of course beyond the dynamic range of the sensor, but the 7,2 stops are most likely limiting the dynamic range, although this affects most of all the deep darks and will be unnoticeable in the highlights.

 

That is why my previuos comment that the restricted DR leads to clipping in the highlights, was incorrect.

As you suggest, it would be very easy for Leica to substract the Black Level value from data before compression. This would improve the results, and make it on par with the M8.

 

 

Hans

Link to post
Share on other sites

As usual Hans a very interesting thread. Thank you for your work.

 

Not sure what I would use if I am ever able to afford a M9.

I guess I'd do a side by side comparison, in print, and make my choice based on that.

If my printer is not able to render the extra data of uncompressed any better then a compressed file I don't see the point in using uncompressed. But that is yet to be determined.

Link to post
Share on other sites

If my printer is not able to render the extra data of uncompressed any better then a compressed file I don't see the point in using uncompressed.

I think it is processing where issues are most likely.

 

Anyway, hopefully one day we will have a lossless compression option so we can leave all of this talk behind us.

Link to post
Share on other sites

Advertisement (gone after registration)

If the dynamic range is defined as largest value divided through smallest step,

the M8 has: LOG2 {Int (255*255/4)=16.256 / Int(2*2/4)=1} giving a theoretical 14.0 stops compared to

the M9 at ISO 400: LOG2 {Int(255*255/4)=16.256 / Int ( 21*21/4) = 110} Hence DR = 7.2 stops

But that’s just an apparent difference. The M8 subtracts the black level and normalizes the values to a range between 0 and 16,383 whereas the M9 does not; still the original digitized values are the same and correspond to the same dynamic range (disregarding for the moment any differences between the sensors in the M8 and M9 which in reality place their own limits on the effective dynamic range).

Link to post
Share on other sites

Overwhelmed... I can (sort of) see what the science is saying, and am trying to work out rules of thumb...

 

Looks like Tribble's rule for DNG capture with the M9 could be:

 

1/ if storage / processing speed is an issue AND you're not going above 800, AND you're confident about exposure, then compressed DNGs might be an advantage

2/ if you're using higher ISOs, in exposure critical situations, or shooting work that demands maximum IQ, then UNcompressed is the way to go...

3/ using the "Convert to DNG during import" option in Lightroom makes sense with any Leica DNGs as its lossless compression reduces system overheads for processing.

 

Does this make sense?

Link to post
Share on other sites

Overwhelmed... I can (sort of) see what the science is saying, and am trying to work out rules of thumb...

 

Looks like Tribble's rule for DNG capture with the M9 could be:

 

1/ if storage / processing speed is an issue AND you're not going above 800, AND you're confident about exposure, then compressed DNGs might be an advantage

2/ if you're using higher ISOs, in exposure critical situations, or shooting work that demands maximum IQ, then UNcompressed is the way to go...

3/ using the "Convert to DNG during import" option in Lightroom makes sense with any Leica DNGs as its lossless compression reduces system overheads for processing.

 

Does this make sense?

Hi Chris,

 

One thing is exactly the other way round.

Compression noise is independent of ISO. Shot noise on the other hand is increasing when going to a higher ISO value.

That is why at higher ISO values, noise generated by compression is masked by Shot Noise, and does not hurt.

It is when using ISO values of 640 ISO and below, that compression noise is becoming more and more visible.

So if you are below ISO 640, and want to get absolutely the best possible result, use uncompressed. Above ISO 640, you can do whatever you like, compressed or uncompressed.

 

Hans

 

P.S. Thanks for making the pictures available.

Link to post
Share on other sites

Hans - this is REALLY helpful - thanks (and thanks to you for making such good use of the shots)...

 

So - Tribble's rule of thumb for M9 DNG capture should read:

 

1/ generally speaking, up to ISO 640 it's best to use uncompressed DNGs

2/ at ISO 640 and higher, there's no benefit in using uncompressed DNGs - use compressed and save time and storage space.

3/ if storage / processing speed is a serious issue and you're really confident about exposure, then compressed DNGs can give good results (but you're losing quality and wiggle room at lower ISO values)

4/ using the "Convert to DNG during import" option in Lightroom makes sense with any Leica DNGs as its lossless compression reduces system overheads for processing.

 

Thanks to Hans for clarifying things...

Link to post
Share on other sites

One thing is exactly the other way round.

Compression noise is independent of ISO. Shot noise on the other hand is increasing when going to a higher ISO value.

That is why at higher ISO values, noise generated by compression is masked by Shot Noise, and does not hurt.

It is when using ISO values of 640 ISO and below, that compression noise is becoming more and more visible.

So if you are below ISO 640, and want to get absolutely the best possible result, use uncompressed. Above ISO 640, you can do whatever you like, compressed or uncompressed.

 

That is true, but the black levels also go up with ISO, so the number of levels of real image you have decreases with ISO. So you have "opposing forces" at work. Hence my comment on the other thread decreasing image quality at high ISO offsetting the impact of few levels.

 

Sandy

Link to post
Share on other sites

That is true, but the black levels also go up with ISO, so the number of levels of real image you have decreases with ISO. So you have "opposing forces" at work. Hence my comment on the other thread decreasing image quality at high ISO offsetting the impact of few levels.

 

Sandy

Sandy

 

You are right, the moving Black levels are a complicating factor. But the fewer remaining levels at higher ISO caused by this, only have their effects in the deep blacks and not in the mids and the highlights. And this deep black is the area where the sensor noise is more dominant. Doubling the ISO, also means doubling the sensor noise just as the black level is also doubled. So my guess is that the higher black level does not influence the image quality more at higher ISO values than it does at lower ISO values.

 

A simulation would give more insight in this effect. When I find the time, I will try to do this.

 

Hans

Link to post
Share on other sites

Uhm... I tend to agree with Michael that this is a sort of "bug" or, probably, a "too quick software release" made to match the planned delivery date... (typical issue in software development with time deadlines: code stable and functional, not optimized) : better they work a little on it and prepare for someday a new firmware version... the 14 bit implementation is not completely exploited, and the compression scheme can be better tuned.

Link to post
Share on other sites

Hans - this is REALLY helpful - thanks (and thanks to you for making such good use of the shots)...

 

So - Tribble's rule of thumb for M9 DNG capture should read:

 

1/ generally speaking, up to ISO 640 it's best to use uncompressed DNGs

2/ at ISO 640 and higher, there's no benefit in using uncompressed DNGs - use compressed and save time and storage space.

3/ if storage / processing speed is a serious issue and you're really confident about exposure, then compressed DNGs can give good results (but you're losing quality and wiggle room at lower ISO values)

4/ using the "Convert to DNG during import" option in Lightroom makes sense with any Leica DNGs as its lossless compression reduces system overheads for processing.

 

Thanks to Hans for clarifying things...

So for those like me using Auto-ISO's, this is going to be a nightmare ;)

Link to post
Share on other sites

Chris started a thread on this topic, showing two pictures of exactly the same composition, one in compressed form, the other one uncompressed. ...

Pet peeve of mine: :o

It's always proper to identify citations for anyone unfamiliar with them, particularly anyone who comes later to a thread and wants to consider its origins. I think the following links are the ones Hans mentions:

 

"Chris started a thread on this topic" at http://www.l-camera-forum.com/leica-forum/leica-m9-forum/100936-m9-compressed-uncompressed-dng-whos-using.html.

 

"two pictures of exactly the same composition, one in compressed form, the other one uncompressed" at http://www.l-camera-forum.com/leica-forum/leica-m9-forum/100936-m9-compressed-uncompressed-dng-whos-using.html#post1064278.

Link to post
Share on other sites

... Differences are quite well visible between the second and the third picture

...

 

The other effect of course is the added noise to the picture.

 

Sorry to be a dunce. Could you point me to what differences you're seeing between these two plots? :confused:

 

Thanks!

Link to post
Share on other sites

Look at the tips of the curves. On the first image, several of the tips are noticeably taller, and in some areas, the tips are much more unruly than in the second image. I presume that this means that both the ultimate magnitude and the general noise levels are higher in the first image. I wouldn't say that the difference in the graph looks huge but I am not sure how this translates to the image. I would have to look at some images myself to make up my mind.

 

From what I saw in the store when I was playing with the M9, I would say that at least 1 stop improvement in the noise levels is a realistic expectation, which makes me happy.

Link to post
Share on other sites

Look at the tips of the curves. On the first image, several of the tips are noticeably taller, and in some areas, the tips are much more unruly than in the second image. I presume that this means that both the ultimate magnitude and the general noise levels are higher in the first image. I wouldn't say that the difference in the graph looks huge but I am not sure how this translates to the image. I would have to look at some images myself to make up my mind.

Due to the linear scale in the y axis, the upper half of the theoretical maximum of 14 EV for the M9’s dynamic range occupies more than 99 percent of those graphs. There may be a lot of noise in the shadows, but we wouldn’t see that because another 7 EV worth of dynamic range gets compressed to less than one percent of the graph, flattening out any noise that might be present. What we do see here is some noise in the highlights which most likely would go unnoticed visually.

Link to post
Share on other sites

I have tried to simulate all the pecularities of the M9 to visualise the effects of compression versus uncompressed files.

I am a bit surprised how well balanced the compression performs with the M9's additional Black level offset.

 

What I used as the basis of this simulation was:

Sensor noise 6.5 ADU @14bits @ ISO160

A/D conv. noise 3.3 ADU @14bits

Black level offset 44/160 ISO, 165/640 ISO and 624/2500 ISO

PRNU 0.006%

Sensor gain 2 @ ISO160 @14bits

 

Simulations are made for resp ISO 160, 640 and 2500 ISO.

Purple line is the uncompressed file versus blue for the compressed file.

Horizontal is the Luminance in EV, and vertically the Signal to Noise ratio in EV.

Dynamic range is roughly 11, 9 an 7 stops for resp ISO 160, 640 and 2500.

 

ISO 640 is more or less the turning point. Above 640 compression has no advantage, below 640 it may be visible in some form.

 

Hans

 

ISO 160

Welcome, dear visitor! As registered member you'd see an image here…

Simply register for free here – We are always happy to welcome new members!

 

ISO640

 

ISO2500

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...