Do have iso160-multiples have more dr & less noise?

Started by Marsu42, January 08, 2014, 06:25:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marsu42

The ML Wiki http://magiclantern.wikia.com/wiki/ISO says only the ML version of iso160 multiples have an advantage, while with Canon the raw file is the same.

I repeated this theory in the CR forum, and another poster wrote that this is wrong bases on DxO data - now I am really confused, is the wiki outdated and are at least newer cameras different even when shooting raw? Here's the discussion link w/ the diagrams:

http://www.canonrumors.com/forum/index.php?topic=18951.msg354527#msg354527

If iso100 multiples don't prove to be "best" after all, I'll modify the auto_iso module accordingly with an option to use iso160 multiples instead.

Audionut

ISO multiples of 100 are the base ISOs.  On Canon cameras at least, all other ISOs are derived from these base ISOs.  This has been proven.  You can verify the results yourself with your camera and a RAW analyser. 

On a direct comparison, 1/3rd reduced ISOs will have less noise because the shot is taken with a slower shutter speed for a correct meter reading.  The data is then compensated digitally by the camera to produce a correct rendering.  However, it's not a free lunch!  Using a slower shutter speed (for a correct meter reading) will result in 1/3rd of the highlight detail being overexposed.  Probably not the end of the world for most shooters, since I guess most people don't even use that top 1/3rd of a stop.  But there's a difference between being aware and being ignorant.

1/3rd pushed ISOs don't bring any benefit to the party other then giving the photographer a false sense of security.  In this condition, the shot will have more noise because it is taken with a faster shutter speed for a correct meter reading.  To top it off, if you are ETTR this shot, you then lose 1/3rd of the highlight detail when the camera digitally pushes the exposure 1/3rd for a correct rendering.

Digital ISOs work in the same manner as HTP.  The only difference being that it makes 1/3rd stop adjustments rather then full stop adjustments as with HTP.  I also wrote a detailed post on bitbucket and will provide a link when I find it.

edit:  DxO reports ISOs readings based on the ISO standard.  So when a camera says it's shooting at ISO 100 but DxO reports ISO 80, this simply means that the manufacturer didn't map true ISO that is being used to the ISO value displayed by the camera.

And since we know that these digital ISOs are simply digital manipulation of analog ISO, I don't understand where one can think this results in an increase in DR.

I gave up on Bill Claffs data when he represented ISO 640 (a known digital manipulation of ISO 800) as having less read noise then ISO 100 on a 5D3 :o

Marsu42

Quote from: Audionut on January 08, 2014, 07:22:19 AMBut there's a difference between being aware and being ignorant.

That's certainly good to know :-) ... but still, the topic in discussion is if all Canon isos except 100 multples are just digital and lose dynamic range, it does make you wonder how this dr graph comes into existence, doesn't it (other graphs on the CR link above):



Also, the noise theory is not about photon noise, of course you get less noise by collecting more photons ... but the read noise seems to be lower at pulled iso settings, see the graph below. The Canon system is known to have weird read noise phenomenons, as this is what kills dynamic range at lower isos vs. Nikon, so I wouldn't be surprised about another abnormality here:


Audionut

Quote from: Audionut on January 08, 2014, 07:22:19 AM
edit:............................
I gave up on Bill Claffs data when he represented ISO 640 (a known digital manipulation of ISO 800) as having less read noise then ISO 100 on a 5D3 :o

Quote from: Marsu42 on January 08, 2014, 08:05:56 AM
but the read noise seems to be lower at pulled iso settings, see the graph below.

My guess is that he used a fixed white point when calculating the DR.  And that he didn't compensate for the exposure being pulled 1/3rd of a stop when making determinations about the apparent read noise.

Marsu42

Quote from: Audionut on January 08, 2014, 07:22:19 AMI gave up on Bill Claffs data when he represented ISO 640 (a known digital manipulation of ISO 800) as having less read noise then ISO 100 on a 5D3 :o

This is not necessarily invalid, as far as I understand it *read* noise is lower at higher iso speeds (see sensorgen), that's the mentioned big problem of current Canon sensors - the resulting noise of the shot is this in combination with other noise sources like base sensor noise: http://www.sensorgen.info/CanonEOS_6D.html

