Headline news

Magic Lantern joins forces with Apertus to create THE ultimate open source camera, thanks to your help!

You can find our live webchat here: [email protected]

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

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 7733
  • 5D Mark Free
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #200 on: July 20, 2013, 04:19:26 PM »
Yes, raw2dng from here is from unified.

Can you upload a short clip?

HDR clips are recognized from the first frame, by computing the ISO difference - so if that frame is dark, it probably won't work.

GregoryOfManhattan

  • Contributor
  • Member
  • *****
  • Posts: 164
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #201 on: July 20, 2013, 04:28:46 PM »
very underexposed - so good to know and explains why i have clips which when running raw2dng do not show the EV HDR correction info - though this is the first time i'm seeing the banded DNG.

uploading now - if you want to see - try these in a couple of minutes when upload is complete
http://50.56.67.113//ml-20july13/M20-0958.RAW 32.7MB

http://50.56.67.113//ml-20july13/000000.dng 2.7MB

stevefal

  • Contributor
  • Hero Member
  • *****
  • Posts: 519
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #202 on: July 20, 2013, 04:32:23 PM »
A1ex, for video could you alternate 100<>1600 each frame and then de-interlace the highlights and shadows in order to address the aliasing? It could turn the extreme spatial artifact into a slight temporal one.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 7733
  • 5D Mark Free
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #203 on: July 20, 2013, 04:39:47 PM »
Yes, feel free to write down the math for deinterlacing. Alternating ISO is trivial.

stevefal

  • Contributor
  • Hero Member
  • *****
  • Posts: 519
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #204 on: July 20, 2013, 04:57:36 PM »
Rather than filling line-skipped highlight/shadow pixels with synthesized values, fill them with values from the previous frame.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 7733
  • 5D Mark Free
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #205 on: July 20, 2013, 05:03:40 PM »
Continue until you get a precise mathematical description of what you said.

Hint: it's 100x more complex than what I did so far.

stevefal

  • Contributor
  • Hero Member
  • *****
  • Posts: 519
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #206 on: July 20, 2013, 06:03:52 PM »
Gotcha. Just wondering what tricks could be used if ISOs were alternated.

Btw I've noticed in the past that when lifting RAW video shadows to the extreme, the noise "crawls" through the frame. I think it was diagonally down and to the left. It reminds me of how the alias patterns are crawling here. I don't understand why there is a barber pole effect during a locked-down shot. That's what I would expect if ISOs were alternating (without de-interlacing).

dubzeebass

  • Supporter
  • Senior
  • *****
  • Posts: 253
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #207 on: July 21, 2013, 12:03:30 AM »
Another video ... I used the Shadow 050 one again and I think it gives the best results.

Is there any way to implement this in such a way that each sensor records individually to the CF card?  Obviously it'd be double the data rate (ergo half the write speed per channel on the CF bus) but it could be a start?

https://www.youtube.com/watch?v=nGBRDbLeIgk

dubzeebass

  • Supporter
  • Senior
  • *****
  • Posts: 253
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #208 on: July 21, 2013, 12:04:29 AM »
@dubzeebass: can you upload a sample? (less than 1 second of video, if possible).

Did it work better with a previous version?

a1ex, it appears to be just the frames at the beginning of the video that do that interlaced pink highlight thing.  It's akin to the judder that some people get, myself included, when viewing a rendered RAW file - the first few frames repeat back and forth and then it continues normally.

Danne

  • Supporter
  • Hero Member
  • *****
  • Posts: 1064
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #209 on: July 21, 2013, 12:32:04 AM »
Hi! Need some help what to do with my developed cr2 dual iso file. I throw the file on dcraw.exe and then to cr2hdr.exe which creates somekind of.ppm file. This opens fine in photoshop and it contains the info from the darker iso. The lines are still visible. Am I not supposed to get a combined file of the two iso,s?
Thank you!
//D

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 7733
  • 5D Mark Free
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #210 on: July 21, 2013, 12:33:22 AM »
@dubzeebass: that was a bug solved a while ago, turn on sync beep if you still use an old version.
@Danne: first cr2hdr, then dcraw.

I have some major updates to the interpolation algorithm. It's too late here to post nice comparisons and stuff, but you can do that for me.

Basically, this update gets the noise levels from the original samples in out-of-focus areas and minimizes aliasing in high-detail areas.

