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 :)

Why Bayer

Graeme Nattress

RED Problem Solver
Joined
Dec 28, 2006
Messages
6,496
Reaction score
16
Points
38
Website
www.nattress.com
I posted this elsewhere, but thought it warrants wider reading....

Of course, 3 chip cameras often have offsets in their chips which stop them delivering properly co-sited chroma in 4:4:4. And of course, if you try to get a triple of 1920x1080 sensors to actually allow you to measure a 1920x1080 resolution you will find that you've contaminated your precious image with significant levels of aliasing artifacts. To me, the only correct engineering and aesthetically correct approach is to properly optically low pass filter to achieve significant attenuation at the full resolution of the sensor making sure that any modulation caused by aliasing is at a practical minimum. That's why we "only" get resolution out to around 3.2k (~78% of the linear resolution, a slightly higher number than I originally quoted at the start of the project, but I've learned a lot since then).

Say you have 12mp of photosites. What is the best way to arrange them?

3x2.66k chips (the prism + three chip approach)
12mp = 4.61k bayer pattern sensor (what we do, near enough)
12mp RGB stripe, 4.61k (Genesis approach)

If you properly optically low pass filter, the three chip approach will give you about 2.4k resolution in R, G and B, but it's limited to using 2/3" chips and lenses. It will give a great image, but you've limited your lens choice. You may get lower dynamic range than current HD cameras as of the finer pitch on the photosites.

The bayer pattern approach will give around 3.6k luma resolution and 2.3k chroma resolution. (RED One achieves 3.2k from a 4k sensor area) Notice how you don't loose much at all chroma resolution compared to the 3 chip approach, but as our vision is relatively insensitive to chroma resolution, all you'll see when projected is the higher luma resolution. However, if you're not careful in your demosaic algorithm, you may still get some chroma moire. We deal with this completely in our demosaic though.

The RGB stripe approach is tricky. If you don't have an OLPF, you'll get 4.61 / 3 (as you need a triple of photosites to get your pixel as the arrangement of photosites is unsuitable for the kind of demosaicing we can do with bayer patterns) = 1.53k. However, the Genesis uses a non-square pixel approach of 1920x3 horizontally and 1080X2 vertically = 12.4mp, giving a max resolution before adding the OLPF of 1.9k. That would probably be around 1.7k with a proper OLPF.

All of the above are compromises, however, I do think that above shows that the bayer pattern is the one that gives you the most perceptually relevant resolution for your budget of photosites. In the above I'm taking into account that we generally use a stronger OLPF on Bayer pattern sensors, and the effects of a known high quality demosaic algorithm.

The 3 chip approach and RGB Stripe approach above are "guestimates" only, and would vary upon specific implementation of the OLPF and sensors. I've not seen, for instance, an F35 or Genesis pointed at a zone plate, so I don't know how strongly or weakly they set their OLPF, and I don't know if they do any software processing to account for the fact that the RGB on their sensor is not co-sited as it is in the three chip approach.

Graeme
 
Interesting, thanks.


While on the subject...

When people talk about RAW, is it specific to Bayer type sensors?

Is this correct:
If I had a 12bit 4:4:4 camera I would have the data of each channel from 0 to 4095.
RAW data is luminance (0 to 4095 for RED) from the monochrome sensor which has received light through the Bayer filter. It approaches 4:4:4 in terms of accuracy, but could never quite reach it as it will always be an approximation based on the demosaic algorithm. It's just the best solution for the reasons you stated above.

Please correct my errors.
 
Some moderator please put this into the "Red One FAQ" :excl:
 
There are many different kinds of RAW, depending on sensor type and configuration. For instance, the Viper uses a three chip + prism approach and sends out RAW RGB (with a log curve) for recording. In that case, RAW just means "un-processed" (apart from the known log curve that you could use to return to the reference of linear light data.)

I don't like to use 4:4:4 in reference to sensors as it's not appropriate terminology, and as I state at the beginning, if you can measure 1920 resolution on a 1920 sensor, it means your OLPF is too weak, and you're letting through too much aliasing. So it's not a true 4:4:4, but a contaminated and fake 4:4:4, so now, you can see that 4:4:4 has no meaning what-so-ever.

Graeme
 
That's why we "only" get resolution out to around 3.2k (~78% of the linear resolution, a slightly higher number than I originally quoted at the start of the project, but I've learned a lot since then).

