Author Topic: Building First Mosaic - Several Failures in SA and Gradient Merge Tool  (Read 9781 times)

Offline Hytham

  • Newcomer
  • Posts: 29
Good Day/Afternoon/Evening Everyone.

I am building out my first mosaic composed of 4 panes, but having some odd issues with it.

Initially I had some trouble registering each image into the larger mosaic using "Register/Union - Mosaic" but after reading the SA documentation, the preview option came in handy (even though I integrated a 20% overlap into each pane) and only then was I able to move onto the 2nd step; SA's "Register/Match - Images".  I can also complete this step with success only by using previews.  One other thing I have noticed is that I had to disable frame adaptation for the images to match brightness and contrast.  If I kept this option active, the frames were wildly different from one another and the final image is useless.

Going through the various iterations of testing, I'm noticing that each time SA registers one of the panes against the mosaic, the dx/y and degrees are always different for the same pane.  How is this possible??  Should it not be the exact same considering I'm using the very same panes that have not been modified between each iteration of "Register/Union - Mosaic" or "Register/Match - Images"?  Is the difference based on the field of view the preview covers for each pane in each subsequent trial iteration I have performed?

The other problems that I'm seeing arises when using the "Gradient Merge Mosaic" tool.  No matter what adjustments I use on the shrink radius or the feather option while overlay or average are selected I see some very odd artifacts that appear where the panes intersect after the Gradient merge mosaic tool has run its course.  These are not at all present in the Mosaic'd image after "Register/Union - Mosaic" has completed.  It looks exactly like what would happen if the image never correctly registered itself with the referenced frame which corresponds to my statement above - the differing results of degrees and dx/y outputs I'm experiencing.

Images:

Artifacts on seams of after gradient merge mosaic tool:



Different contrast/brightness for each frame when frame adaptation is selected:


Thoughts are most certainly welcome... I definitely want to get my first mosaic done :)

Thank you!








Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
If the articfacts that you see with GMM are the duplicate stars: it appears your registration is less than perfect. You since your images seem to ne widefields, you probably have lens distortions. You will need to handle these to get proper mosaics.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Hytham

  • Newcomer
  • Posts: 29
Thank you, Georg.

What I fail to understand is that the pre-GMM mosaic is fine without this oddity.  If the optics on the Tak are at fault, I should see this previous to the application of the GMM...

I'm betting it is the registration of the GMM that is poor.

I guess I'll just have to try Registar to correct the failure I'm seeing.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
...I'm betting it is the registration of the GMM that is poor.

GMM does not do any registration. Your images need to be properly registered before using GMM. GMM also does not do any warping or bending of the images, it just adds or subtracts brightness values to pixels  to make seams disappear.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi,

Quote
I am building out my first mosaic composed of 4 panes, but having some odd issues with it.

The latest version of StarAlignment should have no problems to build this mosaic with local distortion corrections enabled.

However, we cannot help you without working with your images. If you upload the mosaic frames, we'll try to build the mosaic, and hopefully we'll discover where the problem is. Without access to the data, it is completely impossible for us (except in trivial cases) to know what happens in problems like this one.

Quote
I'm noticing that each time SA registers one of the panes against the mosaic, the dx/y and degrees are always different for the same pane.  How is this possible??

Because StarAlignment uses the RANSAC (RANdom SAmple Consensus) algorithm to implement a robust star matching routine. Random sampling can lead to slightly different registration solutions due to differences in the sets of star pair matches used to build a registration model. The differences can be more visible in some cases due to a number of factors (too few stars detected, wrongly used star detection and/or star matching parameters, etc.). Within normal working conditions, all RANSAC models are equally correct numerically.

Quote
SA's "Register/Match - Images"

Here we have a small hint on what is happening. You should use one of the mosaic working modes to build a mosaic.

Quote
I guess I'll just have to try Registar to correct the failure I'm seeing.

Use what you want. I'm sure you'll find hundreds of forums and websites out there where you can get this doubt solved. However, this forum is for PixInsight exclusively.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Eddy Timmermans

  • PixInsight Addict
  • ***
  • Posts: 149
Hytham,

I wouldn't give up on PI too easy.
I used DSS a lot and it helped me really good.
But the results I get from PI are much better. The last sets of images were much better in PI than in DSS. And most of all, it makes you want to improve your subframes.
I didn't try Registax yet but I'm sure PI can do the trick, and maybe better.

Eddy

Offline Hytham

  • Newcomer
  • Posts: 29
Quote

However, we cannot help you without working with your images. If you upload the mosaic frames, we'll try to build the mosaic, and hopefully we'll discover where the problem is. Without access to the data, it is completely impossible for us (except in trivial cases) to know what happens in problems like this one.

I'm more than happy to upload the data to help with the troubleshooting.  If it helps someone solve issues in the future, then we all benefit.  I'll get working on uploading the data for you, or anyone to test it out. 

Quote

Because StarAlignment uses the RANSAC (RANdom SAmple Consensus) algorithm to implement a robust star matching routine. Random sampling can lead to slightly different registration solutions due to differences in the sets of star pair matches used to build a registration model. The differences can be more visible in some cases due to a number of factors (too few stars detected, wrongly used star detection and/or star matching parameters, etc.). Within normal working conditions, all RANSAC models are equally correct numerically.

Makes perfect sense.  Thank you.

Quote

Here we have a small hint on what is happening. You should use one of the mosaic working modes to build a mosaic.

Slight misunderstanding.  I do use SA's Register Union Mosaic module first to register all of the images and then move on to SA's Match Images module.

