Help - Search - Members - Calendar
Full Version: Does a raw file have a color space?
Luminous Landscape Forum > Raw & Post Processing, Printing > Digital Image Processing
Pages: 1, 2, 3, 4, 5
bjanes
QUOTE (digitaldog @ Dec 28 2007, 09:08 AM)
Raw has no color space. And it doesn't matter what you set your camera to (you're shooting Raw).
*


Does a raw file have a color space?

The question is, “Does a raw file have a color space?” Some answer no for various reasons. Some say that the raw file can not have a color space because it is monochrome and contains no color. Of course, no file can contain color, since color is a perception and exists only in the eye and brain. What raw files and RGB files do contain is color information in the form of tristimulus color values that are perceived as color when projected on the retina. The RGB file contains three color values per pixel, for a complete RGB representation. The raw file of a Bayer array camera
contains only one color per pixel, and the other two are interpolated from adjacent pixels in the demosaicing process. Nonetheless, color information is present in the raw file and does not magically appear during demosaicing.

The recognition that the raw file does have a color space is useful in understanding how raw files are processed. Examples with code are available in DCRaw and Dng_verify, a command line program written by Thomas Knoll.

In the DNG program and DCRaw, 3 by 3 matrix conversions are used to convert from the camera space to an internal working space, in the same fashion as one would convert from ProPhotoRGB to Adobe RGB. In the case of DNG, the working space is linear ProPhotoRGB, while in the case of DCRaw, it is apparently CIE XYZ. DNG uses the dng_matrix & CameraToPCS () function to determine the white point x,y values. Thus, it is apparent that the raw file contains all the elements of a color space, either explicitly or implicitly in the form of metadata, camera profiles, or other information. Furthermore, in the source code quoted below, Thomas Knoll refers to the “camera native space” and “camera color space”, which would indicate that he thinks that the camera does have a color space that is represented in the raw file and the camera profile.


Appendix


RGB Matrix profile (example is aRGB) :

Gamma 2.2
White point
K 6500
x, y: 0.3127, 0.3290
Primaries
x y
R 0.6400, 0.3300
G 0.2100, 0.7100
B 0.1500 0.0600

Raw File
Primaries: determined by CFA filters and silicon spectral response, stored in camera profile

Gamma 1.0
White point: stored in tag to raw file
White point x, y: recovered by dng_matrix & CameraToPCS () function in DNG_verify

[B]
3 by 3 matrix for Canon 1Ds, used by DCRaw

6517,-602,-867,
-8180,15926,2378,
-1618,1771,7633
Code Extracts[/B]
/*****************************************************************************/
// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in
// accordance with the terms of the Adobe license agreement accompanying it.
/*****************************************************************************/

/* $Id: //mondo/dng_sdk_1_1/dng_sdk/source/dng_render.cpp#1 $ */
/* $DateTime: 2006/04/05 18:24:55 $ */
/* $Change: 215171 $ */
/* $Author: tknoll $ */