Graeme

Graeme, this is a slight bend away from your original topic, but if using full sensor we get 78% of the sensor resolution, resulting in 3.2K, when using 3K of the sensor do we maintain that 78% ratio?
 
Yes, that ratio remains constant.

Another point, is that for years people thought of NTSC as, say 486 pixels high, but of course, it's all interlaced, and hence the cameras use a vertical filter to reduce vertical resolution to about 70% of the pixel count to avoid interline twitter. This is also why interlaced cameras have a higher sensitivity due to that addition of lines, compared to running it in progressive mode (if a true progressive mode is available).

Graeme
 
...
The bayer pattern approach will give around 3.6k luma resolution and 2.3k chroma resolution. (RED One achieves 3.2k from a 4k sensor area) Notice how you don't loose much at all chroma resolution compared to the 3 chip approach, but as our vision is relatively insensitive to chroma resolution, all you'll see when projected is the higher luma resolution. ...

Graeme

One thing I wonder is why you do not use a RGBI-pattern instead of the Bayer pattern? It should give a slightly better s/n ratio. Or a CMYI-pattern for that sake.
 
Bayer vs 3chip for color...

Bayer vs 3chip for color...

Thanks for the resolution overview, but the Bayer has issues with color, as was noted in a post elsewhere the dyes or colors of the filters used in the bayer filter can pass colors they should not, and using the color matrix cannot fully compensate for the errors.

The main problem seems to be the blue filter passing some red light between 670nm and 700+nm. On film the blue layer does not record red light, but Bayer cameras may make deep red colors show as pink tinted or magenta.

If you put a near IR filter on that blocks the far visible red light you darken deep red colors and get a different reproduction of the colors than you would shooting film, or with a 3 chip camera that has good filters for each primary (not that one has been built since the days of four tube color TV cameras).

To solve the problem of not being able to use movie camera lenses on three chip cameras because of the glass block, I propose using a two sensor approach using a red sensor and a blue/green checker board sensor with a pellicle beam splitter, this would allow a 22mm wide sensor and the use of PL or BNCR 35mm movie camera lenses.

The smaller checker board of the green/blue sensor would result in higher resolution and less color Moiré also color Moiré between green abd blue would be less noticeable.

Some might think that you would want the full sensor to be Green rather athn Red, but that would require the other sensor to be Red-Blue which would give bad Moiré and Color.

Having the Red high resolution image mixing with the softer Blue-Green image will give better color and resolution since the eye sees yellow shades at the highest resolution.

You could use your 4.5K and 5K sensors in this way to make a camera that gives better color and resolution than a Bayer filter camera.

I have attached a drawing of the concept, I would be happy to help you develop a better camera using this idea. There might be some issues with vibration and reflections, but the sensors could be swapped (red in the direct beam), and the reflection issues would be like any reflex 35mm movie camera.

For people sitting a normal distance in the theatre they can see the colors better than resolution above 1K, so having good color should be a goal, even if the software is going to remove colors later when people pick "looks" that have the camera's gambit made to look like bad film lab nightmares. So if "filmmakers" are going to muck up their Digital Camera's color to look like a bad film lab so that their Digital Images do not look like 3 chip camera HD, is there a place for "good" color any longer in a movie theater? I just saw an original priint of a move with "Color By DeLux" at the Castro, and it did not look like anything I have seen come from a Bayer filter, but did look a little like some of the older 4 tube TV cameras.
 
