Author Topic: RBG , LRGB, CMY question for Juan( et al)  (Read 4955 times)

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
RBG , LRGB, CMY question for Juan( et al)
« on: 2015 August 15 08:23:30 »
Juan,

A few years ago there were discussions about RGB and LRGB techniques. You pointed out that LRBG is only efficient in term of acquisition time if RBG is binned. The downside for binned LRGB is poor color on small scale structures.  Also, Noise is very mismatched matched between the L and color.

Unbinned RGB acquisition by itself has better color but would take longer to achieve good SNR .
This because each frame R, G, B is only capturing 1/3 the light.

In the late 1990s someone tried CMY filters but this never caught on. I suspect this was due to difficulty in processing the images or the LRGB  technique was published.

CMY would avoid the L to chrom. matching problems. Having 2/3 the light per color would make straight CMY a more SNR efficient strategy .
What do you( and other forum members) think?

Max

PS.  It has been a long time since I posted in the forum. I moved to AZ and finally built the new observatory. 

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #1 on: 2015 August 16 06:54:45 »
Maybe I should posted this somewhere else in the forums. I wanted the PI team's and forum member's opinion on CMY color acquisition.

I want to know if the color separation would produce a good image.
 It would yield better SNR than RGB. 
The SNR of derived L should mean no addition L need to be acquired.

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #2 on: 2015 August 16 07:25:02 »
Is the original analysis correct?  Would CMY yield lower SNR in RGB?

Full link with excerpts below.
http://www.astrosurf.com/buil/us/cmy/cmy.htm


"No dominant abnormal color affect the tricolor images of figures 3 and 4. Moreover, the balance of the colors of these two images is extremely similar what is the sign that the calibration procedure starting from a Solar-analog star is working properly. The trichromatic image resulting from data CMY appears slightly denser, but the choice of the thresholds of visualization plays a role here. For better apprehending the difference between these images it is a good idea to try an analysis of the signal to noise ratio in the two situations.

We will simplify by considering that the noise is primarily dominated by the signal itself, i.e. that the reading noise of the CCD is negligible. That does not changes basically the results and in any case, it is this photon noise regime which dominates in the analyzed images which were obtained in suburban environment ( the sky background having a level very high).

First of all, let's analyze the case of a tricolor image resulting from RGB filters. For a given pixel one can consider that the signal S is the sum of the 3 tricolor components:

S = R + G + B

In photon noise dominant situation, the noise N is:

The signal to noise ratio is thus equal to:

Let us see now the case of a trichromatic image synthesized starting from CMY filters. Is R', G' and B' the RGB channels calculated starting from the images taken through CMY filters (CMY2RGB command). According to the equations set (1) we have:

R' = Y + M - C
G' = Y + C - M
B' = C + M - Y

and:

S = R' + G' + B' = Y + M - C + Y + C - M + C + M - Y = C + M + Y

The noise associated with calculation of each channels R', G' and B' is equal to the quadratic sum of the noises of the images C, M and Y (the evaluation of the signal for a channel utilizing two additions and one subtraction and note that the signal is uncorrelated for the different images). This noise is identical for the three channels and is equal to:

The production of the tricolor image requires the three channels R', G' and B', so the final noise is then:

N = SQR(3) . N' = SQR(3 . (C + M + Y))

The signal to noise ratio is thus equal to:

By noting that in theory one must have:

C = G + B
M = R + B
Y = R + G

the preceding equation becomes:

The coefficient 2 which appears in this equation traduct the fact announced to the beginning of this paper that imagery CMY makes it possible to acquire twice more signal in spectral bands RGB than can provide directly a filter set RGB.

While comparing with the value of the signal to noise ratio in the case of the use of filters CMY it appears that subtractive technique RGB brings a profit of:

In other words, for identical exposure time, use of RGB filters increases signal to noise ratio of 22% compared to use of CMY filters. One supposes here that these two sets of filters produce equivalent losses by absorptions and reflexions and that R=G=B and C=M=Y at the output of the CCD camera. This simplified analysis shows that the use of CMY filters does not authorize to decrease the exposure times by a factor two compared to traditional filters RGB and there is no gain to use CMY filters in this situation! "



 It should be still underlined that filters CMY can be at the origin of a loss of resolution because of the presence of the atmospheric phenomenon of refraction (it is easier to correct the effect with RGB images obtained directly). Also, obtain images correctly calibrated for a scientific application (calculation of the color equations) is very problematic from CMY images.

In conclusion, the use of CMY subtractive filter in the place of RGB filter is a valid option to carry out realistic color images of astronomical objects. It is noted that the first configuration allows a benefit in signal to noise ratio only for very faint objets and in my peculiar case of transmission filter (these is dispersion in the transmission curve of different sets filters). However this gain is not high in this peculiar situation. The reason comes from the contribution of noise because of the arithmetic operations between images to extract RGB components starting from the observations carried out through CMY filters. In the example shown here it appears that the chromatic balance is more homogeneous with filters RGB than with CMY filters (that indicates that it would be necessary to integrate signal longer through filters cyan and yellow compared to the magenta filter). The problem involved in the recovery of the spectral lines in the case of RGB imagery is not necessary real. Lastly, whatever the technique is used, it is very simple to calculate the calibration coefficients to be applied to the images starting from a star similar to the Sun to obtain images having a pleasant visual aspect having a colors balance close to the visual apparence that a human eye would perceived it (but remember reserve for scientific use of the CMY data...).

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #3 on: 2015 August 18 13:48:05 »
I recall a conversation along these lines on IceInSpace.  Most of it was over my head, but may be of help to you?
IIS thread: http://www.iceinspace.com.au/forum/showthread.php?t=132625&highlight=cmy
There was a link in there to this page regarding the pros/cons of CMY: http://www.astrosurf.com/buil/us/cmy/cmy.htm

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #4 on: 2015 August 18 15:48:51 »
I don't these discussion resolved the question satisfactory.  I don't have the math background to do my own calculations.  :'(

There are three issues.

1 Would the RGB information generated from a unbinned CMY acquisition result in worse or better chrominance S/N. 
2  Would the extracted L from CMY information have higher SNR than L from separate RGB filters. 
(  I am pretty sure this one is a yes)

3. How does does CMY compare in time efficiency verse L Binned RBG or LRBG unbinned.
( Always simpler to acquire and process three filters than four IMO)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #5 on: 2015 August 18 20:12:45 »
I agree with Christian, except that for sky limited exposures read noise is not a factor.

Let b, d, and s be a bright signal, a dim signal, and the sky background, b >> s and d << s.

In the CMY and RGB frames, bright and dim SNR is b/sqrt(b) and d/sqrt(s). Both will be ~sqrt(2) or ~1.4 larger in CMY than in RGB due to the ~2x wider bandwidth. So CMY gives a net gain over RGB.

But in the synthetic RGB (needed for screen presentation, at least) bright and dim SNR is b/sqrt(3b) and d/sqrt(3s). Both will be ~sqrt(2/3) or ~0.8 smaller in synthetic RGB than in standard RGB due to the combination required. So CMY gives a net loss over RGB if RGB is needed in post-processing.

SNR of synthetic L from CMY is ~sqrt(2) larger than from RGB due to the ~2x wider bandwidth.

Mike
« Last Edit: 2015 August 18 20:43:24 by mschuster »

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #6 on: 2015 August 18 21:14:26 »
I agree with Christian, except that for sky limited exposures read noise is not a factor.

Let b, d, and s be a bright signal, a dim signal, and the sky background, b >> s and d << s.In the CMY and RGB frames, bright and dim SNR is b/sqrt(b) and d/sqrt(s). Both will be ~sqrt(2) or ~1.4 larger in CMY than in RGB due to the ~2x wider bandwidth. So CMY gives a net gain over RGB.



But in the synthetic RGB (needed for screen presentation, at least) bright and dim SNR is b/sqrt(3b) and d/sqrt(3s). Both will be ~sqrt(2/3) or ~0.8 smaller in synthetic RGB than in standard RGB due to the combination required. So CMY gives a net loss over RGB if RGB is needed in post-processing.

SNR of synthetic L from CMY is ~sqrt(2) larger than from RGB due to the ~2x wider bandwidth.

Mike

So it takes about 1.5 the exposures to achieve the same result as RGB for color information.  However, CMY extracted Lum has a  sqrt 1/3 decrease S/N verses taking L through a filter.
That's only about 15% less S/N. A lot folks shoot LRGB unbinned.
 So what is time deficit for shooting unbinned CMY?
It sure is easier to acquire 3 filters verses 4.

Max

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #7 on: 2015 August 19 15:26:54 »
So it takes about 1.5 the exposures to achieve the same result as RGB for color information.

Yes. Seems quite inefficient as you end up capturing 3x photons but get only 1x RGB SNR. But if you also synthesize L there may be a time savings.

Mike

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #8 on: 2015 August 20 20:12:53 »
let think about SNR from 6 hours of L and 6 hrs for each RBG. 

How does it compare with 8 hrs for each C,M,Y
Both are 24 hrs total time

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #9 on: 2015 August 21 17:11:44 »
let think about SNR from 6 hours of L and 6 hrs for each RBG. 

How does it compare with 8 hrs for each C,M,Y
Both are 24 hrs total time

Ok, I am going to try this problem one more time. :P

Assume L captures p electrons per hour (e-/hr). Then RGB captures p/3 e-/hr and CMY captures 2p/3 e-/hr.

6hrs of L captures a total of 6p e-, 6hrs of RGB captures 2p e- each, and 8hrs of CMY captures 16p/3 e- each.

SNR of these captures are sqrt(6p), sqrt(2p), and sqrt(16p/3).

If we want to synthesize L from RGB, we stack three frames each with SNR sqrt(2p). SNR of result is sqrt(3)*sqrt(2p) = sqrt(6p), which is equal to the SNR of L.

In the same way, stacking the CMY for synthetic L gives an SNR of sqrt(3)*sqrt(16p/3) = 4p, which is greater than the SNR of L by a factor of 4/sqrt(6) = ~1.6.

CMY captures 16p/3 but only half of this in any given band, 16p/6. When RGB is synthesized, we get one of these halves from two captures, or 16p/3 total. This is the signal. Noise is the quadrature sum of noises in these three 16p/3 captures. So SNR of synthetic RGB from CMY is (16p/3)/sqrt(3*16p/3) = sqrt(16p/9). This is less than the SNR of RGB (i.e 16/9 is less than 2).

So for your example with equal total times, CMY gives a smaller RGB SNR and a larger L SNR.

Mike



« Last Edit: 2015 August 21 22:25:08 by mschuster »

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #10 on: 2015 August 22 06:51:54 »
let think about SNR from 6 hours of L and 6 hrs for each RBG. 

How does it compare with 8 hrs for each C,M,Y
Both are 24 hrs total time
~1.6.

CMY captures 16p/3 but only half of this in any given band, 16p/6. When RGB is synthesized, we get one of these halves from two captures, or 16p/3 total. This is the signal. Noise is the quadrature sum of noises in these three 16p/3 captures. So SNR of synthetic RGB from CMY is (16p/3)/sqrt(3*16p/3) = sqrt(16p/9). This is less than the SNR of RGB (i.e 16/9 is less than 2).

So for your example with equal total times, CMY gives a smaller RGB SNR and a larger L SNR.

Mike

I don't follow the the last calc. 

If you acquire 8 hr CMY vs 6hr RBG.  That would be ratio of sqrt (1.33)= 15% increase.  Would we pick up 15% of the of 22% originally lost in RGB?


Max


Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #11 on: 2015 August 22 07:16:12 »
If you acquire 8 hr CMY vs 6hr RBG.  That would be ratio of sqrt (1.33)= 15% increase.  Would we pick up 15% of the of 22% originally lost in RGB?

Yes. A net loss remains however:

8hr CMY vs 6hr RGB gives a sqrt(8/6) = ~15% increase due to the time increase.

CMY vs RGB gives a sqrt(2) = ~41% increase due to the bandwidth increase (each RGB appears twice in CMY).

These two factor together account for a ~63% increase.

But when the CMY frames are combined to form RGB there is a penalty due to the quadrature sum of CMY noises. The penalty is sqrt(3) = ~73% decrease.

This nets out to sqrt(8/6) * sqrt(2) / sqrt(3) = sqrt(16/18) = ~6% decrease.

9hr CMY would be needed for equal RGB SNR.

Mike

Notes: When you stack 3 frames, signal goes up by 3, noise goes up by sqrt(3), so the signal-to-noise ratio nets out to a gain of sqrt(3). This applies to synthetic L. On the other hand, in the synthetic RGB combination, signal does not go up by 3, it stays at 1, as we are just selecting one color component. Noise on the other hand still goes up by sqrt(3) because we are still combining 3 frames, so the signal-to-noise ratio nets out with a sqrt(3) loss factor.

« Last Edit: 2015 August 22 09:03:05 by mschuster »

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: RBG , LRGB, CMY question for Juan( et al)
« Reply #12 on: 2015 August 22 12:07:06 »
Thanks