Welcome to our community

Be a part of something great, join today!

  • Hey all, just changed over the backend after 15 years I figured time to give it a bit of an update, its probably gonna be a bit weird for most of you and i am sure there is a few bugs to work out but it should kinda work the same as before... hopefully :)

Two basic questions about debayering

Karim D. Ghantous

Well-known member
Joined
Oct 6, 2011
Messages
2,682
Reaction score
89
Points
48
Location
Melbourne AU
1. What would happen if you debayered a monochrome RAW file? What kind of funky results would you get? Would you get any actual colour?

2. Can you REbayer a debayered image? I assume you can, but could you tell the difference between the original RAW file and the rebayered RAW file? This goes for monochrome as well as RGB.

There are reasons why I'm asking. The second question in particular is important.
 
1. As far as I understand there's only luminance data is registered in a monochrome camera, so you don't get any colors directly at the first step (sensor) of the process.
2. Not as far as I understand it, once you debayered it, it becomes locked and it would be like taking a developed negative and making it an undeveloped negative again.

Why would you want to "rebayer" a debayered image?
 
1. There is no Color Filter Array traditionally in a monochrome camera, at least from the RED side of things. What you get is pure tonal information and how that manifests is a notable boost in pure pixel resolution versus a typical color CMOS sensor. With no color data there would be no "debayering" going on.

Debayer has become a nice term to describe what's going on.

What you are doing a demosaicing. Traditional Bayer patter is a Color Filter Array with 50% Green, 25% Red, and 25% Blue pixels. Demosaicing algorithms can vary from very simple to extremely complex. I only have knowledge of this due to the early days of digital and raw, had to learn about it due to necessity really. Our studio developed an HDR spherical camera that created in house a "stunning" 1024x512 equirectangular 360x180 32-bit image. This replaced our film workflow for the same thing, which I then replaced with a system that allowed for faster HDRI capture in the realm of 6K-20+K resolution.

Bryce was a very smart man and modeled this around human vision approximately to work in a similar way that our eyes do. This held a lot of potential for the future of Eastman Kodak at the time IMO. Film itself is not purely made of RGB information, there is indeed a granularity of color and pure tone detail on a microscopic level. This is more or less likely what excited Bryce early on, though it would take a time and technology advancements for things to improve sort of in all directions to really showcase what it could do. There was a time where CMOS wasn't the main digital censor out there. CCDs and 3-chip for instance were very common and still exist now, but CMOS sensors make up the vast majority of imaging sensors globally for many, many years now. Rapid advancements combined with CMOS's lower power requirements really have played a big role.

2. Yes. But depending on a variety of factors particularly in the range of raw image development techniques and demosaicing algorithms it might be very difficult to truly match the pure raw data. Really depends on the complexity, but most are certainly going "hardcore" nowadays on that front. Especially in the digital cinema world where it is very ideal to hide the digital fingerprint on a variety of levels.


There's a lot of reasons to have raw image data, compressed or uncompressed, as a "digital negative" that people generally can't tamper with. Certain industries actually require that. In entertainment it truly serves as something you can't express a destructive workflow on due to user error, ideally.

There is a large variety of image processing techniques, some common fair, some custom and experimental that can really showcase just how freaking rad a true monochrome sensor can look.


Looking at purely black and white imaging, here's a quick summary for those unfamiliar with the differences.

Generally speaking the main benefits when it comes to black and white imaging with a pure monochrome camera are:
- higher resolution, more subtle detail
- now CFA = less light loss/more light sensitive/lower noise floor

Color sensors to have some advantages in a black and white workflow however on creative levels:
- you will have a slightly softer image
- but you have color information you can tap into to develop your black and white grade from

I mention the latter as it's not just a useful grading starting spot, but if you are hoping to match black and white film stocks at all, you sort of need to start with a color image to generate a true match.

With that said, that's also what makes the various Monochrome RED cameras special. They are each very much their own medium with their own unique character.
 
It has been known for over 100 years that one can use color filters when shooting black and white stock to affect the b&w grade creatively. Of course you only get one shot, but if you know what you want to do, you can do it.

As to re-bayering...it is well-known that many colors are not uniquely represented by tristimulus values. So there are many inconsistent ways to re-bayer. And there is no way to know whether one re-bayer is correct vs another. To strengthen your understanding, read this Medium article (and eat your spinach).
 
^ color filter recipes and choices are a great, deep, wonderful conversation to have both when filming with a monochrome or black and white filmstock or going from color to B&W.

Recently we've seen two fascinating directions on film and digital with what Lighthouse did with Double-X and what Mank is doing on RED. Don't want to spoil the latter just yet, but I can't wait to see the look they landed on for the film. The oddly went with an old much loved favorite. Which gets into the twilight zone world of finding specific color filters from days long ago, or at least trying to recreate them.
 
A few years ago I had a client who had a brilliant idea to shoot a commercial project for a big sneaker company on Red using red filter. As a result, not only they managed to destroyed Blue and Green channels, they also "forgot", that the pack shot was going to be color:)
All they had to do is to ask someone, who knows anything about the color process. The simple rules of BW:
1. If you want the most stunning BW images, then shoot it on a proper BW camera. It has no color filter and as a result, it doesn't require debayer, resulting in the best greyscale reproduction as well as the sharpest image.
2. When shot in color, the usual BW filter selection of red or yellow filters is easily reproduced in color grading- just use Color mixer. And as a bonus, you have complete control over the BW effect, unlike when used with the filter.
 
As I understand Karim asks in the 1) what would happen to a BW Raw file if it passes through a color debayer process? Wich funky colors would it produce?


2. When shot in color, the usual BW filter selection of red or yellow filters is easily reproduced in color grading- just use Color mixer. And as a bonus, you have complete control over the BW effect, unlike when used with the filter.

I've shot a docu in color for a BW grade. Now that I'm on the grading room I wonder if those weak red or blue channels should have been pushed by tweeking color ballance/iso and/or with filters? I think we are touching the creative limits of "doing BW in post" solution. (original file is an XAVC-S...)
 
If you are looking for new ways to increase your levels of depression, look at your R3D media files using only the blue channel for a monochrome result. It's mortifying.
 
I've shot a docu in color for a BW grade. Now that I'm on the grading room I wonder if those weak red or blue channels should have been pushed by tweeking color ballance/iso and/or with filters? I think we are touching the creative limits of "doing BW in post" solution. (original file is an XAVC-S...)
If you try to push, say, red channel by adding a red filter, you will unballance the image. The image then will appear similar to the infrared imagery, which is what it actually is, albeit to a much less degree. Anyone who had seen infrared images knows, humans do not look very attractive in them:)
 
As I understand Karim asks in the 1) what would happen to a BW Raw file if it passes through a color debayer process? Wich funky colors would it produce?(original file is an XAVC-S...)

Bingo. And in fact I can confirm that you do get colour - just the one, though. In my case I got magenta. I asked the owner of https://www.monochromeimaging.com to send me a RAW file from a monochrome converted Sony A7. See the attachment for a preview of what I saw.

Christoffer, I will tell you via DM. It's a problem I've been thinking about, and I think I have found a partial solution. ;-)

Phil, I intend to shoot with converted cameras in the future. When my budget allows. If I were a DP... I would love the chance to shoot an entire series in b&w - the only question would be whether I shot it on film or digital. Because as far as b&w goes, digital is arguably superior. But as far as reality goes, I just want monochrome versions of Olympus and Sony stills cameras.

Michael, I will have a look at that article later. I'm up for a challenge!
 

Attachments

  • a7_mono_9190.jpg
    a7_mono_9190.jpg
    16.8 KB · Views: 0
One of the best cameras in recent history on the still side of things and one I use often for B&W is indeed the Canon 5DsR and certainly works well for IR/Full Spectrum Conversion or using an IR/UV Filter for normal imaging. Which you can snag for a hell of a deal used right now.

A fun one to even comare straight away to the Leica Monochrome offerings.

RED Monstro Monochrome is a seductive concept and honestly if I was doing more pure B&W work I would consider grabbing one. I think once Komodo is in full swing and the world is spinning again, I imagine a Monochrome Komodo would cost a slight premium, but likely a very low entry price considering all that could provide. That one I am eyeballing the hardest.
 
As to re-bayering...it is well-known that many colors are not uniquely represented by tristimulus values. So there are many inconsistent ways to re-bayer. And there is no way to know whether one re-bayer is correct vs another.

this is incorrect. A tristimulus value (derived from a SPD) is a unique color - it represents the human vision perceived equivalent as per the implemented CMF.

but you cannot create a spectrum from a tristimulus value, since various SPDs can result in the same tristimulus value - so it would be inconclusive/unknown what the original SPD was.

AD
 
1. What would happen if you debayered a monochrome RAW file? What kind of funky results would you get? Would you get any actual colour?

2. Can you REbayer a debayered image? I assume you can, but could you tell the difference between the original RAW file and the rebayered RAW file? This goes for monochrome as well as RGB.

There are reasons why I'm asking. The second question in particular is important.

Just to answer the question, I ran a monochrome DNG RAW image, from a Leica M10 Monochrom through ImageJ using the Debayer2sx plugin. Using a bilinear demosaic algorithm, which is about as basic as it gets, yields this result:

UR0JdlR.jpg


Which appears that nothing has happened, but when zooming in, does show some strange color changes:

35pqMuL.png


To answer the second question, yes, you can of course rebayer a debayered image--assuming the file isn't compressed. Here's that photo, that was debayed, and then rebayered:

bebBOwX.png


Of course, by doing this all in ImageJ, I'm just "pushing numbers around," not losing any info. If I tried to rebayer the .jpg, it would of course look different.
 
^Andy as you've illustrated, remember to still desaturate after your debayer if intent is monochrome from a B&W source.

And also as you've illustrated, at least with this method, it's likely just better to add a blur :)
 
Just to answer the question, I ran a monochrome DNG RAW image, from a Leica M10 Monochrom through ImageJ using the Debayer2sx plugin. Using a bilinear demosaic algorithm, which is about as basic as it gets, yields this result:

Which appears that nothing has happened, but when zooming in, does show some strange color changes:

35pqMuL.png
Strange indeed. I also note the loss in detail.

I imagine a Monochrome Komodo would cost a slight premium, but likely a very low entry price considering all that could provide. That one I am eyeballing the hardest.
I technically could buy one... but my budget is somewhat strict, until my investments start to yield serious growth. It may very well be the best DSMC camera out there, if you're aiming primarily at photographers.

Eventually all cameras will be DSMCs. Photographers will resist, and they will strongly object, especially those who switched to digital early (more than one pardigm shift is not allowed!). Those who shoot film will just keep doing their thing.
 
Back
Top