Showing posts with label Photometric Mosaic. Show all posts
Showing posts with label Photometric Mosaic. Show all posts

Thursday, May 2, 2024

Mosaic Workflow

I've been working on my Veil Mosaic project and here is the first tentative result, the luminance mosaic:

Original Luminance Mosaic

The full scale version of this is 10257x9687 pixels in size! This has a number of issues, but it really was just an exercise in stitching together six panels. That part worked flawlessly. The main issue I have with this is the stars. There are just so many of them that they obscure the nebulosity. The other issue is how to extend my workflow to incorporate the chrominance channels and deliver a full LRGB mosaic.

Most people suggest building an LRGB mosaic from channel mosaics, so that's what I will do. As for the mosaic-building tools, advice is mixed with most people indicating a preference for GradientMergeMosaic. My experience with GMM has been disappointing; many of my images include dense star fields, and GMM has had problematic issues with stars at the edge of panels. Instead, I'll use PhotometricMosaic.

The workflow might go something like this for each panel/channel combination, although the last two steps operate on channel or panel groups. It's assumed you've already created master frames for dark, bias, and flat frames.

  1. Cull bad images from light frames (Blink)
  2. Calibrate light frames (ImageCalibration)
  3. Clean up residual hot pixels (CosmeticCorrection) 
  4. Assess calibrated frames for quality and select reference frame (SubframeSelector)
  5. Align light frames (StarAlignment)
  6. Integrate light frames (ImageIntegration)
  7. Sort all the resulting frames by panel; for each panel group use DynamicCrop to insure all the channel images for a given panel cover the same sky and have no edge artifacts from dithering. This insures the channel mosaics have identical dimensions and won't require aligning.
  8. Background correction (ABE, DBE, or both)
  9. Reduce noise (NoiseXTerminator)
  10. When all this has been done, sort the panels by channel. If you're archiving images, this is a good time to send all the intermediate products off to storage, they're no longer needed. Only the images from step 9 will be needed.
Because the luminance images will become pseudo-masks for chrominance they need extra attention. Do these steps for each luminance panel:
  1. Create a starless version (StarXTerminator or StarNet2, both have strengths and weaknesses)
  2. Enhance the starless image (MultiscaleLinearTransform, UnsharpMask, NoiseXTerminator, etc.)
  3. Reduce star bloat (StarReduction), apply the same reduction to all luminance panels.
Care should be taken to insure all the enhancements and applications of StarReduction are identical. This is an opportunity to learn how to use PI Containers.

Within each channel, normalize the images using LocalNormalization. The hope is that LocalNormalization will deal with background disparities and that the splining of PhotometricMosaic will make any remaining issues imperceptible. 

Next, create the channel mosaics by repeating these steps for each channel. 
  1. Plate solve each panel (ImageSolver)
  2. Register each solved panel (MosaicByCoordinates)
  3. Merge the panels (PhotometricMosaic)
  4. Reduce noise again (NoiseXterminator)

After you've done all four channels you're ready to combine them all as you would any single LRGB image. 

Taking the channel mosaics nonlinear requires you to try to stretch them in roughly the same manner, perhaps starting with the luminance mosaic and applying that same stretch to each of the chrominance channels. PI lets you do this using the STF process. Having done that you're ready to combine the channels and get on with color balancing, etc.

Notice I'm not using the usual PixInsight noise reduction and deconvolution processes. I think NoiseXTerminator provides superior noise reduction and the PixInsight Deconvolution process? I have never had any real luck with that thing. If your stars are round you're better off using StarReduction, which works exceedingly well and is free, too. Here is a too-quick application of StarReduction:


One pass of StarReduction

This image shows the effect of a single pass of StarReduction. There are a lot of blockish artifacts in this resulting from StarXTerminator being applied to the mosaic rather than individual panels.

With this workflow now defined I can get on with the processing!



Monday, July 10, 2023