http://acoutts.com/a1ex/shadow/000000.jpg

compare with http://acoutts.com/a1ex/shadow/b.jpg (shadow50) for example
or with http://acoutts.com/a1ex/highlight/b.jpg (highlight blurring)
or with http://acoutts.com/a1ex/shadow/median6.jpg (the first algorithm)

There's no denoising; the algorithm is just selecting the cleaner signal source (ISO 1600) in low-detail areas. There's some slight blurring in aliased highlight areas, but it has no impact on noise (it's only used to reduce the artifacts).

Now I think the algorithm is suitable for some really nice shots (photos+videos), not just aliased keyboards in black caves ;)

dubzeebass

  • Supporter
  • Senior
  • *****
  • Posts: 253
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #211 on: July 21, 2013, 12:43:03 AM »
@dubzeebass: that was a bug solved a while ago, turn on sync beep if you still use an old version.

I use the latest build for 5Dmk3 from Lourenco, will turn on Beep and see if that sorts it out.

Now I think the algorithm is suitable for some really nice shots (photos+videos), not just aliased keyboards in black caves ;)

The new one looks way better.  Still that chroma aliasing ... I wonder is it possible to pull the colour from surrounding pixels on anything that's got a jaggie and has an RGB level near clip while other levels are relatively low for that area?  Might not work if something is supposed to be jaggie ... but could help with the chroma aliasing.

Danne

  • Supporter
  • Hero Member
  • *****
  • Posts: 1064
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #212 on: July 21, 2013, 12:54:25 AM »
nice Alex, with the blurring!
Still didn,t get the cr2 to combine. I drop the the file first on cr2hdr wich opens up, than on dcraw, creates somekind of ppm-file. When viewed in 100% the horisontal lines are showing. Should I get a dng?
Thank you for your patience.
//D

*update. Got everything to work eventually. Thanks
« Last Edit: July 21, 2013, 02:57:31 AM by Danne »

Audionut

  • Moderators
  • Hero Member
  • *****
  • Posts: 2830
  • Spamming my signature
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #213 on: July 21, 2013, 01:00:20 AM »
a1ex can you link the cr2hdr executable separately to save some bandwidth.

Audionut

  • Moderators
  • Hero Member
  • *****
  • Posts: 2830
  • Spamming my signature
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #214 on: July 21, 2013, 01:01:48 AM »
Still didn,t get the cr2 to combine. I drop the the file first on cr2hdr wich opens up,

You should get the DNG after dropping the CR2 onto the cr2dng app.

Danne

  • Supporter
  • Hero Member
  • *****
  • Posts: 1064
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #215 on: July 21, 2013, 01:06:14 AM »
Hi audionut. Thanks for helping. cr2dng app? Do you mean cr2hdr? Can,t find any cr2dng

dubzeebass

  • Supporter
  • Senior
  • *****
  • Posts: 253
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #216 on: July 21, 2013, 01:29:39 AM »
Hi audionut. Thanks for helping. cr2dng app? Do you mean cr2hdr? Can,t find any cr2dng

Yes that's what he meant, available in the original post.

Danne

  • Supporter
  • Hero Member
  • *****
  • Posts: 1064
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #217 on: July 21, 2013, 01:31:27 AM »
Got it to work. Had to move the whole package to the virtual box desktop. rather than using the virtual drive.
Thanks for your patience. THis is gonna be fun :)

dubzeebass

  • Supporter
  • Senior
  • *****
  • Posts: 253
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #218 on: July 21, 2013, 01:35:16 AM »
Got it to work. Had to move the whole package to the virtual box desktop. rather than using the virtual drive.
Thanks for your patience. THis is gonna be fun :)

Nice one.. I'm just getting my VM environment up and running again after failing with WINE and WINEBottler to get the EXE to run.  Post some samples when you get em!

Danne

  • Supporter
  • Hero Member
  • *****
  • Posts: 1064
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #219 on: July 21, 2013, 02:52:31 AM »
Hi Alex. Playing around with the smooth3 version. Is that the updated version of the combining tools?? With cr2 it seems to be a real winner. Havn,t done anything special yet but its wonderful to have such clean shadows. Will try to post something tomorrow. I,m away and on a real slow bandwith for a couple of days but I,ll try to post a picture.
Did you by the way update the conversion tools for film yet? I got some vertical pink stripes but probably due to an old version? Is whitefix still the latest raw2dng.exe version?
Thanks man.

