Does BackgroundNeutralization subtract or divide?

M Covington

Well-known member
Jan 10, 2015
67
0
Does BackgroundNeutralization divide R, G, and B by appropriate factors to correct a color cast, or does it subtract constants from them?

I would have expected the former, but when I try to replicate it with AutomaticBackgroundExtractor, I find that if I choose Subtraction, I get the same thing as with BackgroundNeutralization, but if I choose Division, I get more complete correction of the color cast (note white rather than cream-colored stars, and both bluish and yellowish areas of the galaxy distinguishable).

For color cast removal I set the function degree in AutomaticBackgroundExtractor to 0 so it won't try to find gradients, but as far as color is concerned, results are the same if the degree is set to a more normal value such as 2 to 4.

20200524-4galaxies.png
 

pfile

PTeam Member
Nov 23, 2009
5,234
58
based on line 255 of the following file:


it looks like the actual background neutralization operation is addition (subtraction.) i don't see any division happening there, so your experiments match with how i read the code.

but does it matter? BN is not the entire color calibration flow but instead a necessary prerequisite to color calibration.

rob
 

pfile

PTeam Member
Nov 23, 2009
5,234
58
sorry- i know that but i just quickly googled for the code and the old repo was the top hit.

rob