/*****************************************************************************/
for (int32 srcRow = srcArea.t; srcRow < srcArea.b; srcRow++)
{

// First convert from camera native space to linear PhotoRGB,
// applying the white balance and camera profile.

const dng_matrix & CameraToPCS () const;

/// Return the XY value to use for SetWhiteXY for a given camera color space coordinate as the white point.
/// \param neutral A camera color space value to use for white point. Components range from 0.0 to 1.0 and should be normalized such that the largest value is 1.0 .
/// \retval White point in XY space that makes neutral map to this XY value as closely as possible.


DCRAW
/*
Thanks to Adobe for providing these excellent CAM -> XYZ matrices!
*/
{ "Canon EOS-1Ds Mark II", 0,
{ 6517,-602,-867,-8180,15926,2378,-1618,1771,7633 } },
papa v2.0
camera colour space

Yes i would agree with mr bjanes



In single chip cameras, Raw files tend to be 'sensor referred RGB' after demosaciaing.

Three chip cameras (and scanners) produce a 'sensor referred RGB' file, no demosaicing!


we also tend to refer to 'camera colour space' as device coordinates in order to differentiate from, for example CIE colour spaces, CIEXYZ or CIELAB etc or from output referred colour spaces such as sRGB , Adobe RGB, ProPhoto.



saves a bit of confusion – well for me at least!
Panopeeper
Does a raw file have a color space?

When tryig to answer this (and other) questions, it is the very least useful to quote the opinion of other people. Instead, one needs to analyse the issue.

The first step is always to agree on the definition.

Examples, picked from the internet:

- A mathematical way to describe color information. In different color space schemes all the different formulas used essentially describe the same colors

- A model for representing color in terms of intensity values; a color space specifies how color information is represented. It defines a multidimensional space whose dimensions, or components, represent intensity values

- A system for ordering colors that respects the relationships of similarity among them. There are variety of different color spaces, but they are all three dimensional

now, that's general, isn't it?

- A map or chart of the visible portion of the spectrum

Even more generous.

- A two or three dimensional geometric representation of colors that can be seen or generated. RGB is an example of a two dimensional color space. LAB is a three dimensional color space

Refreshing news.

- A system for describing color numerically

A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components. When this model is associated with a precise description of how the components are to be interpreted (viewing conditions, etc.), the resulting set of colors is called a color space

- A device color space simply describes the range of colors, or gamut, that a camera can see, a printer can print, or a monitor can display. Editing color spaces, on the other hand, such as Adobe RGB or sRGB, are device-independent. They also determine a color range you can work in

The definitions are quite different, and I am afraid there won't be any agreement on which one to use.

However, note that the rubbish "not a color space because it contains greyscale channels" can not be reasoned from any of these definitions.

Anyway, IMO the raw files have color spaces, namely the respective camera's color space.

A side note: DNG has nothing particular to do with ProPhoto RGB.
papa v2.0
A two or three dimensional geometric representation of colors that can be seen or generated. RGB is an example of a two dimensional color space. LAB is a three dimensional color space

I dont think that bit is right RGB, 2D colour space?
who said that?
Panopeeper
QUOTE (papa v2.0 @ Jan 18 2008, 08:41 AM)
I dont think that bit is right RGB, 2D colour space?
who said that?


I don't remember from where I took it; it's irrelevant, my intention was to demonstrate the multitude of understandings.
Panopeeper
I add one more definition:

The specific range of colors in a particular model

and the definition of model is

The dimensional coordinate system used to numerically describe colors
papa v2.0
thats ok then
bjanes
QUOTE (Panopeeper @ Jan 18 2008, 10:29 AM)
Does a raw file have a color space?

However, note that the rubbish "not a color space because it contains greyscale channels" can not be reasoned from any of these definitions.

Anyway, IMO the raw files have color spaces, namely the respective camera's color space.

*


Some prominent photographers have taken the rubbish route, including Jeff Schewe and Andrew Rodney.

Your caveat about definitions is important. Some make them up as they go along, while others quote selectively. For simplicity, I chose to compare the characteristics of aRGB with the Camera space, noting their similarities.
Panopeeper
QUOTE (bjanes @ Jan 18 2008, 11:28 AM)
Some prominent photographers have taken the rubbish route, including Jeff Schewe and Andrew Rodney


Mistakes happen, This does not take away anything from their being prominent photographers.

QUOTE
I chose to compare the characteristics of aRGB with the Camera space, noting their similarities.


Those similarities are not greater, than the similarities to sRGB, for example.

Anyway, similarity is not a supplement for the definition. Saying "a color space is something like aRGB, but slightly different" does not cut it.

What definition do you take as basis for the discussion about the "color spacebility" of camera sensors?
Schewe
QUOTE (bjanes @ Jan 18 2008, 01:28 PM)
Some prominent photographers have taken the rubbish route, including Jeff Schewe and Andrew Rodney.
*


Ok. . .what color space does the Canon 1DsM3 raw file have? What are the camera color's color coordinates? What are the spectral properties at D65 and tungsten? What are the separation filter properties of the Bayer RGGB photo sites?

The raw file has color information that, until somehow represented as color data (either via demosaicing or some other color interpretation) is grayscale values.

So, to me that makes it a grayscale file waiting to be interpreted as color data...but it's still grayscale until somebody somewhere does something to it.

If walks like a duck and quacks like a duck...

And one wonders what _YOUR_ definition of "rubbish" is? Garbage, worthless material or nonsense?

When I use DNG Validate to process a raw file without demosaicing...I get a linear grayscale file.
bjanes
QUOTE (Schewe @ Jan 18 2008, 02:30 PM)
Ok. . .what color space does the Canon 1DsM3 raw file have? What are the camera color's color coordinates?
*


Had you read my post, you would already know the answers to these questions. I don't have the matrix values for the 1DsMIII, but here are the values for the 1DsMII from DCRaw. I had already listed those for the 1Ds. What more do you want?

6240,-466,-822
-8180,15825,2500
-1801,1938,8042
"Canon EOS-1D Mark III"

QUOTE (Schewe @ Jan 18 2008, 02:30 PM)
What are the spectral properties at D65 and tungsten? What are the separation filter properties of the Bayer RGGB photo sites?
*


The spectral characteristics of the RGGB sites are characterized in the matrix.

The spectral properties for D65 and tungsten have been developed by Thomas Knoll for use in ACR, and are included in his profile for that camera. All information does not need to be included in the actual file, but can be given by reference. If I save a file in ProPhotoRGB, without the tag, then I restore the meaning of the numbers when opening in Photoshop with the assign profile command. By analogy, the same principle applies to the raw file. The white point is also encoded in the file, and the dng_matrix & CameraToPCS () function is used to determine the white point x,y values.

QUOTE (Schewe @ Jan 18 2008, 02:30 PM)
When I use DNG Validate to process a raw file without demosaicing...I get a linear grayscale file.
*


You are working with a file containing tristimulus color information. Whether or not you make use of it is up to you. A true grayscale file has no color information, only luminance values.

When I look at a TIFF image with a binary editor, I get only numbers. Where is the color? When I delete the red and blue channels from a TIFF, there is no color. What happened? Perhaps a different approach is needed. I agree with Panopeepr, you are taking the garbage route in your argument.
Panopeeper
QUOTE (Schewe @ Jan 18 2008, 12:30 PM)
Ok. . .what color space does the Canon 1DsM3 raw file have?

The Canon 1DsM3 color space.

QUOTE
What are the camera color's color coordinates?

Nonsensical question.

QUOTE
What are the spectral properties at D65 and tungsten?

The sensor has spectral properties, not the image, nor the color space.

Perhaps you wanted to know, how the color space can be described in CIE terms.

at D65 the camera's color space a the result of the conversion from CIE XYZ using following matrix:

{{0.5859, -0.0211, -0.0930}, {-0.8255, 1.6017, 0.2355}, {-0.1732, 0.1887, 0.7448}}

I don't know it for tungsten.

QUOTE
What are the separation filter properties of the Bayer RGGB photo sites?


Again, you are mixing up the properties of the sensor with that of a colorspace.

Please note, that the question if the sensor has a color space does not depend on the fact, that you or I or anyone else knows the details of those properties or does not. What you are doing is something like seeing a bird over your head, and if I can't tell you the name of the bird, then you don't accept that it is a bird. Well, if you can't tell a bird and a Boing apart without knowing the model name, that's your problem.

QUOTE
The raw file has color information that, until somehow represented as color data (either via demosaicing or some other color interpretation) is grayscale values


The same can be stated re the sRGB channels. Going further: is Lab a color space? What color do the "a" and "b" channels have? What is the color of the "L" channel? Is a Lab image a color image at all without knowing, how to interpret the channels?

QUOTE
When I use DNG Validate to process a raw file without demosaicing...I get a linear grayscale file


You can complain about that for example on the Adobe DNG forum; or you can use Rawnalyze to see non-demosaiced color images.

On the other hand, you can see color RGB images on a black and white monitor. Where did the colors go? Do the characteristics of an image depend on how one looks at them?
bjanes
QUOTE (Panopeeper @ Jan 18 2008, 01:55 PM)
Mistakes happen, This does not take away anything from their being prominent photographers.
*


That is quite true. But perhaps they should stick to their areas of expertise. In many areas, Jeff is quite accomplished and I rely on his new ACR book and enjoyed his contribution to the From Camera to Print video and will probably get the new ACR video when it comes out.

However, I'm not so naive as to take his every word as the absolute truth.

QUOTE (Panopeeper @ Jan 18 2008, 01:55 PM)
Those similarities are not greater, than the similarities to sRGB, for example.

Anyway, similarity is not a supplement for the definition. Saying "a color space is something like aRGB, but slightly different" does not cut it.

What definition do you take as basis for the discussion about the "color spacebility" of camera sensors?
*


There does not seem to be one definition that covers all bases. You have made some good suggestions and perhaps can help supply a working definition.

QUOTE (Schewe @ Jan 18 2008, 02:30 PM)
When I use DNG Validate to process a raw file without demosaicing...I get a linear grayscale file.
*


If you use switches with DNG_Verify to get gray scale output, it is not surprising that you get gray scale. BTW, there is a nice raw file analyzer program Photobola Raw Analyze that can show color or gray scale without demosaicing.

With this program you can view in gray scale or color, as well as check clipping and many other characteristics. I think the program was written by Panopeeper, who is participating in this thread.
digitaldog
QUOTE (bjanes @ Jan 18 2008, 04:54 PM)
However, I'm not so naive as to take his every word as the absolute truth.
There does not seem to be one definition that covers all bases. You have made some good suggestions and perhaps can help supply a working definition.


I tend to ask other people who I respect as knowing more than I do. So I asked the follow people this morning and here are their replies. This may make you feel better, you seem to wish to prove your point as being correct and I would submit that the language of the past (essentially Grayscale) needs to be altered after asking the questions of these experts. So I should probably thank you for the efforts.

QUOTE
On 1/18/08 11:09 AM, "RikWalowit@aol.com"  wrote:

<<Does a raw file have a color space?>>

Fundamentally, absolutely YES, but we may not know what that color space is. The image was recorded through a set of camera spectral sensitivities which defines the intrinsic colorimetric characteristics of the image. An simplistic way to think of this (while not purely accurate) is that the image was recorded through a set of "primaries" and these primaries define the color space of the image.

Practically, it makes little difference unless you are interested in accurate scene-referred data. In the context you described, a simple transform is applied to convert from the camera primaries to a new set of primaries (eg CIE or working space) that have more desirable characteristics than the RAW primaries.

Mathematically, of course, you know the foregoing is true. Matrix algebra informs that if the final color image encoding is a "color space" then so must be all of its infinite number of linear transforms (lets ignore the 1 D non-linear transfer functions), including the original RAW encoding.

Eric Walowit
Tahoe

On 1/18/08 9:36 AM, "Thomas Knoll"  wrote:

The fact that a mosaic array is “grayscale” is a red herring in this argument.  An early processing step fills in the missing values, and you have a 3 or 4 channel image as a result.  For most cameras, if you just “assign” a working space RGB profile, you get a recognizable color image as a result, so it certainly seems like a color space.

The camera color space differences from a more common working color space in that it does not have a unique one-to-one transform to and from CIE XYZ space.  This is because the camera has different color filters than the human eye, and thus sees colors differently.  Any translation from camera color space to CIE XYZ space is an approximation because of this.

On 1/18/08 10:20 AM, "Chris Murphy"  wrote:

I think we'd all agree that CIE XYZ, ProPhoto RGB, and sRGB are each a color space. We consider the whole of ProPhoto RGB a color space even though it contains imaginary colors, from a human point of view. And we consider the whole of sRGB a color space even though it contains less than the colors that we humans can see.

A camera has colors it really can capture and encode as unique values compared to others, that are imaginary to us. They don't exist. There are colors we can see, but the camera can't capture that are imaginary to it. So what to do with these captured values that humans can't see? Well they typically get mapped to something, possibly something that another rather different SPD is already mapped to. Two reds that appear the same to us, but have different SPDs, yet the camera sees them as different so it encodes them with two different RGB values. That's fugitive colors. It's nothing new in photography.

So yes a camera (and thus a Raw file) has a color space. The challenge is what to do with the real and "unreal" colors it's encoding. And how to deal with luminance and dynamic range which is still a really big weak area of the ICC workflow. This is not a one size fits all campaign, to get good results. Color appearance models can help us deal with this better, as getting a 1:1 correlation to XYZ is an appropriate starting point prior to color appearance and gamut mapping, but it's not a desirable end result either on-screen or in print.

If we had spectral sensitivities for the camera, that would make the job of mapping to XYZ better and easier, but we'd still have decisions on what to do with the colors the camera encodes, that are imaginary to us.

Chris
papa v2.0
One should think of the raw file as a data file. (or interleaved rgb composite)

To call it a grayscale is probably not the most perceptual way to describe it.

Of course when it is opened in a imaging application as a composite, it is displayed as if it were a 'grayscale' as the application has no other way of interpreting the data.


I think to call it a grayscale gives it the personification of what most people would think of as a correctly exposed, processed etc black and white, monotone , greyscale etc picture.

In fact one could open any file containing numbers (providing it was encoded correctly) and it would display as grayscale.

For example: If asked 1000 random people at Picadilly Circus their age and entered that into an excell worksheet, then import into Matlab, reshape the vector to a 50x20 matrix and wrote the file out to a Tiff format, I could open it in photoshop and it would appear as a grayscale.
What it would look like is anyones guess!

But hey thats given me an Idea for a whole new genre of photography! Wow.
John Sheehy
QUOTE (papa v2.0 @ Jan 18 2008, 06:05 PM)
One should think of the raw file as a data file. (or interleaved rgb composite)

To call it a grayscale is probably not the most perceptual way to describe it.
*


It has probably happened that RAW became notorious for "not having color" simply because of the geometry of CFAs, alone, since three color receptors can occupy a single channel, flat raster because they never occupy the same locations. Had all cameras detected full RGB at each pixel from the beginning, no one would be saying that RAW data is colorless; just dark (if linear), desaturated and slightly off-hue.
Panopeeper
Andrew,

I appreciate your attitude.
Panopeeper
There is one point to add, IMO, though I guess this can be debated as well.

Viewing the color space through the conversion matrix is not the ultimate wisdom. It is convenient for sure, and it is ok between orthogonal color spaces. For example sRGB, Adobe RGB, ProPhoto RGB has been defined with reference to CIE, in terms of conversion matrices, so the conversion with matices is natural.

However, cameras' color spaces can not be described in an orthogonal system based on the three (or four) color pixels, because of the overlap between the spectral responses. Therefor the conversion with the matrix (actually, with its inverse) is not satisfactory. I think this is the reason, that no matter how hard one calibrates ACR, one can not get all colors right, not even all colors of the small color checker.
bjanes
QUOTE (digitaldog @ Jan 18 2008, 04:59 PM)
I tend to ask other people who I respect as knowing more than I do. So I asked the follow people this morning and here are their replies. This may make you feel better, you seem to wish to prove your point as being correct and I would submit that the language of the past (essentially Grayscale) needs to be altered after asking the questions of these experts. So I should probably thank you for the efforts.
*


Thanks for the info, Andrew. I certainly respect you more for having published comments by TK and CM that do not entirely agree with your previous statements. I don't know the other fellow, but I assume he is an expert also.

I did not want to engage in another flame war over this topic, and had written you privately concerning this matter. On receiving no reply I made the public post. I'm sure you all know more about photography than I do, but in this case I felt I was at least partially correct.

Your thanks are graciously accepted.

Bill
digitaldog
QUOTE (bjanes @ Jan 18 2008, 05:54 PM)
Thanks for the info, Andrew. I certainly respect you more for having published comments by TK and CM that do not entirely agree with your previous statements. I don't know the other fellow, but I assume he is an expert also.
*


Eric is up there with color geeks like Thomas. He's got a patent that describes some core functionality within ColorSync and at one time was the fellow who ran ColorSavvy. Now he's a snow board guru. He's the first person I go to when asking about aspects of digital camera color management.

The "Essentially Grayscale" comments date back to another respected color geek and in my case, mentor, Bruce Fraser. I believe I quoted him from his book in the previous debated thread. IF Bruce were alive and had he asked the same questions to this group of experts and received the same answers, I suspect he, (as I will from now on), would use better language than "essentially Grayscale" to describe this aspect of Raw data.
papa v2.0
QUOTE (Panopeeper @ Jan 18 2008, 11:49 PM)
Therefor the conversion with the matrix (actually, with its inverse) is not satisfactory. I think this is the reason, that no matter how hard one calibrates ACR, one can not get all colors right, not even all colors of the small color checker.
*


In ACR the conversion matrices were made from a target based characterisation. A spectral characterisation method could produce more accurate results. (Far more complicated and time consuming, a day at least on the monochromator!)

But I think the problem with 3rd party raw processors is that they use a 'one characterisaion fit all'
approach for each camera. (Thomas Knoll uses two, illuminant A balanced and a D65 i think, correct me if im wrong).

What you have to remember is that characterisation is system specific. Ie only valid for that body lens, filter etc combinations.

If you have a different set up from the one used for the characterisation, this will put you at a disadvantage straight away.

I know that this will grate with some people but I would use the manufacturers RAW converter and compare with ACR – just a thought.
Panopeeper
I find it essential for a raw processor to have analyzed the spectral respones of the sensors and base the comlor converson on that. I don't think the "system" issue is of relevance. The characteristics of a given sensor (with the filters) are important. I see the effect of non-neutral lenses in the area of white balancing, i.e. the set white balances, like daylight, incandescent, etc. should depend on the lens, but this iis independent of the method of color conversion.

It is well-known - except among the creators of raw processors - that the camera manufacturer's software yields the best color. Unfortunately, those raw processors are far from "professional" raw converters on the area of features and comfort.
paulbk
The latest version of Canon's DPP (version 3.2.0.4) is very usable. If you have tried earlier versions and lost patience because of the impossible user interface, I understand. If you are a Canon shooter, well worth giving the newer version a few hours try.

And I agree, DPP gives the best RAW convert in color fidelity, sharpening, and shadow detail. Albeit not as flexible as Lightroom or ACR.
Josh-H
QUOTE
And I agree, DPP gives the best RAW convert in color fidelity, sharpening, and shadow detail. Albeit not as flexible as Lightroom or ACR.


I have found this to be true - with DPP anyway.

However, [and its a big however] - the workflow advantages of Lightroom make it a no brainer to us LR.

And.. you can actually get the same results [or better] than DPP - it just takes more work to get there.

As good as DPP conversions are it just cant compete with the power of LR for processing. And I am a big DPP fan.
Schewe
QUOTE (digitaldog @ Jan 18 2008, 06:17 PM)
The "Essentially Grayscale" comments date back to another respected color geek and in my case, mentor, Bruce Fraser. I believe I quoted him from his book in the previous debated thread. IF Bruce were alive and had he asked the same questions to this group of experts and received the same answers, I suspect he, (as I will from now on),  would use better language than "essentially Grayscale" to describe this aspect of Raw data.
*



Well, that's where my understanding and expectations come from as well. I have no problem accepting the words of Thomas and Chris...they obviously know more than I about the subject. But I still think it's wrong to attribute the term "color space" as defined by general acceptance because (even Bruce has pointed out) that it's more of a color mixing function and a camera sensor will have different spectral responses from different spectral sources. Hence the difficulties for creating a profile for a digital camera.

So, I'll also refrain from calling what the camera captures as "grayscale data" but I'n not convinced a camera has a fixed "color space" either...which is why ya gotta adjust for the white balance of the raw file.
tived
Hello,

this is very interesting, but how does this help us processing our images better? can we profile better with this knowledge? where do we go from here?

Sorry if this is a trivial question

Henrik
Panopeeper
quote=Schewe,Jan 18 2008, 08:44 PM]
I have no problem accepting the words of Thomas and Chris...they obviously know more than I about the subject[/quote]

