You may have noticed that in RAW mode with a Sony IMX sensor, your images have a green colour cast.

This is not a defect. It’s normal and desirable, because it shows you are using RAW mode correctly, showing what the camera “sees”.

This article explains why it happens, and how to correct it in processing.

Firstly we need to explain 3 concepts: Demosaicing, and the difference between RAW and RGB modes.

Bored already? You can skip all this and go to the end of the article, which shows you how to balance the green out.

Demosaicing or Debayering: Colour cameras have 3-4 separate groups of pixels, one for each colour. The information from each of these separate groups of pixels needs to be combined to yield a colour image. A demosaicing algorithm is a digital process used to reconstruct this color image from the separate colour outputs from an image sensor overlaid with a color filter array (CFA). It is also known as “color reconstruction”.  Colour reconstruction is performed by checking the values of adjacent pixels, and estimating what the missing colors should be. Algorithms are used for doing this conversion, and they are all compromises of a sort (faster vs. higher quality). Image capture software uses the faster method because it’s working in real-time. To get the best final image quality, this reconstruction process is better done later, outside the capture software, and during image processing with specialist software. Post-processing software like Astro Art, Nebulosity, Registax, Pixinsight and so-on, have better ways of converting the separate channels into a colour image – and some processing operations are best performed before colour reconstruction.  Read more about Debayering / Demosiacing here.

RAW mode in a colour camera: In RAW mode, image data is transferred from camera ADC (Analogue to Digital Converter), without Debayering the image first. In RAW mode, the only controls which affect the camera in AltairCapture are gain and exposure duration. Because there is no Debayering, the colour adjustment controls like Hue, Saturation, White Balance, Gamma, Brightness, and so-on don’t affect the camera output in RAW mode. You can still apply these controls to make the preview screen image look better (a good trick to make it easier to focus or see faint stuff), but the final recorded image or video file will not be affected by these settings. Therefore, if you use RAW mode and record videos in .SER format, and images in .FITS format, then you are starting with the purest possible data when it comes to post-processing. Tip: If you are imaging while using the histogram graph at the bottom of the screen in AltairCapture, you will notice that changing settings like gamma, colour balance and so-on, affect the graph values. To get a true representation of the histogram (i.e. what the camera is actually recording) make sure all settings are back to default – else you might inadvertently overexpose or under-expose the image. 

RGB mode: Image data is transferred from the sensor ADC, and is Debayered by the capture software. This means you can apply changes like Brightness, Contrast, Colour/White Balance, Gamma, Histogram Stretch, and so-on, on-the-fly, and the recorded .AVI video file, or bitmap image file will include these changes. For example, when you change the White Balance, certain values are increased or suppressed on a per-channel basis to give a “colour-balanced” final image where the red green and blue values are equalised. Doing this on-the-fly in the capture software reduces the final image quality slightly (because as we’ve just explained, you’re using a super-fast Debayering algorithm). So when it comes to post processing and you decide to apply Wavelet sharpening in Registax, or stretch the image to get more detail, you may get artefacts appearing. By the way, this is why DSLR or smartphone planetary imaging never gives such good detail, or appears noisy when you apply a large amount of sharpening – because these devices aren’t capable of outputting RAW video. What’s more, because the .FITS and .SER file formats can’t store a Demosaiced image, they cannot be used in RGB mode. Only the higher quality .FITS and .SER file formats are available in AltairCapture in RAW mode. So why use RGB at all you ask? Well, there are plenty of situations where the quality doesn’t matter that much, and it’s more convenient to end up with a video stream or image file which is already colour-balanced and doesn’t need post-processing. For example you may be doing a meteor video you want to publish on YouTube or edit on your desktop. It’s easier to upload an .AVI file which is permitted in RGB mode (but not in RAW mode). You can read more about various imaging file formats here.

So now we’ve explained Demosaicing, and set out the basic differences between RAW and RGB mode we can get to the green thing!

So why does my image appear green during capture? The images from Sony sensors (such as the IMX183, IMX178, IMX224, and IMX290) always appear green with the high quality RAW mode, because they have a sensitivity peak in the green channel. So because RAW mode is literally what the camera “sees”, a true RAW mode image or video appears green when you open it up in Autostakkert or Registax. Camera sensors are designed to respond like the human eye – with a peak in green sensitivity.

Great! So how do we balance the excess green?

Here’s an example from the Hypercam 178C which uses a Sony IMX178 Colour Sensor. This Jupiter image is the result of stacking a RAW mode .SER video file in Autostakkert. You can see it’s a pretty awful green colour!

So how do you get rid of the green? You can easily balance it during processing in Registax by clicking on the “RGB Balance” button, which launches the HistoRGB Panel. Then click on “Auto Balance” and it usually gives you a nice result with white balance. You can also change the values manually, and so-on.

Here’s a useful tutorial video which takes you through the process in detail.

https://youtu.be/9bLSPBePwLk
How to remove green colour with Altair Camera