[argyllcms] Re: dcraw outlined, annotated, and un-Dnged

  • From: Lars Tore Gustavsen <lars.tore@xxxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Sat, 13 Feb 2010 09:55:17 +0100

 On Fri, Feb 12, 2010 at 4:50 PM, Elle Stone <l.elle.stone@xxxxxxxxx> wrote:
> Hi Lars,
> Actually you can already read in Argyll camera coefficients. If the
> program finds a file named "colprof.inverse" in the same directory as
> the raw file, it will read in and use the coefficients in
> colprof.inverse. The format for the coefficients needs to be
> line-separated values like this:
> 1.422877
> -0.339392
> -0.186022
> -0.485458
> 1.164846
> 0.229688
> -0.098321
> 0.197318
> 0.971034
> 0.000000
> 0.000000
> 0.000000
> Unfortunately I haven't yet figured out how to get C-code to open a
> file with a name specified at the command line.
>
> Your bash script looks like just the ticket to get coefficients from
> an icc profile. There is also already a function in dcraw
> (pseudoinverse) that finds the inverse of a matrix, but I haven't
> tried to get it to do the work of finding the inverse of the camera
> primaries.
>
> Did you have a chance to modify the code for your camera and
> coefficients, then compile and run? Did it work? The code as it
> stands, with no further modification, only works with a Canon Rebel
> xti/400D. It has to be customized to the camera and the profile.
>
> Regards,
> Elle
>
>

Hello again.

Yes I have tested it now. It worked very well with an old target I
found on my harddrive. I have to investigate further the dcraw -g
option.  It would be nice if you in the documentation show us your
full dcraw command in the documentation.

A file named colprof.inverse worked if I changed the Canon EOS 400D", 0, 0xe8e,
line to my camera
Canon EOS 10D", 0, 0xfa0,
I guess you now this, but maybe other have the same problem.

I had of course some rounds to get this working. I found one way to
check if the result was correct. I compared the icc matrix against the
matrix in the tiff file outputted from dcraw-undngd -o 2. Like this:
$exiftool -RedMatrixColumn -GreenMatrixColumn -BlueMatrixColumn  tifffile.tiff
$iccdump -v 3 -t rXYZ -t gXYZ -t bXYZ cameraprofile.icc
In the end they matched. My problems turned out to be space and comma problems.

I have also no problem cut and paste the code from Firefox. If others
have problems they can try
$links2 -dump http://www.dustystones.com/dcraw-unDnged/dcraw-unDnged.html
> dcraw-unDnged.c
and  then compile.

So long
Lars Tore Gustavsen

Other related posts: