Jump to content

  •  

* * * * *

Color-correcting a flat panel


Discuss this article in our forums

Color-correcting a flat panel

Michael A. Covington

It all started with a red galaxy. I took a picture of M61 with my DSLR and calibrated it with PixInsight. It puzzled me that the corrected, calibrated image came out strongly red, like this:

Picture

But at first it didn't puzzle me as much as it should have. Of course the color cast was easy to correct by stretching the R, G, and B layers differently. I figured the red came from light pollution.

But wait a minute. The uncalibrated images from the camera, both raw and JPEG, were not red. They had more of a golden-brown color that really was explainable as light pollution and resembled results from many other cameras and processing workflows at the same site.

Then I figured it out. My flat-field frames had a strong cyan cast. Here's how one of them looked on the camera's display:

Picture

Because of the way flat-field correction works, any color in the flat frame will produce the complementary color in the resulting picture. And red is the complement of cyan. Mystery solved.

Mystery solved, but not problem solved. How could I fix it? I'd rather not do heavy color adjustment in software because that would imply I wasn't using the full dynamic range of the camera in the original image.

Here's what I did. I shoot flat fields by holding an AGPtek artist's tracing panel in front of the telescope. (The same panel is sold under other brand names.) It's uniformly bright, very lightweight, and USB-powered (in fact I Velcroed a small rechargeable USB power pack to the back of it). Handy and easy to manipulate...

...and obviously cyan-colored, once you look at it and ask yourself the question.

Cyan is the absence of red, so a very pale red filter would do the job, but it would need to be big enough to cover the whole panel. Fortunately, filters this size do exist — "gels" used for theatrical lights. And color adjustment of theatrical lights or floodlights is very important for moviemakers.

A web search led me to Stage Lighting Store, which sells a huge variety of gels for a few dollars each, with free shipping. But how could I decide which one I needed?

For that, I drew on my experience with color photography in the film era. I knew we needed to transmit red and cut green and blue slightly. To my aged eye it looked like I needed about CC10 or CC20 worth of red (film-era photographers will know what that means).

To my further delight, gels corresponding to CC filter numbers are available. They are the Rosco CalColor product line, and the CalColor 15 Red is what I ordered (for slightly more than $7, 20 by 24 inches). The only way to know if it's the right one would be to try it.

So I tried it. I cut out a piece of appropriate size and taped it to the panel. As you can see, the panel looks very pink when turned off, but pure white when glowing.

Picture

Picture

To test the correction, I took flat-field frames with it the same way I had done before. Here's how they looked on the camera this time:

Picture

Just a little strong on blue, but much closer to pure gray. And sure enough, using this kind of flats to calibrate astrophotos, I get the same color rendition that the camera would give without calibration. My light pollution shows up as golden brown, not vivid red.


An avid amateur astronomer for more years than you care to count, Michael Covington is the author of Digital SLR Astrophotography, Astrophotography for the Amateur, and other books. By day he is an artificial intelligence researcher, retired from The University of Georgia and now working in industry.


  • WarrenP2, mrlovt, Bill Schneider and 1 other like this


22 Comments

Thank you for posting. You are not the first one who does this.

https://www.cloudyni...?hl=+life +hack

My reason for correcting my panel was the strong difference between the channels caused too much noise in the weakest one when using the light pollution / nebula filter. Meanwhile I changed to Lee 1/8 orange to correct towards the white point and away from blue.

At work in the lab we have a large set of Lee foils in all different colors. They come in about A4 size while some other companies have very small patches in this kind of color sample booklets. It is also great to dim down too bright displays in the light lab because the Lee foils are crystal clear.

    • Michael Covington likes this

Does a flat HAVE to be in color?  Is it processed in color when PI does ImageCalibration?

 

I kind of thought that the flat was just a scaling factor applied to all colors in a light frame. The flat would brighten dim corners and also brighten dark donuts caused by dust on the optics.

Photo
Michael Covington
Jul 12 2020 04:39 PM

The flat is applied to all the pixels (red, green, and blue).  The color of the flat affects how much light each pixel gets.  So yes, the color of the flat has an effect.  If it didn't, my whole procedure wouldn't have worked!  

    • t-ara-fan likes this

An alternative is to deal with the problem later on in software.  I believe that's what most people do. 

 

