Magic Lantern Forum

Using Magic Lantern => General Help Q&A => Topic started by: escho on August 15, 2013, 10:03:58 PM

Title: dual_iso with 600D error: pgm width
Post by: escho 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:

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

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
Title: Re: dual_iso with 600D error: pgm width
Post by: 1% on August 16, 2013, 02:22:23 PM
Weird, mine come out. Windows? Are all programs unblocked? Latest dcraw?
Title: Re: dual_iso with 600D error: pgm width
Post by: escho on August 16, 2013, 03:58:42 PM
QuoteWindows?
no, opensuse 12.3
Quoteall programs unblocked?
which programs? dcraw works and exiftool works too
Quotelatest 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 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
Title: Re: dual_iso with 600D error: pgm width
Post by: g3gg0 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
Title: Re: dual_iso with 600D error: pgm width
Post by: escho on August 16, 2013, 05:46:58 PM
Quote from: g3gg0 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

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

Edgar
Title: Re: dual_iso with 600D error: pgm width
Post by: escho on August 19, 2013, 12:19:46 AM
Compiling from actual MagicLantern source results in the same error (Kopfkratz)

Edgar
Title: Re: dual_iso with 600D error: pgm width
Post by: daduke 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
Title: Re: dual_iso with 600D error: pgm width
Post by: 1% on August 24, 2013, 01:11:47 AM
Check your ver of dcraw. I had no issue with 600D, 700D can't test.
Title: Re: dual_iso with 600D error: pgm width
Post by: daduke on August 24, 2013, 09:59:34 AM
Quote from: 1% on August 24, 2013, 01:11:47 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.
Title: Re: dual_iso with 600D error: pgm width
Post by: daduke 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:

(http://daduke.org/junk/5dm3_v_700d.png)

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
Title: Re: dual_iso with 600D error: pgm width
Post by: escho on August 25, 2013, 10:32:59 AM
Quote from: escho 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:

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

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:

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
Title: Re: dual_iso with 600D error: pgm width
Post by: a1ex 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);
Title: Re: dual_iso with 600D error: pgm width
Post by: escho on August 25, 2013, 12:18:49 PM
Quote from: a1ex 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);

Yes, it does:

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
Title: Re: dual_iso with 600D error: pgm width
Post by: escho 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.

#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
Title: Re: dual_iso with 600D error: pgm width
Post by: kichetof on March 18, 2014, 02:36:26 PM
Solved it ! Sorry !

---------------------------------------------------------------------------------