How many RGB Bayer Filter photo-sites = one pixel?

I was not sure where to put this, but if a mod wants to move it elsewhere, go ahead.

I am trying to learn about the bayer filter pattern and how it works. I'm a bit confused about the pattern.

I understand how it works with 50% green, 25% red, and 25% blue sites.

But how many sites = one pixel? Four? I read somewhere that the pattern is a repeating 2x2 grid but each pixel is actually a sample from 3x3 grid blocks of the pattern for a total of 9 sites... or is it One site, one pixel... but the color is sampled from other photo site pixels around it.

But now i am seeing that it's a 2x2 grid which is averaged with the surrounding 3 2x2 grids in 9 different configs. How confusing!

So is that right? 9 photo-sensor information = one pixel?


And boy do I have even more frustrating and difficult questions that need answering! Hahaha.
 
Last edited:
I was not sure where to put this, but if a mod wants to move it elsewhere, go ahead.

I am trying to learn about the bayer filter pattern and how it works. I'm a bit confused about the pattern.

I understand how it works with 50% green, 25% red, and 25% blue sites.

But how many sites = one pixel? Four? I read somewhere that the pattern is a repeating 2x2 grid but each pixel is actually a sample from 3x3 grid blocks of the pattern for a total of 9 sites... or is it One site, one pixel... but the color is sampled from other photo site pixels around it.

But now i am seeing that it's a 2x2 grid which is averaged with the surrounding 3 2x2 grids in 9 different configs. How confusing!

So is that right? 9 photo-sensor information = one pixel?


And boy do I have even more frustrating and difficult questions that need answering! Hahaha.



From my understanding, sites = pixel = photosensor = photosite etc, different words used in different literature which are refering to the same thing, and yes different Bayer patters also exist (hence the different configurations) and associated de-bayering methods (or demosaicing) see:

http://en.wikipedia.org/wiki/Demosaicing

Anhar
 
Yeah, there's no easy answer on this one. It depends on the algorithm used to demosaic, but you can't just say that one destination pixel is made of four source pixels (the R/G/G/B 2x2 pattern). Each pixel may sample up to 9 (or even more) adjacent pixels to build a composite guess as to what the final three-color value should be.

Furthermore, think about if you were to take just that R/G/G/B group:
R G
G B

... and you wanted to sample that all as one pixel. I guess you could do that, but you would instantly reduce your entire sensor resolution to 1/4 of what it nominally rates at! That would be a phenomenally inefficient debayer!

Most good debayer algorithms can deliver somewhere around 70 to 75% color res, from the full sensor. So if you're talking about something like the GH1's 12-megapixel 4000 x 3000 sensor, you'd expect to get 2000x1500 (or 3MP) from using the cheap 4-pixel debayer, but when using a proper debayer you should be able to get something more on the order of 3000x2250 out of it. That's more like 7 megapixels of actual resolved full-color detail, and more than twice as much detail as the cheap de-bayer would have given. And that means it's something like 1.7 source pixels for each destination pixel -- how's that for confusing! :)

So, yeah, dig through the Wiki article, and don't think that there's any real easy answer (other than if you just want to rely on the 70-75% number).
 
Like Barry said, the answers to this are as varied as the cameras on the market. Each manufacturer has their own marketing and design priorities, which effect the sensor->pixel conversion that you're trying to make. With newer technologies for HDR sensors, the conversion becomes even more complicated.

The best explanation I've ever seen about the state of the digital imaging pipeline is John Galt's talk from Panavision, called "Demystifying Digital Camera Specifications". A text version of most of that talk is also over at The Cow.

One thing for sure, is that a pixel is not likely a photosite in most cases. In the talk, John describes how he's championing the term "photosite" to help clear up several of these points of confusion.
 
Last edited:
Back
Top