Jeff, this entire discussion is totally inconsequent. Does it really matter if the raw image has a color space or not? Not the very least, *except* for a better understanding of the subject in general.

Therefor one should not accept anyone's word as a deus ex machine, but one should try *reasoning* to come to a result. This starts with the very basics, like

QUOTE
a camera sensor will have different spectral responses from different spectral sources


the sensor has only *one* spectral response per channel. The spectral response includes the response of the sensels of a given channel *for all visible light waves*. In other words, the spectral response shows, how the sensor behaves with *any* light source.

QUOTE
Hence the difficulties for creating a profile for a digital camera


The source of difficulties is, that the transformation between the camera's color space and another one (basically CIE, as that is the starter point for the others) is not as straightforward, as it is with the "artificial" color spaces, which have been defined just so, that they can be transformed to and from CIE via a matrix multiplication.

Look at the spectral responses of the three channels of different cameras and see, how different these responses are. Do you believe, that these can be described with only nine parameters? The transformation based on the conversion matrices is an approximation, sometimes better, sometimes worse.

QUOTE
I'n not convinced a camera has a fixed "color space" either...which is why ya gotta adjust for the white balance of the raw file


For the sake of your own understanding, do you mind explaining what you mean with the adjustment for white balance?
Panopeeper
QUOTE (tived @ Jan 18 2008, 10:19 PM)
how does this help us processing our images better? can we profile better with this knowledge?


Not the least; it is academic pure.
eronald
Bjanes:

I would say, THE ANSWER IS NO. Andrew seems correct. At present most Raw files are numbers only, with no clear unambiguous color information. Sadly.

I need only refer to the below fragments of your own post: That EOS 1Ds2 matrix comes from Adobe. If the Raw was intended as a vehicle for colorimetric information surely some colorimetric data would be present in the file itself? Absent such "reference" data, why should the American "Adobe Interpretation" be accorded more credence than the Danish "Phase One Color Interpretation" or the privately held French "Edmund Ronald Color Interpretation" ? Just because Mr. Coffin has found Adobe the easiest place to liberate a Cam2xyz matrix from ?

Of course, were the camera manufacturer to cooperate and measure the colorimetric characteristics of the camera, eg spectral responses, and write this data into the Raw file, then the situation would change: A map with a clearly marked scale is a very different object from a map with no scale. Although of course there is just so much information about "color" to be derived from data viewed through the 3 filters in a Bayer array.

Oh, and by the way, I use camera profiling software I have written myself to determine the color of the images I take with my Phase back- I eat my own dogfood. I've had occasion to discuss camera color with quite a few other people and while all these smart guys have some working solution to the Raw color issues, everybody agrees that existing technology gets you only so far.

Edmund


PS. It has been described in detail how Thomas Knoll initially derived the matrices in ACR for various cameras by imaging a testchart exposed in a Gretag lightbooth switched to various light settings. While I have the greatest respect for Thomas and find the ACR interpolated matrix color model an ingenious solution to a difficult problem, there is no way he or anyone else would claim that this model yields any colorimetric ground truth.

QUOTE (bjanes @ Jan 18 2008, 01:14 PM)
Does a raw file have a color space?

The question is, “Does a raw file have a color space?” Some answer no for various reasons.


----snip----

  Thanks to Adobe for providing these excellent CAM -> XYZ matrices!
*/
  { "Canon EOS-1Ds Mark II", 0,
{ 6517,-602,-867,-8180,15926,2378,-1618,1771,7633 } },
*
papa v2.0
QUOTE (eronald @ Jan 19 2008, 11:25 AM)
Bjanes:

THE ANSWER IS NO. Andrew is correct. At present most Raw files are numbers only, with no clear unambiguous color information. Sadly.



well thats not completely right

a camera does have a 'colour space'- a very big 'colour space'!
The camera 'colour' space (or to be precise, sensor space) is determined by its spectral response.

its the raw file that doesn't have a 'colour space' as the data is yet to be correctly interpreted

A raw file is the un calibrated image data for a particular scene - sensor referred data - its not colormetric data, it has to be converted to that in the next step.! Via the camera matrix to CIE XYZ.

Now we have color data.
eronald
QUOTE (papa v2.0 @ Jan 19 2008, 01:43 PM)
A raw file is the un calibrated image data for a particular scene - sensor referred data - its not colormetric data, it has to be converted to that in the next step.! Via the camera matrix to CIE XYZ.

Now we have color data.
*



Absolutely right. I love the "It has to be converted". Reminds me of Leonardo, designing the helicopter saying well, all I need now is the engine smile.gif


Edmund
digitaldog
QUOTE (papa v2.0 @ Jan 19 2008, 07:43 AM)
well thats not completely right

a camera does have a 'colour space'- a very big 'colour space'!
The camera 'colour'  space (or to be precise, sensor space) is determined by its spectral response.

its the raw file that doesn't have a 'colour space' as the data is yet to be correctly interpreted

A raw file is the un calibrated image data for a particular scene - sensor referred data - its not colormetric data, it has to be converted to that in the next step.! Via the camera matrix to CIE XYZ.

*


Now we run full circle. The initial question was, does a Raw have a color space (not does a camera have a color space).

Just when we were getting somewhere....
bjanes
QUOTE (eronald @ Jan 19 2008, 05:25 AM)
Bjanes:

I would say, THE ANSWER IS NO. Andrew seems correct. At present most Raw files are numbers only, with no clear unambiguous color information. Sadly.
*