A Practice Mosaic Using Photometric Mosaic in PixInsight

During the time between first and third quarter moon I thought it might be good to look at methods used to make mosaics. I had no idea what was available for doing that in PixInsight.

I learned there are a few ways to go about making a mosaic. The one that's often mentioned is the Star Alignment (SA) process. SA is usually spoken of as a rough alignment suitable for two-tile mosaics. For merging more tiles together (my eventual Veil mosaic will mean combining six) other methods can give better results.

I'll give them a try, but first I wanted to get a baseline merge using SA. To do this I'll create two tiles from an image of the California Nebula I made last year. I'll just cut it into two pieces.

Here is the image as fully processed in its nonlinear form:


Original Finished Image

 

Mosaics are built from linear images, and fortunately I kept the linear version of this. The left tile will be a simple crop. The right will start as a crop and then get modified to resemble some of the differences one might see in images taken days or weeks apart. Different dithering or polar align drift might mean different cropping away of poor signal areas, so I'll change its size.  Not having a rotator means it may be off by a few degrees, so I'll rotate it by three degrees. Lastly, the second tile may have a different luminance level thanks to smoke or clouds. Most of this should be removed, but I'll leave some in to see how well it gets handled. (This is done by tweaking the right tile with the Curves Transformation.) Here are the resulting left and right tiles:

 

Left and right "tiles"

 

You can clearly see they're not the same size. The other modifications are more subtle but if not treated correctly could result in a bad  merge seam, misaligned tiles, and possibly other defects.

The easiest method for merging the two panels is Star Alignment (SA). I'm going to do this using the settings suggested by Kayron Mercieca of Light Vortex Astronomy on this page. I'm going to supply SA with previews because it's so easy to do for a 2-panel mosaic. My chosen overlap is about 40%, larger than the 30% I'm using for the Veil mosaic. Executing SA gives me this:


Rough mosaic using only Star Alignment

Inspection of the result shows no seams, and no odd stars. It's perfectly acceptable, and confirms that (at least in this case) SA is suitable for a two-tile mosaic.

Next up is Gradient Merge Mosaic (GMM). I again used the methodology prescribed by Mercieca, first building a synthetic star field and then registering the tiles to it using SA. Then the right tile is processed by the dna Linear Fit script to insure that it matches the left script's brightness. Finally, GMM merges the two tiles.

A common problem with GMM is star pinching at the overlap edge, and my result showed severe pinching. The first fix is to adjust two parameters in GMM. Doing so helped a little, but not nearly enough. When this fails the remedy is to use Clone Stamp to remove bright stars at the offending edge. This did reduce the pinching, but not only left some and created new artifacts stemming from Clone Stamp.

After considerable efforts to deal with the pinching I came to the sense that GMM does not cope will with images having a lot of stars. This is the case for the California Nebula tiles; it will also be true for my planned Veil mosaic. 

SA and GMM are the only methods described by Keller in his book "Inside PixInsight," so I was not happy. A little googling turned up another method: Photometric Mosaic (PM). PM looked very promising!

Here is a great tutorial for PM

I followed the tutorial with one change: I used the Mosaic Join /  Combination mode Overlay rather than the Blend or Average methods the presenter recommends. 

The result was excellent! There are no perceptible seams or artifacts at all, even when boosted autostretching is used. Here is the result, with a quick autostretch to be nonlinear:




If this lacks the contrast of the original image it's due to using only autostretch in the processing.

I think I'm now ready for building my mosaic, and it's a day past 3rd quarter--so let the clear evenings commence!

 -------------------------------------

Here's a callback to an earlier post titled "A Wristwatch for Astronomy?" The watch in question worked well in almost all regards---big, easy to read, and of course it kept time adequately. Where it failed was the luminescence. The watch hadn't been properly "charged" before wearing, so I was only able to read it using my red light. Next time I'll remember to feed it plenty of nice yummy photons!