Author Topic: ExtractWaveletLayers - how are these recombined again?  (Read 4192 times)

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
ExtractWaveletLayers - how are these recombined again?
« on: 2015 December 20 08:46:44 »
How do you recombine the layers that are produced by the script ExtractWaveletLayers back to the original image. This assumes no processing has been done on those layers.

I was hoping to extract the layers, work on one or more layer then recombine them, or does it not work like that?

Tried adding in PixelMath with rescale on:
layer00+layer01+layer02+layer03+layer04+residual
but that does not work.

Thanks,

Mike

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #1 on: 2015 December 20 09:48:52 »
Mike

If you use Statistics and a linear image you will see that the extracted layers have been stretched. I think the confusion comes from the last sentence in the title box, "This script does not modify the target image." That is true the original image is not modified but the extracted images are modified from the original. I think the fact that this script is in the analysis category would point that the script was not intended to be directly used as an image manipulation tool. That is how I see it.


Mike

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #2 on: 2015 December 22 01:47:10 »
Thanks Mike,

I could have sworn I have seen somewhere that noise reduction could be done on a specific layer then added back. Maybe I remembered wrong.

Mike

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #3 on: 2015 December 22 06:47:12 »
Mike

Have you tried using MMT or MLT? You can extract a single layer by itself. I prefer MLT because I can get up to 16 layers to choose from and also choose between 'Linear' and 'Dyadic' layer control. The way I've used this in the past has been to make a clone of the original image. Extract the target layer from the clone. Subtract that layer from the clone using Pixelmath. Work on the extracted layer and then add that reworked layer back into the clone with pixelmath. I can then inspect the finished clone with the original.

Mike

Offline Warhen

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 490
    • Billions and Billions
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #4 on: 2015 December 29 08:07:28 »
Hi 'Mikes' ;>), The confusion Mike Oates may be that the script is often recommended to demonstrate the noise pattern throughout the layers, to inform how to apply wavelet-based NR. As the other Mike says, you won't get a good recombine and it's best not to actually operate on the split layers. 
Best always, Warren

Warren A. Keller
www.ip4ap.com

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #5 on: 2015 December 29 10:33:03 »
Hi Mike & Warren,

Yes I must be confused, doesn't take much! Thank you both for your replies.

Am I right in saying that if you use a wavelet process like MLT, if you just perform noise reduction on one layer, that is the same as separating out the layers, doing the noise reduction on that layer, then recombining. If it is, then what I was asking about is not needed.

Mike

Offline JoLo

  • Newcomer
  • Posts: 46
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #6 on: 2015 December 29 10:47:09 »
There are several multiscale processing techniques to split large and small image structure, process them separately, then recombine using PixelMath.  Here is but one example:  http://www.astro-imaging.com/Tutorial/PixInsight/M33/en.html.

Depending on the image, i will separate out layers, add saturation, contrast, sharpening, to one or more layers, then recombine.  I find it to work very well (again, depending on the image), although I don't use it for NR.

Joe
Orion Atlas
AT106
AT65
Canon 450D
Atik 314L+

Orion 12" Dob

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #7 on: 2015 December 29 11:03:12 »
Joe,

Fantastic, thank you, a great tutorial, which I now remember I have seen before and is probably where I got the idea from, but could not find it again!

Mike

Offline lucchett

  • PixInsight Old Hand
  • ****
  • Posts: 449
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #8 on: 2015 December 29 13:00:20 »
I went through the same issue a few months ago.
I realized that recombination works if you combine n_layers AND the residual.
the single levels don't seem additive.
So, if I need to work on a specific lavel I need to repeat the layer+residual iteratively
Also , it is important to use the rescale option in pixelmath.


Ciao,
Andrea

Offline Warhen

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 490
    • Billions and Billions
Re: ExtractWaveletLayers - how are these recombined again?
« Reply #9 on: 2015 December 29 16:50:37 »
...and yes Mike Oates, MLT, MMT, etc. are isolating structures based on their size in the individual wavelet layers, so no need to break the image up under general workflow. Multiscale techniques are a different story and they can be quite powerful. While complementary wavelets can in theory deconstruct and reconstruct an altered image, in practice you'll find that you can't always simply add them back together with PixelMath. There will be times that you'll have to alter the expression in a variety of ways to get a good recombine, depending on how much alteration has been done to the large scales, small scales, or both images. Try things like a multiplier (i.e. 2*image) to the weaker image or mitigating a result by adding the original image back in with the large and small scales (i.e. SS+LS+Original), re-scaled of course.   
Best always, Warren

Warren A. Keller
www.ip4ap.com