Dual ISO - massive dynamic range improvement (dual_iso.mo)

Started by a1ex, July 16, 2013, 06:33:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SpcCb

Quote from: Audionut on February 21, 2014, 08:16:40 AM
(...)  Does the engineering definition of the DR, describe the useful DR available to the photographer?
(...)
Good question.

I understand that for users, ML have to be 'friendly'. We had discussions with a1ex about this offrecord to make best choices about how ML get access to special functions.

In fact, engineering tools are good; all ML developers here are a kind a engineer.
Plus, maths tools are good too; we should not be afraid by them.
Let me try to explain why:

Good observation is good science. Every time I can I repeat it. We need observations, experimentations, tests, etc.
However, without maths tools, observations are hard to interpret, it takes more times to understand what appends and/or how to correct engineering at the source (ML functions).

I don't say we 'have to' use complex maths etc.: I just say without some tools like these, progress will be hard and will take long times at this point where ML is.
a1ex made useful tools like that; ADTG_GUI, RAW_DIAG, etc. Of course it is hard to use for most of users, but it does not mean that we have to be afraid by them.

Then, it is why I think I was misunderstand some posts ago; it was not to find fault and depreciate someone, it was trying to help by underline where it should be.
The big challenge is that ML starts to access to very complex stuff since some times and it is equally more complex to help with simple stuff.

So, does the DR equation with FPN, RON, TN, .. considerations will be useful for photographers: Yes! :)
Photographers (users) maybe not understand (don't need to?) what appends with the ML on background, but it is clear that if we don't care off this, photographs (images/pictures) will not be as 'nice' as they could be.
For example, it clearly looks that with 5D2, with last offset/WL/ADTG/.. optimizations, we should pass over the 12 stops wall on a single frame with some FPN reduction. And with dual_iso there will be a gain too, of course. The 11.5, 12.0 or 12.5 stops numbers maybe not be relevant overall for photographs, but when they will see deep clean blacks (offset opt + FPN reduction), rich high lights and smooth middle tones (WL+ ADTG opt) on their photographs, it's quite sure that they see the gain.

a1ex

QuoteArguing with an engineer is a lot like wrestling in the mud with a pig. After a few hours, you realize that he likes it.

;)


Audionut

@SpcCb

Engineering dynamic range is useful, because it is not subjective.  It is not subject to  personal opinion.

Apart from that, we are on completely different wavelengths.  My intention in the initial post was not to school the reader on the benefits of accurate engineering dynamic range, and it's usefulness.  It was to increase the readers understanding on basics.  Of course, our definition of basics is surely many moons apart  ;)  I am not sure in how many more different ways I can try and explain this to you.  As I tried to suggest many posts ago, how about we simply move on.

@a1ex

I think the biggest failing with most engineers, and of course, I speak generally here, is that they become fixated with results based entirely on equations.  They are not willing to trust the senses that they have at their disposal.

I will use this example.

PSNR is used in video encoding for the same reason E-DR is used here.  It does not suffer from subjectiveness.  However, this same lack of subjectiveness is the primary reason why it is not the determining factor on the quality of an video encoder.

Consider x264.  The initial development cycle consisted primarily of coding based on the results of PSNR.  This is obviously useful, as the initial code is designed based on a metric that is not subjective.  However, humans are highly subjective beings.  Primarily, when Jason Garrett-Glaser joined the development team, the focus on coding shifted to subjectiveness.  It was at this time that optimisations such as Adaptive quantisation (AQ), Psychovisual Rate–distortion optimisation (Psy-RDO) and Macroblock-tree rate control (MB-Tree) were implemented in x264.

QuoteTry out my new AQ method. Warning: It is very powerful and will butcher your PSNR, though it has little effect on SSIM. Don't judge by the metrics, judge by appearance.

These optimisations are based entirely on subjectivity.  They are, combined, one of the primary reasons why x264 is considered by many, the leading H.264 spec encoder available today.

It has been my experience, that engineers tend to work better with individuals who are adapt at using their senses to determine effects, not measurable with metrics.  Think of this as a symbiotic relationship.

Think of our relationship.  Most of the time I am just stupid.  But every now and then, I am useful.  Mostly, because I do not think like an engineer.

arturochu

Chu

SpcCb

Quote from: a1ex on February 21, 2014, 06:14:21 PM
QuoteArguing with an engineer is a lot like wrestling in the mud with a pig. After a few hours, you realize that he likes it.
;)
:D

I hope you don't have something worse about physicists! :)

a1ex

Of course I have:
Quote
Mathematician: Pi is thenumber expressing the relationship between the circumference of a circle and its diameter.
Physicist: Pi is 3.1415927 plus or minus 0.00000005
Engineer: Pi is about 3.
=> now you can see where the misunderstanding is coming from :P

And I actually copy some code from a physicist:
https://theory.uchicago.edu/~ejm/pix/20d/tests/noise/index.html
https://code.google.com/p/rawtherapee/source/browse/rtengine/amaze_demosaic_RT.cc




SpcCb

