Author Topic: Problem with GradientMergeMosaic  (Read 9076 times)

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Problem with GradientMergeMosaic
« on: 2015 July 20 13:36:54 »
Attached is a result of using GradientMergeMosaic for a 6 panel mosaic.  Has anyone seen this before and, if so, what causes it and hopefully how to fix it.  I used Warren Keller's method from his DVD tutorials of first creating a template to create 6 registered panels to apply GMM to.  I used the red channel for the template as I only have R, G, B, & Ha.  Things were fine for the red channel but this is the green channel.  I have also included panels 3 and 5 which are the center right and lower right panels to show the level of detail in the individual panels.  I also had similar issues with the blue channel.  I have not yet worked on Ha.

Larry Phillips
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Problem with GradientMergeMosaic
« Reply #1 on: 2015 July 20 13:46:12 »
Seems like an artifact created at places were Images Meet and create an inbound corner. Can you cut your Images such that These corners Are avoided? To reproduce, i Would Need 2 Images that have this Problem aus fits (jpg does not work).
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: Problem with GradientMergeMosaic
« Reply #2 on: 2015 July 20 18:25:23 »
Georg, I would think cropping to eliminate the corners would be very tedious but I will give it a try.  I will put a couple of images in Dropbox tomorrow.

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Problem with GradientMergeMosaic
« Reply #3 on: 2015 July 21 01:43:38 »
Had similar challenges with overlapping areas in mosaics and had to cut away corners.

Cropping the corners can be done with PixelMath by simply creating a black rectangle or circle over the bad areas of the single mosaic piece.
PixelMath offers the processes:
maxd2rect     for rectangles at any place in an image  and
rdist              for circles at any place in an image

For example: 
to cut away a black rectangle at pixel position 150,210 (x,y) in the size of 100,80 (width,height) pixels
the Expression in PixelMath is:

d = maxd2rect(150,210,100,80); iif( d > r,gray, $T )
In the "Symbols:" line of Pixelmah you have to (!) enter:      d, r = 1, gray=0.0

Gerald

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: Problem with GradientMergeMosaic
« Reply #4 on: 2015 July 21 08:23:01 »
Gerald,

You are a PixelMath wizard!!

Best,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: Problem with GradientMergeMosaic
« Reply #5 on: 2015 July 21 10:22:32 »
Georg, here is the link to two adjacent images the same as I included as jpegs earlier:

https://www.dropbox.com/sh/zlxtanzratc54km/AAAGkjn9qyGlj-7L2AVVau0Ha?dl=0

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: Problem with GradientMergeMosaic
« Reply #6 on: 2015 July 21 11:02:35 »
Gerald, any tips on how to determine (accurately) the pixel positions and dimensions?  Or is it trial and error?  Does it need to be very accurate?

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Problem with GradientMergeMosaic
« Reply #7 on: 2015 July 21 11:53:36 »
Thats interesting. The artefact seems to be related to the step in one of the images, see screenshot. I have never seen this before, and need some time to think about this. I guess the artefact would disappear if we manage to remove this particular pattern from the image. Probably a script...
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: Problem with GradientMergeMosaic
« Reply #8 on: 2015 July 21 12:35:16 »
Georg, thanks for taking the time to look into this.  I tried Gerald's recommendation about cutting out parts but things were even worse.  I will await any other suggestions be for going forward.

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Problem with GradientMergeMosaic
« Reply #9 on: 2015 July 21 13:07:35 »
Gerald, any tips on how to determine (accurately) the pixel positions and dimensions?  Or is it trial and error?  Does it need to be very accurate?

Larry
With the Readout Cursor you find the pixel x,y Position  in your Image.
The dimension of the bad area you can also measure with the Readout Cursor.
The PixelMath expression i mentioned needs first the upper left x,y Position of the rectangle and second the
width and height in Pixels of the rectgangel. This can be done very precise if needed
Gerald

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Problem with GradientMergeMosaic
« Reply #10 on: 2015 July 21 13:34:25 »
Larry,

I think Georg hit the nail on the head as such. I cropped the right side by 50 pixels to remove the step. The result was clean. Now I need to go back and look at some of my old mosaics where I had some issues.


Mike

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: Problem with GradientMergeMosaic
« Reply #11 on: 2015 July 22 09:40:39 »
Mike, would you mind describing all the steps you performed after cropping the image?  I tried that and still have a problem.

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Problem with GradientMergeMosaic
« Reply #12 on: 2015 July 22 10:49:41 »
Sure Larry,

I used the Crop tool, not DynamicCrop. First you note the width of the image is 4068. Zoom in like Georg was showing. Next you place the cursor at the at the step in the A5 image. Look at the position readout. You will see it somewhere around 4019-4018 because of how zoomed in you are. Subtract that from the width. This is the 50 pixels number for the crop tool. In the crop tool enter -50 in the right selection box. Apply that to A5 and the A3 images. I then used the default settings in GradientMergeMosaic just like Georg.


Mike

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Problem with GradientMergeMosaic
« Reply #13 on: 2015 July 22 11:54:00 »
Larry

I went back and did an aggressive stretch to the cropped image I created and noticed some other artifacts. I don't think the cropping in this manner is the perfect solution but it does help a lot. You might have to do some cropping before alignment, just a thought. I also noticed that the A5 image appears to be not as focused as the A3. Don't know if this has any effect.

Here is your original images merged and the cropped images after stretching for the best central part of the nebula.



Mike

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: Problem with GradientMergeMosaic
« Reply #14 on: 2015 July 22 14:43:58 »
Thanks guys.  I will do more experimentation.

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona