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

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2550 on: August 14, 2015, 04:07:23 PM »
For starters try to delete tag CalibrationIlluminant2:
Open command line/terminal in directory where Exiftool and test DNG are located and run
Exiftool -CalibrationIlluminant2= <name of your file>.DNG

Report results. Don't use originals but copies, please!

toze3

  • New to the forum
  • *
  • Posts: 13
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2551 on: August 14, 2015, 04:41:29 PM »
For starters try to delete tag CalibrationIlluminant2:
Open command line/terminal in directory where Exiftool and test DNG are located and run
Exiftool -CalibrationIlluminant2= <name of your file>.DNG

Report results. Don't use originals but copies, please!

Just tested and now it looks good on rawtherapee

Can this be corrected on cr2hdr? or i have to use exiftool for all files if i want to use rawtherapee?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2552 on: August 14, 2015, 04:52:15 PM »
I suppose (!) it has to be fixed in cr2hdr. Danne has pointed to dcraw and I'm no programmer.

You can batch convert your files in a directory with
Exiftool -CalibrationIlluminant2= *.DNG

heckflosse

  • New to the forum
  • *
  • Posts: 4
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2553 on: August 14, 2015, 05:12:51 PM »
Some background:

original dcraw reads Colormatrix1 and Colormatrix2 (if present). If Colormatrix2 is present it uses Colormatrix2 else it uses Colormatrix1. It doesn't check CalibrationIlluminant1 or CalibrationIlluminant2 for value 21 (D65).

Modified dcraw in RT reads Colormatrix1 and Colormatrix2 (if present). Then it reads CalibrationIlluminant1 and CalibrationIlluminant2 (if present), checks which of them contains value 21 (for D65).
If both contain 21 (which doesn't make sense IMHO) it uses Colormatrix2 (which is not present in the dual iso dng). I already prepared a fix for this bug in RT. But it has to be tested before it will be merged into master branch.

Ingo

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2554 on: August 14, 2015, 10:34:55 PM »
So, I fixed this a long time ago, it just hasn't been merged. The old chdk_dng.c code is not very good and this PR replaces it completely which should fix the issue: https://bitbucket.org/hudson/magic-lantern/pull-requests/603/dng-module-wip

You can compile cr2hdr from that branch and test if it solves the issue, it should.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7741
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2555 on: August 15, 2015, 03:33:09 AM »
Hi dmilligan. I compiled cr2hdr through codio from your branch. I creates a biary unix executable but when I try to run it in terminal I get the following.
Code: [Select]
/Users/itguser/Downloads/ml(1)/ml_dng/modules/dual_iso/cr2hdr: cannot execute binary file


dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2556 on: August 15, 2015, 04:02:34 AM »
You can't run a Linux binary on OSX ;)

dfort

  • Guest
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2557 on: August 15, 2015, 06:10:25 AM »
Here are OSX binaries for cr2hdr and mlv_dump  from dmilligan's ml_dng branch for testing:

https://drive.google.com/folderview?id=0BwCosJpHfhBsfmJudTAxekRiSzh3dEZMVnNaeTBGZE1yQ2hYMjVCRGR2dFlvbTRCbzhaazQ&usp=sharing

[EDIT: Added raw2dng]

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7741
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2558 on: August 15, 2015, 07:52:48 AM »
hehe, gotta learn more compiling linux/mac.
But honestly. Dfort, your uploads worked totally fine! Super thanks. Would you upload the raw2dng as well? it,s in the lv_rec folder inside modules folder I believe. Or isn things changed in there?
Those binaries are awesome dmilligan! Tested right away.

Don,t forget to
Code: [Select]
chmod u=rwx to give the binaries permission rights if you download.

/D

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3413
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2559 on: August 15, 2015, 08:46:18 AM »
All of this is truly beautiful ... Definitely a good way to start the weekend -- Thanks guys!
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2560 on: August 15, 2015, 08:55:13 AM »
Anyone out there able to compile for Windows?

toze3

  • New to the forum
  • *
  • Posts: 13
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2561 on: August 15, 2015, 01:01:09 PM »
Anyone out there able to compile for Windows?
I'm also interested!!  :)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7741
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2562 on: August 15, 2015, 07:52:02 PM »
Dfort updated with a compile of also raw2dng from dmilligan branch. See replay #2557. Enjoy.

dfort

  • Guest
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2563 on: August 15, 2015, 08:14:08 PM »
Anyone out there able to compile for Windows?

PM me on Monday if nobody responds. I'll dust off my old Windows laptop and give it try. It looks like all that's needed to compile the command line tools is Cygwin.

dfort

  • Guest
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2564 on: August 16, 2015, 04:38:35 PM »
Ok--so I pulled out the Windows computer and started compiling the command line tools with Cygwin and even though it worked, turns out that you also need Cygwin installed in order to run the tools so that's not going to work for most people.

I installed MinGw and am going way down that rabbit hole--as expected.

I did manage to get a working version of dmilligan's ml_dng mlv_dump for Windows. I'll keep trying with cr2hdr and raw2dng.

mothaibaphoto

  • Senior
  • ****
  • Posts: 393
  • pesky kid
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2565 on: August 16, 2015, 06:40:22 PM »
@dfort:
your mlv_dump:
1. Produses empty wav (just header, 44 bytes - RIFF$   WAVEfmt      Ђ»   о   data    and nothing else )
2. Wrong lens F - number in ACR (original mlv_dump show correct F-Number)
3. Wrong temp 50000 in ACR (original embed 5500)
The rest seems OK...

dfort

  • Guest
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2566 on: August 16, 2015, 09:02:59 PM »
Thanks for the feedback @mothaibaphoto

Can a Mac user check and see if you encounter the same issues?

Maybe the problem is with the way I set up MinGw? I still can't get raw2dng and cr2hdr to compile.

Until someone can build some proper Windows binaries, here are the Cygwin versions. You will need to put the .dll files in the same directory as the .exe files for them to work. Not too practical for production but maybe it will work for doing some quick tests of this:

So, I fixed this a long time ago, it just hasn't been merged. The old chdk_dng.c code is not very good and this PR replaces it completely which should fix the issue: https://bitbucket.org/hudson/magic-lantern/pull-requests/603/dng-module-wip

You can compile cr2hdr from that branch and test if it solves the issue, it should.

By the way--I'm just trying to help out testers that can't compile for themselves. Looks like building these command line tools in Windows is more difficult than I anticipated.

dfort

  • Guest
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2567 on: August 17, 2015, 09:08:50 PM »
Ok--I was able to compile raw2dng and cr2hdr for Windows. You can get all the Windows builds, including mlv_dump and Cygwin builds here.

Note that raw2dng and cr2hdr were cross compiled on a Linux system. I only have an old Windows Vista laptop and it can't run these binaries so there's no guarantee that it will work. mlv_dump won't cross compile on Linux but I was able to build it on Windows. By the way, the Linux system is on the same laptop that can dual boot into Windows or Ubuntu Linux.

Anyway--please report back so we know if this is working.

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2568 on: August 17, 2015, 09:23:13 PM »
Cr2hdr.exe not working in 64-bit environment. Windows identifies it as 16-bit app and denies execution.

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2569 on: August 17, 2015, 10:05:25 PM »
Cr2hdr.exe not working in 64-bit environment. Windows identifies it as 16-bit app and denies execution.

+1 same for me
70D.112 & 100D.101

dfort

  • Guest
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2570 on: August 17, 2015, 10:49:59 PM »
Yeah, it figures. My Windows/Linux laptop is too long in the tooth. I think these tools need to be compiled on a 64-bit system.

I'm trying to see if there's a way to run a MinGw gcc cross compiler on the Mac. In the meantime, do the other binaries work?

dfort

  • Guest
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2571 on: August 17, 2015, 11:18:56 PM »
Alright--this one works. Cross compiled on a Mac.

cr2hdr.exe

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7741
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2572 on: August 17, 2015, 11:34:52 PM »
Nice work dfort. Appreciated.

dfort

  • Guest
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2573 on: August 17, 2015, 11:39:48 PM »
Thanks. Here's the whole bunch, cr2hdr, raw2dng and mlv_dump.

These are working on my old Windows laptop and they should also work on a new 64-bit system. (Used mingw-w64-i686)

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #2574 on: August 18, 2015, 12:04:24 AM »
Cr2hdr.exe works now. Tag-Issue solved.
But Win 8.1 "Smartscreen" is warning me about security threat. Never happened before.