Quote from: a1ex on February 21, 2014, 10:59:53 PM
Of course I have:
QuoteMathematician: Pi is thenumber expressing the relationship between the circumference of a circle and its diameter.
Physicist: Pi is 3.1415927 plus or minus 0.00000005
Engineer: Pi is about 3.
=> now you can see where the misunderstanding is coming from :P
Well seen! ;D
And it confirms that I'm definitely not an engineer, nor a mathematician!

Quote from: a1ex on February 21, 2014, 10:59:53 PMAnd I actually copy some code from a physicist:
https://theory.uchicago.edu/~ejm/pix/20d/tests/noise/index.html
(...)
Nice reading, and I note that you find an other physicist agree with me:
Quote from: Emil Martinec(...)
If the DR of the downstream components were not a limiting factor, then when recording at ISO 100, the highlights would be available, but the read noise would be predominantly due to the sensor itself and thus have the same value in electrons as the read noise at ISO 1600. For the 1D3, ISO 100 read noise, limited by the downstream components, is about 24 electrons; ISO 1600 read noise, coming primarily from the sensor, is only four electrons. Because of this factor of six difference in read noise, the full sensor dynamic range is over two stops higher (about 14.0) than the camera delivers (about 11.7) due to those downstream components.

This hidden extra dynamic range is what Roger Clark calls "sensor dynamic range" -- (...)

dubzeebass

So what can we do to increase dynamic range other than Dual ISO? I know there's the ongoing hacking of the Digic registers, EDMAC, etc to squeeze half a stop out, but what's stopping us from getting more?

dmilligan


orim

@a1ex

your last cr2hdr converts this ISO 100/+2EV
https://www.dropbox.com/s/xcaclw1jxwhnv82/2014-02-23_5089.CR2
into dng which still has dualISO lines like input cr2 file, could you check it, please?

c:\dualISO>cr2hdr.exe 2014-02-23_5089.CR2
cr2hdr: a post processing tool for Dual ISO images

Last update: 835b724 on 2013-12-10 13:06:11 UTC by email:
Merged OtherOnePercent/tragic-lantern-6d into unified

Active options:
--amaze-edge    : use a temporary demosaic step (AMaZE) followed by edge-directed interpolation (def
ault)
--cs2x2         : apply 2x2 chroma smoothing in noisy and aliased areas (default)

Input file      : 2014-02-23_5089.CR2
Camera          : Canon EOS 50D
Full size       : 4832 x 3228
Active area     : 4770 x 3177
Black borders   : 62 left, 51 top
Black level     : 995
ISO pattern     : ddBB GBRG
White levels    : 13310 11413
Noise levels    : 6.83 8.07 8.85 7.59 (14-bit)
Black delta looks bad, skipping correction
ISO difference  : 0.29 EV (122)
Black delta     : 0.00
Dynamic range   : 10.82 (+) 10.20 => 10.49 EV (in theory)
Looking for hot/cold pixels...
Hot pixels      : 226
Cold pixels     : 141
AMaZE interpolation ...
Amaze took 6.07 s
Edge-directed interpolation...
Semi-overexposed: 33.07%
Deep shadows    : 2.84%
Horizontal stripe fix...
Full-res reconstruction...
ISO overlap     : 7.5 EV (approx)
Half-res blending...
Chroma smoothing...
Building alias map...
Filtering alias map...
Smoothing alias map...
Final blending...
Noise level     : 31.47 (16-bit), ideally 29.90
Dynamic range   : 10.61 EV (cooked)
Black adjust    : 7
Output file     : 2014-02-23_5089.DNG


Audionut

Quote from: orim on February 23, 2014, 05:00:46 PM
@a1ex

your last cr2hdr

Last update: 835b724 on 2013-12-10 13:06:11 UTC by email:
Merged OtherOnePercent/tragic-lantern-6d into unified

I see different.

QuoteLast update: d0ac769 on 2014-01-23 10:13:39 UTC by alex:
cr2hdr: experimental white level routine with two separate levels ...


a1ex

Both versions have the bug.

It's already fixed in my local copy, but I'd like to understand what exactly happened before publishing the fix. If you run it with --iso-curve, it looks like a strong nonlinear response of the sensor (which is not true).

orim

Thanks, alex,

so now i have the file, which can not be processed, till update, right.
(yes, i downloaded your cr2hdr again :-)

And what about opposite situation, where my non dualISO files are processed into dngs?
Why is that happening/how to prevent it?

a1ex

Do you have an example? How do the log files look like when you process a non dual ISO shot and it gets mistaken for one?

orim

Alex,

here is the example cr2: https://www.dropbox.com/s/dena1a1bu3dn3hb/2014-02-22_4912.CR2
i want to share it as short as possible - please, let me now u downloaded it.

it is Tv priority, ISO auto = 1600, +2/3 Ev

c:\dualISO>cr2hdr.exe 2014-02-22_4912.CR2
cr2hdr: a post processing tool for Dual ISO images

