Author Topic: Dual ISO - massive dynamic range improvement (dual_iso.mo)  (Read 2121192 times)

awesnap

  • New to the forum
  • *
  • Posts: 7
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1775 on: February 13, 2014, 06:44:39 PM »
Been messing around with Dual_iso raws for the past week, this totally changes my shooting style! THANK YOU!!!



Just a question, cause I can't seem to find a master list anywhere, but I saw that the 5d3 has the ability to record dual_iso raw video, but I can't seem to figure out how to enable it in the 5d2.  I'm going to assume that its not doable at this time on the 5dmk2?

What about the 6d?

reflectphoto

  • New to the forum
  • *
  • Posts: 4
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1776 on: February 14, 2014, 11:04:08 AM »
Hey guys, I installed magic lantern on my 6D a couple weeks ago and still can't figure out why post processing dual ISO images doesn't work. I am on a mac running lion. Got the cr2hdr, dcraw and exif tools installed. cr2hdr is in my app folder, dragged the cr2hdr installation packaged into my app folder and installed it from the to make sure that dcraw and exif tools install in the same directory. When i drag and drop a dual iso image into cr2hdr I get this message:

cr2hdr // Beta 1.4


Input file : DUAL9549.CR2
Error: dcraw output is not a valid PGM file Logfile    : DUAL9549.txt

THE END

the log file created has this in it:

Input file     : DUAL9549.CR2
Canon EOS 6D detected
Full size      : 4104 x 4104
Active area    : 4104 x 2736

I have been reading through all the threads and have been googling for an answer on how to get it to work for over a week but no success.
Please help!!!
What am I doing wrong?

Thanks in advance.

a.d.

  • Member
  • ***
  • Posts: 126
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1777 on: February 16, 2014, 10:21:11 AM »
@a_d_:
 
i have just read that some new dual iso conversion code is available..
is there an update for the mac tool planned in the near future? would be really great.
thx.
That last commit was back in december.

@awesnap
Hmm...How to explain?
For example:
Photo Mode
0x404b3b5c ISO 100
0x404b3b6a ISO 200
...
14 Bytes Step Register between the ISO 100 and 200, same 14 Bytes between 200 and 400 ...

Movie Mode
0x404b4590 ISO 100
0x404b4590 ISO 200
The Register is unchanged in Movie Mode, so it's not possible to have Dual ISO  for video on 5D2.

@reflectphoto
I don't own a 6D, but I think you seem to use some kind of SRAW, you need to switch to RAW.

mrd777

  • New to the forum
  • *
  • Posts: 49
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1778 on: February 17, 2014, 12:53:16 AM »
No matter what I do, on my 5D2 I can't seem to get a difference in Dual ISO. I shoot a regular raw and then do something like 100/800 iso in dual iso, convert using cr2hdr and they both look the same.

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8497
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1779 on: February 17, 2014, 01:03:37 AM »
Use 100/1600 and make an interior shot covering a window area, too. Place a darker object like a wood tablett with visible wood grain in a darker corner of the frame. Expose window area properly (without blown highlights). Take a Dual-ISO shot and another one at ISO 100 without blown highlights again.
Try to process your files to make the wood's grain visible.
If you're still unable to see a difference you may want to upload the CR files to a file hoster and link them here. We will look after that one then.

Ciao
Walter

PS: Daylight necessary.

halbmoki

  • Freshman
  • **
  • Posts: 55
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1780 on: February 19, 2014, 07:36:24 PM »
I tried this for the first time and just want to say thank you :)

It does need some getting used to and a lot of finetuning, but once I got the hang of it, the results were stunning. My trusty old 50D isn't everything but state of the art when it comes to high ISO, so I'm very surprised how clean 100/1600 and even 100/3200 look compared to single ISO shots.
There is some noise in the shadows when pushing the recovery to the extreme, but it's far less annoying because it's very regular. The loss of resolution is pretty bad, but sometimes 4M well-exposed pixels are better than 15MP of crushed shadows.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1781 on: February 19, 2014, 07:41:02 PM »
If shadow priority > highlight priority, increase ISO separation.

