Author Topic: "non-traditional" use of GradientsMergeMosaic  (Read 3479 times)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
"non-traditional" use of GradientsMergeMosaic
« on: 2013 January 13 16:16:45 »
so yesterday i decided to try to merge in the M42/NGC1977 area from a 200mm widefield image into a 50mm widefield image of Orion. the M42 in the 50mm widefield was pretty blown out and colorless.

i cropped out just the M42 area and registered it to the 50mm image. i then struggled with pixelmath for a while, trying to get the blend right. but then it hit me - why not try GradientsMergeMosaic?

so i did that, and the result looks great (though a bit funny due to the higher resolution of m42 + the original had undergone MT and so the star profiles don't match). still, zoomed out it looks much better than the original.

however, the resultant image is a bit desaturated - the bright stars from the original image have lost their color. perhaps this is a result of the black background surrounding the crop of M42.

attached is a closeup of the blend. looks great aside from the FHWM/resolution mismatch.

http://www.flickr.com/photos/pfile/8377462056/

does it make sense to fill the cropped image with, say, the median value from the 50mm image instead? or is this just unavoidable due to the algorithm involved?

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: "non-traditional" use of GradientsMergeMosaic
« Reply #1 on: 2013 January 14 11:10:58 »
Hi,

I am using  GMM as a debloomer in http://pixinsight.com/forum/index.php?topic=5023.msg34770#msg34770, basically pasting neutral data into bloomed areas. What you are apparently doing is pasting an actual image into overexposed areas, something that is perfectly legal - no "painting" involvled. GradientHdrComposition would also be an option, but I am not sure how well it works on non-linear data. In general, GMM can be used to inpaint anything into something else. I guess some of the selfhealing brushes of other programs work similarly.

I also noticed that sometimes the result of GMM seems to loose contrast/saturation. In my opionion, this is because GMM usually removes extreme values at either end of the scale (0=black background: gone after GMM, bright stars: often go away because of feathering). One of the last commands of the GMM implementation is Rescale(), which basically restretches the image to the range [0,1]. This usually causes bright parts of the image to be in a flat region of the STF, causing low contrast and low saturation. In reality, the  data is still as linear as it was before. That's my theory, but I did not thoroughly investigate it.

Maybe this bit of the GMM needs a re-design to preserve the original appearance as much as possible.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: "non-traditional" use of GradientsMergeMosaic
« Reply #2 on: 2013 January 14 14:28:07 »
thanks for the reply georg. so i guess then the pixel values of the "non-active" area of the M42 image do not matter then?

i wonder if it makes sense to mask off the rest of the image while doing the GMM. i'll have to do some experiments.

rob

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: "non-traditional" use of GradientsMergeMosaic
« Reply #3 on: 2013 January 15 01:59:24 »
Rob,
feel free to do experiments, and report your results. I have the intention to do a GMM2.0 later this year, based on what we learned so far.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)