Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

PixInsight GradientMergeMosaic help


Recommended Posts

I've been building an 8 panel mosaic using MosaicByCoords to create the 8 panels, and DNALinearFit to intensity match the panels, which has worked very well. I then used GradientMergeMosaic to blend the panel edges together which also worked fine, apart from the known issue of bright edge stars causing 'pinched' stars as shown here. The mask shows the panel edges.

GMM1.thumb.png.f35928f4e8ecfcc9e69cb977d05a4b4b.png

Here's the offending star on the top panel

GMM2.png.ccd17a8851d44a4718b9f8de17f0549e.png

I used CloneStamp to copy some black over the offending star as a recommended solution on the PixInsight forums.

GMM3.png.f4cc3758f24a08de77b2b07d0912ac5c.png

However when re-running GradientMergeMosaic it fixed the star but a faint outline of the clone stamp is left. I think this is because the edge of the clone stamped area is still blending into the image background over a few pixels, and is not a hard edge, even though I've set the softness to 0.0. The preview circle still shows it blending at softness 0.0.

GradientMergeMosaic will only ignore true black areas so is treating the blended edge as image background and tries to merge it causing this effect.

GMM4.png.d16b7be083e69f2884a64a19d926bd78.png

is there a way to effectively clone stamp with a hard black edge, and not having it try to blend the cloned edge? Or is there some other method which is quick and easy to achieve this. As the PI forum recommends this method, there must be a way to do it.

Any PI experts able to help? 😊

Alan

Link to comment
Share on other sites

The documentation for GradientMergeMosaic just says to use the CloneStamp to remove offending 'pinched' stars on panel edges. 🧐

This tutorial also uses Clone Stamp but left to defaults apart from the radius. I tried it and this produced far worse results as almost none of the cloned pixels will be black at 0.5 softness, and they so you ended up with each 'fixed' star surrounded by a dark halo the size of the clonestamp. 😟

The Astro Imaging Channel had a talk by David Ault on GMM and at 45:30 he describes what he does about pinched stars. No mention of clone stamp.

In summery he draws a preview box around the offending star, notes the x and y extends of the box, and enters them into a PixelMath equation to replace every pixel inside the preview box with zero. Then repeats for every pinched star.

My 4x2 mosaic has at least 2 pinched stars on each edge, and 20 overlapping edges so I have to go through that palaver at least 40 times. :ohmy:

There's a third party PI addon called DynamicPaintbrush which may do what I want, and let you paint in black with a hard edge, and there's a free 30 day trial so I'll try it out.

Else it's export all the panels as tiffs into PS, paint out the stars and reimport back into PI. This means it's 16 bit rather than 32 bit fp which may affect the merging though so I don't really want to do that.

Why's it so hard. 🤔

Alan

Edited by symmetal
Link to comment
Share on other sites

Couple of points:

1. I used to suffer a from pinched stars like this. This tutorial https://www.lightvortexastronomy.com/tutorial-preparing-a-mosaic.html explains use of Shrink Radius setting to try and help sort the problem. But it also has a method to cut the offending star out of one of the images using PixelMath to avoid the problem, which I used successfully. I assume this only works with the Overlay method of merging though.

2. However, now I always use the Mosaic scripts - MosaicByCoordinates and PhotometricMosaic. I've not had this problem at all - these scripts work really well and I would recommend trying them as an alternative to the PI processes.

  • Thanks 1
Link to comment
Share on other sites

@Fegato Thanks for the info.

Yes, the PixelMath method works but is very cumbersome when you have quite a number to do. It would be useful if PixelMath had Object Oriented parameters where you could pass for example the Preview Box name to the PixelMath function and the expression would then have access to the box coordinates without having to enter them manually each time.

I can now see that the CloneStamp method could work if GMM is in Overlay mode and the panels are added in the correct order but I wanted to use Average mode as panel order doesn't matter and the merging should be smoother. The PixelMath method method should work in either mode as true black pixels are ignored by GMM.

I did try the DynamicPaintbrush tool  on a 30 day trial and I believe it will do what I want. It has the same interface as the CloneStamp but just paints black or white pixels rather than cloning. Also blur 0.0 acts correctly too, where no edge blending occurs and a hard edge black circle is painted. This enables GMM to ignore the painted pixels as they are true black of value 0.0 and so doesn't try to merge the painted area with the other panel like it does with clone stamp.

I went to try it using GMM but it then said my trial period had expired, (after 15 mins of use). 😲I'm sure it'll work, so I took the plunge and paid the $4.99 registration and am now waiting for the serial number to be emailed. DeepSkyColors released it in 2021 with the announcement of many follow up versions and other PI utilities but they've gone very quiet since. Hope they do send a serial number.

I'll try the alternative scripts you've mentioned and see how they perform. The DnaLinearFit script may balance the panel levels well enough that the gradient merging isn't so necessary.

Alan