There is no way to get any color from numbers only unless you know the meaning of those numbers. Furthermore, are you impervious to the statements made by Andrew's experts? As Mr. Knoll has stated, it is not possible to get perfect unambiguous colors from the CFA sensor, since the spectral characteristics of the filters do not match those of the human eye. Furthermore, recent research has shown that there are polymorphisms in human visual pigments and all people do not see color in the same way. Some are tetrachromats.

QUOTE (eronald @ Jan 19 2008, 05:25 AM)
I need only refer to the below fragments of your own post: That EOS 1Ds2 matrix comes from Adobe. If the Raw was intended as a vehicle for colorimetric information  surely some colorimetric data would be present in the file itself? Absent such "reference" data, why should  the  American  "Adobe  Interpretation" be accorded more credence than the Danish "Phase One Color Interpretation" or the privately held French  "Edmund Ronald Color Interpretation" ? Just because Mr. Coffin has found Adobe the easiest place to liberate a Cam2xyz matrix from ?

Of course, were the camera manufacturer to cooperate and measure the colorimetric characteristics of the camera, eg spectral responses,  and write this data into the Raw file, then the situation would change: A map with a clearly marked scale is a very different object from a map with no scale. Although of course there is just so much information about "color" to be derived from data viewed through the 3 filters in a Bayer array.
*


The Adobe coefficients only approximate the behavior of the sensor. It may be best to allow each software vendor to use their own methods according to the circumstances and shooting conditions. A spectral power distribution taken over the visible spectrum at 1 nm intervals would take up a lot of space and you would still have to derive the coefficients. The current approach is to tag the file with a few key characteristics and the remaining data can be filled in by reference as is done with the DNG conerter. The absolute perfection you seek is not attainable, and compromises must be made and these involve judgment.

QUOTE (eronald @ Jan 19 2008, 05:25 AM)
Oh, and by the way, I use camera profiling software I have written myself to determine the color of the images I take with my Phase back- I eat my own dogfood. I've had occasion to discuss camera color with quite a few other people and while all these smart guys have some working solution to the Raw color issues, everybody agrees that existing technology gets you only so far.

*


Thus far we have been talking about Matrix Profiles, which apply only to relatively behaved devices such as CRTs and some sensors. I don't know what type of profiles you are generating, but most camera profiles generated by third party software are look-up table based and are much more involved than a few coefficients. These latter profiles may work under defined conditions, such as in the studio taking pictures of models under flash, but many authorities such as Bruce Fraser and Andrew Rodney are not enthused with their use under general conditions.
bjanes
QUOTE (digitaldog @ Jan 19 2008, 09:34 AM)
Now we run full circle. The initial question was, does a Raw have a color space (not does a camera have a color space).

Just when we were getting somewhere....
*


Chris Murphy: "So yes a camera (and thus a Raw file) has a color space. "
digitaldog
QUOTE (bjanes @ Jan 19 2008, 10:08 AM)
Chris Murphy: "So yes a camera (and thus a Raw file) has a color space. "
*


Yes he does. And a good lawyer could continue to use the above words of Thomas to try to sway the jury, for example:

QUOTE
An early processing step fills in the missing values, and you have a 3 or 4 channel image as a result.


When is this early process step happening (before or after we have a raw)? If after, then the lawyer could say "well until that step, this Raw hasn't filled in the missing values, there's no color (yet)".

Chris further lumps the camera and the Raw color space issue into one:
QUOTE
So yes a camera (and thus a Raw file) has a color space.


We agree a camera has a color space/color mixing function but what about the Raw? He's somewhat unclear here.

The lawyer could even argue that what Eric says here doesn't apply to the Raw data:
QUOTE
The image was recorded through a set of camera spectral sensitivities which defines the intrinsic colorimetric characteristics of the image. An simplistic way to think of this (while not purely accurate) is that the image was recorded through a set of "primaries" and these primaries define the color space of the image.


All heading us back to the "Essentially Grayscale", somewhat ambiguous original statement about the Raw data itself.

I'm not a lawyer and don't want to mince the words here.

The clincher here, for me is what Eric wrote:
QUOTE
In the context you described, a simple transform is applied to convert from the camera primaries to a new set of primaries (eg CIE or working space) that have more desirable characteristics than the RAW primaries.


Characteristic of Raw primaries is the key in my mind. He is associating the Raw to primaries which seems to strongly suggest color (space).

Of course the lawyer could nitpick his use of RAW instead of Raw (its not an acronym, a pet peeve of some) and try to get the jury to look the other way.

The lawyer could further use this from Thomas to say he doesn't seem to strongly believe the statement:
QUOTE
it certainly seems like a color space.


In the end, too many semantics!
Panopeeper
QUOTE (eronald @ Jan 19 2008, 03:25 AM)
If the Raw was intended as a vehicle for colorimetric information  surely some colorimetric data would be present in the file itself?


What exactly do you miss?

1. the public knowledge of the colorimetric information?

This can not be made a condition for being a color space. If the characteristics of a color space are known only among a certain circle of people, then it is still a color space IMO.

2. the presence of it in the file?

If that is a condition, then sRGB, aRGB, etc. are no color spaces, because their characteristics are not present in the files.

Btw, DNG files do contain the conversion matrices. Does a DNG file have a color space, while the native raw file does not?

QUOTE
Absent such "reference" data, why should  the  American  "Adobe  Interpretation" be accorded more credence than the Danish "Phase One Color Interpretation" or the privately held French  "Edmund Ronald Color Interpretation" ? Just because Mr. Coffin has found Adobe the easiest place to liberate a Cam2xyz matrix from ?


As any such matrix is an approximation only, this question is reduced to "who can approximate better". As such, it plays no role in the topic.

QUOTE
Of course, were the camera manufacturer to cooperate and measure the colorimetric characteristics of the camera, eg spectral responses,  and write this data into the Raw file, then the situation would change: A map with a clearly marked scale is a very different object from a map with no scale


