Author Topic: New to PI with a question about Wavelets  (Read 3560 times)

Offline luigis

  • Newcomer
  • Posts: 29
New to PI with a question about Wavelets
« on: 2012 March 10 04:57:12 »
Hi All,

I'm happy to joint the PI community.

I'm learning how to use PI for Multiscale processing.
I'm having a simple problem that is driving me crazy.

Let's say I have an image "I".
I use wavelets to extract the 128 pixel level I call this I_L (Large)
I calculate I_S = I - I_L
And I have also the small details.
If I do I_S + I_L I get the original image "I", eveything is fine.

But now I want to decompose I_L into two images too
so I use wavelets to extract the 128 pixel level from I_L and I call this I_VL (very large)
I calculate I_LS = I_L - I_VL

but now if I do I_LS + I_VL the result is not I_L, it is different.

So I decompose one image into two levels but I can decompose one of the levels into sub-levels.

So my questions are:
1) Why is this happening and what am I doing wrong?
2) How can I do what I want to do? (Decompose an image in 3 levels that added will result in the original image)

Thanks a lot for your help!

Luis

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: New to PI with a question about Wavelets
« Reply #1 on: 2012 March 11 14:26:15 »
Hi Luis, welcome to the forum.

What you are doing is ok. Do not rescalete when you add l_LS + I_VL and the result will be I_L

Saludos.
Alejandro.


Offline luigis

  • Newcomer
  • Posts: 29
Re: New to PI with a question about Wavelets
« Reply #2 on: 2012 March 11 14:44:33 »
Hi Luis, welcome to the forum.

What you are doing is ok. Do not rescalete when you add l_LS + I_VL and the result will be I_L

Saludos.
Alejandro.

Hi Alejandro,

I've tried without rescale when I add I_LS + I_VL but the result is still different. I'm getting crazy!  O0

Any ideas?

Gracias!

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: New to PI with a question about Wavelets
« Reply #3 on: 2012 March 11 15:25:31 »
Hi Luis,

I made a quick example. See the parameters in PixelMath

Original Image



Clone and apply ATWT to clone



Subtract from image



Clone the clone and apply ATWT to clone_clone



Substract clone_clone from clone



Now adding clone + clone_clone without rescalete



And add Image + clone but enable rescalate



Original image recovered



Hope this helps.

Saludos.
Alejandro.

Offline luigis

  • Newcomer
  • Posts: 29
Re: New to PI with a question about Wavelets
« Reply #4 on: 2012 March 11 17:45:56 »
Hi Alejandro,

Thanks! But I'm getting dizzy.

Why do you do l+l_clone twice at the end ?


I have an Image

I apply wavelets to obtain large structures
I substract the large structures from the original to obtain small structures

So I have Image = Small + Large (this works!)

Now why I can't do the same to "Large" ?

I apply wavelets to "Large" to obtain "Large_Large"
and I do Large_Small = Large - Large_Large

but now Large_Small + Large_Large <> Large  Why is this happening? why it doesn't work like with the original image? What is different?

« Last Edit: 2012 March 11 17:53:17 by luigis »

Offline luigis

  • Newcomer
  • Posts: 29
Re: New to PI with a question about Wavelets
« Reply #5 on: 2012 March 11 19:37:33 »
Now I think I got it working. Thanks a lot for your help Alejandro!
 :) :) :)