dual_iso with 600D error: pgm width

Started by escho, August 15, 2013, 10:03:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

escho

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
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

1%

Weird, mine come out. Windows? Are all programs unblocked? Latest dcraw?

escho

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
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

g3gg0

Dual iso is only supported on 5d3 and 7d.
These are the only models that have two separately programmable ADCs
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

escho

https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

escho

Compiling from actual MagicLantern source results in the same error (Kopfkratz)

Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

daduke

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%

Check your ver of dcraw. I had no issue with 600D, 700D can't test.

daduke

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.

daduke

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

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
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

a1ex

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

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
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

escho

@ 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
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

kichetof

Solved it ! Sorry !

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