Debayered cameras?

Not sure why anybody would want to debayer a Canon 5D series camera, when there is an entire system in place to supply mostly correct color reproduction, down to the most minute little pixel groupings, and when there is an entire system in place to determine color reproduction based on white balance settings, and when there is an entire system in place to adjust the image in relation to contrast level the photographer uses, a system to adjust the image in relation to the filter effects the system can analyze at breakneck speed, based on the Bayer array's color predictions and the WB, and so on and so on.

Why cripple a system that Canon has built for the entire camera?

PLUS...for the anally retentive, there is ALSO a full bit-depth .CR2 raw file that can be worked to whatever type of B&W image desired, using other types of B&W conversion software, from multiple vendors.

Because of the above basics, it seems to me that de-bayering the camera seems like, well, counterproductive, considering the engineerign sytetem that the Worlds' Number One camera maker has developed over the last almost two decades....
 
........ RawTherapee will both allow you to pull the image without demosaicing the CFA. ..........

Care to spill the beans on how to do this? I can't find anything in either V2.4 or 4.1.

Oops, sorry.

In RT first go to color management and select No profile. You may also want to go down and check Free Gamma and set that to 1.00 and zero the slope. Then go to the Raw tab and under Sensor with _____ matrix select none in the drop box.

Process and you'll get an image with the CFA still in place.

Joe

We must have different versions. I have no "No Profile", for anything, under Color Management (except for monitor profile which is default None).

rt_profile.jpg


Joe

sorry, not clear enough.
 
Ah... I was under Preferences.
 
As for removing the Bayer array, Raw conversion would not be required as the image is not mosaiced - so cannot be demosaiced.

So how does a raw converter "know" this?

How do you not demosaic?
by not using a Raw converter, perhaps. Or by using a Raw converter that uses dcraw as it's engine (UFRaw, Rawtherapee and several others). Or by using dcraw on its own - it is a command line program so not for the faint hearted - dcraw is quite happy to export the raw file without demosaicing. See the dcraw website for details on how to do this. It involves invoking dcraw with the right toggles/switches.

Sometimes old age and experience of DOS is a useful thing.
 
@Ysarex - Interesting.

I am assuming that the pattern is resulting from difference in color across the filtered regions?

Provided that you could compensate for the filter factor of each component, which should be similar, I wonder if you could use the lightness channel to produce an image without the pattern.

This definitely falls under the category of wasting your day doing stupid stuff. My wife tells me just say you're retired. So this is really just a novelty -- I've had recourse to use it in class to show students what demosaicing a CFA is all about so I never poked at it too seriously.

Now I just went back with that photo and made some changes in RT before generating the RGB image. I altered WB and then used RT's channel mixer to equalize the luminance of the red and blue to better match the green. Then I output the undemosaiced file. In PS I selected an area around middle grey and used Hue/Saturation to desaturate all three colors in the CFA and to equalize the tone of each for that middle grey area. I got a lot further in removing the CFA pattern and was able to add much less simulated grain to suppress it. Got better overall tone response as well. Actually not too bad a photo.

test3.jpg


Joe
 
Yeah I ran into problems essentially trying the same thing, probably got about as close as you did here, but I feel liek I was fighting a gamma adjustment. This should be doable though. And my guess is if I can get things totally linear this shouldn't be too problematic.

I will look into it later.

You might want to take a photo of a grey card, adjust the channels so they all read out middle, and then process the images using that setting. If it does not work and you're getting the pattern in non-grey middle-grey areas a gamma of 1.0 should solve this provided that the adjustment is performed before white balance is. You can reapply gamma using curve adjustment after white balance correction. But once you get the CFA normalized, I don't see any reason why this would not work.

To combine the channels into greyscale, you should be able to stack each of the three channels in Lighten mix mode. That should be the most reliable way to remove the color.
 
I could certainly shoot in JPEG monochrome with a filter adjustment, but that wouldn't give me the quality of RAW.

I use Lightroom for a majority of my editing. Why wouldn't it be able to import a debayered Raw file? It is compatible with the Leica Monochrom, and that doesn't have a Bayer array.

The advantage of debayering a camera is that it effectively splits every pixel into 4 pixels. You get a 20mpix image with the effective resolution of 80.
 
The advantage of debayering a camera is that it effectively splits every pixel into 4 pixels. You get a 20mpix image with the effective resolution of 80.

No, it doesn't do that. If you pull the Bayer array off a 20 megapixel sensor you still have a 20 megapixel sensor -- there's no resolution increase. A Bayer array does not force 4 pixels into 1 pixel.

Joe
 
I could certainly shoot in JPEG monochrome with a filter adjustment, but that wouldn't give me the quality of RAW.

Or you could shoot raw and process it into b/w using the white balance controls as your color filter ...

The advantage of debayering a camera is that it effectively splits every pixel into 4 pixels. You get a 20mpix image with the effective resolution of 80.

You have a few things incorrect here.

First, LR does not process every camera the same. It may see a monochrome leica file and, if it know what to do with it, does not run the interpolation. However, if it sees a Canon 5D file it will think it's a normal 5D file and run the interpolation. Yes. You'll get a greyscale image, but it would have been interpolated since the raw processor has no idea if it's looked at a debayed sensor, or if it's looking at a scene that has no color in it - does that make sense?

This type of interpolation is kind of a funny thing though. You're taking the RGBG, each having unique spatial data and recombining it into a single domain. Using fancy math I don't totally understand you get more resolution than if you simply stacking the corresponding pixels, averaged their value and removed the empty space (as in RPP's 'half' mode) and then doubled the size. Because the information in each pixel is valid, the raw processor attempts to use adjacent pixels to approximate the full resolution of the image. But it's not perfect, but it is better than simply stacking the pixels.

So yes, You will get substantial increase in resolution, but it won't be a simple 1:1 relationship either.

---

That said, if resolution is what you're interested in, and not sensitivity, then I don't even think it's necessary. I am confident that further development into the techniques discussed above will get you the exact same thing as what you're looking for once the kinks are worked.
 
The advantage of debayering a camera is that it effectively splits every pixel into 4 pixels. You get a 20mpix image with the effective resolution of 80.

No, it doesn't do that. If you pull the Bayer array off a 20 megapixel sensor you still have a 20 megapixel sensor -- there's no resolution increase. A Bayer array does not force 4 pixels into 1 pixel.

Joe

Exactly. The bayer filter is completely passive. Its just an array of colors corresponding to the four channels of a RAW file, RGB+G.

To combine the pixels are interpolated mathematically which while destructive, is not 4:1 destructive.
 
I could certainly shoot in JPEG monochrome with a filter adjustment, but that wouldn't give me the quality of RAW.

To answer your original question. Use a digital camera, shoot and process raw files, convert them to B&W and get quality that is superior to shooting film.

Joe
 
The advantage of debayering a camera is that it effectively splits every pixel into 4 pixels. You get a 20mpix image with the effective resolution of 80.

No, it doesn't do that. If you pull the Bayer array off a 20 megapixel sensor you still have a 20 megapixel sensor -- there's no resolution increase. A Bayer array does not force 4 pixels into 1 pixel.

Joe

Exactly. Interpolation is destructive, but it's not 4:1 destructive.

I would add that since the pixel count stays constant the loss due to interpolation is in fact very minor, basically inconsequential. The AA filter in most cameras does much more to reduce resolution than demosaicing interpolation. That's one of the points behind the Fuji X-Trans sensors and why Fuji developed them.

Joe
 
There are well-known artifacts associated with the Bayer mask and interpolation. I am not sure if "inconsequential" is the right word, and different raw processors do have better results - so interpolation has impacts.

"minimal" perhaps. But "inconsequential" I don't know. And playing with your file here I think there is potential.

I'm also curious how noise would be handled.
 
I could certainly shoot in JPEG monochrome with a filter adjustment, but that wouldn't give me the quality of RAW.

To answer your original question. Use a digital camera, shoot and process raw files, convert them to B&W and get quality that is superior to shooting film.

Joe

Only if you're going to compare a DSLR to 35mm SLR film cameras. Let's not forget medium, large and ultra-large format.

I routinely scan 6x7 negs to 45-50mp, and 4x5 at 75mp. I could scan 4x5 at 1.2gp, but my computer can't handle images that size.
 
Thanks for the advice. I'm going to play around with Silver Efex Pro.
 
Last edited:

Most reactions

New Topics

Back
Top