I use PixInsight by using ABE or DBE on the stack. They also take out the color cast, as they reduce the light pollution gradient.

 

Somewhat easier.  It would be interesting to see if the hardware alternative is better, perhaps by reducing noise better.  If so, I'm surprised that more serious imagers wouldn't be concerned about correcting the flat panel in hardware.  Color casts are usual.

Some people (for sure not Michael!) are dealing with low priced optics that adds fringes to the stars. In that case star based color calibrations can fail. I've processed a lot of that stuff. If you have neutral flat and just can stretch without color calibration things are much easier for a beginner. Some pro might also decide to rely on the cameras color because the results are pleasing even if the star color is scientifically wrong. Color calibration is also tricky if the data are acquired at low altitudes and the air has removed lots of the blue. Sometimes an image full of golden stars looks better than for example the result of PCC which will push up the blue channel all the way up to compensate. I think it is nice to have the option of hardware color as well.

Photo
Michael Covington
Jul 14 2020 11:28 AM

An alternative is to deal with the problem later on in software.  I believe that's what most people do. 

 

I use PixInsight by using ABE or DBE on the stack. They also take out the color cast, as they reduce the light pollution gradient.

 

Somewhat easier.  It would be interesting to see if the hardware alternative is better, perhaps by reducing noise better.  If so, I'm surprised that more serious imagers wouldn't be concerned about correcting the flat panel in hardware.  Color casts are usual.

I was doing it in software for a long time but decided that in this case it was so extreme that I'd rather color-correct the panel itself.

    • bobzeq25 likes this
Photo
lesleyrgreen
Jul 16 2020 01:59 PM

I believe it was the red glow from the giant supernova in M61 which threw off your image haha. Nice image as well. I always get one peak with a considerable gap between the other two. Thanks for the tip.

 

Les

I shoot OSC, so I guess I have this problem too.

 

Could one just take the blue channel from the flat and make a monochrome version of it? 

 

Or do you need a color flat to go with color images? If that was the case, why not take the blue channel, make a monochrome image, then combine 3 copies of the mono image to make a RGB flat?

 

Or am I missing something. That does happen ;) LOL.

Photo
Michael Covington
Jul 18 2020 10:18 AM

Part of the benefit of flats is that they correct  not only vignetting and dust specks, but also PRNU (pixel response non-uniformity).  Some pixels are more sensitive than others, and this is one source of grain in pictures.  For this to work, the flat needs to involve every pixel.   If you used just the pixels of one color and copied their values into the pixels of the other colors, you'd lose this benefit, although you would still correct vignetting and dust specks.

 

This was not realized in the earlier days of digital astrophotography.  It used to be recommended to bin the pixels 2x2 to eliminate color cast; that is, take each RGGB group and make all 4 pixels in it the same.  Totally free of color cast, but also not good with respect to PRNU.

    • t-ara-fan likes this

Agree to Michael. I'd like to add that the problem of not correcting PRNU might be acceptable if you dither and have many subs. Averaging the object form pixels at different places will lower the noise. But why use one channel only? If you want to go that route, debayer the master flat and extract luminance from the result. Use this as your gray flat.

I also would like to add that quite often the artificial light pollution adds an orange color cast to the image that won't go away with a color corrected flat. It only works when the background is dark, I guess.

    • Michael Covington likes this

Hi Michael,

You make a very important point with all channels (RGB or narrowband, when applicable) having to be of equal intensity for proper flat correction with regard to vignetting and uneven response of individual pixels. Because in DSLR the channels are detected by separate pixel populations, a flat of one color should not used for a different channel, as you pointed out, unless just crude correction is acceptable... When channels cannot be adjusted to the same level (e.g. the panel does not emit in far red), the normalization of flat channels will partially address the problem, though the noise will be higher in channels corrected with weaker flat. Building flat source box with extra far-red LEDs will solve this problem, though.

I have a silly question re. images you showed. At least on Canon DSLR, the histogram scale is shown in f-stops (log2) not linear. In that case the peaks of channel histograms in your examples are at about 25% of full dynamic range, instead of typical 50%. Or is Nikon DSLR (?) display different?

Cheers,

Jan

Photo
Michael Covington
Jul 21 2020 10:01 PM

