AstroBin is the home of astrophotography - Share full resolution images, preserve acquisition details, discover equipment, discuss techniques, and learn from the community.Discover AstroBin

Studies of an extreme case in mosaic processing, where all standard methods fail

Wei-Hao WangBrian BoyleJohn Hayes
24 replies493 views
Wei-Hao Wang avatar

Hi,

Recently I encountered an extremely difficult mosaic and spent more than half year to devise a solution. The figure below shows what the problem is.

📷 Fig1_MGC_LF_gradient_merge.jpgFig1_MGC_LF_gradient_merge.jpgThis is a mosaic created in PI, using MGC (and my own reference image) for gradient removal, Linear Fit for matching the brightness/color/contrast of the panels, and Gradient Merge Mosaic for mosaicking. These are quite standard in common mosaic workflows. The upper half shows the result directly from Gradient Merge Mosaic. It looks quite fine. There are no obvious mosaic seams and residual gradient in individual panels. The bottom half shows the result after stars are removed. Once stars are gone, you can see all the defects in this mosaic. The standard workflow just cannot unify the gradient and brightness in all panels. This mosaic is un-processable. As soon as I enhance the nebulas (any extended features), the mismatched panels will become apparent. I tried several different methods for gradient removal and panel matching, including those in PI and APP. None of them worked.

This PDF file contains the full story, including all the tests that I had done, the cause of the problem, and my solution to it. I hope it will be useful for mosaic maniacs like myself, as well as developers who seek for improving their mosaic algorithms.

Cheers,
Wei-Hao

ps, I cross-post this on CN. If this is not allowed here, I apologize. Please delete it.

pps, a partial mosaic created during the test phase was published here a while ago. I hope I can publish the full mosaic some time soon.

Somehow, this post was assigned to the APP forum without my agreement. Actually, this is more about PI than APP, although it also involves APP. If there is a forum manager, please help to move this post to a better place.

Well written Helpful Insightful Respectful Engaging
Brian Puhl avatar

Very informative! I had issues trying to stitch a 9 panel mosaic awhile back and eventually gave up for the same reasons. This changes things, I might make an attempt at doing mosaics more!

Respectful Engaging Supportive
andrea tasselli avatar

Curiously, I did something on the same lines (minus the background matching PI script) so I kind was expecting you moved on similar lines. Thanks for the write-up and well done!

Respectful Supportive
donld avatar

Very interesting, thanks. I’m curious how a Photoshop workflow would proceed after the stretch.

Non-astro mosaics typically are shot with more overlap than astro. It would be interesting to learn whether more frames would make the problems you encountered better or worse.

Respectful Engaging
Wei-Hao Wang avatar

donld · Jul 13, 2026 at 12:44 PM

Very interesting, thanks. I’m curious how a Photoshop workflow would proceed after the stretch.

Hi,

I do most of the retouching in Photoshop. I do curve and level stretching, and saturation boost. I always mix a global saturation boost and a luminosity-weighted saturate boos (brighter parts get more saturation boost while faintest parts get none).

I apply unsharp masking to sharpen details (in addition to BXT in PI), and this is luminosity weighted as well, to avoid amplifying noise. Then I add multiple layers of high-pass filtering (with different filtering radius) to amplify the larger-scale nebula structures. If just NXT is not enough, in Photoshop, I do my own noise reduction using series of surface blur in Lab space and apply to original image with again a luminosity weighting (more noise reduction in the fainter part). The sharpening, high-pass filtering, and noise reduction are all done on starless images to avoid artifacts around stars or blurring the stars. Some image defects are also best corrected on the starless version.

Final retouching may include further star shrinking using a combination of minimum filter (similar to morphological transform in PI) and small-radius unsharp masking, with a mask to act on stars only. And then color-balancing and further curves/levels/saturation to adjust the look and feel of the image.

donld · Jul 13, 2026 at 12:44 PM

Non-astro mosaics typically are shot with more overlap than astro. It would be interesting to learn whether more frames would make the problems you encountered better or worse.

A lot of mosaic defects can be remedied with large overlapping between panels or more panels. Unfortunately this does not apply here. The example here contains a 4×4 mosaic, and then a 5×5 mosaic offset by 0.5x the FoV of an individual panel in both E-W and N-S directions. So every point on the sky is covered by at least 2 different panels. And the mosaicking using standard algorithms still shows the problems.

Moreover, what I didn’t say is, the imaging was actually done by 3 scopes/lens simultaneously. All of them have 250mm focal length. One is with a median format camera (44mm*33mm sensor), and two are with FF cameras (24mm*36mm sensors). The two FF combined give an FoV comparable to the median format one. So actually, after including all data, any point on the sky is covered by at least four different panels. And this doesn’t lead to any better results.

The problem I described here essentially has nothing to do with how the panels overlap with each other and how many panels are there.

Well written Helpful Insightful Engaging
donld avatar

Moving towards first principals, the data between panels doesn’t match well when merged. So either the capture is different or the stretch before merge is different. That difference isn’t noticeable in low contrast, but must be present.

The difference between panels is measured precisely in the overlap regions. Photoshop has tools for both mid tone and color matching.

Why don’t the two most central panels match? It seems to me that the many panels amplify the issue. But that issue exists in a 2×2 mosaic of these frames. All multi-row mosaics have multiple fames overlapping.

I tend towards Photoshop after the basics in Pixinsight because I don’t know what astro scripts and plug-ins are doing “under the hood”. This situation is a mismatch of capture, stretch. or both. Tools may correct it satisfactorily to make the final composite visually pleasing, but that is likely at the cost of resolution. Resolution is the whole point of your project.

One though I had, espcially with an uncooled camer,a is that adjacent frames should probably be shot close in time. In practice that would mean shooting in columns instead of rows. I would want to do that on a mount with a sequencer instead of a traditional tripod head.

Engaging
Wei-Hao Wang avatar

donld · Jul 13, 2026 at 03:29 PM

Moving towards first principals, the data between panels doesn’t match well when merged. So either the capture is different or the stretch before merge is different. That difference isn’t noticeable in low contrast, but must be present.

Oh well… I think you have a lot to read about basic astronomical mosaic workflows.

Joseph Biscoe IV avatar

Wei-Hao Wang · Jul 12, 2026 at 05:10 PM

Hi,

Recently I encountered an extremely difficult mosaic and spent more than half year to devise a solution. The figure below shows what the problem is.

📷 Fig1_MGC_LF_gradient_merge.jpgFig1_MGC_LF_gradient_merge.jpgThis is a mosaic created in PI, using MGC (and my own reference image) for gradient removal, Linear Fit for matching the brightness/color/contrast of the panels, and Gradient Merge Mosaic for mosaicking. These are quite standard in common mosaic workflows. The upper half shows the result directly from Gradient Merge Mosaic. It looks quite fine. There are no obvious mosaic seams and residual gradient in individual panels. The bottom half shows the result after stars are removed. Once stars are gone, you can see all the defects in this mosaic. The standard workflow just cannot unify the gradient and brightness in all panels. This mosaic is un-processable. As soon as I enhance the nebulas (any extended features), the mismatched panels will become apparent. I tried several different methods for gradient removal and panel matching, including those in PI and APP. None of them worked.

This PDF file contains the full story, including all the tests that I had done, the cause of the problem, and my solution to it. I hope it will be useful for mosaic maniacs like myself, as well as developers who seek for improving their mosaic algorithms.

Cheers,
Wei-Hao

ps, I cross-post this on CN. If this is not allowed here, I apologize. Please delete it.

pps, a partial mosaic created during the test phase was published here a while ago. I hope I can publish the full mosaic some time soon.

Somehow, this post was assigned to the APP forum without my agreement. Actually, this is more about PI than APP, although it also involves APP. If there is a forum manager, please help to move this post to a better place.

Really enjoyed reading this. Love the detailed analysis and the result.

Brian Boyle avatar

Dear Wei-Hao,

What a fascinating and informative read. I have been working with mosaics for a few years now. The biggest challenged faced has been misaiming the 1200 or so OSC fields for the full astrobin survey that @James Tickner is working on.

I have had some success at the ~25 field level with the following workflow

PI. GradientCorrection: SpecPhotFluxCal: SpecPhotColCal: BXT (Correct only)

APP. Mosaic Mode; with LNC 2nd order/MB Blending at 15%

The mosaic can be now be stretched in PI (using GHS or MAS) without showing seams. I have a few examples on my posts.

APP fails at larger sizes - but primarily with the astrometry over such a wide field. I think @James Tickner is closing in on his own solution for a larger number of fields and you should compare notes.

I had given up on GHS in PI, but after reading your paper, I may reinvestigate. I also tried using MARS with my 40mm data, but found it didn’t help. Like you, I fought it was the stars that were the issue. How? Not sure? But they do vary in structure from field to field - particularly if neighbouring fields are taken over a variety of nights.

