New project: camera color profile calculation - page 3 - RAW Shooting and Processing - CHDK Forum  

New project: camera color profile calculation

  • 480 Replies
  • 318080 Views
*

Offline ArtDen

  • ***
  • 175
    • dng4ps2
Re: New project: camera color profile calculation
« Reply #20 on: 27 / January / 2008, 23:21:39 »
Advertisements
ArtDen

I took a quick look into this matrix in CIE xy color space, and positions of primaries are
(hope I didn't make some typing mistake writing DngSetmatrix parameters)

Red:    0.84,  0.18
Green:  0.46,  2.25
Blue:   0.13, -0.04

I don't know what "positions of primaries" means and what values you wrote :)

As you can see, in your profile, green primary is obviously way too far from white point. Red is also too far (although not as much as green) and slightly too low. On the other side, blue is too close to WB
Did you test my matrix on real picture? Can you upload resulting picture into this forum?

Re: New project: camera color profile calculation
« Reply #21 on: 28 / January / 2008, 00:28:38 »
Speaking of DNGSetMatrix, where can I find it? I tried searching the forums, the wiki, and google but came up blank.

Re: New project: camera color profile calculation
« Reply #22 on: 28 / January / 2008, 00:37:27 »
Here's an a570is picture of a real Gretagmacbeth mini target under an Ott-lite light (it's is  not a daylight but at least not a random monitor color temperature). Why did it have to be out of focus and program-exposed, BTW?

a570is.zip - 10.13MB

Is there any other info you need to help you improve your program? Sounds like a good idea but not too realistic.

<edit> I edited the link - my first file had "vibrant" turned on for jpgs.
« Last Edit: 28 / January / 2008, 01:34:59 by dvornik »

*

Offline vit40

  • ****
  • 276
Re: New project: camera color profile calculation
« Reply #23 on: 28 / January / 2008, 01:54:57 »
CIE xy is well-known diagram:


For display color spaces like sRGB (shown above), primary colors are inside diagram. For digicam sensors, it's normal that "virtual" positions of primary colors are slightly outside (except red - it is usually inside), because for instance green pixel is also sensitive to red and blue. But they shouldn't be very far from diagram
« Last Edit: 28 / January / 2008, 02:14:28 by vit40 »


Re: New project: camera color profile calculation
« Reply #24 on: 28 / January / 2008, 02:14:07 »
From what I know CIE xy is just one of 3D coordinate systems to describe colors. What you've posted is a 2D projection of it. For any meaningful comparison of gamuts you'd need to look at 3D models. Which are readily available in XP color applet, Mac Colorsync and several independant gamut comparison utilities.

<edit> All of which doesn't matter for the program that ArtDen is writing  - he's just trying to make RAW output look like the in-camera jpg conversion.
« Last Edit: 28 / January / 2008, 02:20:01 by dvornik »

*

Offline vit40

  • ****
  • 276
Re: New project: camera color profile calculation
« Reply #25 on: 28 / January / 2008, 02:16:14 »
Third coordinate is upper-case Y - intensity of each color
Inverting color matrix (3x3) gives you position of primary colors in xyY (also 3x3 matrix)
DngSetMatrix accepts both, depending on first argument (P or M)
« Last Edit: 28 / January / 2008, 02:17:58 by vit40 »

*

Offline ArtDen

  • ***
  • 175
    • dng4ps2
Re: New project: camera color profile calculation
« Reply #26 on: 28 / January / 2008, 03:39:02 »
Here's an a570is picture of a real Gretagmacbeth mini target under an Ott-lite light (it's is  not a daylight but at least not a random monitor color temperature). Why did it have to be out of focus and program-exposed, BTW?
Out of focus is used to make areas more monotone.

a570is.zip - 10.13MB
Thanks for images!

Matrix for your camera is
Code: [Select]
0,594925 -0,168536 -0,076592
-0,345835 1,029958 0,111052
-0,045052 0,156228 0,349470

Is there any other info you need to help you improve your program? Sounds like a good idea but not too realistic.
Why not too realistic? :)
« Last Edit: 28 / January / 2008, 03:59:12 by ArtDen »

Re: New project: camera color profile calculation
« Reply #27 on: 28 / January / 2008, 04:09:09 »
Could you point me to instructions on how to use that matrix?

I use the beta of the DNG converter to make my files usable. But I don't know how to plug the matrix values into it. I suppose  it's a dumb question... Sorry.


*

Offline vit40

  • ****
  • 276
Re: New project: camera color profile calculation
« Reply #28 on: 28 / January / 2008, 04:15:01 »
Ok, now we have (CIE xyY)

Red         0.7883      0.2369      0.6592
Green      0.4051      2.1869      1.4526
Blue        0.1155     -0.0696     -0.3308

Red and blue seem to be closer to expected position, but I'm still wondering why green primary is so high in diagram (2.18), so green is oversaturated

Usage of above matrix:   

DngSetMatrix  <dng_file_name>  M  0.496669 -0.143363 -0.070594  -0.236213 0.795223 0.086647  -0.047424 0.183230 0.239612

or

DngSetMatrix  <dng_file_name>  P   0.7883  0.2369  0.6592  0.4051   2.1869  1.4526  0.1155  -0.0696  -0.3308


*

Offline vit40

  • ****
  • 276
Re: New project: camera color profile calculation
« Reply #29 on: 28 / January / 2008, 04:34:03 »
OK, it seems that ArtDen changed the matrix in the meantime:

DngSetMatrix  <file_name> M  0.594925 -0.168536 -0.076592  -0.345835 1.029958 0.111052  -0.045052 0.156228 0.349470

or

DngSetMatrix  <file_name> P   0.7599  0.2569  0.6266   0.2826  1.2312  1.1059   0.1046 -0.0689  -0.2142

This one looks better to me

« Last Edit: 28 / January / 2008, 04:35:41 by vit40 »

 

Related Topics