Quote
Use what you want. I'm sure you'll find hundreds of forums and websites out there where you can get this doubt solved. However, this forum is for PixInsight exclusively.

I wasn't being snarky at all, more of an out loud thought.  I would prefer to continue using PI as it has never given me any trouble in the past and I'm a proponent of its use for (astro)photography... this is my first real bump in the road and it's driving me nuts.

You did touch on one point that I never thought to enable and that is the "Distortion correction".  I'll give that a shot as I upload the data.

Thanks again for the help!

Offline Hytham

  • Newcomer
  • Posts: 29
Juan,

Taking a tip from your post, I enabled distortion correction, increased the residual to .030, left the iterations at default (20), and changed the distortion model to 2-D surface splines to account for the distortions in the field (Georg... I should been more attentive to your post!).

The result is a perfectly aligned mosaic without any of the improper registrations I had seen previously.  Thank you for that insight.

The problem that I'm now facing is during SA's register/match images working mode.  Only two of the frames are detected and can be registered to the mosaic.

I will PM you the link to my data.

Thank you

EDIT:  I also increased the RANSAC parameter to 8

Offline Hytham

  • Newcomer
  • Posts: 29
I was finally able to register the 4 individual panes against the mosaic to produce the necessary output for GMM to create the seamless mosaic. 

As is mostly the case with these sort of problems, the issue was in my hands and how I defined the physical construct of the previews to aid in registration of the individual panes to the larger mosaic during the register/match module.  Oddly enough (to me because I have not given it much thought and more reading is in order), the first two panes were detected without the need for definition of previews.

Now moving on to the next problem.  When running GMM using the registered output from SA's register/match images module, the brightness of each pane is wildly off, whereas the preceding output from SA's register/union mosaic (with frame adaptation now enabled) has near perfect brightness and near seamless output.  I am thinking a pixel math equation could be used to eliminate the remaining seams (if so, please do not post the equation, I want to figure that out on my own - need the thought exercise). 

I will post the output from SA's register union and GMM's output when I return home.

Something I never mentioned is that I did run DBE against the individual panes to remove any additive gradients prior to registration attempts. 

Offline Hytham

  • Newcomer
  • Posts: 29
Here is the output from SA's register/union mosaic module:


Here is the resulting output from GMM after using SA's register/match images to generate the registered panes to the mosaic:




EDIT:  Only now am I seeing the poor flat fielding.  I'll have to redo DBE against two of the frames.

« Last Edit: 2013 October 10 18:04:15 by Hytham »

Offline Tom OD

  • PixInsight Enthusiast
  • **
  • Posts: 88
Did you use Overlay or Average in GMM when you made the 2nd mosaic? I can see star issues at the top and bottom of the pic. If the SA Union mosaic came out without distortions then registering the frames to the base layer with the distortion ticked again should work. Overaly an help with this I have found.
Tom

Offline Hytham

  • Newcomer
  • Posts: 29
Did you use Overlay or Average in GMM when you made the 2nd mosaic? I can see star issues at the top and bottom of the pic. If the SA Union mosaic came out without distortions then registering the frames to the base layer with the distortion ticked again should work. Overaly an help with this I have found.
Tom

Hey Tom,

I used overlay with an extremely high feather. 

I made some more progress last night after I had re-run DBE with more carefully placed samples to create a fare more accurate flat field.  The subsequent output mosaic after SA's register/union was far cleaner - near perfect registration, with zero distortion alongside of excellent frame adaptation.  I love progress - no matter how painful.

Once that was taken care of GMM worked brilliantly at eliminating all of the seams and an evenly distributed background across all 4 panes, but the problem of distorted stars still exists after I run SA's register/match images module to generate to registered files for GMM.

The output from GMM is still distorted due to SA's registration phase.  I am using the exact same parameters as I did during the SA union mosaic module phase and will require on-going tweaking.

I am guessing that the problem is specifically related to the detection of the panes during registration.  For the two right most panes, no previews are required, but for the two on the left previews must be defined for the registration to complete.  Again, I'm thinking the definition of the previews are at fault because I'm not accounting for the centre of the mosaic where the distortion occurs.  I will end up using previews for each pane ensuring I overlap the common centre area to create a far more accurate map of the stars.

We'll see if that works :)

« Last Edit: 2013 October 11 08:46:53 by Hytham »

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hytham,

I have uploaded two videos to show you how I have built your mosaic. These are quick/dirty videos without sound and just a few annotations, but I hope they will help you:

http://pixinsight.com/videos/m45-mosaic/m45-mosaic-1.html

http://pixinsight.com/videos/m45-mosaic/m45-mosaic-2.html

There are other ways to generate this mosaic but I have preferred to follow a simple and direct procedure. Let me know if this solves your doubts.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
By the way, if you prefer to download the videos instead of watching them embedded, these are the links:

Part 1 (104 MB):
http://endor.uv.es/files/data/public/c07697.php

Part 2 (183 MB):
http://endor.uv.es/files/data/public/f67dca.php

Unfortunately, the final part of the second video (where I browse the mosaic to show it at full resolution) has some video compression errors (blame Final Cut Pro X...)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Tom OD

  • PixInsight Enthusiast
  • **
  • Posts: 88
Great videos Juan,
At first I didn't know what you were doing with the crop tool, but I never knew you could set pixels to black outside the crop FOV. I tried just cropping before when making mosaics to remove some black areas, but the GMM would fail as the panes were of different sizes post cropping. I can't remember any of my school maths either for the sloped line.
I had issues before making miosaics, but with the new distortion and set pixels method I'll retry some old pics and see if I can improve what I was getting.
Tom.