Brian

Helpful Respectful
Wei-Hao Wang avatar

Brian Boyle · Jul 14, 2026 at 09:25 AM

The mosaic can be now be stretched in PI (using GHS or MAS) without showing seams. I have a few examples on my posts.

Hi Brian,

Thank you. In the mosaics that you mentioned above, did you try to remove the stars to see if the starless version is still fine?

Brian Boyle · Jul 14, 2026 at 09:25 AM

APP fails at larger sizes - but primarily with the astrometry over such a wide field. I think @James Tickner is closing in on his own solution for a larger number of fields and you should compare notes.

Yes, after seeing one of your earlier large mosaic, I contacted James and he told me the details about his method. I think his method is really smart. For this particular mosaic that I was working on, after I encountered the problems, I thought about using Jame’s method, but then found that it’s hard to integrate it into my existing workflows. So I just consider his method the last resort, for now. I want to find a smart way to adapt his method without a major overhaul to my established workflows.

Well written Respectful
John Hayes avatar

Very nicely done Wei-Hao! I enjoyed your write up and I look forward to seeing the final result. With all of the multi-aperture systems coming online, I would encourage you to consider publishing a paper about this subject. Your work certainly would have been very worthy of a poster paper at the Copenhagen meeting.

John

Well written Respectful Supportive
Wei-Hao Wang avatar

John Hayes · Jul 14, 2026 at 02:54 PM

Very nicely done Wei-Hao! I enjoyed your write up and I look forward to seeing the final result. With all of the multi-aperture systems coming online, I would encourage you to consider publishing a paper about this subject. Your work certainly would have been very worthy of a poster paper at the Copenhagen meeting.

John

Hi John,

Thanks. That’s an interesting suggestion. I suppose the Copenhagen meeting is mainly for instrumentation, i.e., hardware. There some colleagues from my institute in that meeting. They all work on instrumentation or observatory operation. I myself pretty much only attend conferences for astronomical studies. That being said, long time ago, I attended one of the Astronomical Data Analysis Software & Systems (ADASS) conferences and gave a talk there. It’s about my mosaic processing pipeline for infrared mosaic cameras on 4 to 10 meter class telescopes. But that’s for processional research. I am not sure if there is a conference that accepts papers about amateur data processing. Even if there is one, since it’s about amateur works, I can’t use my grant to attend a conference to present such a paper. So it has to be in east Asia, so I can more easily pay by myself.

Talking about multi-aperture systems, a lot of them are for astronomical research or SSA. They are perhaps less about making nice looking mosaics. But anyway, if any of them want to create big mosaics and struggle for similar issues, I hope my document helps to point to some good directions.

Helpful Supportive
John Hayes avatar

Wei-Hao Wang · Jul 14, 2026 at 04:08 PM

John Hayes · Jul 14, 2026 at 02:54 PM

Very nicely done Wei-Hao! I enjoyed your write up and I look forward to seeing the final result. With all of the multi-aperture systems coming online, I would encourage you to consider publishing a paper about this subject. Your work certainly would have been very worthy of a poster paper at the Copenhagen meeting.

John

Hi John,

Thanks. That’s an interesting suggestion. I suppose the Copenhagen meeting is mainly for instrumentation, i.e., hardware. There some colleagues from my institute in that meeting. They all work on instrumentation or observatory operation. I myself pretty much only attend conferences for astronomical studies. That being said, long time ago, I attended one of the Astronomical Data Analysis Software & Systems (ADASS) conferences and gave a talk there. It’s about my mosaic processing pipeline for infrared mosaic cameras on 4 to 10 meter class telescopes. But that’s for processional research. I am not sure if there is a conference that accepts papers about amateur data processing. Even if there is one, since it’s about amateur works, I can’t use my grant to attend a conference to present such a paper. So it has to be in east Asia, so I can more easily pay by myself.

Talking about multi-aperture systems, a lot of them are for astronomical research or SSA. They are perhaps less about making nice looking mosaics. But anyway, if any of them want to create big mosaics and struggle for similar issues, I hope my document helps to point to some good directions.

Hi Wei-Hao,

