Author Topic: Creating mosaics - what am I doing wrong?  (Read 3563 times)

Offline bretm

  • Newcomer
  • Posts: 15
Creating mosaics - what am I doing wrong?
« on: 2013 December 25 11:47:14 »
I am trying to create a 3 panel mosaic, and I can't get rid of the gradients, and given the great results other people are getting I must be doing something obviously wrong.

I have posted some size reduced images that show the problem.

To get to this point, I
  • preprocessed the images (calibration, cosmetic correction, debayered)
  • registered the individual panels
  • integrated the individual panels
  • applied ABE to the individual panels
  • neutralized the individual panels
  • registered the individual panels so a synthetic star field with distortion correction applied
  • attempted to combine the panels using image integration, gradient merge mosaic in both overlay and average mode

I cannot figure out how to put registration with "frame adaption" into the workflow even though it is recommended -- it does not seem to make sense with the synthetic star field, and if I try to re-register the star field registered images using frame 2 as the reference, the black areas are not ignored so the other two panels get their results adapted to basically nothing.

I realize the I need more exposure and that the individual panels need work (there are still visible satellite traces, etc.) but this is a mosaic experiment so I'm not worried about those things unless they are affecting the mosaic.

You can find the input files (registered to the synthetic star field) in the 1-input directory, and see the 3 integration results in the 2-integrated directory here: https://www.dropbox.com/sh/wkpy8yutrmfzeuu/NIbManN-Qw

Any suggestions would be greatly appreciated.

Bret

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Creating mosaics - what am I doing wrong?
« Reply #1 on: 2013 December 25 15:08:18 »
i am working on the same thing.

i found that on narrowband images with the FOV that i have, DBE or ABE on the individual panels did more harm than good. the calculated gradient was false and this led to mismatches in brightness along the edges of the frames. this might not apply to your images if they are RGB or there are just super-awful gradients in them.

as you point out, frame adaptation will only work when registering against other images, not the synthetic field.

one thing that i tried was to register each pane to the synthetic field, then crop them back down - the idea being that i could remove distortions from the individual panes that way. then i made a mosaic out of the re-registered panes in the traditional way, building them up frame by frame with frame adaptation turned on.

however, i found that if i stretched my synthetic star field and applied it as a mask, i could see that the stars in the mosaic did not line up everywhere. i think my mistake was using Projective Transformation when doing the initial registration - despite turning on distortion correction i think i needed the 2d splines to properly undistort the panes.

so then i cheated and registered the built mosaic to the synthetic star field with 2d splines and distortion correction turned on. masking the result showed that the stars all lined up nicely.

3 registrations is bad, but that mosaic was supposed to be a reference for creating the images necessary for GradientsMergeMosaic, so i think it's okay.

so with that mosaic as the reference, i created the 4 images needed for GMM, from the original, unregistered panes. here frame adaptation, 2d splines and distortion correction were turned on in Register/Union - Separate mode. unfortunately i seem to have hit a bug because the 4 images have different sizes. they are all very near the reference mosaic size, but not exactly, and GradientsMergeMosaic does not know what to do.

so i'll probably open another thread about that.

rob

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Creating mosaics - what am I doing wrong?
« Reply #2 on: 2013 December 25 16:53:13 »
okay, i took a look at your data. DBE or ABE is a must here due to the gradients, and i think your individual frames need a lot of work on that front. more than you've already done. it is a very difficult area to do background subtraction because of all the dust in the area, but i guess you have no choice but to try.

also frame adaptation is pretty important so i think if you want to use the synthetic star reference you need to first build a mosaic which is registered to that reference as i was describing, then do frame adaptation against the new mosaic while creating the 3 files for GMM.

i think a further complication here is the large halo around altinak. this is probably throwing off the scaling in frame adaptation between the top and middle frames. you may have to resort to pixel math to adjust the brightness of the 2nd frame. a strategy here is to define previews over similar background areas in both images and check the statistics. divide the medians by one another to get the scaling value and use that in pixel math.

anyway i had to clip this kind of hard to cover up the brightness issues in the seams. and i hit the problem again where one of the 3 panels was not the same size as the other two. this seems to be some kind of rounding error somewhere in StarAlignment because it seems to follow the size of the reference mosaic (mine is pretty huge.)

rob


Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Creating mosaics - what am I doing wrong?
« Reply #3 on: 2013 December 26 07:59:20 »
Am by no means an expert, having done 1 mosaic, with a much simpler subject, but with 3 images:



However, I had very similar problems.  Eventually I solved the gradients problem by using masked stretch to get the same median levels on the images in non-linear form.  I did the DBE on individual RGB channels in linear before combining the images to RGB. 


Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline bretm

  • Newcomer
  • Posts: 15
Re: Creating mosaics - what am I doing wrong?
« Reply #4 on: 2013 December 28 21:33:09 »
I spent some more time experimenting with mosaics, and it seems that for the gradients I'm getting, I get better results splitting the  R, G and B components and using DBE to remove the gradients and then recombining them.

I am attaching a small version here, and you can see a larger version at http://www.astrobin.com/69879

Bret

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Creating mosaics - what am I doing wrong?
« Reply #5 on: 2013 December 29 15:07:51 »
yes splitting the channels can help when the gradients vary wildly. it might make sense to do 3 separate DBEs, then combine, then do a final DBE.

your latest looks much better!

rob

Offline bretm

  • Newcomer
  • Posts: 15
Re: Creating mosaics - what am I doing wrong?
« Reply #6 on: 2013 December 29 15:13:42 »
Rob.

I encountered the different image size issue you reported in your first response while doing this iteration. In order to align things, I made a temporary mosaic, and I found that if I use the crop tool to add 10 pixels to all 4 sides of that image, the "different size" problem went away.

Hope that helps,

Bret

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Creating mosaics - what am I doing wrong?
« Reply #7 on: 2013 December 29 15:31:48 »
thanks - that is what i ended up doing yesterday, but i was fooled when it did not work initially. i must have miscalculated how much of a border to add... at least twice. eventually i got it.

when the reference is too small even by a little bit, the resulting mosaics are sometimes wildly bigger than they should be so i assume there is a bug there. i'm working with a mosaic that's quite large though and i think the error is more pronounced the larger the reference frame is.

also probably it would help if SA had a mode where it crops the output to the size of the reference frame.

i need to go back and crop my source images, then try using Andres' new MosaicByCoordinates script + GMM.

rob