Last update: d0ac769 on 2014-01-23 10:13:39 UTC by alex:
cr2hdr: experimental white level routine with two separate levels ...

Active options:
--amaze-edge    : use a temporary demosaic step (AMaZE) followed by edge-directed interpolation (def
ault)
--cs2x2         : apply 2x2 chroma smoothing in noisy and aliased areas (default)

Input file      : 2014-02-22_4912.CR2
Camera          : Canon EOS 50D
Full size       : 4832 x 3228
Active area     : 4770 x 3177
Black borders   : 62 left, 51 top
Black level     : 993
ISO pattern     : ddBB GBRG
White levels    : 9000 9000
Noise levels    : 19.43 17.66 19.05 17.40 (14-bit)
Doesn't look like interlaced ISO
ISO difference  : 0.00 EV (100)
Black delta     : -0.55
Dynamic range   : 8.85 (+) 8.69 => 8.69 EV (in theory)
Looking for hot/cold pixels...
Hot pixels      : 778
Cold pixels     : 1686
AMaZE interpolation ...
Amaze took 3.67 s
Edge-directed interpolation...
Semi-overexposed: 0.00%
Deep shadows    : 24.08%
Horizontal stripe fix...
Full-res reconstruction...
ISO overlap     : 5.8 EV (approx)
Half-res blending...
Chroma smoothing...
Building alias map...
Filtering alias map...
Smoothing alias map...
Final blending...
Noise level     : 106.69 (16-bit), ideally 59.52
Dynamic range   : 8.23 EV (cooked)
Black adjust    : -17
Output file     : 2014-02-22_4912.DNG



mad.eos

hi guys,

Don't know if this is the appropriate topic but, I would like to share a dual_iso picture just to show one of the big advantages of using the dual_iso module.

Kitty scratching in HDR! May be plain to some, I loved the final result! ;)

http://imagizer.imageshack.us/v2/1600x1200q90/32/hqp8.jpg
Canon EOS 1100D w/ 18-55mm | ML Nightly Build Tester

mrd777

For some reason, no matter what I do I cannot get the dual ISO working.

I tried this inside my house multiple times. I shoot the interior and outside window at the same time. ISO 100 from Canon, to expose the outside of the window, and ISO 800 for ML for the interior. I then run the cr2hdr tool to make a DNG which is supposed to make an image with a lot of dyn range improvement, but there is none. Not noticeable like you all show in your photos.
I compare it to an original photo that the camera takes, and they look the same pretty much.

5d Mark 2

Tried it a few times throughout the last week or two. I don't know what I did wrong?

Thank you,
Mr D

mad.eos

Hello mrd777,

When you take a dual_iso picture, can you see some banding? Does the picture look weird to you? If so, camera wise, you're doing it right. If so, let's get on the Barracuda software.

Use the BarracudaGUI.exe with the "attached" cr2hdr.exe and dcraw.exe in the same folder. Then simply run barracuda, you get a DNG file and then it's up to the Light Room or Photoshop to give it that extra punch in color, that's basically it.

Edit: Oh, and if you are using ETTR, try dual_iso module with it off, sometimes for some reason, it equals the ISO values for ex. 100/100 = 0 DR  ::)
Canon EOS 1100D w/ 18-55mm | ML Nightly Build Tester

mrd777

Hi madness,

Thanks for the reply. I see the scan lines if that is what you mean. So it looks like it works. So I'm guessing I missed the fact that I need to use Barracuda.

I  get my camera back from a friend in a few days. Will try then.

Thank you!

mad.eos

Barracuda is only a gui for the original cr2hdr command line, but you're welcome ;-)
Canon EOS 1100D w/ 18-55mm | ML Nightly Build Tester

Audionut

Compare a standard ISO 100 shot with a dual_iso shot.  You need to boost exposure and shadows to see the difference.

@mad.eos
There is a thread for dual_iso photos here.

smckenzie

I've probably missed something but not having any luck here.

5D MKIII iso set to 100, dual iso turned on at recovery iso set to 1600. Screen looked interlaced. Extracted .RAW with RAW Magic (MAC OS) and dragged dng's onto cr2hdr - it ran through the files but errored with "Doesn't look like interlaced ISO " and deleted all the dng's.

Please advise and sorry in advance for any stupidity on my part.

smckenzie

Just doubled checked and I noticed the after setting the recovery iso it then switches back to the canon iso...

mad.eos

Do you have Ettr enabled? If so, uncheck it and try again.
Canon EOS 1100D w/ 18-55mm | ML Nightly Build Tester

kgv5

Is there any way to have dualISO mlv files "tagged"? When using ETTR connected with dualISO we often get mixed files (normal and dualiso) and the only way to know if the clip is dualISO or not is to open one of the DNGs (which takes a lot of time with dozens of files). If we have DI files with some different name it would be possible to easly filter such a files out of the rest and process them with any dual iso app (or script) right away. Is metadata of MLV module has a "room" for such a tagging?

EDIT: Maybe something like 'custom file prefix' but for movies.
www.pilotmovies.pl   5D Mark III, 6D, 550D