Whenever you are discussing the layout of the ColourFilterArray (the CFA) with respect to Bayering or DeBayering images (on any kind of OSC camera) it is essential that there is a full understanding, and declaration, of 'where' the origin of the CFA lies, and in which directions the X and Y axes lie.
Think of ot like this:
- The manufacturer of the sensor creates an array of photo-sensitive pixels
- These pixels are not 'colour-sensitive' - they are just 'photon-sensitive
- To make a particular pixel sensitive to a particular colour, a 'filter' is added
- This 'grid' of different coloured filters is then the CFA
- The CFA grid will have some form of repeating pattern, to cover the whole sensor
- CFA colurs can have three colours (Rd, Gn, Bu), or four (Cy, Mg, Ye, Gn), and others
- The most common CFA grids nowadays tend to have three coloured filters (RGB)
- But, the pixel grid of sensor sites is 'rectangular', and so a four-filter CFA is required
- Because the human eye is most sensitive to Gn, and extra Gn filter is used
- The CFA is now a four-filter, rectangular, 'super-pixel', yet still only uses three colours
- But, with three-filter, 2x2 array- there are still quite a few CFA possibilities
- The sensor manufacturer will select what they believe to be their preferred CFA layout
- They will also define which sensor pixel is the origin - i.e. at (X, Y) = (0, 0)
- They will also define the 'positive' direction for both the X and the Y axes
- Having defined the origin and the CFA, it is then possible to identify all other pixels
- However, now the manufacturer of the imager becomes involved
- The CCD might not be used in the same 'orientation' in a given imager
- The X-axis and Y-axis may be swapped, turning 'landscape' mode into 'portrait', for example
- A 'positive' axis direction may actually be processed by the CCD firmware as 'negative'
- Sensor pixels at the image edges can, and are often, 'ignored' - or 'blacked out'
- These 'black' pixels are/can be used as a 'zero reference' in some instances
- However, any such 'black edges' need to be taken into account as 'CFA Offsets'
- The user is then at the whim of the image acquisition software
- X- and Y-axis 'flips' and 'flops' and black-edge offsets can be, and are, totally ignored
- They can also be completely, or partially, 'reversed' by the image acquisition software
- Most importantly, some, all, or none of this critical information will necessarily be available
- . . . and so on . . .
And so, unfortunately, it is often left to the user to determine - emprically, i.e. by trial and error - what settings are actually needed. At least PixInsight has set out to provide the user with the widest range of tools possible to identify what
settings should be used.
I always recommend that a user takes an image of a purely (or, at least 'predominantly') Red scene - and then repeats this for a Green and a Blue scene. Then, each of the images is examined, individually, at a very high zoom factor, concentrating on what PixInsight uses (and displays) as the Origin (X=0, Y=0) - as well as the three neighbouring pixels at (1, 0), (0 1) and (1, 1) - one pixel to the right, one pixel down, and one pixel 'to the right and down' respectively.
The examination should identify the brightest pixel - of the Red scene, the brightest pixel of the Blue scene, and the two brightest pixels fo the Green scene. The CFA grid is then named - in the order of the four pixel positions described in the preceding paragraph - according to brightness of the pixel found during the examination.
So, if (0, 0) was brightest in the Red scene, and (1, 1) was brightest in the Blue scene, and (0, 1) & (1, 0) were brightest in the Green scene, the 'name' for the CFA layout would be
RGGB (double-click, or select, to reveal).
I hope that helps - but I am happy to explain things further if I have missed anything, made a mistake, or otherwise confused anyone