Pages: 1 2 [3] 4 5 6   Go Down

Author Topic: Colour spaces  (Read 67583 times)

Panopeeper

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1805
Colour spaces
« Reply #40 on: November 24, 2007, 07:51:53 pm »

Quote
So, what color space is the original grayscale raw image in? The actual raw image is indeed grayscale until the image is demosiaced

Here is the surprize: pls display an RGB color image in PS and disable two of the three channels. Then pls post here, what you see.

Quote
and not only is it grayscale, it's in linear gamma

Totally irrelevant.

Quote
So, again, in terms of the RAW file before demosiacing interpolation, what would be the "camera color space"?

The range of colors, which can be reproduced by those sensors.

The fact, that the raw data has to be processed before being displayed has no relevance. Try to display a Lab image on an RGB monitor without conversion, or even an RGB JPEG, which is kept in YCbCr form.

The raw data too can be dislayed in color without de-mosaicing, although the result is not as pleasing as after the de-mosaicing.

See the Channel view of the color checker. It is in TIF, so that one can see it magnified without JPEG artifacts. In 600% you can see the individual pixels.

(In this view every monitor pixel represents a green, red or blue filtered pixel of the sensor; the two other RGB channels are zero.)
Logged
Gabor

digitaldog

  • Sr. Member
  • ****
  • Online Online
  • Posts: 20630
  • Andrew Rodney
    • http://www.digitaldog.net/
Colour spaces
« Reply #41 on: November 24, 2007, 08:45:55 pm »

Quote
I don't know, I am not that business. However, some others are obviously doing that (and the manufacturers, who know the spectral response of the filters, certainly know the gamut of their own equipment).

