Author Topic: Mosiac Questions  (Read 6358 times)

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Mosiac Questions
« on: 2011 January 12 15:40:13 »
I had downloaded and looked at the video tutorials on using the Star Alignment tool for mosaics and am curious at what stage should this be done when the image is a RGB image. Should I be, in this case, making master frames of the 3 blue panels and make a mosaic blue master of the three and repeat for the red and green or make the fully assembled RGB images of the three panels and then create the mosaic? Is there a difference in what order? This will be my first attempt at a mosaic using PI and I'd like to give myself a fighting chance of getting it right....OK maybe close.

Thanks for any guidance,

Steve
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline Nigel Ball

  • PixInsight Addict
  • ***
  • Posts: 277
    • Astrophotography by Nigel
Re: Mosiac Questions
« Reply #1 on: 2011 January 13 03:12:40 »
Steve

I'll watch this thread with interest as I am about to do the same

Rogelio does a lot of these so hopefully he will chip in

Nigel
Nigel Ball
Nantwich, Cheshire, United Kingdom

Takahashi FSQ-106 at f/8, f/5 and f/3.6 on AP900, Nikon 28 mm and 180mm f/2.8
SBIG STL-11000M, Astrodon LRGB, 5nm Ha
ST-10XME, Astrodon HaLRGB
www.nigelaball.com

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Mosiac Questions
« Reply #2 on: 2011 January 13 10:59:49 »
Rogelio does a lot of these so hopefully he will chip in

When I use PixInsight's mosaic capabilities I always do it channel by channel, not doing the (L)RGB combine first. In some cases when I just couldn't get things to match seamlessly (due to bad field-flattening, unresolved gradients, etc) I have resorted to do the whole LRGB combine on a per-frame basis (with PixInsight) and then stitch them as RGB images, but in those cases I have only used PixInsight for image registration, do the actual stitching and seam work with Photoshop, and go back to PI once the mosaic is already seamless.

In general, you want to try building the mosaic by constructing the mosaic on each channel separately. I start with the luminance and when done, I register the R, G and B data over to the already built luminance, and build a whole R, G and B mosaics, so I end up with 4 "mosaics" already registered and all. It may seem more complex or time consuming, but it's not, and if things do match nicely, then once you have all your 4 mosaics stitched seamlessly, you can "start" the processing almost as if the project was never a mosaic in the first place.

Offline Nigel Ball

  • PixInsight Addict
  • ***
  • Posts: 277
    • Astrophotography by Nigel
Re: Mosiac Questions
« Reply #3 on: 2011 January 16 02:15:27 »
Thanks Rogelio

That gives a good starting point  :D
Nigel Ball
Nantwich, Cheshire, United Kingdom

Takahashi FSQ-106 at f/8, f/5 and f/3.6 on AP900, Nikon 28 mm and 180mm f/2.8
SBIG STL-11000M, Astrodon LRGB, 5nm Ha
ST-10XME, Astrodon HaLRGB
www.nigelaball.com

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Mosiac Questions
« Reply #4 on: 2011 January 16 07:06:30 »
So creating master mosaics of each channel and then combine as a LRGB and process from there. So any cropping that needs to be done would be done when the image is assembled and then go on with DBE, HDRW, Histogram Stretch and so forth. Makes sense, we just start off with much larger master frames. I'm not sure why I would have thought that this process would deviate from a basic routine. Thank you for the guidance.

Steve
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Mosiac Questions
« Reply #5 on: 2011 January 16 11:30:40 »
So creating master mosaics of each channel and then combine as a LRGB and process from there. So any cropping that needs to be done would be done when the image is assembled and then go on with DBE, HDRW, Histogram Stretch and so forth. Makes sense, we just start off with much larger master frames. I'm not sure why I would have thought that this process would deviate from a basic routine.

Um, not exactly. At least I do apply DBE on individual frames before building the mosaic. If I don't do that, I will most definitely have impossible to correct seams when putting all the subframes together, especially with the usually large FOVs I tend to shoot, where gradients are most definitely going to be there. In fact, often times, I apply the DBE, and when I stitch the subframes together, I notice I should have created a slightly different background model (due to differences across a seam), so I go back to the DBE at the subframe level, reapply (now better knowing the "defects" and try to correct them), and re-stitch to see if things have improved.

Also, before the DBE you would also need to crop "bad" edges on that particular frame (due to dithering, misalignment, etc) of course. But other than that, yes, I would defer any other processing to the point when the mosaic has been assembled for each channel.


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Mosiac Questions
« Reply #6 on: 2011 January 16 13:50:30 »
Quote
So creating master mosaics of each channel and then combine as a LRGB and process from there.

That can work. However, there are some caveats. Field curvature and other field distortions can be problematic, especially with wide field images. StarAlignment has limited capabilities to correct for local distortions because it uses triangle similarity to find star pair matches between the images being aligned. If you create separate mosaics for individual RGB channels, there can be problems to co-register the three mosaics due to slightly different distortions, especially near the overlapping areas. If this happens, you'll need to align the three mosaics with DynamicAlignment.

To minimize those risks and save two mosaic building steps, I'd implement the following workflow:

- Register the L, R, G and B images for each mosaic panel, using StarAlignment in normal "Register/Match" mode. Now we have four grayscale images for each panel.

- Compose an RGB image for each mosaic panel (using ChannelCombination). Now we have two images for each panel: one is RGB and the other is L (grayscale).

- Remove any residual gradients on RGB and L for each mosaic panel. This step is of crucial importance to achieve a seamless mosaic. The better you do here, the better the final result.

-  Build two mosaics with StarAlignment: one for RGB and a second one for L. Be sure to enable the frame adaptation feature in both cases. Now we have two "big" images: RGB and L. Note that both are linear images.

- Now we must register RGB and L, again with StarAlignment. Here we may have problems if there are differing local distortions, especially for wide field images. However, by building only two separate mosaics instead of four, we have minimized the risk, and in turn we have simplified the whole process. If RGB and L cannot be registered accurately on some locations of the mosaic (especially near mosaic seams), then DynamicAlignment must be used instead of StarAlignment. To detect possible registration errors, one may simply compute the absolute difference between both registered images with PixelMath (the expression is: A -- B) and carefully inspect the result. If you have to use DynamicAlignment, don't be scared by the fact that it's a semi-manual process; it is very easy to use and provides extremely accurate results in a few minutes.

- If you want to process the linear images (for example, apply deconvolution to the L image), do it now or forever hold your peace :)

- Now we have two registered (and possibly processed) linear images: RGB and L. Time to perform the LRGB combination. LRGB requires nonlinear (stretched) images, so you must apply the initial nonlinear histogram transformations to RGB and L at this point. Adjust the L image first, to the desired brightness and contrast. Then try to match the overall illumination of L when you transform RGB. Do it roughly by eye using the CIE L* display mode (Shift+Ctrl+L, Shift+Cmd+L on the Mac). Don't try to do a particularly accurate work here; we'll do much better in the next steps.

- Extract the CIE L* component of RGB with the ChannelExtraction tool (select the CIE L*a*b* space, uncheck a* and b*, and apply to RGB).

- Open the LinearFit tool (ColorCalibration category) and select the L image as the reference image. Apply to the L* component of RGB that you have extracted in the previous step.

- Reinsert the so fitted L* in the RGB image with the ChannelCombination tool.

- Now your RGB and L images have been matched very accurately. Use the LRGBCombination tool with them. You shouldn't change the luminance transfer function, neither the channel weights, as LinearFit has already done the matching job much better than anything you could do manually.

At this point, you have an optimally matched LRGB image, and the fun starts. I have borrowed the last steps to match RGB and L from another thread, where this method has been reported to give excellent results.

Let us know how it goes.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Mosiac Questions
« Reply #7 on: 2011 January 16 17:52:00 »
After reading Juan's workflow one thing came to mind...

Aligning and building mosaics for each channel separately usually works pretty well when the number of subframes is not too large (2 to 6) but after that, it becomes increasingly difficult. I'm not saying it cannot be done, but I have never built a mosaic by building separate channels first when the mosaic had more than 6 frames.


Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Mosiac Questions
« Reply #8 on: 2011 January 16 17:54:56 »
-  Build two mosaics with StarAlignment: one for RGB and a second one for L. Be sure to enable the frame adaptation feature in both cases. Now we have two "big" images: RGB and L. Note that both are linear images.

FWIW, I have had better luck by building the L mosaic, then registering the RGB subframes to the L, rather than building two independent mosaics then aligning one over the other.

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Mosiac Questions
« Reply #9 on: 2011 January 17 02:43:02 »
Hi Steve,

I would attempt a mosaic assembly always by merging first the RGB images for each panel. This way you have only one mosaic instead of three. In the case of a LRGB composition, I would go with the steps Juan suggested.

Quote
- Extract the CIE L* component of RGB with the ChannelExtraction tool (select the CIE L*a*b* space, uncheck a* and b*, and apply to RGB).

- Open the LinearFit tool (ColorCalibration category) and select the L image as the reference image. Apply to the L* component of RGB that you have extracted in the previous step.

- Reinsert the so fitted L* in the RGB image with the ChannelCombination tool.

- Now your RGB and L images have been matched very accurately. Use the LRGBCombination tool with them. You shouldn't change the luminance transfer function, neither the channel weights, as LinearFit has already done the matching job much better than anything you could do manually.

This can be simplified :) :

- Extract the CIE L* component of RGB with the ChannelExtraction tool.
- Open the LinearFit tool (ColorCalibration category) and select the L* component of RGB that you have extracted in the previous step as the reference image. Apply to the L image.
- Insert the fitted L image in the RGB image  with the ChannelCombination tool.


Best regards,
Vicent.

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Mosiac Questions
« Reply #10 on: 2011 January 17 06:52:33 »
I think I have a better understanding of this now. I'm anxious to give this a try as soon as I get some data on a small mosaic, a 2 or 4 panel to start with. Thanks for the replies and guidance.

Steve
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Mosiac Questions
« Reply #11 on: 2011 January 17 06:57:54 »
Steve,

You're welcome. Good luck with your mosaic and let us know how it goes, or if we may assist you further.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Mosiac Questions
« Reply #12 on: 2011 January 17 07:01:58 »
Quote
This can be simplified

Ah yes. For some reason I always tend to think that lightness provides the reference of brightness and contrast for the LRGB image, but you're right: L can be adapted to RGB and this saves us from re-inserting L(RGB) into RGB. Good point! :)

Anyway this L and RGB adaptation will be implemented in the next version of the LRGBCombination tool, so the process will be automatic.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/