Wednesday, October 3, 2012

So, how about a green filter?

Yeah.

That was a bit of a complication.

DNGMonochrome has the ability to produce a red filtered photo and a blue filtered photo.

Given that the Bayer filter has three colors (green, red and blue), you might expect producing a green filtered photo would be easy. In fact, you might even think the regular result - based on the green pixels - is already a green filtered photo.

But that's not the case.

The Bayer filter - as explained in one of the previous posts - is set up in the luminance / chrominance model. It means the green pixels register 'luma' and the the red and the blue pixels register 'chroma'.

So where is green?

Well, as far as I understand it now, the Bayer filter operates in the YUV model, which means there is no green.

Nah, obviously there is, but not the RGB green. You can't reach green in the YUV model without converting the values first to the RGB model.

Y stands for luma, U is chrominance blue, and V is chrominance red.

No green.

But how to convert to RGB without color interpolating?

Well, turns out it's fairly easy if you first interpolate the luma (the regular monochrome photo), then the red and the blue filtered photo. Then after applying some simple math, you can calculate the green.

But it's slightly unfair, since for a red and blue filtered photo, it's the chroma red and chroma blue that's being used, not the RGB red and blue, so I might introduce additional filters (a full RGB set, also for red and blue).

I'm not done with this issue...


Why?

Now you might think: why go through all that trouble of interpolating three photos to get to a green filtered (or blue or red filtered) one?

Well, maybe I'll show you next time, but if you think Lightroom can offer the same, you're probably mistaken.

I tried getting to a similar result in Lightroom with the HSL sliders and the color mixer. It's impossible to get to the same DNGMonochrome result without degrading the image.

The strength of DNGMonochrome sits in the fact that it interpolates the photo on one aspect of the color (either luma, chroma, or now also RGB green), whilst Lightroom starts messing with individual pixels, pulling or pushing certain gray tones, introducing artifacts if you go sliding too wild.

They could implement a similar thing - interpolate new after making an adaptation - but the slowdown would also slow down their sales I suspect... it's one of the advantages of giving software away for free: I don't have to bother about sales :-)

1 comment:

  1. Keep going - it's great seeing how far you've gotten with this. You're in sync with my thinking - that the ultimate abilities of the M8/M9 in B&W haven't been pushed yet, but you're so much farther in acting on that. Looking forward to the green solution, as I agree, Lightroom doesn't give us the tools to address that

    bikefixe

    ReplyDelete