One thing I wonder is why you do not use a RGBI-pattern instead of the Bayer pattern? It should give a slightly better s/n ratio. Or a CMYI-pattern for that sake.

Because an unfiltered pixel will clip sooner, and it makes the colourimetry even harder, and the demosaic trickier.

Graeme
 
...
To solve the problem of not being able to use movie camera lenses on three chip cameras because of the glass block, I propose using a two sensor approach using a red sensor and a blue/green checker board sensor with a pellicle beam splitter, this would allow a 22mm wide sensor and the use of PL or BNCR 35mm movie camera lenses.
...

I have been thinking about a pellicle mirror camera with an IR-reflecting mirror instead. You can either have an IR-absorbing pad or a IR detector receiving the IR image. If you make it slightly larger and slightly further away, it should be in focus at the same time as the visible part.

This IR image can be used on its own, or you can use it to correct for any IR getting through to the RGB pixels.

Or you could extend the dynamic range with a pellicle mirror that reflects just a small fraction of the light to an identical detector chip.
 
I know this is probably slightly skewed but if the effective resolution is 3.2k because of the way bayer and other bits are done how do we gain anything going to 5k on epic ?

or is their some extra pixel magic dust being done and we'll find out later ?
 
Because an unfiltered pixel will clip sooner, and it makes the colourimetry even harder, and the demosaic trickier.

Graeme

I know it would be trickier, but it seems within reach. And it would be possible to ignore the unfiltered chip when it saturates. Sure, it will make the demosaic even more difficult, but it is still within what I believe is possible.

Of course, simulations never run in to the unexpected problems found in real life...
 
On 5k, you get a measured 4k resolution, but again, with the advantage of negligible luma aliasing, which you don't tend to get on the 3 chip approach as they try to over-egg their pudding, resolution wise.

Graeme
 
Visable Red in Blue sensor...

Visable Red in Blue sensor...

I have been thinking about a pellicle mirror camera with an IR-reflecting mirror instead. You can either have an IR-absorbing pad or a IR detector receiving the IR image. If you make it slightly larger and slightly further away, it should be in focus at the same time as the visible part.

This IR image can be used on its own, or you can use it to correct for any IR getting through to the RGB pixels.

Or you could extend the dynamic range with a pellicle mirror that reflects just a small fraction of the light to an identical detector chip.

You could do IR screen with that camera, it works like Green screen but does not have the green leak issue...

The problem is not so much IR getting into the RGB, but Visable far Red getting into the Blue and a little Green. When Visable Red from the far Red gets into Green rather than Orange getting into Green it shifts the colors in an unnatural way.

When Far Red gets into Blue it makes the Reds go pinkish not the Deep Reds you could get from good film like in the 70mm print of "Lord Jim" (1965).

You will notice if you look at the specs for the Bayer filters that the peaks are not in the same place as Eastman Color, and that the Blue layer does not pick up any Red or IR. If you filter the Far Red and Near IR you cut off colors that film picks up, so you push the Red sensors toward Orange rather than Full Deep Red.

Its better to filter the sensors so that they shoot the same color curves as film would shoot, you can do that, but the bayer filters are optimised to have high transmission, and if you use better filters on the Bayer filter the EI would go down to 50 or less, maybe.

Also Graeme mentioned before that the bayer filters are not "saturated" so that LUMA can be extracted from all three colors, so they are light red, light green, and light blue, the matrix trys to make the colors brighter but they are polluted from the start, in a three or four chip camera you can use deep colored filters and get no pollution of the colors.

Also as Graeme implied, you cannot use saturated filters in a Bayer chip because that would make the Aliasing worse unless you use a heaver OLPF, then your reslution drops to less than half the pixel width.
 
On 5k, you get a measured 4k resolution, but again, with the advantage of negligible luma aliasing, which you don't tend to get on the 3 chip approach as they try to over-egg their pudding, resolution wise.

Graeme

thanks graeme
 