Micheal Reichmann shows the color space of the Canon 20D in here. He even thanks Bruce Fraser and Jeff Schewe for their feedback and suggestions; the latter must have forgotten it already.
You are mixing up the gamut of the camera and of the scenery/actual image. The subject is the former.
[a href=\"index.php?act=findpost&pid=155631\"][{POST_SNAPBACK}][/a]

You sir are the confused one. The gamut they show is based on ICC profiles built as I described by shooting a target (which has a fixed gamut). That doesn't mean the capture device is being fully defined by this profile because its not, because a digital camera doesn't have a gamut as I've tried to explain to you.

In a nutshell, a color mixing function, also called a color matching function, is a mathematical defined representation of a measured color based on three monochromatic RGB primaries that would duplicate the observed color of a measured wavelength. Until its mapped into a defined RGB space, it can’t have a color gamut.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Colour spaces
« Reply #42 on: November 24, 2007, 09:13:42 pm »

Quote
Here is the surprize: pls display an RGB color image in PS and disable two of the three channels. Then pls post here, what you see.
[a href=\"index.php?act=findpost&pid=155633\"][{POST_SNAPBACK}][/a]


Ah, but the raw capture is not a 3 channel image file...it's a grayscale (single channel) image file (which was the whole friggin' point of posting what the raw files actually looks like).

Through demosiacing, the pixels that represent the R, G, & B photo sites are used to interpolate the component RGB color files. See, it's a case of turning a grayscale file into a color file that is the whole point of a Bayer array sensor.
Logged

digitaldog

  • Sr. Member
  • ****
  • Online Online
  • Posts: 20630
  • Andrew Rodney
    • http://www.digitaldog.net/
Colour spaces
« Reply #43 on: November 24, 2007, 09:50:42 pm »

From the FAQ's on Munsell Color Science Laboratory:

Question:
"Digital image sensors (such as those used in digital cameras)use red, green, blue ink-based color filters to generate color. Do they therefore have a color gamut that limits the range of colors that they can detect? (255)"

Answer:
"Let's start with the short answer to your question; there is no such thing as a camera, or scanner, gamut. A gamut is defined as the range of colors that a given imaging device can display. To say that a camera had a gamut would be to imply that you could put a color in front of it that it could not possibly respond to. While it is certainly possible that two colors that are visually distinct might be mapped into the same color signals by a camera, that does not mean that the camera could not detect those colors. It just couldn't discriminate them. For example, a monochrome sensor will map all colors into a grayscale image and encode it as such. Certainly the encoding has a gamut (in this case a lightness range with no chroma information), but did the camera responded to all the colors put before it. It is the encoding that imposed the gamut. In the color world, encoding is based on some explicit or implied display. For example, sRGB is a description of a display and therefore defines a gamut (but only if the sRGB values are limited in range). If a camera encodes an image in sRGB, that doesn't mean that the range of colors the camera detected are only from within the sRGB display gamut, but it means the camera data have been transformed to best use that sRGB encoding. As long as a camera has three or more sensors that span the visual spectrum, then it will respond all the same stimuli as our visual system. Whether the camera can discriminate colors as well as the human visual system will depend on the encoding of the camera signals, quantitization, and the details of the camera responsivities. (To return to the black and white system, that camera encodes all the colors into a gray scale. They could then be displayed as any color within a given display, but many colors from the original scene would be mapped to the same values.)

Since there is no such thing as a gamut for an input device, then there is no way to compute it or calculate a figure of merit. Generally, the accuracy of color capture devices is assessed through the accuracy of the output values for known inputs in terms of color differences. Also, sensors are sometimes evaluate in terms of their ability to mimic human visual responses (and therefore be accurate) using quantities with names like colorimetric quality factor, that measure how close the camera responsivities are to linear transformations of the human color matching functions. Doing an internet search on "colorimetric quality factor" will lead you in the right direction."
« Last Edit: November 24, 2007, 09:51:37 pm by digitaldog »
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

Panopeeper

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1805
Colour spaces
« Reply #44 on: November 24, 2007, 10:20:53 pm »

Quote
Ah, but the raw capture is not a 3 channel image file...it's a grayscale (single channel) image file

LOL, that's good. Each channel of an RGB file is only a grayscale on its own.

Nothing differentiates the color channels, except their interpretation.

You can copy the content of the red channel of an RGB image over the green channel, and suddenly the image has different colors.

The channels of the raw images are greyscale on their own. Together they constitute a color image. The only real difference between raw and RGB channels is, that the "colors" of the raw channels are overlapping. However, this fact does not make the raw image a colorless one.

You are overstressing the role of de-mosaicing. Although it is essential for the reproduction of the original colors, it is not essential for having a color image.

Following images are another views of the raw data (from the same color checker as above, shot with a Nikon D200): no de-mosaicing occured, but now each color filter array is shown as a single pixel; the three RGB components are directly from the raw channels (the two green have been averaged):



and the same with white balancing:

Logged
Gabor

digitaldog

  • Sr. Member
  • ****
  • Online Online
  • Posts: 20630
  • Andrew Rodney
    • http://www.digitaldog.net/
Colour spaces
« Reply #45 on: November 24, 2007, 10:29:45 pm »

Quote
Nothing differentiates the color channels, except their interpretation.

Quote
Question:>So the raw image is actually a grayscale image. OK. It's one grayscale but
>isn't the Bayer pattern actually interleaved in that grayscale image, as far
>as you know?

Quote
Answer: No, there's a CFAPattern metadata tag that defines the Color Filter
Array (which is often a Bayer pattern but is sometimes something else
entirely, possibly using more than three primaries). A blue-filtered
pixel will produce a lower luminosity than a red-filtered one that
received the same photon count, so the effect of the CFA is certainly
imposed on the grayscale pixels, but the pixels themselves are
just grayscale pixels.

Bruce Fraser

Do you get it yet?
« Last Edit: November 24, 2007, 10:30:57 pm by digitaldog »
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Colour spaces
« Reply #46 on: November 24, 2007, 10:39:05 pm »

Quote
LOL, that's good. Each channel of an RGB file is only a grayscale on its own.
[{POST_SNAPBACK}][/a]


No, you STILL don't get it...a raw capture is only a single channel grayscale file. It is only through the demisaicing interpolation that the color data is extracted from the grayscale file and rendered as color data in a 3 channel file.

Note, the original un-demosiaced files that I posted were actually in a linear gamma, grayscale space that I converted to sRGB for the purpose of posting.

Quote
You are overstressing the role of de-mosaicing. Although it is essential for the reproduction of the original colors, it is not essential for having a color image.

No, the raw file _IS_ a single channel grayscale file UNTILL demosiacing...you DON'T have ANY color in the single channel file WITHOUT demosiacing.

In the original, single channel grayscale file in linear gamma, each photo site is represented as a single pixel of either red, green or blue data from that photo site (ya gotta blow it up REAL BIG to see the individual pixels). There are 2x the number of green photo sites as red or blue (hence the Bayer array unless you are talking Foveon chips).

To better understand the demosiac process, see: [a href=\"http://en.wikipedia.org/wiki/Demosaicing]Demosaicing[/url]
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Colour spaces
« Reply #47 on: November 24, 2007, 10:44:11 pm »

Quote
You see the tiny green rectangles? Here are some details from those areas...

So, ya still think that the original raw capture has a color space?
[a href=\"index.php?act=findpost&pid=155589\"][{POST_SNAPBACK}][/a]

I can't believe that your reasoning is so very simplistic. If I take a TIFF and delete the blue and red channels, I don't see any green at all. All I see is monochrome. As Bruce Fraser has stated, an RGB file consists of three monochrome channels, so this is not surprising. But by your simplistic interpretation, there is no green in the image. If I view the file in a hex editor all I see are hex numbers. Gee, you have to view the file with a program that knows how to interpret the data.

BTW, you don't have to jump through hoops with some command line program to view undemosaiced files. You can use the freeware program Iris.

Here is a crop from a shot of a flower:

[attachment=4014:attachment]

A closeup of the ACR conversion is on the left and the raw file as shown by iris. The red, blue, and green information is all there in the Bayer grid. The colors of the array can be viewed without demosaicing with the SPLIT_CFA command. Instead of being present on three layers, they are all in one layer in a grid pattern, but they are still there and separate.

[attachment=4015:attachment]
Logged

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Colour spaces
« Reply #48 on: November 24, 2007, 10:56:10 pm »

Quote
The colors of the array can be viewed without demosaicing with the SPLIT_CFA command. Instead of being present on three layers, they are all in one layer in a grid pattern, but they are still there and separate.
[a href=\"index.php?act=findpost&pid=155669\"][{POST_SNAPBACK}][/a]

Do you mean channels?

What application are you talking about with the "SPLIT_CFA command"?
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Colour spaces
« Reply #49 on: November 24, 2007, 11:06:31 pm »

Quote
No, you STILL don't get it...a raw capture is only a single channel grayscale file. It is only through the demisaicing interpolation that the color data is extracted from the grayscale file and rendered as color data in a 3 channel file.

[a href=\"index.php?act=findpost&pid=155668\"][{POST_SNAPBACK}][/a]

Schewe, you are the one who is not getting it. With a Bayer array you can use a program such as Iris (do a google search) to separate the Bayer grid into four files representing red, blue, green1 and green2. No demosiacing is involved. The color information is distributed in the grid, whereas with a regular RBG file the color information is on three separate channels. You can not get color from a single gray scale file.

In your demonstration of the Bayer grid, if you painted in color on the grid according to the color of the filter, you would see a color image. Each pixel would have only one color, but if you viewed the image from a distance the colors would be blended by the eye.
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Colour spaces
« Reply #50 on: November 24, 2007, 11:09:32 pm »

Quote
Do you mean channels?

What application are you talking about with the "SPLIT_CFA command"?
[{POST_SNAPBACK}][/a]

The application I mentioned was Iris. See the [a href=\"http://www.astrosurf.com/buil/iris/tutorial5/doc17_us.htm]tutorial[/url]

BTW, in your example, you are not viewing the unmodified raw data, which are in the range of 0..4095 for a 12 bit camera chip. The image would be so dark you could hardly see it in Photoshop 16 bit (15+1). In my Iris example, I multiplied the values by 15 to bring them into the 0..32767 range expected by Photoshop.
« Last Edit: November 24, 2007, 11:16:27 pm by bjanes »
Logged

Panopeeper

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1805
Colour spaces
« Reply #51 on: November 24, 2007, 11:24:22 pm »

Quote
No, the raw file _IS_ a single channel grayscale file UNTILL demosiacing...you DON'T have ANY color in the single channel file WITHOUT demosiacing

Jeff, don't you get it? The images I posted just above are from the raw file, NOT DE-MOSAICED, only mapped with the sRaw function.

The mapping has no relevance in this question. Here they are in linear mapping, with and w/o WB.

I repeat it: no de-mosaicing has been involved. The three raw channels have been used directly as R, G and B (again, the two greens averaged in the RGB green).



« Last Edit: November 24, 2007, 11:25:50 pm by Panopeeper »
Logged
Gabor

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Colour spaces
« Reply #52 on: November 24, 2007, 11:24:47 pm »

Quote
You can not get color from a single gray scale file.
[a href=\"index.php?act=findpost&pid=155674\"][{POST_SNAPBACK}][/a]

Uh huh. . .so, like a bumble bee can't fly, Camera Raw can't interpolate the color data from a grayscale Bayer array? I think that was the point of demosiacing, to interpret the grayscale CFA file into RGB color?

The SPLIT_CFA gives you 4 separate files...ok, but that's not too useful unless you want to run processing on the individual files considering the size of the files is reduced by a factor of 2...but the CFA image is still a single channel image after you do a MERGE_CFA command. It's the demosiacing that make the single channel grayscale file into an RGB file...right?
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Colour spaces
« Reply #53 on: November 24, 2007, 11:27:56 pm »

Quote
No put down intended. The fact is, a digital camera doesn't have a color gamut and a Raw file doesn't have a color space. Some here don't consider this a nit pick.
[a href=\"index.php?act=findpost&pid=155591\"][{POST_SNAPBACK}][/a]

You are half right: a digital camera does not have a gamut, but the raw file does have a color space as documented in the DNG specification. Have you read Chapter 6 of that spec, and what is your take on it? However, these issues are not the topic of the discussion. IMHO, you brought them up to impugn the knowledge of the poster and score debating points, rather than contributing to the topic being discussed.
Logged

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Colour spaces
« Reply #54 on: November 24, 2007, 11:28:20 pm »

Quote
BTW, in your example, you are not viewing the unmodified raw data, which are in the range of 0..4095 for a 12 bit camera chip. The image would be so dark you could hardly see it in Photoshop 16 bit (15+1). In my Iris example, I multiplied the values by 15 to bring them into the 0..32767 range expected by Photoshop.
[a href=\"index.php?act=findpost&pid=155676\"][{POST_SNAPBACK}][/a]

No, I'll admit that I took the linear grayscale (in a linear gray gamma) and transformed it into sRGB...

Here's the actual linear file...in linear gamma.


There, that better? Course, ya can't hardly see anything in the linear gamma.
Logged

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Colour spaces
« Reply #55 on: November 24, 2007, 11:31:14 pm »

Quote
Jeff, don't you get it? The images I posted just above are from the raw file, NOT DE-MOSAICED, only mapped with the sRaw function.
[a href=\"index.php?act=findpost&pid=155679\"][{POST_SNAPBACK}][/a]

So, you are relying on the mapping function to interpret the color data from the grayscale file...in leu of demosiacing.
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Colour spaces
« Reply #56 on: November 24, 2007, 11:36:59 pm »

Quote
Uh huh. . .so, like a bumble bee can't fly, Camera Raw can't interpolate the color data from a grayscale Bayer array? I think that was the point of demosiacing, to interpret the grayscale CFA file into RGB color?

The SPLIT_CFA gives you 4 separate files...ok, but that's not too useful unless you want to run processing on the individual files considering the size of the files is reduced by a factor of 2...but the CFA image is still a single channel image after you do a MERGE_CFA command. It's the demosiacing that make the single channel grayscale file into an RGB file...right?
[a href=\"index.php?act=findpost&pid=155680\"][{POST_SNAPBACK}][/a]

The point is that the SPLIT_CFA command separates the color information into four files, and it can be viewed much as you would view the color channels (R, G, B ) of a TIFF file. The color information is in the raw file and does not need to be extracted by demosaicing. The files are smaller, since there is no interpolation of the missing two colors in each pixel. You could leave blank spaces in the split files, but that would be unsightly.
« Last Edit: November 24, 2007, 11:37:18 pm by bjanes »
Logged

Panopeeper

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1805
Colour spaces
« Reply #57 on: November 24, 2007, 11:46:47 pm »

Quote
So, you are relying on the mapping function to interpret the color data from the grayscale file...in leu of demosiacing.

That's really funny. Somehow I had the feeling, that you will mix up things, therefor I posted two images with linear mapping.

The mapping occurs within the channel. It is not a substitute for de-mosaicing. In these images the red channel of the RGB is from the red filtered pixels, the blue is... etc.
Logged
Gabor

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Colour spaces
« Reply #58 on: November 24, 2007, 11:50:35 pm »

Quote
In these images the red channel of the RGB is from the red filtered pixels, the blue is... etc.
[a href=\"index.php?act=findpost&pid=155687\"][{POST_SNAPBACK}][/a]

Uh huh. . .and WHAT is interpreting the red colored pixels to display as representing RED? A magic wand? Because, without something being told that this pixel in this coordinate represents red, it would still be a grayscale image file.
« Last Edit: November 24, 2007, 11:51:22 pm by Schewe »
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Colour spaces
« Reply #59 on: November 24, 2007, 11:52:26 pm »

Quote
So, you are relying on the mapping function to interpret the color data from the grayscale file...in leu of demosiacing.
[{POST_SNAPBACK}][/a]

I could be mistaken, but I was under the impression that Panopeeper posts on the Adobe Camera Raw forum as G Sch and he has written an interesting program that anyalzes and displays raw image files without any demosaicing. If so, he is not an imaging moron, even though he doesn't use gamut in the sense that it is used in digital cameras  

[a href=\"http://www.cryptobola.com/PhotoBola/RawnalyzeGuide.htm]http://www.cryptobola.com/PhotoBola/RawnalyzeGuide.htm[/url]
Logged
Pages: 1 2 [3] 4 5 6   Go Up