What if they would only publish that information, but not put it into the file? Just like sRGB?
Panopeeper
QUOTE (digitaldog @ Jan 19 2008, 08:34 AM)
Characteristic of Raw primaries is the key in my mind

Primaries exist only in an orthogonal system. Raw files do not have primaries.

Therefor raw files/images/cameras (pick whatever you like) do not have color spaces in the sense of those definitions, which expect the description of a color in orthogonal form, like this one of those I posted yesterday:

A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components. When this model is associated with a precise description of how the components are to be interpreted (viewing conditions, etc.), the resulting set of colors is called a color space

This was the reason I suggested to lay done a definition first.
digitaldog
My fourth expert has responded. More food for thought:
QUOTE
On 1/19/08 10:11 AM, "Jack Holm"  wrote:

I think a couple of things in Eric’s response could be confusing.

- Unless the camera spectral sensitivities are colorimetric, they do not define the intrinsic colorimetric characteristics of an image.

- Also, primaries are for synthesis and can cause some wrong thinking if discussed in relation to analysis.

The second paragraph of Thomas’ response is important.

The short answer to the question is:

Raw image data is in some native camera color space, but it is not a colorimetric color space, and has no single “correct” relationship to colorimetry.

The same thing could be said about film negative densities.

Someone has to make a choice of how to convert values in non-colorimetric color spaces to colorimetric ones. There are better and worse choices, but no single correct conversion (unless the “scene” you are photographing has only three independent colorants, like with film scanning).

A purist might argue that a color space not based on colorimetry is not really a color space because it is not an assignment of numerical values to colors, defining colors as a human sensation. In the standards committees we decided it is useful to be able to talk about non-colorimetric color spaces so we allow them and use “colorimetric color spaces” when appropriate.

Jack


Jack often differs with Eric from clearly a semantic standpoint, something most of us here appear to be doing as well. We're talking two world class color scientist with extreme expertise in digital imaging from the point of digital capture.
papa v2.0
this is good to see the views on such things

But it is obvious there is a lot of confusion over terminology and definitions
"In the end, too many semantics!"

The way I like to think is

Camera -sensor space-

RAW file - just a data file

CIEXYZ colour encoding space.

so any way im off to the pub for a pint and to see what the general consensus is! (any excuse)

have fun
digitaldog
Some here may recall another recent debate about colors outside the spectrum locus not being colors and the quote I got from another expert, Karl Lang:
QUOTE
Color, is a perceptual property. So if you can't see it it's not a 
color. Color is not a particular wavelength of light. It is a 
cognitive perception that is the end result of the excitation of 
photoreceptors followed by retinal processing and ending in the 
visual cortex. We define colors based on perceptual experiments.

A coordinate in a "colorspace" outside the spectrum locus is not a 
color. We often refer to these as "imaginary colors" but this is by 
and large also erroneous (you can't map an imaginary color from one 
colorspace to another as the math (and experimental data) for each 
colorspace breaks down outside the spectrum locus.


Jack's post seems to use the same ideas here to discuss non-colorimetric color space no?

QUOTE
A purist might argue that a color space not based on colorimetry is not really a color space because it is not an assignment of numerical values to colors, defining colors as a human sensation

We seemed to agree about this post of Karl's and if so, now we have to rework our ideas about color spaces based on non colorimetric data I suspect. Chris also discusses this above (imagery colors).
digitaldog
QUOTE (Panopeeper @ Jan 19 2008, 10:46 AM)
Primaries exist only in an orthogonal system. Raw files do not have primaries.

RAW file - just a data file


So while we could agree its a data file (no arguments there), we still go back to the original writings of Bruce (essentially Grayscale) versus that of others (color data). Which is it?

Even the four color geeks (three true color scientists that do this for a living) seem to either somewhat disagree or use differing language.

Both Eric and Jack are members of the ICC and spend a great deal of time in the various committees (both part of the camera committee) trying to define these kinds of terms. What hope do we have here of coming to some agreement in terms???
Schewe
QUOTE (digitaldog @ Jan 19 2008, 12:16 PM)
Both Eric and Jack are members of the ICC and spend a great deal of time in the various committees (both part of the camera committee) trying to define these kinds of terms. What hope do we have here of coming to some agreement in terms???
*



OK, so screw it. I'm gonna go back to saying a raw file is NOT yet a rendered color file (it's raw color data) and is essentially grayscale image data (with the pixels representing what the color could be) waiting to be interpreted into color as a result of a demosaicing process. I also still think that the raw file doesn't have "A" color space as the term "color space" is commonly used.

So now I've gone full circle and think Bruce was more right that Mr. Bill Janes...who seems hellbent on arguing about how many angels can fit on the head of a pin...my thought? One really fat angel or a bunch of really skinny angels but in the grand scheme, since I don't believe in angels, it's a moot point.
bjanes
QUOTE (digitaldog @ Jan 19 2008, 10:34 AM)
Yes he does. And a good lawyer could continue to use the above words of Thomas to try to sway the jury, for example:
When is this early process step happening (before or after we have a raw)? If after, then the lawyer could say "well until that step, this Raw hasn't filled in the missing values, there's no color (yet)".

Chris further lumps the camera and the Raw color space issue into one:
We agree a camera has a color space/color mixing function but what about the Raw? He's somewhat unclear here.

The lawyer could even argue that what Eric says here doesn't apply to the Raw data:
All heading us back to the "Essentially Grayscale", somewhat ambiguous original statement about the Raw data itself.

In the end, too many semantics!
*


If we need to call in a lawyer, then we are in deep trouble. They know nothing about color theory but are very good at obfuscating and will advance any thesis that the client wants, as long as they get paid. They do not seek truth, but rather results for their client. After all, do you think OJ is innocent?

Thus far, no one has come up with an ironclad definition of a color space, and indeed there probably are many kinds of color space. What we have had is a good scientific discussion where most agree that the camera has a space with many but not all of the attributes associated with well defined matrix spaces and how camera tri-stimulus values may be rendered imperfectly into a better defined space such as ProPhotoRGB. I think it is time to close down this thread. I agree that semantics will get us nowhere. Everyone can declare victory (should that be necessary) and turn to the next topic.