Whatever way you mix it, any demosaic algorithm is a subjective process, different images can benefit from different approaches. Some colours and some luma have to be guessed at/imagined, period, which I like btw, sort of like modern day alchemy. I`d guess you`d need a 8k+ bayer with a lpf to totally minimise aliasing and to satisfy niquist at 4k?
On the subject of demosaic,
The "threshold-based variable gradients" style demosaic approach seems to me to give the best results in practice (the versions I`ve implemented for my crude tests), at least for what I tend to point lenses at, but I created a "pixel grouping" style algorithm myself a few weeks ago, that seemed to handle natural looking footage surprisingly well, as well as cgi and flatter material I chucked at it. This makes me think, especially considering the sheer number of instructions some known algorithms use, having as many demosaic options as possible in Redcine surely wouldn`t hurt at some point in the future, especially as processing power is still steadily climbing, and muti-threading is beefing up with multi-cores.
Another thing I`ve noticed is that a demosaic designed and optimized to handle extreme single pixel wide artificial image lines (in all directions etc), in b&w or colour, may not be the best one to simply demosaic natural footage (or nearly as quick).
I find it interesting to imagine, in the future, some third party plugin that might be able to analyse adjacent frames and could then perform some sort of "super-resolution" demosaic (using both frames), before exporting out at half the original fps, with ultra sharpening (or maybe increased resolution)?
I also wonder if anybody (like Kodak?) has ever tested a series of different demosaic algorithms on every possible 5x5 pixel combination to see which would statistically win. Then do the same test on several hundred thousand different "true 4:4:4 RGB" images, and again, compare the statistics. Then get twelve people (one of whom should be blind, as a control sample:)) to look at, and rate, some of the image samples and compare their perseptual results with the previous statistical results (using left/right and both eyes?). I`ve carried out much crazier statistical image tests (in terms of 100000s of images), while experimenting with lossless fractal compression ideas I`ve had (for a digial microfiche). No one paying me either. Lots of demosaic research papers I`ve read seem to use quite small numbers of test images, and not just as "typical examples" either. I would imagine you`d want to test different colour spaces and bayer patterns too eg, luminance, chromiance, hue, CYMK, RGB etc in the search for the holy grail (unless you had a hardware specific reason not to). I`m not familiar with the science of colour beyond RGB/YUV conversion and inaccurate raytracing metaphors, but I am working on that. I hope I`m not too old to learn, I may need some geeksteroids. The unravelling of a CFA is interesting.
 
Ronx, you're getting sampling theory wrong. A 4k image can accurately hold < 4k detail, not <8k detail.

Graeme
 
5K sensitivity

5K sensitivity

On 5k, you get a measured 4k resolution, but again, with the advantage of negligible luma aliasing, which you don't tend to get on the 3 chip approach as they try to over-egg their pudding, resolution wise.

Graeme

Graeme,

With more photosites (correct term?) stuffed onto a 5K super35 sensor will sensitivity suffer because of site size (as was mentioned by another another unnamed company)?

Thanks
 
Another point, is that for years people thought of NTSC as, say 486 pixels high, but of course, it's all interlaced, and hence the cameras use a vertical filter to reduce vertical resolution to about 70% of the pixel count to avoid interline twitter. This is also why interlaced cameras have a higher sensitivity due to that addition of lines, compared to running it in progressive mode (if a true progressive mode is available).

Graeme

I think we talked about it earlier. But even if you go to progressive, the figure of 70% for NTSC will not go away becasue of Kell factor. Though, Kell factor and interline twitter are different phenomenon, but both result from the same fact that size of image detail approaches the size of sampling/display grid based upon its camera/TV. Hence, if you filter NTSC about 70% it should take care of both.

Bottom line, even if footage is progressive, the resolution obtained will be 70%, which is a fact used nicely by NTSC designers to restrict luma bandwidth to 4.2 MHZ.
 
Back
Top