In so far the read noise graph isn't really of interest to the "end user" on its own, but the dr graph is because it says exactly what the ml wiki says - iso160 multiples have more dr... it's the ml wiki only applies this to ML iso settings, not to vanilla Canon ones - but Canon might have upgraded their logic since the wiki was written.

Audionut

Quote from: Marsu42 on January 08, 2014, 08:24:53 AM
This is not necessarily invalid, as far as I understand it *read* noise is lower at higher iso speeds (see sensorgen)

My apologies.  I made that determination based on his measuring of read noise in ADUs.

Look at the read noise in electrons to get a better idea of how the noise from the ADC reduces with increasing ISO. 

Also note the variance in data!  ISO 1200 has less read noise in ADUs vs ISO 1600, but has more read noise in electrons.

Marsu42

Quote from: Audionut on January 08, 2014, 08:36:12 AM
Also note the variance in data!  ISO 1200 has less read noise in ADUs vs ISO 1600, but has more read noise in electrons.

What camera graph were you looking at? Even accounting for variance & looking at the 5d3 graph, pulled isos seem have a *little* less read noise, pushed a *little* more ... but I wonder if this is enough to explain the dr gain of pulled isos in the graph I posted above - in theory it could be the reason though.

Audionut

Quote from: Marsu42 on January 08, 2014, 08:53:17 AM
What camera graph were you looking at? Even accounting for variance & looking at the 5d3 graph, pulled isos seem have a *little* less read noise, pushed a *little* more ... but I wonder if this is enough to explain the dr gain of pulled isos in the graph I posted above - in theory it could be the reason though.

5D3.

160-200 identical
320-400 / .144 in favour of pulled.
640-800 / .007 in favour of base.
1250-1600 / .126 in favour of base.

And it continues to favour the base ISO with increasing ISO.  Heck, from ISO 1600 and above, he shows pushed ISO as having less read noise then pulled ISOs!

Marsu42

Quote from: Audionut on January 08, 2014, 09:01:44 AM
And it continues to favour the base ISO with increasing ISO.

The reason would be that that Canon sensors at lower iso have a lot of read noise, so any read noise effect from pulling/pushing will be most visible here - at higher isos, the read noise isn't a problem any more, so base iso will have the advantage and Canon sensors are superior to Nikon.

Still, when shooting at lower iso I currently don't see any reason why iso160,320,640 should be really inferior to the base iso if this effect really exists - it might depend on the camera model and generation though... but if iso160 dr is a bit larger than iso100, that would be something to consider in real life shooting, unfortunately sensorgen only measures full iso stops.

Audionut

I don't understand how you are coming to the conclusion that pulled ISOs can have more DR then base ISOs, when you are aware that they are simply digital manipulations.

Quote from: Marsu42 on January 08, 2014, 09:07:07 AM
Still, when shooting at lower iso I currently don't see any reason why iso160,320,640 should be really inferior to the base iso if this effect really exists

Because you are exposing 1/3rd of a stop brighter then the Canon meter would make you believe.  0EV on the Canon meter should represent 0EV.  Not +0.3EV with the gain reduced 0.3EV.

Marsu42

Quote from: Audionut on January 08, 2014, 09:10:20 AM
I don't understand how you are coming to the conclusion that pulled ISOs can have more DR then base ISOs, when you are aware that they are simply digital manipulations.

I'm not, because what you wrote is circular logic - *you* say that it's "only" digital implying that the effect can only be worse than base iso, but if you cannot explain the peaks in dynamic range in the graph above with this. This means either the graph is wrong or your theory is. Even the ML wiki says that iso160 multiples have more dynamic range!

Currently I'd guess there are multiple overlapping effects at play, that's what makes it confusing - but as we all don't really have a clue what is actually done with the sensor data in the camera, the effects of pulling iso a) lower dr because of pull itsself, b) higher dr because of less read noise might add up to a+b = a bit more dr at lower isos for pulled values.

Audionut

Push and pull the data 0.3EV in post.  Did you increase the DR?

There are fundamental mistakes in the data presented in these graphs, this makes all graphs invalid until an explanation is forthcoming.  This is my explanation of the irregularities in the graph, the graphs themselves are flawed.

And since you either cannot read the graphs properly,

Quote from: Marsu42 on January 08, 2014, 08:53:17 AM
What camera graph were you looking at? Even accounting for variance & looking at the 5d3 graph, pulled isos seem have a *little* less read noise, pushed a *little* more

Or want to imply that 1 result in favour of pulled ISOs

Quote from: Audionut on January 08, 2014, 09:01:44 AM
160-200 identical
320-400 / .144 in favour of pulled.
640-800 / .007 in favour of base.
1250-1600 / .126 in favour of base.

Leads to a conclusion in favour of pulled ISO overall, despite the data showing otherwise, I think it might be best if you test the data for yourself. 

Hint:  There's probably a reason most test sites only test relevant (base ISO) data  ;)

I can't recall the exact reason why, but a1ex has mentioned that the ISO wiki needs updating.

I have no problem being shown to be wrong, the entire point of conducting my own testing was to gain a better understanding.   But I need more proof then being able to explain the irregularities in others results.

a1ex

Digital ISO is only advantageous when you shoot JPEG or H.264.

When you shoot RAW, I think it's best to stay away from 160. It will apply a digital scaling, and I believe this will introduce more quantization errors in the noise, compared with the full-stop ISOs. Didn't try it though, it's just a theory.

On the raw histogram you have a dynamic range indicator. In photo mode, it analyzes the noise and white level on the fly (so it even accounts for DR variations from shutter speed, temperature and who knows what else). Can you draw some charts from this indicator?

(choose a scene that contains some overexposed stuff for proper white level detection, photograph this scene at all ISOs and write down the results)

dmilligan

@Audionut,

Your theory is only correct assuming that Canon is not playing any other 'tricks' on the raw data even with all types of ICNR turned off. Yes we know that ISO640 is a digital manipulation of ISO800, but ISO800 may very well also be digitally manipulated version of itself. This seems silly and it is, but so is burning an 8x digital push into the raw file for those super high ISOs. Obviously this manipulation wouldn't be to change the exposure like with the pull to 640, but things like noise suppression tricks and dithering that might be being done before the data is actually recorded into the raw file, could very well effect the dynamic range (even for the worse). I'm more inclined to believe the graphs until someone proves them wrong with better data.

Here's what I mean could be going on:
ISO640: analog gain -> A/D -> -1/3ev digital gain -> tricks -> .CR2
ISO800: analog gain -> A/D -> tricks -> .CR2

You're theory is only correct if:
ISO640: analog gain -> A/D -> -1/3ev digital gain -> .CR2
ISO800: analog gain -> A/D -> .CR2

Basically, a 1/3 ev pull in post would not be the same as a 1/3 ev digial pull in camera because the in camera pull could be happening before other tricks Canon is playing on the raw data. Your post pull would be happening after said tricks. (Assuming the 'tricks' are non-commutative and occur after digital gain). Is this actually happening? IDK, but I wouldn't put it past Canon.

Obviously this needs futher testing. I'm just trying to offer an explanation as to why those graphs could be right (even in theory). If correct, these graphs would indeed indicate that Canon is doing some kind of trickery before writing the raw data.

Audionut

a1ex, how accurate is your white level detection?

edit:  Currently, ISOs 100, 160, 200 are all producing the same DR.  RawDigger shows white level to reduce by a little under 1/3rd of a stop for ISO 160.  If my maths is right 0.2207 EV. 

My testing shows the standard deviation rises with increasing ISO based on exposures with the lens cap on.

Also, line 116 of raw.c points to an invalid link.

* Renato [http://www.magiclantern.fm/forum/index.php?topic=5614.msg41070#msg41070]:

SpcCb

160, 320, 640, etc. ISO are interesting because they give significant less RON.

And the most interesting is the ISO for nominal inverted gain minus RON reduction (ex. 1250 ISO on 5D2).

a1ex

As long as you have something overexposed in the image, it should be pretty good. It scans the raw file for the brightest pixels, throws away 10 of them which could be hot pixels, and goes back 500 units, which is roughly 0.05 EV (reason: for overexposure indicators it's better to underestimate the white level).

The problem with latest code is that standard deviation is computed on integer math and rounded (for speed reasons). If you compile from 978bf96 or earlier, it's computed on floating point, so it should be much better for this analysis.

I just did a quick test with 978bf96. For repeatability, I'd say you can assume a stdev from 0.02 for low isos and 0.1 for high ones.


50     10.92
100    10.92
125    10.59

160    10.93
200    10.85
250    10.54

320    10.82
400    10.73
500    10.39

640    10.62
800    10.53
1000   10.19

1250   10.17
1600   10.10
2000    9.76

2500    9.54
3200    9.45
4000    9.13

5000    8.63
6400    8.51
8000    8.20

10000   7.81
12800   7.72
16000   7.39

20000   7.07
25600   6.87

512000  5.92
102400  5.16


So, ISO 160 multiples seem to have 0.1 EV more DR and ISO 250 multiples seems to have 1/3 EV less DR than ISO 200 multiples.

White levels on ISO 160 & co was always below the white level of 200 and 250, but white(200) was equal to white(250). This shows there's something getting saturated at 200 and 250, so it confirms my previous theory that the real ISO is somewhere between 160 and 200 (most likely around 185, 375, 745 and so on).

If we define the real ISO as being the ISO at which the white level no longer changes, I can search for it and post some test code.

@SpcCb: what's RON? (google didn't help with "RON noise", and neither http://en.wikipedia.org/wiki/Ron )

edit: okay, repeated some tests without that 500 white offset, and wrote down the white levels (it doesn't change the conclusions):


50     10.99  15283 (huh? the gain for this one is not burned in the raw file?)
100    10.99  15283
125    10.64  15283

160    10.99  13307
200    10.91  15283
250    10.60  15283

320    10.85  13307
400    10.77  15283 
500    10.44  15283


Quote from: Audionut on January 08, 2014, 08:15:30 AM
My guess is that he used a fixed white point when calculating the DR.

+1.

dmilligan


Audionut

http://photographylife.com/riddle-intermediate-iso-settings

QuoteThe interesting part here, is that the ratio between the saturation at ISO 200 and ISO 160 is once again very close to 1/3 EV, that is 1.23. And this is the key to the riddle – for both ISO 200 and ISO 160 the sensor is run in the exact same mode, which is why the signal to noise ratio is practically the same. The exposure at ISO 160 is in fact the result of exposure at ISO 200, but shifted to the left by 1/3 EV, or in other words, divided by approximately 1.25. Yet another way to put it, is that noise-wise the result of an exposure at ISO 160 is equivalent to the exposure at ISO 200 with the shutter speed slowed by 1/3 EV or aperture opened 1/3 EV wider. Of course it appears from this that the headroom at highlights for ISO 160 is 1/3 EV less compared to ISO 200.

Quote from: a1ex on January 08, 2014, 04:14:24 PM

100    10.99  15283
160    10.99  13307
200    10.91  15283


In other words, ISO 160 and it's friends receives the advantage of 0.3EV noise reduction from shutter/aperture, but doesn't lose 0.3EV from the gain reduction.  The shadows gain 0.3EV, the white point is clipped by less the 0.3EV.

So basically, enable digital ISOs and gain 0.1EV of DR with reduced ISOs (good luck noticing that), and risk blowing 0.2EV of highlight data.  Just to keep things fair, if the exposure meter decides to use a pushed ISO, kiss 0.3EV of DR goodbye and you get 0.3EV more noise through the entire exposure for good measure.

a1ex

Interesting that in Audionut's link, they get a small DR advantage (0.03 EV) for ISO 200, so there may be some bias on my side. My test wasn't a controlled one, just a quick try.

Quote
    For the first shot the saturation is 12810, while the noise is 6.0901. The ratio is 2103.413737.
    For the second shot the saturation is higher 15760, and noise is also higher 7.334. Nevertheless the signal-to-noise ratio is slightly better (higher is better) and equal to 2149.071372.

and log2(2149) - log2(2103) = 0.03 EV.

Marsu42

In case anybody wants to have a try it in real world shooting, I added the "Smart ISO" option to the auto_iso module: it uses pull iso instead of 200/400/800 and/or uses digital pull/push instead of only full iso stops for iso 3200+ values (alas, it's digital push anyway).

https://bitbucket.org/hudson/magic-lantern/pull-request/314/auto_iso-module/commits

Audionut

My results for my 5D3 on the Green 1 channel


    ISO     Saturation      S.Dev   SNR
    100     15331           6.44    2380.5900
    125     15331           8.14    1883.4152
    160     13354           5.47    2441.3162
    200     15331           6.75    2271.2592
    250     15331           8.38    1829.4749
    320     13354           5.88    2271.0884
    400     15331           7.38    2077.3712
    500     15331           9.30    1648.4946
    640     13354           6.71    1990.1639
    800     15331           8.48    1807.9009
    1000    15331           10.8    1419.5370
    1250    13354           9.05    1475.5801
    1600    15331           11.3    1356.7256     
    2000    15331           14.2    1079.6478
    2500    13354           13.8    967.6811
    3200    15331           17.0    901.8235
    4000    15331           21.7    706.4976
    5000    13354           26.7    500.1498
    6400    15331           33.2    461.7771
    8000    15331           41.8    366.7703


Which gives these pretty charts.






Notes:
Last analog ISO 3200

ISO 1600 pushed digitally has a greater SNR then ISO 3200 pulled.  ie:  ISO 2000 has greater SNR then ISO 2500

Dynamic Range increase of pulled ISOs vs their base ISOs
160-200 = 0.1041 EV
320-400 = 0.1288 EV
640-800 = 0.1391 EV
1250-1600 = 0.1213 EV
2500-3200 = 0.1019 EV

100-160 = 0.0359 EV


What this data doesn't show:
Base ISOs (100, 200, etc) have a defined limit above 0EV where saturation (clipping) occurs.  This is different for intermediate ISOs.  Pushed ISOs will saturate 0.3EV sooner.  Further investigation is probably required, but I would put pulled ISOs as saturating 0.22EV sooner.  If you ETTR, you should consider this if using intermediate ISOs.

Pushed ISOs will have 0.3EV more noise through the entire exposure, for the same meter reading.  Contrary to popular belief, ISO is post exposure gain.  Exposure is the light hitting the sensor which is a result of lens diameter, shutter and aperture.  When you adjust shutter/aperture to compensate for the post exposure gain, you effect the SNR of the entire exposure (from the really bright bits through to the really dark bits)!
Shot noise being the square root of the number of photons hitting the sensor.

Audionut

a1ex, looks like the white level in ML is around 0.4 EV to low.  Using ISO 100 for 1 simple test.

ML reports overexposure (11 in the histogram) on an image where Rawdigger reports maximum level as 12236.
Taking the next image with shutter 1/3rd slower, Rawdigger reports maximum level as 15283 (saturated).

I'm sure this is the long way,
A=(15283/2/100)
B=(15283-12236)
B/A/100=0.3987 EV

Is the white level only this section of code?
static int autodetect_white_level(int initial_guess)
{
    int white = initial_guess - 3000;
    int max = white + 500;
    int confirms = 0;

    //~ bmp_printf(FONT_MED, 50, 50, "White...");

    int raw_height = raw_info.active_area.y2 - raw_info.active_area.y1;
    for (int y = raw_info.active_area.y1 + raw_height/10; y < raw_info.active_area.y2 - raw_height/10; y += 5)
    {
        int pitch = raw_info.width/8*14;
        int row = (intptr_t) raw_info.buffer + y * pitch;
        int skip_5p = ((raw_info.active_area.x2 - raw_info.active_area.x1) * 6/128)/8*14; /* skip 5% */
        int row_crop_start = row + raw_info.active_area.x1/8*14 + skip_5p;
        int row_crop_end = row + raw_info.active_area.x2/8*14 - skip_5p;
       
        for (struct raw_pixblock * p = (void*)row_crop_start; (void*)p < (void*)row_crop_end; p += 5)
        {
            if (p->a > max)
            {
                max = p->a;
                confirms = 1;
            }
            else if (p->a == max)
            {
                confirms++;
                if (confirms > 5)
                {
                    white = max - 500;
                }
            }
        }
    }

    //~ bmp_printf(FONT_MED, 50, 50, "White: %d ", white);

    return white;
}

a1ex

If the image is not overexposed, then yes, it may report a little overexposure where there isn't any (since the white level is asummed to be 12000 or higher). Not sure how to solve it, because there are also other variables that influence this white level, not just digital ISO (e.g. on 5D3, shutter speed - especially at long exposure - will change the white level too). And even if it was just digital ISO, having a table with how it behaves on each camera is hard to maintain.

Back then I tried reading it from hot pixels, but I had the surprise to find some of them above the white level of the other pixels.

Also, looks like the white level varies between bodies (15331 vs 15283), and with dual ISO I found it to vary even more. Maybe it also changes with temperature?

Audionut