AstroAlign 2.0 - QuickHelp
AstroAlign is a software program for unconventional (?) image processing of astronomical and other images. The program is free and may be used by anyone who finds it useful. However, read the disclaimer at the bottom of this page before you start using it.
You can download the program here: (less than 100KB). Notice that this help page is not included. Version 2.0 fixes a nasty bug in version 1.1 which caused
some BMP's to show ugly diagional lines.
The current version of AstroAlign accepts 24bit Windows BMP files only. The files may be
of any size, but no features are provided for scrolling when the image is larger than the screen. The program is mainly intended for use with images produced by webcams and is therefore optimised for image sizes such as 320x240, 640x480 or similar. However, I have
successfully used the program with larger files.
Below is a screenshot of the program in action. Notice the 5 color channels represented
by tabs (Original, Red, Green, Blue and Result). With each channel, a number of filters
and tools can be applied, providing a certain amount of flexibility in image manipulation. These filters and tools are described later in this document.
The color pipeline
AstroAlign implements a color "pipeline" that makes it possible to mix or replace colors, and export/import color separations to/from other programs. A special feature is the ability to perform RGB color alignment, either automatically or manual (or a combination). Such color alignment can to a certain degree compensate for atmospheric chromatic aberration or similar effects caused by achromatic telescopes. Also, an image can be sharpened using the unsharp mask feature, and contrast/brightness can be
adjusted using the adjust color features.
The color pipeline is illustrated below. The "Original" channel receives an image from an external BMP file. This image is automatically color separated into red, green and blue components which are fed into their respective color channels, where individual color manipulation can be performed. Finally, the red, green and blue channels feed their (potentially modified) images into the "Result" channel. This is done by calculating a monochrome gray value for each color channel, the 3 gray values are then used as red, green and blue in the result channel.
Features are available that makes it possible to feed "green signals" into the "red channel" etc. when this is required. Such compensation can provide finer detail, but it also causes loss of information and color balance. Use with caution.
A use scenario
Which features you use at which step is to a great extent up to you, but the following is what I had in mind when I wrote the program:
First, read in an image into the "Original" channel. Perform color alignment as the first operation (you can also perform any upsampling before aligning colors). As an example, consider this image which is assumed to represent a severely abberrated image of 3 stars:
Align the colors by selecting an area in the image, using the mouse. Move the mouse to somewhere in the image, press and hold down the left mouse button while moving to another location in the image. The selected area is highligthed using inverted colors. When you are done, release the mouse button and the program will calculate the RGB offsets.
Notice that which area you select, will determine the color alignment suggested by the program. Below, the three components of a single star have been isolated in the selection area. The whole image will be aligned independent of the size of the selected area. The program calculates the required x and y offsets for the R, G and B channels, trying to make them overlap. You can edit the values if you want, before pressing the "Align Colors" button.
Below is the result of the automatic color alignment.
Real images are not as easy, and do not offer such good results, but they can at least be improved. Notice that there is no requirement to have images with sharp contrast to perform this kind of alignment, blurred images can also be aligned. The only main requirement for success is that the 3 colors are to be similarly distributed within the selected area. The method used is a simple one: the centre of gravity is computed for each color in addition to the centre of gravity for the gray "color". Red, green and blue are then individually offset to coincide with gray.
After performing color alignment, examine the Red, Green and Blue channels by clicking their respecive tabs. You may find that red and/or blue contains less detail and contrast as compared to green. Perform the necessary adjustments on each channel, perhaps by slightly sharpening red or mixin it with green. Experiment in small increments! If you do something wrong, press the "Refresh input" button to undo the local channel adjustments.
While manipulating the channels, you can visit the Result channel to see the currently accumulated effect of the adjustments. This can be very instructive. Do not perform any local adjustments on the result channel until you are certain that all R, G and B adjustments are complete, or else these adjustments may be lost through the automatic pipeline recomutations.
The final step is the manipulation of the result image. Typical operations here are contrast and brightness adjustments and final color balancing adjustments. The last step performed should be to sharpen the image using the unsharp mask feature. Again, experiment in small steps.
Filters and tools available with each channel
- Channel Input
Usually, you only use this in the Original channel. You simply Open a BMP
file and everything else will be automatic. In special cases, you may want to
break the automatic pipeline. You can do this, for example in the blue channel,
by swithing off automatic input and open a separate BMP file containing an
adjusted blue image. You can also adjust the definition of the channel here, by
adjusting the R, G and B factors.
- Agjust Colors
Here you can enter factors to perform local modification of red, green and blue,
as well as brightness and contrast. Press "Adjust colors" to perform. Be warned
that the effect is cumulative for successive use.
- Color alignment
Align the colors so that chromatic aberration is adjusted. See a more detailed
description in the use scenario above.
- Sharpen image
Enhance details in the image to make it look sharper. This features works internally by first taking a blurred copy of the image. The amount of blurring is determined by the pixel radius, which can be any whole or decimal number larger than zero. This blurred copy is scaled by the Amount value (also a decimal number). For each pixel, the difference between the image and the blurred copy is computed. If the difference is larger than the threshold (a number between 0 and 255) the blurred copy value is subtracted from the image. The result is that details are enhanced. Such details may be real or artificial, depending on the quality of the original image. You may want to experiment with different values. Notice that applying an unsharp mask several times in succession is rarely a good idea. If you don't like the result, press the "Refresh input" button to undo the effects.
- Up/down Resampling
Use this feature to create a new larger or smaller image (usually larger). Click
in the image to indicate the center of the upsampling. Type a factor (e.g. 2.5 if you
want the image to be 2.5 times as large) and press the "Resample" button. This feature
uses bi-linear pixel interpolation to calculate new pixel values. This means that every
new pixel value gets a contribution from the 4 closest pixels in the old image. Each of the old pixels is weighed according to distance to the new pixel. This provides a reasonable
- Channel Output
Use this to save the current channel view to a new BMP file. Normally, this is used
for the Result channel only, but can sometimes be used with the RGB channels to export color separations to other programs.
The author regularly uses the software on several of his computers and
feels confident that the software is without any damaging effect, including
the computer, image files and other programs or files.
Nevertheless, the author accepts no responsibility for damages resulting from
use of the software and makes no warranty or representation, either express or implied,
including but not limited to, any implied warranty of merchantability or fitness
for a particular purpose. The software is provided "AS IS" and the author does not
assume any risk by its use.