Author Topic: Debayered files suddenly deep red  (Read 1083 times)

Offline ColinR

  • Newcomer
  • Posts: 21
Debayered files suddenly deep red
« on: 2019 February 12 09:10:00 »
I would be extremely grateful if anyone could help me with this problem. I've spent hours trying to find out the cause with no luck.
My debayered files are recently, (January 2019), red. (See M45 Snippets, attached.)

Data
Camera: Altair Astro 183C Pro TEC cooled to -20C
Filter: CLS 2"
Imaging Software: SharpCap 3.2 Pro
Pixinsight: Latest level
Operating system: Windows 7
Calibration Files: Darks, Flats & Dark Flats
Pre-processed: Manual and BPP, same result
Flats made using: Luminescent sheet with Perspex diffuser

Any comments or help would be greatly  appreciated.
Colin

Offline dhb2206

  • Newcomer
  • Posts: 41
Re: Debayered files suddenly deep red
« Reply #1 on: 2019 February 12 10:03:53 »
Try adding Background Neutralisation and Photometric Colour Calibration to your flow and see what that does. My images start off like the hulk, very green!

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Debayered files suddenly deep red
« Reply #2 on: 2019 February 12 10:12:09 »
did you happen to change capture software or versions of capture software? the images do seem to be biased red after ABE (which approximates a background neutralization.)

one problem with the FITS format is that the 0th byte in the file does not map unambiguously to a particular corner of the image. for this reason the PI fits reader has the "up-bottom" and "bottom-up" settings. when dealing with color sensors, if the writer and reader directions are mismatched, the bayer matrix order changes from what the sensor manufacturer says the bayer pattern is.

so, you can either experiment with different debayer matrix patterns, or you can keep the same pattern you were using and try reversing the PI fits reader direction, and see if you get the expected resultas. as dhb2206 says almost every color camera has 2 green pixels in each bayer matrix, which for a variety of reasons usually gives you a green cast in your images.

rob

Offline ColinR

  • Newcomer
  • Posts: 21
Re: Debayered files suddenly deep red
« Reply #3 on: 2019 February 12 11:39:31 »
Thanks bhd2206 and pfile Rob,
I had green and understood this to be the norm. I am using RGGB for the 183C as that is what is suggested. So I'll try swapping the "up-bottom / "bottom-up"setting in the first instance and see what happens.  (If that's what you mead Rob?)

Thanks again for your replies.

Colin

Offline ColinR

  • Newcomer
  • Posts: 21
Re: Debayered files suddenly deep red
« Reply #4 on: 2019 February 12 12:57:29 »
I swapped the up-bottom to bottom-up in the Format Explorer - Fits Advanced with no improvement observed. I also went through all the Bayer patterns on the Bebayer process. There were two "green" outcomes - GRGB & GBGR. Stretching both resulted in grey images.

Please see attached Snippets to see if there are any clues there. Apologies for using DSS! I really don't want to go back there.

Thanks again for your help.

Colin

Offline sharpie78

  • Newcomer
  • Posts: 30
Re: Debayered files suddenly deep red
« Reply #5 on: 2019 February 13 03:26:18 »
I have exactly the same result as you in my stacked images. I was under the impression that it was my CLS filter but am going to do a test with swapping the up-bottom FITS settings.

In the meantime I have found a good way to deal with the red hue......Linear Fit.

My workflow with an unprocessed stacked image is ;

Extract RGB
Use LinearFit to balance the (in my case) Red and Green channels to the Blue channel. (can explain which one to use as the reference if necessary)
Recombine Red, Green and Blue channels to create an RGB image with no red hue. :D
DBE if necessary
BackgroundNeutralization
Colour Calibration or Photometric Colour Calibration

This usually yields a well balanced histogram and colour correct image that you can process further before stretching.

Let me know if you need any clarification on the workflow. Hopefully it works for you too

Jack

Offline ColinR

  • Newcomer
  • Posts: 21
Re: Debayered files suddenly deep red
« Reply #6 on: 2019 February 13 09:54:08 »
Hi Jack,
Thanks for your reply.
I've tried to Google to find out for myself, but could you help or point me in the right direction how to extract RGB and to use Linear fit on the extracted images.

I'm assuming I would start with a stack of registered images?

Colin
 

Offline sharpie78

  • Newcomer
  • Posts: 30
Re: Debayered files suddenly deep red
« Reply #7 on: 2019 February 13 10:31:29 »
Yep. The first thing to do is determine which channel you're going to use as a reference.

Open up Curves Transformation or Histogram Transformation and zoom in so you can see the RGB channels clearly. You're looking for the channel that is furthest to the left. That is the channel you're going to align the other channels with. Once you know this......

Open up the Channel Extraction process and drag the New Instance triangle onto the image. This will seperate the RGB channels and give you 3 images with the postfix _R _G and _B. Close channel extraction.

Open up the Linear Fit process and select your chosen channel to align to as the reference image. Then drag the New Instance triangle onto the other two channels. Close Linear Fit once you're finished.