Good catch!   Those are indeed a little underexposed for flats.  It may not make a difference, though.

 . When channels cannot be adjusted to the same level (e.g. the panel does not emit in far red), the normalization of flat channels will partially address the problem, though the noise will be higher in channels corrected with weaker flat.

That makes sense. Thanks for all the answers guys.

 

When I shoot flats with my Spike-A I get 3 distinct peaks in the histogram with my ASI071MC Pro (OSC).  Would  it make sense to shoot 3 sets of flats, so each of R/G/B was correctly exposed in their respective set of flats. That would I would not be boosting the faintest channel and increasing its noise.
 

Color-balancing the light source would be a way to go. Otherwise, you do not have a choice but to live with a single flat, I am afraid...

Thanks for providing this!  i went back over all my flats which were all showing a LOT of red and did a color balance on them to simulate what you did here and Voila! whole new ballgame!  Now i just need to figure out how much correction is needed on the light box i use to get the proper Gel for it.  Thanks so much for helping me figure out something that has been holding me back!  I wasn't sure it was wise to have to edit the flats to remove the color, now i know.

    • KTAZ likes this

Thanks for providing this!  i went back over all my flats which were all showing a LOT of red and did a color balance on them to simulate what you did here and Voila! whole new ballgame!  Now i just need to figure out how much correction is needed on the light box i use to get the proper Gel for it.  Thanks so much for helping me figure out something that has been holding me back!  I wasn't sure it was wise to have to edit the flats to remove the color, now i know.

Please make sure to post back the type of film you find works best as well as the specific light box you are using.

 

I have one on order and I am sure that different manufacturers LED's are providing different color saturation, so hopefully this thread will allow us to see some specific color correction films against specific boxes.

 

It all started with a red galaxy. I took a picture of M61 with my DSLR and calibrated it with PixInsight. It puzzled me that the corrected, calibrated image came out strongly red...

Click here to view the article

I would love to see three histograms for each of the 3 light levels that most of these boxes offer. Curious if the change in LED intensity changes the color balance.

 

What box do you have and what color film did you use to correct?

Photo
Michael Covington
Aug 01 2020 12:24 PM

Please make sure to post back the type of film you find works best as well as the specific light box you are using.

 

I have one on order and I am sure that different manufacturers LED's are providing different color saturation, so hopefully this thread will allow us to see some specific color correction films against specific boxes.

 

I would love to see three histograms for each of the 3 light levels that most of these boxes offer. Curious if the change in LED intensity changes the color balance.

 

What box do you have and what color film did you use to correct?

Details are in the article, in the Articles section.

Please make sure to post back the type of film you find works best as well as the specific light box you are using.

 

I have one on order and I am sure that different manufacturers LED's are providing different color saturation, so hopefully this thread will allow us to see some specific color correction films against specific boxes.

 

I would love to see three histograms for each of the 3 light levels that most of these boxes offer. Curious if the change in LED intensity changes the color balance.

 

What box do you have and what color film did you use to correct?

I actually built my own light box with three 1W LED arrays and a couple of sheets of copy paper in between to make a smooth white surface.  However since i made my post i went upstairs to the light box and threw everything together inside to see what the camera was actually showing as the curve and it showed i had too much Magenta and not enough green in it to display properly.  So i am buying the Green 15 Gel and will see what that does.  If that doesn't work i will get the Green 30 and try it next.  However i found that post processing the Flats by adding more green to get a mostly even tone worked the charm!  

I picked up a sheet of exactly the same gel. I'll report back as soon as this tiny virus lets me image during cloudless New Moon nights. smile.png

I have a dasher A3 size coming on Monday. I'm planning on using an embroidery ring with several layers of landscape frost material between it and the scope to ensure even dispersion. I'll be curious as to what the histogram looks like.

Photo
HydrogenAlpha
Aug 03 2020 09:01 PM

I think if you just clicked the button to unlink channels in STF it would fix all the problems immediately. 

Photo
Michael Covington
Aug 03 2020 10:14 PM

I think if you just clicked the button to unlink channels in STF it would fix all the problems immediately. 

There are several ways to do it in software.  But at that point you have already not used the same amount of the sensor's dynamic range in all the channels.  That's why I chose to fix the problem at the source.

    • Dynan likes this


Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics