Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

Kaycee Blyden




Posted Questions



Wait...

Posted Answers



Answer


What a Bayer filter is

Colour camera sensors use Bayer filters to capture the various colours. The Bayer filter effectively halves the resolution of the sensor for each colour (though green is left with slightly more in a checker-board pattern).

Each pixel on the sensor can only capture either red, green or blue light, but not all three colours. A software algorithm needs to interpolate the data later to re-construct the full resolution photograph in full colour.

Demosaicing

This interpolation process (called demosaicing) will visually restore a lot of the effective lost resolution, making it look pretty sharp again, but it can only do so by taking fairly intelligent guesses. It's not the same as if you had been able to capture the image at full resolution in the first place.

For example, while demosaicing is fairly good at claiming back lost sharpness from the Bayer filter, any fine detail such as hair, comb-like patterns or fine stripes are likely to suffer from aliasing, which can show up as colourful interference patterns:

(source)

(These images show very poor demosaicing algorithms for the sake of illustration. Modern cameras - even cellphones - use much smarter ones.)

Modern demosaicing algorithms are pretty smart and can minimise the effect of aliasing, but it still cannot retain the fine detail. A distant picket fence shot on a 1920x1080 colour sensor will retain less effective resolution than an RGB 1920x1080 image that is computer-generated or scaled down from a larger sensor or scanned on a scanner.

How this affects the resolution

(and how I came up with the "11 megapixels" figure)

The effective resolution of the resulting image after demosaicing doesn't look like it is half the resolution claimed by the sensor, because of the gains made by smart demosaicing routines, and the fact that the green channel, which correlates well with luminance, has more resolution than the other colours.

But it still would need to be shrunk by 50% to remove any loss due to interpolation. If you really wanted to ensure that your picture was "full resolution", without any loss of detail due to interpolation, you would need to have a colour sensor with double the resolution you want, in both the horizontal and vertical direction, and then resample the resulting image to 50%.

In order to capture full effective resolution of 1920x1080, a colour camera sensor (with a Bayer filter, which includes 99% of colour camera sensors) would need to have a resolution of double that: 3840x2160. That's over 8.2 megapixels. Due to cropping on the sensor (again due to the camera's demosaicing method) you'd effectively need around 8.8 megapixels to be sure.

And that's if your sensor had a perfect 16:9 aspect ratio. If your sensor has a 3:2 aspect ratio, you'd need around 10.7 megapixels to capture a 3840x2160 image, including discarded areas on the top and bottom to make up for the aspect ratio, and a small border to account for any demosaicing crop.

Sensors without Bayer filters

While 99% of colour camera sensors use Bayer filters, there are some that use an alternative pixel layout, but the principle is the same.

There are also some colour sensors that don't need a colour filter at all, such as the Fovean X3 sensor, but these are still exceptionally rare and have their own issues. Manufacturers also tend to lie about their pixel count (in order to be competitive with sensors using a Bayer filter, where the pixel count always sounds a lot more impressive than it really is due to the above described filter).

Another alternative that is employed by some expensive professional video cameras is to have three entirely separate sensors, one for each of red, green and blue, and use a light splitter to throw the same image on all three of them. Obviously this cannot exist in a DSLR or compact camera or any normal type of consumer stills camera. But it can explain why pixel counts on the sensors of professional video cameras can't be compared to those on DSLRs.


Answer is posted for the following question.

Is 2 megapixels better than original?

Answer


Mouse Location: Behind the top of the sewing counter in the lower right corner, to the right of the sewing machine. Angela's gotten a rough start today – the store is full, and there's several angry customers waiting to be helped. Help each of the customers as quickly as possible.


Answer is posted for the following question.

Where's the mouse in fabulous angela?

Answer


Complete an application with your personal and financial details, such as your ID and tax file number. Fund your account with a bank transfer, PayPal or debit card. Search for Novonix . Find the share by name or ticker symbol: NVX.


Answer is posted for the following question.

How to buy nvx stock?


Wait...