The emphasis at the SPIE meeting is indeed on instrumentation; however, the range in sophistication among the poster papers was quite large. Frankly, I could have submitted a paper about some of the stuff that I’m doing on my own scope and it would have been relevant, new, and useful to some of the folks there. I totally understand your point about the science images produced by multi-aperture systems vs producing a “pretty” mosaic but again, that’s what the poster papers are good for. Someone, somewhere is working on trying to figure out a solution to a problem that you’ve already solved! I completely agree that it’s not a “science level” topic, but you might be surprised by how much interest it might get—particularly if you present it with even a hint of connection to some of these new programs. I saw numerous papers where the authors churned and churned to analyze to death something very simple. I saw others about some totally trivial thing—like the OAG poster paper that I mentioned. Clearly, the best subjects for a paper are obviously about new, novel, and maybe even revolutionary ideas; but IMO, this sort of conference is also about the exchange of methods and techniques that can be helpful to others and that’s what you’ve done here. It’s just something to consider…

John

Well written Helpful Insightful Respectful Engaging Supportive
GalacticRAVE avatar

Excellent write-up Wei-Hao, can’t wait to see the final mosaic! CS Matthias

Respectful Supportive
Wei-Hao Wang avatar

John Hayes · Jul 14, 2026 at 05:05 PM

The emphasis at the SPIE meeting is indeed on instrumentation; however, the range in sophistication among the poster papers was quite large. Frankly, I could have submitted a paper about some of the stuff that I’m doing on my own scope and it would have been relevant, new, and useful to some of the folks there. I totally understand your point about the science images produced by multi-aperture systems vs producing a “pretty” mosaic but again, that’s what the poster papers are good for. Someone, somewhere is working on trying to figure out a solution to a problem that you’ve already solved! I completely agree that it’s not a “science level” topic, but you might be surprised by how much interest it might get—particularly if you present it with even a hint of connection to some of these new programs. I saw numerous papers where the authors churned and churned to analyze to death something very simple. I saw others about some totally trivial thing—like the OAG poster paper that I mentioned. Clearly, the best subjects for a paper are obviously about new, novel, and maybe even revolutionary ideas; but IMO, this sort of conference is also about the exchange of methods and techniques that can be helpful to others and that’s what you’ve done here. It’s just something to consider…

John

Thanks. Looks like it’s a conference that I have to go at least once. I like the diverse topics that you mentioned. The science conferences that I usually attend have focused topics, and sometimes that can be boring.

Respectful
Wei-Hao Wang avatar

GalacticRAVE · Jul 14, 2026 at 05:29 PM

Excellent write-up Wei-Hao, can’t wait to see the final mosaic! CS Matthias

Thank you. I am working on it. Retouching of such a big image takes lot of time. Earlier this month, I thought I was able to publish it. Then I found something in the near-final result that I was not quite satisfied. That dissatisfaction required some rework at the very early stage. So I went back and do everything all over again. I hope I don’t need to do this again.

Respectful
John Hayes avatar

Wei-Hao Wang · Jul 14, 2026 at 09:12 PM

GalacticRAVE · Jul 14, 2026 at 05:29 PM

Excellent write-up Wei-Hao, can’t wait to see the final mosaic! CS Matthias

Thank you. I am working on it. Retouching of such a big image takes lot of time. Earlier this month, I thought I was able to publish it. Then I found something in the near-final result that I was not quite satisfied. That dissatisfaction required some rework at the very early stage. So I went back and do everything all over again. I hope I don’t need to do this again.

Oh man…I really hate it when that happens!

Brian Boyle avatar

Wei-Hao Wang · Jul 14, 2026 at 11:43 AM

Brian Boyle · Jul 14, 2026 at 09:25 AM

The mosaic can be now be stretched in PI (using GHS or MAS) without showing seams. I have a few examples on my posts.

Hi Brian,

Thank you. In the mosaics that you mentioned above, did you try to remove the stars to see if the starless version is still fine?

Brian Boyle · Jul 14, 2026 at 09:25 AM

APP fails at larger sizes - but primarily with the astrometry over such a wide field. I think @James Tickner is closing in on his own solution for a larger number of fields and you should compare notes.

Yes, after seeing one of your earlier large mosaic, I contacted James and he told me the details about his method. I think his method is really smart. For this particular mosaic that I was working on, after I encountered the problems, I thought about using Jame’s method, but then found that it’s hard to integrate it into my existing workflows. So I just consider his method the last resort, for now. I want to find a smart way to adapt his method without a major overhaul to my established workflows.

Wei-Hao,

Thanks for your kind response. I have looked at all my mosaics without stars. Actually I skated over a little of the detail of my processing. My final stretch from linear is a multi-step process.

1) Stretch using a PixelMath expression designed to replicate what STF does.

2) Remove stars with SXT (screen mask)

3) Stretch result with MAS (default params)