You may be surprised at the gains with lower recovery ISOs.  Also, ISO doesn't effect shot noise.

mad.eos

  • Freshman
  • **
  • Posts: 63
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1782 on: February 20, 2014, 12:37:51 AM »
Woaah! Dual ISO all the way! Excelente work! Love the concept, am blown away by the results! ;-)
Canon EOS 1100D w/ 18-55mm | ML Nightly Build Tester

halbmoki

  • Freshman
  • **
  • Posts: 55
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1783 on: February 20, 2014, 01:19:32 PM »
If shadow priority > highlight priority, increase ISO separation.

You may be surprised at the gains with lower recovery ISOs.  Also, ISO doesn't effect shot noise.

I'm probably not understanding how the interpolation actually works. Why should the recovery ISO not affect the noise at all? Sure, the low ISO lines will always give less noise in the lights and mid-tones, but why should the high ISO lines have no influence on noise at all? Of course, that would be mostly in the shadows, but in the end, noise doesn't just disappear.
I did another test just now and I'm surprised that there seems to be no significant difference in noise between 100/400 and 100/3200 (still a huge difference to straight 100). I can see that the separation is basically a trade-off between more dynamic range (high separation) and resolution/sharpness (low separation)... I just don't understand how the noise plays into it all or rather, why it doesn't.

mateusz

  • New to the forum
  • *
  • Posts: 5
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1784 on: February 20, 2014, 01:45:32 PM »
If anyone is experiencing errors post-processing in Windows 7 (dcraw.exe not recognized):

Add the folder to system path, as explained:
http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx

:)

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1785 on: February 20, 2014, 03:46:40 PM »
Why should the recovery ISO not affect the noise at all?....................but why should the high ISO lines have no influence on noise at all?

Shot noise.

ISO only reduces camera induced noise from the downstream electronics (amplifier/ADC).
The sensor in the 5D3 for instance, has a reported dynamic range of 14.7 stops.

Unfortunately (for us), the downstream electronics are only capable of capturing up to 11.4 stops of dynamic range, at any one time.

At low ISOs, the priority is towards highlights.  Here, the highlights and midtones are captured with maximum quality.  No highlights are ever clipped unless through exposure (shutter/aperture) decisions by the user, but the cutoff point from shot noise dominance in the image, to camera induced noise is steep.  Shadow detail suffers.

As we move through higher ISOs, the priority shifts from highlight detail to shadow detail.  Here, highlight detail is simply clipped 1 EV for every full stop ISO bump, always.  By increasing the gain of the downstream electronics, they become more sensitive to lower signals.  This increased sensitivity means that the shadow point (of lower ISOs) gets shifted higher in the detail capturing range of the ADC.  Remember, the ADC can only capture 11.4 stops at any one time, so by throwing away 1 EV at the top end, we gain some in the low end.

Unfortunately (again), the loss of highlights vs the gain in shadows is not linear.  So we always throw 1 stop away at the top end, but for each increasing ISO bump we gain less in the shadows.

Consider the dynamic range measurements for the 5D3.  If the ratio between highlight loss and shadow gain was linear, the measured dynamic range for all ISOs would be the same.

In dual_iso, when we increase ISO separation, we lose 1 stop of highlight resolution, always.  And as shown above, we do not gain 1 stop of shadow detail.

If shadow detail > highlight detail, increase separation.

And this is limited to the dynamic range of the sensor, and shot noise.  Here, once we hit around 14.7 stops of dynamic range, increasing the ISO separation further simply reduces highlight resolution further, without any gain in the shadows, at all.

My limit to noise in an ISO 100 exposure is around 8.5 stops.  If the dynamic range of the scene is only 10 stops, I can choose to lose 2 stops of highlight resolution and gain the required dynamic range for the scene.  What I wouldn't do, is set the recovery ISO to 1600, just for the sake of it, and throw away an extra 2 stops of highlight resolution, for a net result of no gain in the shadows.  I only wanted 10 stops to begin with.

Where motion and/or Depth of Field requirements clamp exposure, then further consideration should be made.  Here, if the exposure limits require the use of say ISO 400 for ETTR, then 2 stops of highlight detail have already been clipped.  The new sensor dynamic range, for all intents and purposes, has become 12.7 stops.  Not only that, but the biggest gains in the shadows have already been made, just in an attempt to push the highlights in the scene towards saturation.

Here, the ratio of highlight loss to shadow gain is even less, just for the first recovery ISO bump.  Instead of losing 2 stops of highlight resolution and gaining say 1.8 stops of shadow detail with ISOs 100/400, now, for the same 2 stop difference in base/recovery ISOs, we still lose 2 stops in the highlights, but we only gain 1.4 stops in the shadows.  It should be obvious at this point, that increasing the lower ISO in dual ISO use, decreases the usefulness of dual_iso itself.

If you've made it this far, hopefully you can see how the loss of highlight resolution vs the gains in the shadows, is completely dependent on each ISO setting (base/recovery).  And at some point, regardless of anything, no further detail in the shadows can be obtained.

If you don't care about resolution loss, then just set the recovery ISO to 3200 and call it a day.  In an upcoming article, I will (hopefully) show ways of where you can work around the highlight resolution loss with shooting techniques.

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1786 on: February 20, 2014, 05:03:39 PM »
(...)
The sensor in the 5D3 for instance, has a measured dynamic range of 14.7 stops.

Unfortunately (for us), the downstream electronics are only capable of capturing up to 11.4 stops of dynamic range, at any one time.
(...)

Be careful with comparisons; 14.7 stops DR published by Roger N. Clark is not a measured DR, Roger took the maximum FWC (Full Well Capacity) and the lower RON (Read On Noise). However the maximum FWC value is taken from ISO 100 and the minimum RON value is taken from ISO 25600 ISO 6400, so this number of 14.7 stops is very theoretical (supposes that we can have maximum FWC and minimum RON in the same time/shoot) and never confirmed by experimentations, even with full calibration post process.

Plus, if we speak of RON we speak of downstream electronics, so in both of cases with this methodology we don't get the sensor full/maximum DR. And beside it's difficult to compare DR numbers in real world with regular photography shoot conditions without take consideration of FPN (Fixed Pattern Noise).

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1787 on: February 20, 2014, 05:14:33 PM »
However the maximum FWC value is taken from ISO 100 and the minimum RON value is taken from ISO 25600,

Actually, the minimum RON value was taken from ISO 6400.

Quote
(note: limit read noise to ISO that give at least 8 stops dynamic range)

Based on my own testing, I would agree with Roger's findings.  This sensor dynamic range may not be accurate to the tenth degree, however, the intent of the post remains the same.

If the reader determines to use photographic dynamic range (the limit of noise in the shadows based on personal preference), rather then engineering dynamic range, then the sensor dynamic range measurement shifts to another point entirely, subject to personal preference.

without take consideration of FPN (Fixed Pattern Noise).

Actually, this isn't a consideration with dual_iso for 2 reasons.  First, the higher ISO minimises it's effect, secondly, it is my understanding that a1ex performs banding correction in cr2hdr.

Plus, if we speak of RON we speak of downstream electronics, so in both of cases with this methodology we don't get the sensor full/maximum DR.

If you have evidence to show otherwise, then I look forward to your results.

Else, do we get to a point where the DR limits of the entire system are reached?  Of course we do.  Whether that point is at the DR limits of all components in the system is irrelevant.  Semantics.





halbmoki

  • Freshman
  • **
  • Posts: 55
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1788 on: February 20, 2014, 05:51:32 PM »
Thanks, Audionut. I think, I do understand a little more now. Not only did I misunderstand shot noise but also almost everything about how a digital camera works...

This also explains, why 100/3200 is just not useful with my 50D. No matter at which base ISO, a recovery ISO above 1600 doesn't give any increase in dynamic range anymore. The "best" useful setting  for me is 100/800 with +2EV of DR and 8EV of overlapping midtones.
I guess that would give me about 13 stops of useable range at best, so stop nitpicking, you 5D3 owners ;)

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1789 on: February 20, 2014, 06:55:28 PM »
Thanks, Audionut. I think, I do understand a little more now. Not only did I misunderstand shot noise but also almost everything about how a digital camera works...

