From: Bart Declercq Sent: Thursday, April 18, 2002 10:37 AM To: ccd-astro-imaging@yahoogroups.com Subject: Re: [ccd-astro-imaging] M81 & Colour Wheel (Part III) - Calibrating RGB Part 1 On Wednesday 17 April 2002 21:36, Bill Gardner wrote: > First, thanks to everyone who gave me suggestions about what might have > been going on with my colour wheel last week. Turns out it was the motor > shaft, there wasn't enough contact between the it and the carousel to turn > it evenly. > > Now that it is working properly again, I was able to take an image last > night. I used a Genesis non-sdf, with my ST-7E mounted on an > AP900GTO. The image can be seen at: > > http://members.rogers.com/gardner.w/html/m81-april15-2002.htm > > I would love any input into things to work on such as image processing. > > Thanks, > > Bill It seems you have a considerable excess of blue in your picture (the histogram of the blue channel of your image seems to confirm this. I tried to balance the colours out, but the JPEG doesn't seem to give me enough dynamic range to do this. Did you try to do colour balancing? If no, you should really try to do this, as it enhances the colour representation of pictures enormously. Calibration can be done as follows: - Take three images of an far out-of-focus G-type star (it should show a significant disk) that's near the zenith, make sure to make the exposures short enough that the star is never overexposed, also take all three images with exactly the same exposure time. In your image processing software, measure the average brightness of the background sky (a single ST7 image has a 16-bit signal, so your "brightness" can be between 0 and 65536). A typical value for this background brightness could be 1,000 (this depends on the exposure time/temperature/light pollution) but especially if there is considerable light pollution, it will be different in R, G & B. Also measure the "typical" brightness of your out-of-focus stellar disk. If you chose a good exposure time, this should be between 10,000 - 50,000 (if it's higher than 50,000 you are getting too close to overexposing the star, which will negatively impact the calibration, especially if the camera is anti-blooming). The three images should certainly give different results for this brightness. Let's say (hypothetically) that the R Value is 50,000, the G value 45,000 and the B value 36,000. This gives us an idea of the relative sensitivity of the camera to the different colours, as a G-type star is considered as white (I know a G type is called a "Yellow" star, but we're talking human eye, not astronomical standard, and the sun produces "White" light almost by definition. This means that if the camera+filter was equally sensitive to all three colours, they should all have the same brightness if the exposure time is the same. Now you have two ways of using this calibration information. The easiest (and most often used) method is to adjust your exposure time to the calibration. Varying the Exposure time: --------------------------------- Since the hypothetical camera gives the highest value in R (50,000), this means it is most sensitive in Red, and the exposure through the red filter should be the shortest. The Green value is 45,000, so to know how long we must expose this, we can use the ratio R/G = 50,000/45,000 = 1.11 , this means the Green exposure must be 11% longer than the R exposure (so if R exposure is 10 min, G needs to be 11 minutes). The Blue value is 36,000, the Ratio R/B = 1.39, so the Blue exposure needs to be 1.39 times the Red (or 14 minutes in this case). Recalibrating after the exposures ---------------------------------------- Say you already made the exposures, and you did three 10 minute exposures through R, G & B. Does this mean that it is impossible to now get 'accurate' colours? Not at all, although you'll need to play with your processing software a bit: First of all, we need to get rid of most of the background brightness, because it will influence the calibration if we let it. Say your long exposure means that the sky background on one image is 2,000. Then you need to subtract a value of 2,000 from your image (in MaximDL this is done using the menu option "Pixel Math", similar options exist in other packages). You could use a "remove background" option, which does this automatically, but I prefer to keep tight control while I do this. In another colour, the background might be 2,500, then you subtract 2,500 in that image. You should end up with three images where the background is almost 0 (make sure that you leave a small margin, we don't want any of the pixel values to actually be 0, or you'll get strange artefacts in your end image. If the average value of your background is 2,000, then subtract 1,900 or something similar, just make sure the background is as close to 0 as possible without actually being zero (it doesn't really matter if a few pixels are 0, they just need to be rare). Once you have done this to your pictures (you "normalised" the backgrounds), we can return to the R=1,G=1.11,B=1.39 ratios we calculated from the G-type star. Now, in stead of making longer exposures, we're going to "simulate" longer exposures, by multiplying the value of each and every pixel in the image by the calculated ration (again, in MaximDL, this is done by setting the percentage of original image in the "Pixel Math" option, other SW usually has similar operations). We leave the Red image alone, we multiply the Green image by 1.11 (set it to 111% in MaximDL) and the Blue image by 1.39 (139%). Then you can do the colour combine and, hey presto, a calibrated RGB image! I will continue this in a second message, as it's getting pretty long...