Hi everybody,
Recently I've been contacted by
Antonio Pérez to help him in the construction of a large mosaic of the Sadr region in Cygnus. Antonio has kindly given me permission to use his raw images to show the mosaic construction procedure step by step, as I think it may be of interest to most users on this forum.
The mosaic in question has six frames covering about 2x2 degrees each. However we'll show just a partial mosaic here with four frames, as Antonio is still collecting data for the other two, as of writing this.
The resulting four-frame mosaic image has some 7000x5000 pixels. This is a JPEG version of the final result:
Click on the image to see a full-size version.Overlapping between frames is excellent in right ascension (horizontal), but relatively small in declination (vertical). This makes the task somewhat difficult, but despite that, StarAlignment is able to generate the mosaic without any problems, with nearly default parameters. We'll see also how the new mosaic frame adaptation feature works remarkably well.
The first screenshot shows the four mosaic frames with automatic screen transfer functions. I have set the TL, BL, TR and BR image identifiers, respectively standing for top-left, bottom-left, top-right and bottom-right, to help identifying the frames by their position.
Click on the image to see a full-size version.As you can see, there are significant variations between frames, in both background illumination and signal levels. They will be compensated by StarAlignment's automatic frame adaptation feature to yield a completely seamless mosaic, as you'll see later.
There are several ways to build a mosaic like this one:
1. Register individual frames one at a time. For example, register the BL frame on TL, then BR on the resulting two frame mosaic, and finally TR on the previous three-frame mosaic. This has the advantage that no frame is interpolated more than once. However, this is the worst way of building a mosaic in terms of geometrical accuracy, since small registration errors caused by distortion accumulate and get worse as we add successive frames.
2. Build several partial mosaics and build a final mosaic with them, following a strategy to minimize accumulated errors. This is, in general, much more accurate in geometrical terms, but has the disadvantage that several frames get interpolated twice. In practice this has, however, only marginal importance due to the accuracy of the implemented pixel interpolation algorithms. This is the method that we'll follow in this example.
3. Build the entire mosaic over a
synthetic star field. For example, the StarGenerator tool can be used in PixInsight to this purpose, especially in the next version 1.6.1, where gnomonic projection provides much better results than the current conformal projections. This method is potentially the most accurate, since we are building the entire mosaic under controlled geometrical constraints, and all frames are interpolated only once. I'll generate this mosaic again using this method.
So let's put the second method into practice. We are going to register the bottom left frame over the top left frame. The first step is cropping the registration artifacts on the right edge of BL with DynamicCrop; otherwise those artifacts would look extremely ugly in the middle of the mosaic.
Click on the image to see a full-size version.Below is the StarAlignment tool with the appropriate parameters to build the mosaic.
Click on the image to see a full-size version.All parameters have default values except:
Working mode = Register/Union - mosaic
Generate masks = enabled. This is optional. The masks aren't really necessary, but they will allow us to verify the quality and correctness of the registration, as we'll see later.
Frame adaptation = enabled. With this option enabled, StarAlignment will compute a linear frame adaptation function of the form y = a + bx, to generate a seamless mosaic.
RANSAC Tolerance = 3.5 pixels (Star Matching section). Working with large mosaics as this one, an increased RANSAC tolerance will help StarAlignment to find more star pair matches to compute a registration model better adapted to local distortions. Large mosaics are particularly affected by distortions, both optical distortions (e.g. field curvature) and "natural" distortion caused by the fact that we are representing a relatively large portion of the sphere on the plane.
Registration model = 2D Surface Splines (Interpolation section). Cubic surface splines (also known as
thin plates) are a much more adaptable interpolation device than the default homographic projection. This coordinate interpolation method will lead to a more accurate image registration in presence of relatively strong distortions, which is important for mosaics for the same reasons explained above.
This is the resulting partial mosaic and its corresponding mask:
Click on the image to see a full-size version.StarAlignment masks are
binary masks, that is, masks where pixels can have only pure black (0) or pure white (1) values. We are going to apply a simple PixelMath instance to raise the low levels to 0.7, instead of zero:
Max( 0.7, $T )without rescaling. The result is below.
Click on the image to see a full-size version.With this mask enabled on the partial mosaic image, we can check the correctness and accuracy of the mosaic registration very easily. Note for example how a star has been perfectly divided into two halves between both mosaic frames:
Click on the image to see a full-size version.Another example where a diffraction pattern has been accurately represented just at the seam:
Click on the image to see a full-size version.Further accuracy checks with a double star and a couple tiny stars near the right edge of the mosaic:
Click on the image to see a full-size version.Click on the image to see a full-size version.The next step in the construction of the mosaic is registering the two rightmost frames. We'll crop the registration artifacts that could be seen on the resulting mosaic with DynamicCrop, as before.
Click on the image to see a full-size version.Here are the resulting partial mosaic and the mask:
Click on the image to see a full-size version.On StarAlignment, note that I have selected TR as the reference image and have applied the process to BR. In the previous step the reference was TL and the instance was applied to BL.
Let's do a few accuracy checks. The mask has been limited to 0.7, as before, using PixelMath. First a bright star whose diffraction spikes lie just at the seam:
Click on the image to see a full-size version.A star that also falls at the "bleeding edge":
Click on the image to see a full-size version.Let's prepare for the final step. We'll register the right sub-mosaic over the left one. Hence, the left border of the right mosaic must be cropped.
Click on the image to see a full-size version.And here is the final mosaic with its corresponding registration mask:
Click on the image to see a full-size version.Checking accuracy is always important. These are three stars perfectly crossed by the junction line:
Click on the image to see a full-size version.This one demonstrates the accuracy in the computed rotation angle between frames:
Click on the image to see a full-size version.That's it. Hope you'll find it useful. Thanks to Antonio for letting me work with his images.