Bill
digitaldog
QUOTE (Schewe @ Jan 19 2008, 12:35 PM)
OK, so screw it. I'm gonna go back to saying a raw file is NOT yet a rendered color file (it's raw color data) and is essentially grayscale image data (with the pixels representing what the color could be) waiting to be interpreted into color as a result of a demosaicing process. I also still think that the raw file doesn't have "A" color space as the term "color space" is commonly used.


I'd agree, its a non rendered image. I think going full circle, we're not too much closer to agreement. "Essentially Grayscale data" doesn't seem to be any more or less inaccurate and that Bruce was careful here using the important caveat of "essentially". None of the four color experts have dismissed this idea (yet) but I hope to hear back from them based on Jack's last post.
Panopeeper
One of the citations above gives away the "secret":

A purist might argue that a color space not based on colorimetry is not really a color space

i.e. it is the question of definition. If your definition requires that a color space be colorimetric, then raw data does not qualify due to ambiguity.

However, this "greyscale" approach is still nonsense, independently of the accepted definition, and honestly, I find its endless repetition quite ridiculous. The question is not if the raw file represents a color image but how the colors can be described.
Panopeeper
QUOTE (Schewe @ Jan 19 2008, 10:35 AM)
OK, so screw it. I'm gonna go back to saying a raw file is NOT yet a rendered color file


Since when is "rendered" a requirement for being a color space?

Btw, what is "rendered"? Is a JPEG in Exif format a "rendered" file? What about a Lab file?
Graeme Nattress
A so called RAW image is just data. I tend to think of the bayer pattern as a clever form of image compression 3:1, and it only becomes an image again after demosaicing. Displaying the RAW data is perhaps useful for geeks like me who develop raw conversion software, but not for much else. It's just a visual representation of data, not an image, which to me is a representation of the image you wanted to capture with the camera. Once it's demosaiced to RGB it has a colour space, that being Camera RAW colour space for that particular camera.

Graeme
digitaldog
QUOTE (bjanes @ Jan 19 2008, 12:37 PM)
If we need to call in a lawyer, then we are in deep trouble. They know nothing about color theory but are very good at obfuscating and will advance any thesis that the client wants, as long as they get paid. They do not seek truth, but rather results for their client. After all, do you think OJ is innocent?


Lets look this over from the beginning. For me, it's Bruce's book that introduced me to the concepts and he states as we've heard over and over "Raw is essentially Grayscale data". I've used this sentence too (and that started this entire slew of posts after you decided that's not accurate). OK, I'm fine with that, lets look where we've come so far and see if we've learned anything useful. The word "essentially" may be considered a cop-out, but I suspect Bruce like the other four experts I've asked, understood this well and the term is necessary (he's not saying a Raw document IS Grayscale or that a Raw document is in a color space).

One side wants to call the Raw data essentially Grayscale, the other wants to say its data in a color space. The middle ground seems to say the data has the potential to be color data in a color space. One camp asks "if the Raw data isn't essentially Grayscale and is in a color space, what is it?" The other camp suggests this is defined or can be defined. One group suggests that by their definition of a color space, the colors have to fall within human vision (other wise, we're talking about "Imagery Colors" and colors we can't see are not colors at all). We have the issues of colors that fall outside human vision and possibly captured by the camera (and represented by the Raw?) as not being colors in a color space due not being non-colorimetric; that further muddies the waters. One side says that we need three defined primaries to even consider data in a color space. The 5 experts (four mentioned above, the 5th being Bruce who unfortunately can't comment here), seem to have subtle differences in what they define as a color space and in some cases refer to the camera not the Raw data, the root of this argument.

Are we any closer to agreement? I'm still no the fence. But I'm a Gemini.

It appears that without the spectral properties of the chip and some other necessary data, we can't even define the color space of the capture. Does that mean the Raw data defines a color space? Or a potential color space? What is the color space of an untagged RGB document? If we don't know, can we say that its composed of three Grayscale channels? (I'd say yes) but without that definition of the scale of the numbers, is it essentially Grayscale with a potential to be a color space we can define? Can we even say a set of values that represent multiple Grayscale values is a color space if we don't know the scale of the values?
digitaldog
QUOTE (Graeme Nattress @ Jan 19 2008, 01:47 PM)
Once it's demosaiced to RGB it has a colour space, that being Camera RAW colour space for that particular camera.
*


No argument there! But what about before? The crux of debate. Is a Raw a color image? Is it in a color space? If I take an image in sRGB in Photoshop and split the color channels into three documents, is that still an sRGB image or do I have to merge the data (and assign a profile)? If a tree falls in the forest and no one is around.... Never mind.

Going back to square one, is calling a Raw "essentially a Grayscale file" any more or less accurate to saying its "essentially a color image"?
digitaldog
QUOTE (bjanes @ Jan 19 2008, 12:37 PM)
Thus far, no one has come up with an ironclad definition of a color space, and indeed there probably are many kinds of color space.



Here's mine:

QUOTE
Color model: A method of mapping color using a set of defined dimen-
sions. Some scientific color models such as x,y,Y or L*a*b* encompass all
of human vision and have a defined scale such that a particular color will
always have the same set of values. Other color models such as RGB or
CMYK have no standard defined reference or scale. In order to under-
stand a color in these models you must have a color space definition that
provides a scale and reference.

Color space: A color space is a scientifically defined portion of human
vision. A color space may be defined with any color model. The RGB
values R10,G100,B10 have no meaning by themselves other than the
color is mostly some kind of green. By using a color space definition, the
same set of values can be translated into one of the scientific color models,
giving the values exact meaning. Having a set of RGB values associated
with a color space allows for the exact reproduction of the color.

A color space is a color model that has a known reference and scale, in this case primaries (the
ingredients) and scale (specific quantities of these ingredients).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.