Author Topic: White balancing a daytime image  (Read 5201 times)

Offline David Serrano

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 503
White balancing a daytime image
« on: 2009 August 05 11:53:24 »
Folks,

When I shoot in RAW mode, my Canon 40D gives me images with a strong red cast. I assume that's caused by it not applying the white balance to the RAWs. Now, for the astronomical pictures, I guess that it gets resolved in the ColorCalibration step, but I don't think this applies to daytime images, since in these cases we not always have a reliable white reference to give to CC. So, how to proceed then? Can the white balance be extracted somehow from the JPGs (I don't think so)?

Edit: changed "diurnal" to "daytime", thanks Sander ;)
« Last Edit: 2009 August 06 09:44:14 by David Serrano »
--
 David Serrano

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: White balancing a diurnal image
« Reply #1 on: 2009 August 05 12:05:50 »
Ah, diurnal = day time. Had to look that one up :)

I think the best way to determine white balance is to take a picture of a known quantity (ie. a color card) and use that to determine calibration factors that can then be applied to other images provided the camera settings haven't changed.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline David Serrano

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 503
Re: White balancing a daytime image
« Reply #2 on: 2009 August 06 09:43:14 »
Upon loading a RAW image, PixInsight spits some info on its standard output (this is a Unix term), including this promising line:

Code: [Select]
Daylight multipliers: 2.444244 0.930336 1.163797
Dividing the image by these multipliers (scaling activated, since dividing by 0.9 can potentially yield values greater than 1) doesn't give a good result. Then tried some things off the numbers in Statistics, and got a nice image by subtracting the Minimal values, ie:

Code: [Select]
$T - Min($T)
The scientific validity of this equation I don't know, but for this image in particular it seemed to fit the bill!
--
 David Serrano

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: White balancing a daytime image
« Reply #3 on: 2009 August 15 23:18:16 »
Hi David

This is a bit late, but I hope it helps anyway :P

What I do with daytime images is follow the same principle from astronomical images: first, take several bias images (8, for example). Then, just take 1 shot of a known gray or white target. You may use a T-shirt, a paper, or a cartuline (I own a neutral middle gray card from the analog days, to set the photometer).
Once in PixInsight, just create the master bias averaging the frames. Now, load the gray target's image. Create a preview covering the inside of the target, and use the image statistics to obtain the median. Write down the values. Now you may create a new PixelMath instance that applies both corrections, bias substraction and color correction as linear scaling.

BTW. I found that with most daytime images a histogram midtones adjustment yields too contrasted images, that are hard to process. A gama function gives better results as a first approximation, and may be incorporated in the same PixelMath expression (of course, we are talking about RAW shots here).

For example (for each channel): (($target-bias)*ColorFactor)^GamaValue

Then, you may apply this instance to the whole set of images with a ImageContainer, and voilá :)


PS: Yes, my current status is MIA (missing in action). jajajajajajajaja
Regards,

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