New Feature : Stellar Colour Calibration for Live Stacking

All the latest news about new features and improvements to SharpCap
User avatar
admin
Site Admin
Posts: 15625
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

New Feature : Stellar Colour Calibration for Live Stacking

#1

Post by admin »

Hi folks,

this one is something that I have been working on in the background for quite some time, but it's now finally ready to make it available to everyone.

Stellar Colour Calibration is a new tool in SharpCap Live Stacking that can automatically colour balance your images based on matching up the measured colours of stars in the image with the known colours of those same stars from star catalog data. If, for example, all of the image star measurements show significantly more green than the corresponding data from the star catalogs, the white balance needs to be adjusted to reduce the green brightness (or, equivalently, to turn the red and green up).

You might have previously used similar tools in other processing applications such as PixInsight or Siril - often these tools are called 'Photometric Colour Calibration' - mostly they work in similar ways, requiring at least the following to work properly
  • A decent selection of stars able to be detected in the image - ideally several hundred
  • Plate solving information for the image so that image stars can be matched up with catalog stars
  • A catalog of stars containing colour information
Fortunately SharpCap already has a built in Plate Solving tool, which also has a catalog of about 10 million stars included. I have now enhanced this catalog to included basica colour information for about 93% of those stars, increasing the size of the catalog data file by a relatively modest 10Mb to allow for this.

Using the tool is relatively simple - once you have a live stacked image (let a few frames stack so the image noise has started to reduce), go to the 'Colour Calibration' tab in live stacking and press the 'Calculate' button.
Screenshot 2025-06-30 151622.png
Screenshot 2025-06-30 151622.png (13.12 KiB) Viewed 483 times
The first step will be for SharpCap to plate solve the image - regardless of your normal plate solving settings, this will *always* use SharpCap's built in SharpSolve plate solving engine as it is important that the plate solve results match the star co-ordinates in the SharpCap database as accurately as possible. SharpSolve will work down to about a 0.5x0.5 degree field of view with the default database or 0.25x0.25 with the optional larger database downloaded. Note that if you are not using a GOTO mount then the plate solve will have to search the whole sky and may take up to a minute or so.

Once the plate solving is complete, the rest of the process - detecting stars in the image, measuring their colours, matching them with catalog stars and determining the relationship between catalog colours and image colours and how to correct the image colours is usually very fast - just a second or two.

Here's an example of a stack of the Horsehead/Flame region using an IMX533 camera with no colour correction, just a stretch in live stacking. The image is dominated by excess green caused by the sensor's high sensitivity to green picking not only more green from the target but also more green from the skyglow.
Screenshot 2025-06-30 152303.png
Screenshot 2025-06-30 152303.png (352.09 KiB) Viewed 483 times
And here's the same region after using the one click Stellar colour calibration function
Screenshot 2025-06-30 152446.png
Screenshot 2025-06-30 152446.png (423.13 KiB) Viewed 483 times
The tool makes three main adjustments:
  • Automatically sets the three colour balance sliders you find in the live stack histogram tab to values calculated to correct for colour casts introduced by the camera
  • Automatically turns on the live stacking background subtraction function and sets the subtraction levels for R/G/B to remove the skyglow background from the image back down to a neutral background very close to black
  • (Optionally) auto set the image stretch on the Live stack histogram to give a reasoably well stretched image
As well as the displayed image being automatically updated based on the calculated values, you will see some information on the results of the calibration process in the right hand side of the 'Colour Calibration' tab.
Screenshot 2025-06-30 152941.png
Screenshot 2025-06-30 152941.png (74.6 KiB) Viewed 480 times
Here, you have on the left some text summarizing the results of the process, including the number of stars found in the image, the number of stars matched with catalog stars and the resulting R/G/B colour balance adjustments and background subtraction values.

The two graphs show the distribution of star colours in the image (vertical axis) vs the catalog (horizontal axis) for two measures of colour - 'G-R magnitude' and 'B-G magnitude'. G-R magnitude is simply the magnitude of the star in the green less the magnitude in the red. Since higher magnitudes mean dimmer stars, a positive G-R means that the green is dimmer than the red, while a negative means the green is brighter.

The crosses on the graphs indicate the measurements for individual stars, whereas the dots are averages of groups of stars with similar catalog colours. For this process to work, it's essential that there is a clear pattern relating the catalog and image values for G-R and B-G. This might be a straight line (as seen in the G-R on the left) or a curve (as seen in the B-G on the right). If there is a lot of random spread in the individual measurements (probably due to a noisy image) then the process may fail if it cannot detect a relationship from either the individual measurements or the grouped data.

The vertical dashed line in each graph highlights the colour of a white reference object in the catalog data - the corresponding dashed horizontal line shows how that white object would be coloured in the image, and it's the G-R and B-G values for those horizontal lines that are the results needed from the whole process... Those values give allow the image colour of an object that is really white to be worked out, which then allows the calculation of the colour balance adjustments needed to turn it back to a true white.

If you don't like the default colour results, you can change the reference colour being used from the 'Default' white to one of the listed star colours from deep red stars (M/K class) to white/blue stars (B/A class). Note that the results of this might be opposite to what you expect - if you choose a red class of star as being the reference white colour, the calculation will try to make that type of star appear white in the image, making the whole image bluer and less red to achieve this. Similarly, choosing a blue type of star as the reference will lead to a red image.

Obviously, once you have used the auto calculation feature of Stellar Colour Calibration, you can use the manual colour balance (and background) adjustment sliders to make further tweaks to get your image looking just how you want it. You may also find that the calculation needs re-running as the stack progresses - particularly if changing conditions lead to a drift in the background levels of the stack.


If you have problems, first check the text summary shown in the 'Colour Calibration' tab to see if that explains what went wrong (too few stars, failure to plate solve, etc). You can also check the SharpCap log for more information. If the process fails on an image that it seems it should succeed on, or if it gives bad results, please use the 'Save as 16 bit stack' button to save your stack to a FITS file and share that FITS file with me so that I can investigate.

Note that the Stellar colour calibration is a SharpCap Pro feature.

cheers,

Robin
Borodog
Posts: 428
Joined: Fri Jan 01, 2021 7:25 pm

Re: New Feature : Stellar Colour Calibration for Live Stacking

#2

Post by Borodog »

Whoa. This is awesome. Thanks Robin!
AngeloM
Posts: 15
Joined: Thu Dec 21, 2023 3:34 am

Re: New Feature : Stellar Colour Calibration for Live Stacking

#3

Post by AngeloM »

WoW! Thank You Soooo much.
Gfischer
Posts: 175
Joined: Thu Jun 22, 2023 4:20 pm

Re: New Feature : Stellar Colour Calibration for Live Stacking

#4

Post by Gfischer »

Fantastic Robin. I’ve been using ccp in Siril and it works great. When I update sc the required star data files will automatically upload?
User avatar
admin
Site Admin
Posts: 15625
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Feature : Stellar Colour Calibration for Live Stacking

#5

Post by admin »

Hi,

yes, the data is now incorporated into the SharpCap plate solving star database, meaning that there is colour information for probably about 8-9 million stars. This database is installed by default with SharpCap and with the latest version has increased in size from about 45Mb to 55Mb due to the inclusion of colour data (you can see from the small size increase that the colour information is only stored at a limited level of detail - that allows the whole database to still be part of the default SharpCap install while still giving workable results).

cheers,

Robin
MarMax
Posts: 130
Joined: Sun Sep 19, 2021 11:43 pm

Re: New Feature : Stellar Colour Calibration for Live Stacking

#6

Post by MarMax »

Ditto . . . WOW . . . thank you Robin!

I can't wait to give this a try.
roelb
Posts: 239
Joined: Wed Mar 08, 2017 11:36 pm

Re: New Feature : Stellar Colour Calibration for Live Stacking

#7

Post by roelb »

Thanks Robin for this outstanding new tool addition.
Roel
Celestron Nexstar Evolution 8 - Celestron Nexstar 6 SE - StarSense
ZWO ASI533MC-Pro -- ZWO ASI533MM-Pro
Acrux
Posts: 6
Joined: Fri Feb 26, 2021 3:51 am

Re: New Feature : Stellar Colour Calibration for Live Stacking

#8

Post by Acrux »

Thank you, Robyn. Looks very promising.
Steve.
MarMax
Posts: 130
Joined: Sun Sep 19, 2021 11:43 pm

Re: New Feature : Stellar Colour Calibration for Live Stacking

#9

Post by MarMax »

Robin,

Perhaps you covered this already. Regarding the star database(s), is there anything I need to do to get the latest which include the colour information?

Aside from initially downloading the 0.25 database I've never updated anything other than SharpCap itself with each new drop.

Mike
celkins
Posts: 143
Joined: Fri Apr 20, 2018 10:58 pm

Re: New Feature : Stellar Colour Calibration for Live Stacking

#10

Post by celkins »

Robin,
just trying this new feature on M20, the Trifid Nebula - WOW!

--
Carl
Post Reply