Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

Filling in alignment gaps using PixInsight.


Recommended Posts

I have received so much advice from this forum and videos from others that when I found a little trick which helped me with a situation, I thought I would write a little post about it to share and try to give something back.

The scenario I faced was that I had shot my Luminance data at a slight angle from the RGB data. The angle was severe enough that the intersection would mean a drastically cropped image

Misagligned

Rather than crop aggressively and lose a lot of the data and image, I decided to fill in the gaps with the Luminance data from the RGB channels. This is meat and drink to PhotoShop users I am sure, but in PixInsight, things are a little different. Here is what I did:

All that follows was done at the Linear stage, so this is all on linear images, so no stretching at this point.

I extracted the Luminance from the RGB image using the standard extract feature found on the toolbar and in the Menu : Image/Extract/Lightness (CIE L*). This gave me the raw data to fill in the gaps. The RGB Lum will generally be significantly noisier than the Lum channel itself (certainly was with me) and it will have different background brightness as well.

I used the MultiScaleMedianTransform tool to do wavelet level noise reduction, using ratios taken directly from Harry Page's excellent videos. This improved the RGB L image. You can do further noise reduction quite merrily, as we are only interested in the edges of this image.

RGBNoiseReduction

I then had to ensure the backgrounds matched and to do this, I used the LinearFit tool and using the Luminance image as the reference, I applied the default parameters to the RGB L extracted image.

I now have 2 images which have similar backgrounds. I then tried using PixelMath to combine the two images in a simple manner to fill in the gaps:

PixelMath1

When this is applied to to the target image, where there are black sections, it puts in the RGB_L data. As can be seen, it has done a pretty good job for the 2 right hand side missing sections, but it has not done a very good job on the left. If this is good enough for you, then you can tidy up the edges with the clone tool and get on with your life:

PixelMath result1

For me though, I needed something a little better, so I ended up using the GradientMergeMosaic tool. This tool allows you to overlap images in a specified order, so I could preserve the quality of the Lum image by overlaying the better quality Luminance data over the top of the RGB_L data, leaving the RGB_L data in the gaps. You can tweak the settings on how it manages the joins, and for these particular images, the defaults worked well enough for me.  This tool only works on Files, so you need to save both the RGB_L and L image to the filesystem. Then you need to ensure that the order is correct, in that the L will be overlaid on top of the RGB_L image.  

This final image shows the blended image this creates and also the settings. I set the Generate Mask flag merely to see the pixels used from each image. There are some join artefacts that still remain, but these are at the edges and can be cropped out leaving most of the image intact.

Mosaic

I hope this was of interest and that it helps someone some day!

Cheers

Matt

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.