Your welcome  :)

The biggest issue, IMHumbleO, is the reliance on the exposure triangle in a digital system.
The exposure triangle weights ISO with the same priority as shutter/aperture in exposure decisions.  This leads the reader to assume that ISO effects exposure.

Code: [Select]
ISO 100 - 1/100s - f/4.0
ISO 1600 - 1/1600s - f/4.0

The exposure triangle tells us that these 2 settings on a digital camera will both produce the same result.  Well, technically, they do produce the same rendered brightness.  In actual effect, the 2 exposures are completely different.  The ISO 100 exposure has a SNR 4 x greater (in the highlights/midtones) then the ISO 1600 exposure, due to the effect of shot noise. 

http://en.wikipedia.org/wiki/Shot_noise

Quote
Since the standard deviation of shot noise is equal to the square root of the average number of events N, the signal-to-noise ratio (SNR) is given by:

    SNR = N/sqrtN = sqrtN.

In the shadows, the SNR = infinity for the ISO 100 exposure vs the ISO 1600 exposure, until such point is reached where the exposure falls within the reduced dynamic range limits of the higher ISO.

In other words, the ISO 100 exposure delivers 10.9 stops of dynamic range for a Canon 5D3, but the ISO 1600 exposure only delivers 10.1 stops of dynamic range.  So not only have you reduced the SNR of the exposure with ISO 1600 due to shot noise, but you have clipped shadow detail also.

In a film system, the exposure triangle was much more useful since changing the roll of film was a pita.  In a digital system, exposure should be set simply to the limits of motion, depth of field and sensor saturation.  ISO should only be used to ETTR.


This also explains, why 100/3200 is just not useful with my 50D. No matter at which base ISO, a recovery ISO above 1600 doesn't give any increase in dynamic range anymore. The "best" useful setting  for me is 100/800 with +2EV of DR and 8EV of overlapping midtones.
I guess that would give me about 13 stops of useable range at best, so stop nitpicking, you 5D3 owners ;)

Correct.  ISO 3200 only gives you 0.1 stops of shadow detail vs ISO 1600.  Either you clip 1 stop of highlight headroom in non dual_iso usage, or you increase highlight resolution loss by 1 stop with dual_iso.  In either case, 0.1 stop of shadow detail probably wasn't worth it.  The measured dynamic range results for the 50D suggest that the same occurs for ISO 1600 vs ISO 800 also.

For me, my most useful settings are usually 100/800 also.  This provides the most overall useful compromise between highlight resolution and total dynamic range.  However, I have been experimenting with lower ISOs (for the recovery ISO) in situations that only require a reduced dynamic range.  Here, the highlight resolution loss is less, and the dynamic range requirements of the scene are still fulfilled.

Of course, the final decision rests in the hands of the operator.  Having a sound understanding of the pros vs cons increases ones ability to maximise results.  :)

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1790 on: February 20, 2014, 07:05:11 PM »
Actually, the minimum RON value was taken from ISO 6400.
Indeed, 14.7 is from FWC/2.5 (ISO 6400), not from FWC/2.05 (ISO 25600).
I thought Roger took the lower value as he speaks top of his table, but he took from ISO 6400 (He does not explain why, mystic stuff?).
Thank you to point this.

(...)
If you have evidence to show otherwise, then I look forward to your results.
Evidence is evident and it's not only my results; a lot of analysis confirm that (ex. Noise Analysis in CMOS Image Sensors, Hui Tian, 2000).

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1791 on: February 20, 2014, 07:20:42 PM »
(He does not explain why, mystic stuff?).

Not so mystic!

Quote
(note: limit read noise to ISO that give at least 8 stops dynamic range)

I do not know why he chose this limit of 8 stops.

Evidence is evident and it's not only my results; a lot of analysis confirm that (ex. Noise Analysis in CMOS Image Sensors, Hui Tian, 2000).

Confirms what exactly?  That your nitpicking is valid because I chose to label the dynamic range limits of the system as a whole, as simply sensor dynamic range?  Which still does not change the conclusion of my post mind you, and only serves to satisfy your desire for correct terminology.

If this other evidence shows the true dynamic range of the sensor, then I would ask you to extend to me, the same curtsey I provided to the reader above, in both the length of my explanation, and the linking of evidence to support my post.  When this evidence is forthcoming, then I will happily change my description to better reflect a technical accuracy.

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1792 on: February 20, 2014, 07:44:31 PM »
(...)  That your nitpicking is valid because I chose to label the dynamic range limits of the system as a whole, as simply sensor dynamic range?  Which still does not change the conclusion of my post mind you, and only serves to satisfy your desire for correct terminology.
(...)

???
I think you miss understand me.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1793 on: February 20, 2014, 08:18:45 PM »
Since DR is simply log2(saturation/stdev), then sensor dynamic range is simply log2(saturation / the stdev of the highest ISO that produces an increase in shadow detail).

Quote
Plus, if we speak of RON we speak of downstream electronics, so in both of cases with this methodology we don't get the sensor full/maximum DR.

Since we are speaking of downstream electronics, then the true and accurate DR of the sensor is meaningless.  With downstream electronics producing a limiting factor, the sensor could have a true and accurate DR of 100 stops for all we care.

Does the sensor having 100 stops of DR in this situation effect your exposure/ISO decisions.  Of course not.  Because you are limited by the DR of other components in the chain.  For all intents and purposes, the sensor has a DR of 14.7 stops.

Any misunderstanding on my part, is a direct result of your short post, with counter claims that were based on a misunderstanding of the reported results.  And no linking documentation to support your claims.  He said, she said.

Apparently, evidence is evident.  Well if that is the case, then my post is sufficient evidence  ;D  and that should be evident  :P

I am happy to be corrected in matters of correct terminology, and accurate understanding, but I require more then simply, your word, and some riddles.  :)

Either way, I have changed the post to describe the dynamic range as "reported", instead of "measured".  I trust, based on the explanations I have provided, that this is sufficient, and we can move on.

IliasG

  • Member
  • ***
  • Posts: 124
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1794 on: February 20, 2014, 09:18:23 PM »
I thing that all these calculations on DR increase by using Dual-ISO are overestimating the real world visual effect because they are based on per pixel data while the correct is to normalize for displayed at equal size and equal apparent detail. It's "screen" vs "print" DR in DxO's terms .. we use print DR in our (based on DxO data) comparisons don't we ?).

As soon as at the dark areas only half the pixels are used then the print-DR gain is 0.5 stops less than if all pixels were used.

So in the case of 5D3 if the per pixel "screen-DR" gain of dual ISO 100/3200 is 3.5 stops the "print-Dr" gain will be 3.0 stops.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1795 on: February 20, 2014, 09:26:04 PM »
Here's how much the DR calculations are overestimating the real-world result: http://www.magiclantern.fm/forum/index.php?topic=7139.msg99437#msg99437

I didn't do the math, but I've posted the tools needed to reproduce the results. The 0.5-stop loss does make sense though (should I update the DR estimations from ML menu with it?)

IliasG

  • Member
  • ***
  • Posts: 124
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1796 on: February 20, 2014, 09:57:16 PM »
Thanks for the link A1ex, very interesting !!.

I have to clarify that what I wrote is about using mixted ISO shots and the properties of the data in the DualISO CR2s. The final result (the DualISO DNGs) additionally include some kind of software denoise and some excellent algos for Black Level normalization + line/banding elimination  + .. so a part of DR is regained :)

I really hope that we could use the same on normal CR2s ..

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1797 on: February 21, 2014, 01:25:36 AM »
(...)
Any misunderstanding on my part, is a direct result of your short post, with counter claims that were based on a misunderstanding of the reported results.  And no linking documentation to support your claims.  He said, she said.
(...)
I totally understand and I totally agree that I could not pretend to be referent in the domain. Plus I admit doing errors sometimes (human factor, and I like it BTW).
So, let's see what we are talking about...

We are speaking about CMOS and DR, and DR with dual_iso.mo in this particular case.
Some times ago in my job I spoke about close stuff with guys from the Stanford University, I think it could help here:

CMOS can be schematized by a 2D matrix sensor device where pixel voltage is read out one row at a time to column storage capacitors,
then read out using the column decoder and multiplexer. Row integration times are echeloned by row/column readout time.
I'm sure a lot of persons here already know it, it's just to introduce the context to be sure we will speak about the same thing.
Beside, it will clearly be a simplified version here; if you need more precisions please see references at the end.

We would like to get the maximum DR from this device, so the first thing to do is to analyse what is reducing the DR.
In our activity _daylight photography (I mean with short exposure time) with regular thermal conditions (I mean what nobody use his camera @-40°C here, except maybe 1 or 2 persons with me count inside)_ we can find: TN (Temporal Noise), FPN (Fixed Pattern Noise), dark signal (also called dark current, etc. but for a question of physic I prefer to use signals, currents are for electronic) and spatial sampling and low pass filtering.

TN is caused by photodetector and MOS transistor thermal, shot, and 1/f noise. It can be lumped into three additive components: Integration noise (due to photodetector shot noise), RN (Reset Noise) and RON (Read Out Noise). Noise increases with signal, but so does the SNR (Signal to Noise Ratio) and under dark conditions presents a fundamental limit on sensor DR (Dynamic Range).

FPN is the spatial variation in pixel outputs under uniform illumination due to device and interconnect mismatches over the sensor and have two components: Offset and gain. FPN is most visible at low illumination because offset FPN is more important than gain FPN). This is why with a1ex we try to introduce new pedestal definition to optimize this point.

