Author Topic: Problems with mosaic  (Read 6780 times)

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Problems with mosaic
« on: 2015 August 14 07:04:58 »
I'm struggling with creating a mosaic and would love some insights and help ;)

It's a 3 panel mosaic of the LMC (wasn't able to finish it, was supposed to become a 2x3;))
I have no problem aligning the frames and to use the GradientMergeMosaic, but am struggling to get the color/intensity of the frames to match.
Somehow the middle frame is of different color and intensity, no matter how I try to correct the color before creating the panel and
using the dnaLinearFit script after.

This is what I'm getting as a result;



I've uploaded the initial stacked frames and the Panels here in case someone is willing to try the data out;
Tarantula mosaic frames

Any suggestions?
« Last Edit: 2015 August 14 10:20:07 by chrisvdberge »

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Problems with mosaic
« Reply #1 on: 2015 August 14 07:32:35 »
For those having problems with Chris's link try this. https://www.dropbox.com/sh/xnfr1jjbtn3v9wm/AADet87-NoZZM3VtDg8MOXaha


Mike

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: Problems with mosaic
« Reply #2 on: 2015 August 14 10:20:31 »
thx.. fixed the link.
Also the img url seems to have changed(?) ..

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Problems with mosaic
« Reply #3 on: 2015 August 14 15:40:49 »
Chris


I'm not sure why your image sections are so different. I did something a little different. For simplicity I didn't do any DBE or noise reduction I just wanted to see if I could equalize the images and join them in something that looked better.

I first used AutoHistogram with Rational Interpolation on your original images. I then re-sampled to a lower resolution for quicker processing. Then I used Image Solver, Mosaic By Coordinates and Gradient Merge Mosaic. I then used Curves, Histogram Transformation and SCNR for color and contrast. Finally re-sampled again for uploading here.


Mike

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: Problems with mosaic
« Reply #4 on: 2015 August 15 00:30:33 »
That actually looks great! thx for having a go at it.
So you're not merging in the linear stage. That's something I'll try. Thx!



edit: it's early.. lol
« Last Edit: 2015 August 15 00:37:58 by chrisvdberge »

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Problems with mosaic
« Reply #5 on: 2015 August 15 02:24:54 »
Chris

I would prefer to combine while linear but I do like how well Autohistogram seems to equalize some images. You could try playing with setting the target median value to be somewhere close to the median value of your linear images panels. I've only used it for the actual stretch and then combine in the past. I generally do a full BN and CC before using it. Since I just wanted to see the basic result for your image I did not.

By the way, a wonderful image. If you don't mind I might need to do a real processing of this and use it as wallpaper for my computer. Just spectacular.

Mike




Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: Problems with mosaic
« Reply #6 on: 2015 August 15 03:25:19 »
Thx Mike, that's indeed what I tried to do right now (the median value of one of the subs)
Feel free to process the data to your liking, but please post it or send it to me as well. Would love to see the comparison as to what you are getting out of it.

The image didn't get as much integration time as I'd have wanted because of the fact that LMC was rising really late and was already suffering from the zodiacal light (!) . I had planned to do another 3 panels next to these, but only managed to get 1 of them as the last 2 nights of my stay in Namibia were clouded out. Ah well, will be a nice target for next year ;)

Offline dnault42

  • PixInsight Addict
  • ***
  • Posts: 125
Re: Problems with mosaic
« Reply #7 on: 2015 August 15 08:23:23 »
Chris,

My dnaLinearFit script only works on monochrome data at the moment, that might be part of the problem.  I would go with Mike's suggestion for now, which you can do easily with PixelMath like this, where ref is the reference image:
iif($T>0, ((mean(ref)-med(ref))*$T + mean($T)*med(ref) - mean(ref)*med($T))/(mean($T)-med($T)), 0)

This uses the mean and median of two images as points on a line and adjusts the target image so that it's mean and median match the reference.  This is what my script does in mean/median mode, except that it only uses the pixels that are non-zero in both images to determine the mean and median of each.  It's that last part that makes my script useful for mosaics.  It also keeps pixels with a value of zero as zero which GMM needs.

I will update my script to handle color channels soon.

Regards,
David

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: Problems with mosaic
« Reply #8 on: 2015 August 15 11:05:30 »
Thx a lot for the clarification!
Still having some challenges with getting rid of the star deformations in the mosaic, but this is definitely helping in getting the images (more or less) equal in terms of intensity/color

Offline dnault42

  • PixInsight Addict
  • ***
  • Posts: 125
Re: Problems with mosaic
« Reply #9 on: 2015 August 15 13:21:00 »
Yeah, that PixelMath expression won't get it perfect because it's using the whole image mean and median rather than just the areas that are common.  For the star deformations I typically crop out the stars that are causing issues.  I do the crop on the frame where the star is closest to the edge.  I do this in PixelMath as well:
iif(x()>xlow && x()<xhigh && y()>ylow && y()<yhigh, 0, $T)

Where xlow, xhigh, ylow and yhigh are the coordinates around the star.  I move the mouse around in the image and use the x,y values on the bottom control bar to mark the bounding coordinates.  You need to make sure that the area around the star extends to the edge that it is closest too, otherwise you'll get a black square whole in the middle.

It should looks something like this:


Regards,
David

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Problems with mosaic
« Reply #10 on: 2015 August 15 14:11:06 »
David


Thanks! One more icon for the workspace.


Mike

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: Problems with mosaic
« Reply #11 on: 2015 August 17 05:31:51 »
That's very helpful!
As for the color/intensity. I still can't get it good enough to have a seamless mosaic, but maybe this will help + further cropping of the frames (they have a lot of overlap anyways).
I'll give it another try later this week :)

Offline dnault42

  • PixInsight Addict
  • ***
  • Posts: 125
Re: Problems with mosaic
« Reply #12 on: 2015 August 17 19:22:03 »
I've updated my dnaLinearFit script to deal with color channels.  You can download it from here.

It will now also support mismatched numbers of channels between frames.  So you can linear fit all channels in a color image to a reference image, for example an RGB image to a luminance or Ha frame.  If you have two color images it will linear fit red to red, etc.

Regards,
David

Offline chrisvdberge

  • PixInsight Addict
  • ***
  • Posts: 104
Re: Problems with mosaic
« Reply #13 on: 2015 August 18 12:06:57 »
Great work David! That sounds really good. I'll try it out later this week!

Offline joelshort

  • PixInsight Addict
  • ***
  • Posts: 260
    • Buckeyestargazer.net
Re: Problems with mosaic
« Reply #14 on: 2015 August 30 17:48:01 »
David,
Great work on the dnaLinearFit script. 
In creating the mosaics I'm dealing with a couple of annoying stars that despite everything still leave black holes around them.  Isn't there an easier way to crop out those stars prior to mosaic creation than using the pixelmath expression you outline above?  Sort of a reverse dynamic crop?  Using pixelmath is laborious...
Joel Short
www.buckeyestargazer.net
CFF135 f6.7, SV80ST, G3-16200M, QHY163M, QHY183M