Author Topic: Strange colored halo  (Read 6637 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Strange colored halo
« on: 2011 March 19 09:40:07 »
Hi,

I have been playing with the idea to implement a histogram transform that preserves the relative shares of RGB for quite a while. Actually, it is not so difficult to implement via some PixelMath. However, I observe a strange effect:
- stars are burned out in the center. This is not really surprising since the camera was close to saturation for these. However, this is not so visible with the normal HistogramTransform. I have no good idea how I should handle this smoothly in a later implementation.
- Stars also have a strongly colored halo adjacent to the region where they are burned out. However, RGB values are in the range of 0.2 there, so I would not expect the camera to go into saturation there. This is the bit I dont really understand. I took these images (of Praesepe) with a Newton telescope and a Canon EOS40D, no lens between stars and CCD, so there is also no reason to expect dispersion.

My question is: does anybody have an idea what could be the cause for the red rings? At which point does a camera such as Canon EOS40D leave the linear region of its CCD? How could I handle the burned out cores?

The screenshot below shows this:
- top left: relative contribution of R channel in top right image, computed in Pixelmath via $T[0]/max($T[1],$T[2]). We clearly see the ring of relative high R values. Gray image stretched with STF.
- top right: original stacked data after DBE
- bottom right: top right stretched via histogram transform and ColorSaturation transform. We dont see a strong red ring because a Histogram transform bleaches bright pieces of the image (i.e. R:G:B is close to 1:1:1)
- bottom left: top right stretched via RGB preserving Histogram transform (i.e. R:G:B are as in the top right image), no ColorSaturation transform. We clearly see the red ring predicted by the top left image.

Any insight would be welcome.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Strange colored halo
« Reply #1 on: 2011 March 21 11:00:03 »
I think I do now understand what is going on;
- I tried to determine if a color channel is saturated by looking at absolute values the integrated image. This of course is wrong: The intergrated image has gone through calibration, and this (especially the flat frame) changes the values quite a lot compared to the values recorded by the CCD.
- looking at one of the calibrated flat frames, I can see that the green and blue channels go into saturation much earlier than the red channel
- (BTW: for my Canon EOS 40D, saturated pixels are displayed with a value of 0.25 in PI. The camera is using only 14 of the 16 integer bits.)
- So what happens is this: as we approach the star, blue and green go into saturation. Red still increases. We therefore get an intensely red ring around the star, until red also reaches saturation.

I think I can avoid this effect only if I make sure that I dont have saturated stars in my image. I will test this when I next image a cluster.


Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Strange colored halo
« Reply #2 on: 2011 March 21 11:18:47 »
Also, you may use the red channel to "fix" the saturated data on the other channels ;) Dirt trick XD
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Strange colored halo
« Reply #3 on: 2011 March 22 02:09:09 »
Also, you may use the red channel to "fix" the saturated data on the other channels ;) Dirt trick XD

Well, it would be a kind of cross channel HDR: You use data from a less saturated channel to substitute regions in a saturated one. Unfortunately, in the present case that is more difficult than with normal HDR. There, you have fixed levels at which you blend in the other picture. This is not the case with this cross channel HDR, because the blending has to happen at different levels of red depending on the color of the star.

It would probably be possible using "Gradient Domain Compositing" as already investigated in http://pixinsight.com/forum/index.php?topic=2124.msg13961#msg13961, but I currently do not have the time to do this... Maybe there is some more simple method?

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: Strange colored halo
« Reply #4 on: 2011 March 22 06:37:48 »
Hi Georg,

I've just noticed this thread....sounds like a good idea. I'll just add some thoughts.....

The red response of my DSLR is way higher than the blue and green since its been modded. This means that 'white' stars often have the red channel saturated in the centre whilst unsaturated in the blue and green. This means that when I do colour calibration, by applying factors to each channel, the halos are white or whatever colour they should be (as expected) and the centres are blue/green, because the red channel has 'flat topped' at some intermediate value.

What would be good is a way of detecting the 'flat top' in a star in a channel, and from there to the centre replacing that channel with the same channel mix that was detected in the halo, but following the intensity curve of the other one or two channels that don't have a flat top.

Maybe this is what you are trying to do?

Cheers
         Simon

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Strange colored halo
« Reply #5 on: 2011 March 22 06:44:37 »
...Maybe this is what you are trying to do?
Yes, in effect thats what would need to be done to adjust for the star cores that are differently saturated in different color channels. However, I currently only have fairly complex ideas on how this could be done - if there is a simple approach: please let me know.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: Strange colored halo
« Reply #6 on: 2011 March 22 13:14:59 »
Hi Georg,

My first thought is to take the derivative of the image...this gives the slope. The saturated parts will have a slope of zero....and not have any noise on that slope, which should make it very obvious from any other flattish unsaturated areas in the image...because these will have noise on them. So even if channel X has been multiplied by 0.5, the 'flat tops' will still be detected. This assumes that the images are still linear.

This can be used to generate a mask of the saturated parts of channel X....Mask1.

Then you need to 'sample' the halo to find its unsaturated colour. Do this by expanding Mask1 (MorphologicalTransform?) to give Mask2. Then do something in PixelMath (my brain hurts at this point) so that you end up with Mask3 which is just the halo area that is exposed in Mask2 but not in Mask1, i.e. a halo ring looking mask.

So Mask3 will show the halo parts of the image, i.e. the true(???) unsaturated colours of the stars.

Now you need to somehow 'correct' all the channel X pixels inside the saturated core so that they are in the same ratio with the other channels as they were in the halo. If you had a single saturated star in the image it would be easy. You just take the ratio of the three channels through Mask3 and then apply that to channel X through Mask1. But the problem is that there will be many saturated stars in an image, all with different colours. So you somehow have to apply this on a 'local' basis. I have no idea how you could do that, but I guess there are people here that do.

This might be problematic if there is a nebula behind the star...depends on the halo definition I guess.

Anyway, that's my thoughts. I hope it helps, or maybe its the wrong track to take?

Cheers
         Simon

   

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Strange colored halo
« Reply #7 on: 2011 March 22 15:04:07 »
Now you need to somehow 'correct' all the channel X pixels inside the saturated core so that they are in the same ratio with the other channels as they were in the halo. If you had a single saturated star in the image it would be easy. You just take the ratio of the three channels through Mask3 and then apply that to channel X through Mask1. But the problem is that there will be many saturated stars in an image, all with different colours. So you somehow have to apply this on a 'local' basis. I have no idea how you could do that, but I guess there are people here that do.
Hi Simon,

this is the point were my brain begins to hurt right now: Finding a simple correction of the channel X values for star Y. Let's sleep over it, maybe an idea comes up...

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)