Headline news

Want to help with Magic Lantern development, without having to code?

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

Author Topic: dual_iso with 600D error: pgm width  (Read 2218 times)

escho

  • Senior
  • ****
  • Posts: 364
dual_iso with 600D error: pgm width
« on: August 15, 2013, 10:03:58 PM »
I make a testshoot with dual_iso 100/1600. Using cr2hdr, a dng-file is not generated and I get this error:

Code: [Select]
Input file     : 1.CR2
Full size      : 0 x 0
Active area    : 0 x 0
Error: pgm width

I do not find this error string in cr2hdr.c. The tmp.txt looks like this

Code: [Select]
Dateiname: 1.CR2
Zeitstempel: Thu Aug 15 21:13:01 2013
Kamera: Canon EOS 600D
ISO Wert: 100
Verschlusszeit: 3.2 sek
Blende: f/8.0
Brennweite: 42.0 mm
Eingebettetes ICC Profil: nein
Anzahl an RAW Bildern: 1
Größe des Thumbnails:   5184 x 3456
Volle Größe des Bildes: 5344 x 3516
Größe des Bildes:       5202 x 3465
Größe der Ausgabe:      5202 x 3465
Raw Farben: 3
Filter Muster: RGGBRGGBRGGBRGGB
Tageslicht Multiplikatoren: 2.339939 0.935795 1.311823
Kamera Multiplikatoren: 2602.000000 1024.000000 1306.000000 1024.000000

What´s wrong?

Compiled latest source code of TL2.0 from today

Edgar
EOS 600d
OpenSuse 13.1

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5892
  • 600D/6D/50D/EOSM/7D
dual_iso with 600D error: pgm width
« Reply #1 on: August 16, 2013, 02:22:23 PM »
Weird, mine come out. Windows? Are all programs unblocked? Latest dcraw?

escho

  • Senior
  • ****
  • Posts: 364
dual_iso with 600D error: pgm width
« Reply #2 on: August 16, 2013, 03:58:42 PM »
Quote
Windows?
  no, opensuse 12.3
Quote
all programs unblocked?
which programs? dcraw works and exiftool works too
Quote
latest dcraw?
  Latest from opensuse 12.3. But this dcraw-version is from last year. I updated to the recent dcraw, but no changes.

This error string
Code: [Select]
Error: pgm width where does this come from? As I said before, cr2hdr.c does not contain such a string. So I don´t know, where to search for the reason of this error.

Edgar
EOS 600d
OpenSuse 13.1

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 2329
dual_iso with 600D error: pgm width
« Reply #3 on: August 16, 2013, 05:35:48 PM »
Dual iso is only supported on 5d3 and 7d.
These are the only models that have two separately programmable ADCs

escho

  • Senior
  • ****
  • Posts: 364
dual_iso with 600D error: pgm width
« Reply #4 on: August 16, 2013, 05:46:58 PM »
Dual iso is only supported on 5d3 and 7d.
These are the only models that have two separately programmable ADCs

https://bitbucket.org/hudson/magic-lantern/commits/b17035baa550a34cea8999f71f3648cbfb8880ad

Edgar
EOS 600d
OpenSuse 13.1

escho

  • Senior
  • ****
  • Posts: 364
dual_iso with 600D error: pgm width
« Reply #5 on: August 19, 2013, 12:19:46 AM »
Compiling from actual MagicLantern source results in the same error (Kopfkratz)

Edgar
EOS 600d
OpenSuse 13.1

daduke

  • Supporter
  • New to the forum
  • *****
  • Posts: 10
  • 700D + EOS-M
dual_iso with 600D error: pgm width
« Reply #6 on: August 23, 2013, 10:03:35 PM »
I'm having similar issues with a dual iso test shot from my 700D:

Input file     : /tmp/IMG_5884.CR2
Full size      : 5280 x 3528
Active area    : 5208 x 3476
White level    : 13482
Black borders  : 72 left, 52 top
Black level    : 1982
ISO pattern    : BdBd RGGB
Interlacing method not supported
ISO blending didn't work


according to the source, BdBd means is_bright[0] && is_bright[2], so maybe the 700D uses another interleaving than other cameras?

cheers,
-d

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5892
  • 600D/6D/50D/EOSM/7D
dual_iso with 600D error: pgm width
« Reply #7 on: August 24, 2013, 01:11:47 AM »
Check your ver of dcraw. I had no issue with 600D, 700D can't test.

daduke

  • Supporter
  • New to the forum
  • *****
  • Posts: 10
  • 700D + EOS-M
dual_iso with 600D error: pgm width
« Reply #8 on: August 24, 2013, 09:59:34 AM »
Check your ver of dcraw. I had no issue with 600D, 700D can't test.
latest 9.19 in Fedora 19. Also, the "BdBd - Interlacing method not supported" is from cr2hdr, not dcraw. I'll have to dive into cr2hdr.c as soon as I find the time.

daduke

  • Supporter
  • New to the forum
  • *****
  • Posts: 10
  • 700D + EOS-M
dual_iso with 600D error: pgm width
« Reply #9 on: August 24, 2013, 10:36:57 PM »
the 700D definitely has another line interleaving scheme than the 5Dm3. cr2hdr reports "BddB RGGB" for the 5Dm3 and "BdBd RGGB" for the 700D. Page 5 of dual_iso.pdf talks about an interleaving pattern of l,l,H,H,l,l,H,H... for the 5Dm3, but I think the 700D uses something like l,l,l,l,H,H,H,H,l,l,l,l,H,H,H,H....
To illustrate, I cropped the first top left 32x32 pixel out of a 5Dm3 and 700D CR2, respectively:



Needless to say, current cr2hdr interpolation algorithms do not like this. I'll look into this some more, but maybe someone has some input already?

-d

escho

  • Senior
  • ****
  • Posts: 364
dual_iso with 600D error: pgm width
« Reply #10 on: August 25, 2013, 10:32:59 AM »
I make a testshoot with dual_iso 100/1600. Using cr2hdr, a dng-file is not generated and I get this error:

Code: [Select]
Input file     : 1.CR2
Full size      : 0 x 0
Active area    : 0 x 0
Error: pgm width

I do not find this error string in cr2hdr.c. The tmp.txt looks like this

Code: [Select]
Dateiname: 1.CR2
Zeitstempel: Thu Aug 15 21:13:01 2013
Kamera: Canon EOS 600D
ISO Wert: 100
Verschlusszeit: 3.2 sek
Blende: f/8.0
Brennweite: 42.0 mm
Eingebettetes ICC Profil: nein
Anzahl an RAW Bildern: 1
Größe des Thumbnails:   5184 x 3456
Volle Größe des Bildes: 5344 x 3516
Größe des Bildes:       5202 x 3465
Größe der Ausgabe:      5202 x 3465
Raw Farben: 3
Filter Muster: RGGBRGGBRGGBRGGB
Tageslicht Multiplikatoren: 2.339939 0.935795 1.311823
Kamera Multiplikatoren: 2602.000000 1024.000000 1306.000000 1024.000000

What´s wrong?

Compiled latest source code of TL2.0 from today

Edgar

I found the error.

This happens, because my pc is set to my native lanuage (german).

As I can see in cr2hdr.c, you use dcraw to fill tmp.txt with important values and you read from tmp.txt to process the dual-iso-file. But you search for english expressions. Because of my system-settings, dcraw writes geman expressions to tmp.txt. So they never can be found and used for further processing.

If I change my system to english, decoding the dual-iso-file is running fine:

Code: [Select]
LANG=en LC_CTYPE=en LANGUAGE=en ~/cr2hdr 1.CR2
Maybe it would be a solution to hardcode the language to english for running cr2hdr?. No plan, how this can be done, because I cannot code in C, just read a little...

Edgar
EOS 600d
OpenSuse 13.1

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 7543
  • 5D Mark Free
dual_iso with 600D error: pgm width
« Reply #11 on: August 25, 2013, 11:36:41 AM »
Does it work if you do the same trick in cr2hdr.c, for the dcraw command line?

Like this:

        snprintf(dcraw_cmd, sizeof(dcraw_cmd), "LANG=en LC_CTYPE=en LANGUAGE=en dcraw -v -i -t 0 \"%s\" > tmp.txt", filename);

escho

  • Senior
  • ****
  • Posts: 364
dual_iso with 600D error: pgm width
« Reply #12 on: August 25, 2013, 12:18:49 PM »
Does it work if you do the same trick in cr2hdr.c, for the dcraw command line?

Like this:

        snprintf(dcraw_cmd, sizeof(dcraw_cmd), "LANG=en LC_CTYPE=en LANGUAGE=en dcraw -v -i -t 0 \"%s\" > tmp.txt", filename);

Yes, it does:

Code: [Select]
edgar@linux-dfco:~/test2> ~/cr2hdr 1.CR2

Input file     : 1.CR2
Full size      : 5344 x 3516
Active area    : 5202 x 3465
White level    : 12400
Black borders  : 142 left, 51 top
Black level    : 1962
ISO pattern    : dBBd GBRG
Estimating ISO difference...
ISO difference : 3.99 EV (1588)
Black delta    : 0.91
Interpolation  : mean23-chroma5x5-contrast
Matching brightness...
Looking for hot pixels...
Hot pixels     : 2689
Full-res reconstruction...
Alias filtering...
Dark chroma filtering...
Building contrast map...
Dilating contrast map...
Smoothing contrast map...
ISO overlap    : 5.0 EV (approx)
Black adjust   : -2
Output file    : 1.DNG
    1 image files updated
EOS 600d
OpenSuse 13.1

escho

  • Senior
  • ****
  • Posts: 364
dual_iso with 600D error: pgm width
« Reply #13 on: August 26, 2013, 09:13:41 PM »
@ alex

I read a bit about programming. Trying to learn it somehow ...

What do you think about this construct? This runs under OpenSuse. Windows and MAC I cannot test.

Code: [Select]
#if defined(__linux__)
/* Linux */
snprintf(dcraw_cmd, sizeof(dcraw_cmd), "LANG=en LC_CTYPE=en LANGUAGE=en dcraw -v -i -t 0 \"%s\" > tmp.txt", filename);
#else
/* all other OS */
snprintf(dcraw_cmd, sizeof(dcraw_cmd), "dcraw -v -i -t 0 \"%s\" > tmp.txt", filename);
#endif
Edgar
EOS 600d
OpenSuse 13.1

kichetof

  • Member
  • ***
  • Posts: 205
  • Take a beer and enjoy it!
dual_iso with 600D error: pgm width
« Reply #14 on: March 18, 2014, 02:36:26 PM »
Solved it ! Sorry !

---------------------------------------------------------------------------------
« Last Edit: March 18, 2014, 03:12:32 PM by kichetof »