Monthly Archives: April 2007

Ask Dr. Color’s Assistant – Colorspaces

Dr. Color’s assistant here. Here’s a recent question from the good doctor’s answering service that will be of interest to photographers.

Hi, Dr. Color? What colorspace should I use with my new digital camera? What is a colorspace anyway?

A colorspace is the set of all possible colors that can be represented by a set of values, usually (R,G,B) triples, but also L*a*b* and CMYK and XYZ and so on. This collection of colors is known as the gamut.

(You might be questioning the possibility of the same RGB value — say (255,128,128) — looking different on two different devices. Trust me, friends, it’s true. If you don’t believe me, fiddle with the buttons on the front of your monitor and watch the colors change.

Three things influence the gamut of a colorspace:

  • The color of the red, green, and blue primaries
  • The color of “white”
  • The bit-depth of the image

We’ll look at each of these in turn.

RGB has three primaries: red, green, and blue. Changing the color of any of those primaries — either by fiddling with the buttons on your monitor or by changing the values in your color calculations — changes the color of every other (R,G,B) triple in your colorspace, creating a new colorspace. The easiest way to visualize this is via a chromaticity diagram, which shows all of the visible colors (for a given luminosity).

The sRGB colorspace (from Wikipedia)

The three corners on the triangle on the chromaticity diagram are the colors of the red, green, and blue primaries. Notice that the primaries don’t actually extend to the corners of the chromaticity diagram for this colorspace. Colors outside the triangle can’t be represented by (R,G,B) numbers. The primaries determine the size of the gamut.

The chromaticity diagram above only shows one slice through the gamut, corresponding to a particular level of luminosity (roughly equivalent to lightness). The actual gamut is all of the slices for the various luminosity values. The brightest white and its color provide another axis through the colorspace. (It’s actually true that there are different colors of white: daylight white, flourescent white, tungsten white, and so on.)

To get technical for a moment, the primaries determine the span of the linear combination of the primary colors; while the whitepoint determines the weights for the linear combinations. Together they determine where a particular (R,G,B) triple will fall on the chromaticity diagram, which is in device-independent xyY (or xyL) space.

Finally, the bit-depth of the image determines the spacing between the colors. Because the individual red, green, and blue components must take discrete values (e.g., 1, 2, 37, and so on) there are gaps between neighboring colors. Bit-depth is the range between the minimum and maximum values for each color channel. An 8-bit image has R, G, and B values that vary between 0 and 255. For 16-bit images, these values range from 0 to 65,535.

Obviously, if you edit an image in a higher bit-depth mode, you can either (1) pack more colors together or (2) expand the colorspace to include more colors. Actually you can do both. Conversely, if you choose a very wide colorspace but a low bit-depth, your image will have banding where neighboring pixels show unpleasant jumps in color. For example, it’s generally unwise to edit an 8-bit image in the very wide ProPhoto RGB colorspace.

So what colorspace should you pick?

First off, don’t pick sRGB for editing. As you can see in the diagram above, the colorspace is rather small. It’s really only good for preparing images for the web.

If you’re storing your RAW images for later processing, consider ProPhoto RGB. It’s very wide, but you should only edit in 16-bit mode.

A nice compromise is Adobe RGB (1998). It’s much wider than sRGB but not as big as ProPhoto RGB; yet it’s still possible to edit in 8-bit mode without too many problems.

Of course, you will use different colorspaces when printing and displaying images, but you shouldn’t use these for editing or storing images: The gamut of your monitor or printer is almost always smaller than a good editing space. Often sRGB is smaller than these gamuts, highlighting why it’s such a bad idea to use it for editing.

Posted in Color and Vision, Fodder for Techno-weenies, Photography | Leave a comment

Gyro ball?

News flash! Fox 25 News broadcaster Maria Stephanos reports that the Red Sox’s newest pitcher, Daisuke (Dice-K) Matsuzaka is actually Dino Matsusakis from Sommerville. Red Sox GM Theo Epstein (D-Newton) and pitcher Curt Schilling (R-Westwood) discovered the young phenom at The Friendly Eating Place on Mass Ave in Cambridge during the off-season.

Stephanos said Epstein had no comment on a possible connection between the Dino/Dice-K acquisition and the demise of the Greek deli this April. Schilling vehemently denied rumors that the young pitcher’s famous (and famously elusive) gyroball is really nothing more than a silly homage to the Central Square fixture.

Posted in Baseball | Leave a comment

Four in a Row

I have goals in life — many of them involve watching baseball. In particular, I want to see (1) a perfect game and (2) an unassisted triple play. I almost saw Mussina retire 27 batters in a row on TV, and a coworker offered me tickets to the Paw Sox game where teen idol Bronson Arroyo pitched his perfect game. Alas, we had other plans. . . .

None of my “goals” involve home runs. I’m more of a fan of small ball: the bunt, the hit-and-run, the sacrifice, the steal. “Get on, get over, get home,” that’s my baseball mantra.

But it was so exciting — not to mention historic — to see Manny Ramirez, J.D. Drew, Mike Lowell, and Jason Varitek hit four consecutive home runs in the fourth inning of tonight’s game against the Yankees. Wicked exciting!

Posted in Baseball | 1 Comment

A Drive-Time Haiku

With optimism,
Vivid flashes of new green.
The willow has leaves.

Posted in General, This is who we are | Leave a comment

Camera Indica

Another trip, another delayed flight. It did give me several extra hours to read the first half of Camera Indica: The Social Life of Indian Photographs. It’s an interesting book, this socio-historical examination of the imperial and indigenous uses of photography in India. Independence is just around the corner; and we’ll see if it starts to discuss “art” photography. So far — in the book, that is — we’ve just seen ethnographic typologies made by the colonial powers and some really nice cartes de visite.

Next up, the Olan Mills of India…

It’s late, so I shan’t stary far, but I see lots of parallels between the paternal racism of 19th century colonial photographers and America’s Edward Curtis and Jacob Riis. Well, more later.

Posted in OPP, Photography | Leave a comment

Marathon Day

Gloved hands cheer cold runs at Natick Center

The photograph above pretty much sums up this year’s marathon. Still, Patriots’ Day was the best holiday of the year . . . as always.

Posted in General, This is who we are | Leave a comment

All Work and No Play Makes Jeff a Dull Boy…

What can I say? This incredibly long semester — ten weeks of class spanning fourteen weeks — draws to a close. Wednesday I submitted my 51-page software requirements specification for a product that will never be built. (If you were to specify the actual system in this fashion, it would easily be around 300 to 400 pages. Professors too lazy to come up with new term project ideas for each semester Academic honesty keeps me from posting it here for the curious.) Tonight I finished designing an XML schema for an image cataloguing system: iPhoto or ACDSee for example. I don’t expect any problems coming up with a couple of XSL stylesheets to transform the documents into HTML and PDF. . . blah, blah, blah.

Alors et enfin, mes amis, je vis pour le mardi prochain. J’ai mon projet de la photographie des Indes. Je vais lire The Making of the Atomic Bomb de Richard Rhodes. Il y a aussi la nouvelle magazine Blind Spot, que j’ai réçu cette semaine. (Ça mérite un billet unique.) Peut-être demain ou lundi aprés le Marathon. C’est le meilleur temps de l’année…

And then there’s the matter of photography, which I’ve been thinking about all spring — such as we’ve been having here in chilly New England. Anyone have advice on buying a good 4×5″ large-format camera? If continuing to use film makes me a niche photographer, I might as well go for the gold, right?

Posted in General | Leave a comment

Running Silent

Dear readers,

Please forgive the recent lack of posts. I have a lot going on right now, but nothing is complete enough to warrant its own dispatch:

  • I’m dying to finish a large project at work and recap the experience here.
  • I still haven’t made up my mind about this semester’s Software Development Methodologies class. I see some value in the three-part software requirements specification and design document due in two weeks. (I’m 2/3 done and it’s already 36 pages long!) But it stinks of waterfall development. Of course, I think I might have had it out for this course. . . .
  • Doctor Color’s Assistant has a few questions awaiting answers. A little more research should do the trick. . . .
  • And I’ve been getting back in touch with my inner physicist. I needed some distraction from the aforementioned SDM project and picked up my 886 page copy of Richard Rhodes’ excellent The Making of the Atomic Bomb. I eyed it for over a decade and, now that I’ve started reading it, wish that I had started earlier.

    In the very unlikely event that I ever teach a course in the history of science, I would certainly assign this book as one of the required readings. It presents science as a process of expansion and refinement — Kuhn’s crises and “normal science.” Rhodes is subtly introducing the fact that early 20th century science was very community-based. (We might call it “exclusive” these days.) And he ties sceintific enquiry to larger societal trends and developments in philosophy and the history of ideas.

    All this and it’s a pretty good read, too.

Expect the silent running to continue for a little while longer.

Posted in General | Leave a comment