//D
« Last Edit: July 21, 2013, 03:04:29 AM by Danne »

squig

  • Moderators
  • Senior
  • *****
  • Posts: 419
  • Crash test dummy MK3
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #220 on: July 21, 2013, 04:20:51 AM »

I have some major updates to the interpolation algorithm. It's too late here to post nice comparisons and stuff, but you can do that for me.

Basically, this update gets the noise levels from the original samples in out-of-focus areas and minimizes aliasing in high-detail areas.

http://acoutts.com/a1ex/shadow/000000.jpg

There's some aliasing on the coffee table that isn't in the shadow 50 shot. Can you post up a 100/400 shadow 50 shot for comparison. Now that you have the FPN under control the noise doesn't bother me, with a bit of chroma noise reduction it will look like grain.
Reporter to Mahatma Gandhi: "Mr. Gandhi, what do you think of Western Civilisation?"   Gandhi: "I think it would be a good idea." https://vimeo.com/squig

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 7733
  • 5D Mark Free
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #221 on: July 21, 2013, 07:00:03 AM »
That shot is just a tricky shot from EOSHD - here's his original rendering: http://www.eoshd.com/uploads/5d3-hdrx.jpg

I can remove the shadow aliasing completely, but right now I'm only cleaning 50% of it, because the noise gets pretty bad. Still lots of room for tweaking (but you need to compile yourself, there are no user parameters yet).

Here's the spot you need to change:

Code: [Select]
            if (b0 < white && d < white)
                f = MAX(f, c * FIXP_ONE / 2);

change to f = MAX(f, c * FIXP_ONE); to remove all the shadow aliasing, and maybe tweak CONTRAST_MAX to fine-tune stuff.

IliasG

  • Member
  • ***
  • Posts: 123
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #222 on: July 21, 2013, 09:13:17 AM »

I can remove the shadow aliasing completely, but right now I'm only cleaning 50% of it, because the noise gets pretty bad. Still lots of room for tweaking (but you need to compile yourself, there are no user parameters yet).

Here's the spot you need to change:

Code: [Select]
            if (b0 < white && d < white)
                f = MAX(f, c * FIXP_ONE / 2);

change to f = MAX(f, c * FIXP_ONE); to remove all the shadow aliasing, and maybe tweak CONTRAST_MAX to fine-tune stuff.

I think that as soon as FPN is suppressed (and cr2dng does a beautiful job on this) then the optimal mix depends on the workflow. I suppose that with ACR (and it's very effective denoise in use) a user would be better to have a DNG with less aliasing at the cost of more noise and then denoise in ACR.
The same with Rawtherapee which has some nice tools for demosaic, denoise, false color suppression ...
With Resolve with it's primitive demosaic and denoise the needs are different.

User parameters would be a nice option.

 

squig

  • Moderators
  • Senior
  • *****
  • Posts: 419
  • Crash test dummy MK3
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #223 on: July 21, 2013, 09:53:17 AM »
(but you need to compile yourself, there are no user parameters yet).

Hehe, yeah like that's ever gonna happen.   :D

Yeah noise is easily dealt with in ACR without much of a detail penalty, and besides if you want anything to look like film you still have to light. Samuel mentioned that 100/400 still gives you 13.5 stops and only the top and bottom 2 stops have aliasing vs top and bottom 4 with 100/1600. With only a half a stop DR penalty to substantially reduce the aliasing 100/400 looks like the best option so far.

Is shadow 50 100/1600 4+4 stops aliased?

Reporter to Mahatma Gandhi: "Mr. Gandhi, what do you think of Western Civilisation?"   Gandhi: "I think it would be a good idea." https://vimeo.com/squig

IliasG

  • Member
  • ***
  • Posts: 123
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #224 on: July 21, 2013, 10:08:03 AM »

.... Samuel mentioned that 100/400 still gives you 13.5 stops and only the top and bottom 2 stops have aliasing vs top and bottom 4 with 100/1600. With only a half a stop DR penalty to substantially reduce the aliasing 100/400 looks like the best option so far.


What you describe is for 100/800 not 100/400 .. http://www.magiclantern.fm/forum/index.php?topic=7139.msg59971#msg59971
And I also think 100/800 is optimal.

At 100/400 the DR increase is 1.25 less than 100/1600.

 

courtesy