Link to comment
Share on other sites

I used to have this problem, but have switched to PhotometricMosaic. This seems not to have the same issues. I am not sure why it works better for my mosaics, but it does. You have to remember to use TrimMosaicTile to clean up the edges first.

  • Like 1
Link to comment
Share on other sites

54 minutes ago, old_eyes said:

I used to have this problem, but have switched to PhotometricMosaic. This seems not to have the same issues. I am not sure why it works better for my mosaics, but it does. You have to remember to use TrimMosaicTile to clean up the edges first.

Thanks old_eyes. That's two votes for PhotoMetricMosaic. 🙂 I'll give that a try.

Alan

Link to comment
Share on other sites

I tried PhotoMetricMosaic and it performed very well apart from the bottom left panel where the join is visible and the background is significantly brighter than the rest. 🤔

8panelSTF.png.9881342258fdd5e88c945c8f780fad60.png

GradientMergeMosaic blended this panel in much better although both methods seem to show the background getting progressively lighter from top to bottom. They were taken under a partial Moon and where astro dark was running out so not the best of conditions. I used dnaLinearFit on the GMM panels to make the overlapping areas of equal intensity which likely helped. I'll try using these dnaLinearFit panels through PMM to see if they perform better.

For PMM I created 2 colums of 4 panels and then joined the two columns together. I could try 4 rows of 2 panels and see if that makes a difference.

There's evidence of misregistered stars towards the edges of the mosaic where the panels meet too.

These are 8 ASI 6200MM Ha images binned 2x2 in software to avoid having a mosaic of 18000 x 24000 pixels, and only 30mins per panel with a RASA11. It was just an exercise to see how well mosaics worked under less than ideal conditions. 🙂

Alan

Link to comment
Share on other sites

I tried PhotoMetricMosaic making 2 columns of 4 panels from the botom up and this improved the vertical gradient a lot but when joining the two columns the bottom 2 panels still didn't match, so I tried instead creating 4 rows of 2 panels and joined the 4 rows from the bottom up. This was much better as shown here 😊

Grab.png.757618ad0e0518d75353028256d5ae77.png

Just an overall left to right gradient which is easily fixed. This is very good considering that no background extraction or LinearFit has been applied here.

So no need for GradientMergeMosaic and pinched stars, or the DynamicPaint tool for which I've still not had a serial number sent. 🧐 I paid by Paypal so should be able to get a refund if it doesn't arrive.

Alan

  • Like 2
Link to comment
Share on other sites

Yes that's looking good - excellent!

NB I have played with the Gradient settings on PhotometricMosaic at times, although with a big mosaic like this, it's sometimes harder to get everything perfect. Most often I'm just turning off "target image" if I have strange gradients (blotches!) along the edges, as this will potentially propagate them across the target image. And meant to ask before,  just checking - are you running DBE on each panel before putting the mosaic together? That is recommended.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Fegato said:

are you running DBE on each panel before putting the mosaic together? That is recommended

I intended to initially, but the indidual panels didn't show any obvious gradients, and some didn't have any background anyway, so I thought I'd try them as they were, without DBE, and see how they matched. The mosaic turned out much better than I had expected considering the Moon was around, though it being fairly low in the sky and around 120 degrees away helped.

If I also try adding OIII and SII I'm wondering how well they'll register with the Ha. As long as I specify the same pixel scale, centre coords and projection for MosaicByCoords, I hope that's enough. Slight rotation throughout the mosaic may be an issue.

Alan

  • Like 1
Link to comment
Share on other sites

I'm a newbie to mosaics (only ever done 1) but from my limited knowledge gradients can be a problem. I've started using the Normalize Scale Gradient plugin for Pixinsight and found it to more effective than WPB alone. I've had limited sucess with Pix and mosaics but I'll be trying the PhotoMetricMosaic when darker nights are back.
Interesting thread and thank you for sharing your knowledge.
Clear skies
Pete

  • Like 1
Link to comment
Share on other sites

Hi @Petrol, This is my first mosaic too, apart from Moon mosaics which I did manually, and I've only been using PI for a few months now. I went for GradientMergeMosaic because it implied it specialized in correcting gradients, but PhotoMetricMosaic does that too, and just as well if you combine the panels in the 'best' order. I only had a 12% overlap when capturing the mosaic, but the more overlap the better in enabling the software to more accurately match the panels, so I'll have a higher overlap in future. The documentation with PMM is very informative and worth reading through.

It actually says that background extraction, DBE or ABE, isn't necessary before using PMM and can be better applied after, but if you do do it before ensure it's done before you run MosaicByCoords or you'll end up with near black areas.

I did use BlurXTerminator and NoiseXTerminator on the panels beforehand but the PMM documentation says it's best to leave that until the mosaic is made as they can change the star profiles which affects the PhotoMetric part of PMM. Even though I did this wrong it still produced very good results. 🙂

Alan

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.