4) Use HDRMT (order 6) on a cloned image to bring out more detail in the saturated areas.

5) Average the images produced in 3) and 4)

6) Using MLTSharp with 0.05/0.05/0.02 in layers 2,3,4

7) Add stars back in.

To my - perhaps less than critical eye the starless images produced from steps 3) to 6) look not too bad. This is true of both the Halpha and OSC mosaics I have been doing.

I will post some starless examples in the next message on this thread.

I am really glad you started this thread with such a good report. It is oddly reassuring to see someone else struggle with the challenges of large mosaics. I would like to think that the problem can be solved. SeamXterminator?

CS (Clean seams)

Brian

Well written Helpful Respectful Engaging Supportive
Brian Boyle avatar

📷 abc_cross.jpgabc_cross.jpgHere is the starless version of the Southern Cross region from the ABC survey fields (taken by myself and @James Tickner ). I posted the image (with stars) back in Nov last year

📷 cross_ha_nostars.jpgcross_ha_nostars.jpgAnd the Ha image mosaic of (roughly) the same area - posted a couple of months ago with the stars.

Engaging
Wei-Hao Wang avatar

Brian Boyle · Jul 15, 2026 at 10:43 PM

📷 abc_cross.jpgabc_cross.jpgHere is the starless version of the Southern Cross region from the ABC survey fields (taken by myself and @James Tickner ). I posted the image (with stars) back in Nov last year

📷 cross_ha_nostars.jpgcross_ha_nostars.jpgAnd the Ha image mosaic of (roughly) the same area - posted a couple of months ago with the stars.

Hi Brian,

They both look very good to me. Did you use James’ method for mosaicking the two? For the Ha mosaic, I can imagine that stars would cause less trouble in panel matching, since the nebula-star contrast is higher. The RGB one is amazingly good, and I think James’s method contributes a lot to this.

Respectful Concise Supportive
Brian Boyle avatar

Hi Wei Hao,

No both were done using the method outlined above. Initial field processing in PI → Mosaicing in APP → stretching in PI.

I think James’ method will work even better. APP is still limited to about 25 frames, before it starts to scale down automatically and/or fail due to the astrometric solution over such a wide area.

Helpful Concise
Wei-Hao Wang avatar

Ah! I see. Then it’s interesting that APP works better for you (in terms of creating a seamless mosaic even after star removal).

I vaguely remember somewhere during the APP process, it warned me the mosaic is too big. But I didn’t check if it scaled the mosaic down. If it’s the case (scaling down), then APP isn’t the best tool for big mosaics. We probably have to work completely in PI if we want to avoid reducing the image resolution.

Well written Respectful Engaging Supportive
Brian Boyle avatar

Wei-Hao Wang · Jul 16, 2026 at 02:26 AM

Ah! I see. Then it’s interesting that APP works better for you (in terms of creating a seamless mosaic even after star removal).

I vaguely remember somewhere during the APP process, it warned me the mosaic is too big. But I didn’t check if it scaled the mosaic down. If it’s the case (scaling down), then APP isn’t the best tool for big mosaics. We probably have to work completely in PI if we want to avoid reducing the image resolution.

I suspect APP isn’t ultimately the best tool for mosaics. But it is the best available tool I have found to date.

Nevertheless, I am in awe of what APP is currently able to do with mosaicing and only wish PI was half as good. In my experience it is not. I never had much luck with GMM. PMM is good, but tedious beyond belief to do more than a few frames. Also PMM does weird thing with field boundaries when images are rotated more than a few degrees with respect to each other.

APP is also a bit of a “black box” to me, but then again most software programs are. I feel were are getting closer to the perfect mosaicing programs - which must in some way also be driven by commercial requirements for the explosion in smart telescopes.

Well written Respectful Engaging
Peák Gergely avatar

I am not an expert on mosaics for sure but i have found that gradient mosaic is REALLY subpar to photometric mosaic. I have not had a single success with gradient and almost always seamless perfect with photometric. might worth a shot.

Wei-Hao Wang avatar

Peák Gergely · Jul 16, 2026 at 06:07 PM

I am not an expert on mosaics for sure but i have found that gradient mosaic is REALLY subpar to photometric mosaic. I have not had a single success with gradient and almost always seamless perfect with photometric. might worth a shot.

Hi,

I used to use photometric mosaic script a lot in the past. It worked quite fine, but not this time. If you click into the PDF file link in the first post, you will see that I included extensive tests with the photometric mosaic script. The conclusion is that it’s not better.