Thread: Debayering.
View Single Post
  #2  
Old 12-07-2018, 04:03 PM
Merlin66's Avatar
Merlin66 (Ken)
Registered User

Merlin66 is offline
 
Join Date: Oct 2005
Location: Junortoun Vic
Posts: 8,904
From Helen on SGL:

Each pixel in a colour camera with a bayer matrix has a filter over it - to let through either red, green or blue. They are grouped in four pixels and each 4 has 2 green, 1 red, 1 blue (to match the human eye's response to colour).

If you capture in raw, all the camera downloads and is saved initially, is a measure of the photons captured by each pixel. It is quick as it just counts, it doesn't worry about what filter was over the pixel.

The debayering process takes the measurements and then assigns the colour to the measurement - this gives the colour output. It is quicker to read /capture in RAW and then use software to debayer later. You just need to know the colour pattern for each group of 4 - but trial an error is quick to sort that out if you don't know!

EDIT: I've added further detail.....
(Reconstruction of the colour from the Bayer matrix is handled by some smart algorithms - Bilinear, VNG (variable number of gradients) etc.
http://www.stark-labs.com/craig/reso...yering_API.pdf)

Question - if the Bayer Matrix is blue/green/red why don't you see blue/green/red pixels when you zooooom in on the image?????
(Answer: see the PDF doc.)
Reply With Quote