Dark signal comes from the leakage current at the integration node (i.e. current not induced by photogeneration) due to junction and transistor leakages. It limits the image sensor DR by introducing dark integration noise (due to shot noise), varying widely across the image sensor array causing FPN that cannot be easily removed (a1ex is working on this point right know, it's a hard task) and reducing signal swing.

So we could synthesis all of this in a photo-current to output charge model:
Q0 = Q(i) ⊕ QShot ⊕ QReset ⊕ QReadout ⊕ QFPN
Where:
Q(i) is the sensor transfer function and is given by: {1/q(itint) electrons for 0 < i < qQsat/tint & Qsat for i >= Qsat/tint} with Qsat is the well capacity
QShot is the noise charge due to integration (shot noise) and has average power 1/q(iph+idc)tint

However, to calculate SNR and dynamic range we use the model with equivalent input referred noise current.
Since it is linear we can readily find the average power of the equivalent input referred noise In (i.e. average input referred noise) power, to be:
σIn² = q²/tint²(1/q*(iph+idc)tintσr²) A² where σr² = σreset²+σRON²+σFPN²

SNR is the ratio of the input signal power to the average input referred noise power, so using the average input referred noise power expression we get:
SNR(iph) = 10log10(iph²/(q²/tint²(1/q*(iph+idc)tintσr²))

DR is defined as the ratio of the largest nonsaturating input signal to the smallest detectable input signal.
The analog output of the camera is subsequently quantized via A/D conversion to obtain a digital image. The number of gray levels in the image and the gain of the A/D convertor are usually adjusted such that the maximum gray level imax corresponds to the FWC (Full Well Capacity) and the minimum level imin corresponds to the minimum signal (RON) detectable by the sensor. The process of quantization itself introduces an additional noise, but we will ignore its contribution for simplicity (sorry, too long to explain here).

The largest nonsaturating signal given by:
imax = qQsat/tint- idc
The smallest detectable input signal defined as standard deviation of input referred noise under dark conditions σIn(0) (the zero here refers to iph = 0), which gives:
imin = q/tint√[1/q(idctintσr²)]

So the DR of the digitized image can be written as:
DR = 20log10(imax / imin)
Hence,
DR = 20log10(qQsat/tint- idc)/(q/tint√[1/q(idctintσr²)])

DR with dual_iso.mo means we have to look at a DR from a kind of SVE (Spatially Varying Exposure) image.
Hence, DR of an SVE camera is:
DRSVE = 20log10[(imax / imin) (emax / emin)]

I don't replace all variables in the equation for reading consideration, it could be too complicate here in the forum.

As we can see when we take a picture with dual_iso.mo, each exposure is uniformly quantized but the set of exposures together produce a non-uniform quantization of scene radiance (i.e. we see horizontal lines on the camera screen). As noted by Madden (B. Madden, Extended Intensity Range Imaging. Technical Report MS-CIS-93-96, Grasp Laboratory, University of Pennsylvania, 1993), this non-uniformity can be advantageous as it represents a judicious allocation of resources (bits). Though the difference between quantization levels increases with scene radiance, the sensitivity to contrast remains more or less linear. This is because contrast is defined as brightness change normalized by brightness itself.
We now determine the total number of gray levels captured by an SVE imaging system. Let the total number of quantization levels produced at each pixel be q and the number of different exposures in the pattern be K. Then, the total number of unique quantization levels can be determined to be:
Q = q + ∑{K-1; K=0} R [(q-1) - (q-1) (eK / eK-1)]
Where R(x) rounds-off to the closest integer.

This last equation is useful to compute ADU values from dual_iso images. Maybe a similar algorithm is used by ML and cr2HDR to compute DR gain from dual_iso; to be honest I don't take a look on the code yet.

Ref.: You can find full development of this in scientific papers plus some other references included:
_. High Dynamic Range Image Sensors, A. Gamal, Department of Electrical Engineering of Stanford University
_. High Dynamic Range Imaging: Spatially Varying Pixel Exposures, K. Nayar, Department of Computer Science of Columbia University & T. Mitsunaga, Media Processing Laboratories of Sony Corporation
_. E. Ikeda, Image data processing apparatus for processing combined image signals in order to extend dynamic range, September 1998
_. A. Morimura, Imaging method for a wide dynamic range and an imaging device for a wide dynamic range, October 1993
_. R. A. Street, High dynamic range segmented pixel sensor array, August 1998
_. Y. T. Tsai, Method and apparatus for extending the dynamic range of an electronic imaging system, May 1994

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1798 on: February 21, 2014, 08:16:40 AM »
I appreciate that you spent the time to clarify some of the issues I raised.


Quote
We would like to get the maximum DR from this device, so the first thing to do is to analyse what is reducing the DR.

And herein lies the crux of the problem.  While I appreciate that the content you posted may "clearly be a simplified version", compared to extended equations that might span 3 square city blocks, they are probably still significantly above the comprehension of most readers of this forum.  Certainly, the maths equations you described, are well above this readers comprehension.

Here, I had attempted to increase the knowledge (of the reader), of the processes involved in using dual_iso, from almost nil, to a satisfactory level suitable in obtaining excellent results, in the field.  Based on the pros and cons of dual_iso itself.

You have attempted to increase the knowledge (of the reader), from the basic understanding I set forth, to that of a university professor.

Baby steps  ;)

Quote
DR is defined as the ratio of the largest nonsaturating input signal to the smallest detectable input signal.

That is the engineering definition, yes.

Now consider this.  Does the engineering definition of the DR, describe the useful DR available to the photographer?

At some future date, I will attempt to describe a number of processes that will help the photographer best use ML, in a manner that is designed to increase the readers comprehension from almost nil, to a level that should hopefully provide an increase in the output quality of the photographers images.

I would appreciate it greatly, if you did not attempt to extend this comprehension to a level that requires an intimate knowledge, of the physics involved, in that thread.  Your extended explanations will only serve to help a significantly small number of the target audience, and will simply serve to confuse the greater target audience.

That is not to imply that I want to limit conversation, I simply ask that extended technical explanations are conducted in a separate thread.  If you do conduct your own explanations in a separate thread, I, for one, look forward to attempting to increase my knowledge of the subject, even further.

l_d_allan

  • Senior
  • ****
  • Posts: 258
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1799 on: February 21, 2014, 04:06:53 PM »
You have attempted to increase the knowledge (of the reader), from the basic understanding I set forth, to that of a university professor.
Several months ago, DPReview added a forum for "Photographic Science and Technology", which tends to be rather esoteric.
http://www.dpreview.com/forums/1061

Would that kind of forum be something to consider for ML?