Open up Channel Combination process and click on the Select Channel square (right hand side) for each of the channels, This should auto-populate the channels with the correct image due to the _R _G or _B postfix on each image. Click the Apply Global circle and voila.....one image with no red hue.

If you want a full explanation of how and what you're doing....check out Astro Dude's channel on youtube. Look for the video titled "Pixinsight intermediate series part 1 (color correction)". (about 10mins into the video)
 :)

Offline ColinR

  • Newcomer
  • Posts: 21
Re: Debayered files suddenly deep red
« Reply #8 on: 2019 February 13 12:06:38 »
Jack,

I can't thank you enough for this as it has done the trick! I have the colours in the stretched recombined image that I was hoping for. I will now proceed with this method for the other images I am currently working with which are red. Or indeed use this method at all times, red or otherwise!

The alignment was Blue left, Green next and Red out right. 

I am still interested in why I suddenly have the Red issue instead of previous Green. I've also had Blue/Green which I put down to the CLS filter.

But anyway, you have provided me with a way that will allow me to proceed with processing my Red images. It was really getting me down.
So once again thank you very much indeed. You have given me the lift that I needed to crack on and get the current images completed.
And also a thanks to Rob and dhb2206 for their input in trying to find the cause. Maybe I'll get there too?   

Offline sharpie78

  • Newcomer
  • Posts: 30
Re: Debayered files suddenly deep red
« Reply #9 on: 2019 February 13 12:23:14 »
No problem Colin. It bugged me too when I first encountered it. I'm sure the red hue is due to the filter but for the life of me I can't remember who told me or where I read it. I've been burying my head in learning about PixInsight and processing in general for a while now and really should make more notes.

It'd be easy enough to test by removing the filter but I like to leave my rig fully setup and ready to go when the clouds clear. Messing about with tests when everything is working nicely seems a waste of rare clear skies to me....and gives dust and moisture an opportunity to get into the imaging train. Tbf though, I've just looked outside and it's just hazy high cloud here tonight so I may use that time to tinker. I'll let you know if I find out anything significant.

Glad it's done the trick for you, I've hit a few roadblocks while learning about PI too and this forum is an invaluable resource to get around them.

.....just out of interest is your CLS filter an Altair Astro CLS-CCD filter ?

Offline ColinR

  • Newcomer
  • Posts: 21
Re: Debayered files suddenly deep red
« Reply #10 on: 2019 February 14 11:00:09 »
The filter is a 2" Astronomik CLS CCD. I have also used my 2" Baader 7nm Ha filter for my recent Flame / Horse Head Nebulae image, where I combined the red channel from the Ha with the RGB images. I thought that the deep red issue was because of the Ha filter, which I now know it wasn't. However the final image turned out just fine. I never proceeded with the red M45, maybe I should have as suggested by dbh2206.
However, the way ahead for me certainly while my debayered images are an unnatural red is Linear Fit. So thanks again for that.

I just stared using Pixinsight from my Photoshop CS6 comfort zone in October. I used Astro Dude's 12 Youtube videos to get me started. I wasn't aware of the video you pointed me towards.

My Flame/Horse Head image can be seen here https://www.colinrobbphotography.com/sky-at-night      Still a touch of green in the stars, I think!
   

Offline sharpie78

  • Newcomer
  • Posts: 30
Re: Debayered files suddenly deep red
« Reply #11 on: 2019 February 15 09:23:31 »
You've got some really nice images there Colin. I agree the stars are a little green in The Flame/Horsehead image....Maybe try a quick SCNR process ?? Keep your eye on March's issue of Sky at Night, I might have my version of the Flame/Horsehead in it.....as they said.....depending on page space. If you're on Facebook.....look up my Broadland Astro page. My version has been uploaded to it.

The reason I asked what make your filter was, was to see if the red hue was manufacturer specific but seeing as yours is an Astronomik, I would assume it's not. Be interesting to see if anyone else has encountered this with their CLS-CCD filters.....

Offline ColinR

  • Newcomer
  • Posts: 21
Re: Debayered files suddenly deep red
« Reply #12 on: 2019 February 16 03:17:27 »
Jack, thanks for your comments, and yes I think a touch of SCNR will improve this image, maybe with a mask. I hope to work on this today, (now that I have Linear Fit I have two other images I'm working on! So thanks again.)

As for your image submitted to Sky at Night, I wish you well, it's a cracking result. (I had a solar image published in October 2017  :) .) Your Facebook page contains many fine images. I will send you a PM on a couple of questions I have, if that's OK with you.

Unless I, or someone else can identify the root cause of the red issue shown above, I am happy to carry on correcting it with the Linear Fit solution.

Colin

Offline sharpie78

  • Newcomer
  • Posts: 30
Re: Debayered files suddenly deep red
« Reply #13 on: 2019 February 16 15:30:29 »
Agreed, why change method if the method works. I like to understand root causes but sometimes I get hung up on them....this one I've just accepted as it works so well.

Anyways...feel free to PM. If I can help I will.  :)