Log in

View Full Version : Wavelet decomposition filter idea


TheProfileth
29th March 2012, 23:20
After seeing this http://registry.gimp.org/node/11742 and then realizing how vaguedenoiser worked I came up with an idea for a filter that would be very interesting if implemented.
The basic idea is that the image is decomposed into multiple layers based upon frequency.

The idea is that you use wavelets to decompose a frame into x amount of iterations each taking up a separate frame. You can then use/manipulate/filter any one or all of the decomposed frames and then recompose the image. Hopefully you should be able to decompose and recompile with little to no loss of detail, if you only apply the changes made within the decomposed frame to the sector that was decomposed in the first place then decomposition inaccuracy can be mitigated.
I want to be able to take a frame and essentially break it down into various wavelengths, separating the various wavelength decomposed images into different frames.

Here is an example atleast in theoretical terms
Note: just gonna say decompositions default at 1 being the original image

Number of wavelet decompositions 3
Frame 1: Original Image
Frame 2: Lowest frequency segments
Frame 3: Highest frequency segments


Number of wavelet decompositions 4
Frame 1: Original Image
Frame 2: Lowest frequency segments
Frame 3: Mid frequency segments
Frame 4: Highest frequency segments


Number of wavelet decompositions 6
Frame 1: Original Image
Frame 2: Lowest frequency segments
Frame 3: Low frequency segments
Frame 4: Mid frequency segments
Frame 5: High frequency segments
Frame 6: Highest frequency segments


Number of wavelet decompositions 8
Frame 1: Original Image
Frame 2: Lowest frequency segments
Frame 3: Low frequency segments
Frame 4: Lower Mid frequency segments
Frame 5: Mid frequency segments
Frame 6: Higher Mid frequency segments
Frame 7: High frequency segments
Frame 8: Highest frequency segments


Number of wavelet decompositions 10
Frame 1: Original Image
Frame 2: Lowest frequency segments
Frame 3: Lower frequency segments
Frame 4: Low frequency segments
Frame 5: Lower Mid frequency segments
Frame 6: Mid frequency segments
Frame 7: Higher Mid frequency segments
Frame 8: High frequency segments
Frame 9: Higher frequency segments
Frame 10: Highest frequency segments


You also could ask it to calculate a number of iterations but only output segments x,y and z because you know what you are looking for.
One possible usage would be wavelet decomposition to create high detail masks for denoising/sharpening. Hopefully this would give a lot more control than standard threshold based masking. Of course a threshold could be used in conjunction with the decomposed image allowing for specific targetting of regions.

Either way if possible higher bitdepths could be complementary to said system as they could increase the accuracy of the decomposition. A really competent debander could be fashioned out of this if not only for the masking accuracy but also because if done correctly you could isolate the segment of banding and then apply various methods of debanding/dither to it while keeping the majority of the actual scene intact.

Unfortunately as it stands, I can not code, so I am unable to implement this procedure nor do I know a possible way to. I also don't know much between the different methods/techniques of wavelet decomposition. However I would like to know what other people think about this, and if anyone knows if this would be even remotely possible.

wonkey_monkey
30th March 2012, 16:39
Looking at the linked page, that looks to be a lot like what my Fusion (http://forum.doom9.org/showthread.php?t=152109&page=2) filter does internally.

I'm not sure about this bit:

Number of wavelet decompositions 4
Frame 1: Original Image
Frame 2: Lowest frequency segments
Frame 3: Mid frequency segments
Frame 4: Highest frequency segments

How do you define "mid frequency" and "lowest frequency"?

Actually I've been considering a sharpening or denoising filter using my Fusion code...

David

wonkey_monkey
31st March 2012, 19:54
Here's what Fusion does to an image:

http://img96.imageshack.us/img96/9145/wavelets.jpg

It's not the same as that GIMP plugin - it reduces each level by 50% as a way of reducing time, memory usage, and complexity. But it should allow similar manipulations to be made (perhaps not by external scripts/plugins; internally those layers are all stored as float, so without rewrites there'd be a loss of accuracy).

David

pandy
10th April 2012, 17:27
After seeing this http://registry.gimp.org/node/11742 and then realizing how vaguedenoiser worked I came up with an idea for a filter that would be very interesting if implemented.
The basic idea is that the image is decomposed into multiple layers based upon frequency.

http://forum.doom9.org/showthread.php?p=1551989#post1551989

TheProfileth
11th April 2012, 06:42
http://forum.doom9.org/showthread.php?p=1551989#post1551989
Yes I am perfectly aware of this thread, the difference is how I want to be able to compile and recompile layers without quality loss and not just filter via low pass and half ass decompose the frame. I was actually first interested in the idea when you first brought it up in that thread.

pandy
11th April 2012, 13:32
My idea was to control various aspects of picture - DCT or FFT can be less useful to operate at some areas than wavelet - not only denoising.

Granit
12th April 2012, 03:06
Have a look at V.C Mohan's filters. Fquiver, I think, does what you want.
"http://avisynth.org/vcmohan/index.html"

pandy
13th April 2012, 17:58
Have a look at V.C Mohan's filters. Fquiver, I think, does what you want.
"http://avisynth.org/vcmohan/index.html"

http://www.amara.com/IEEEwave/IW_wave_vs_four.html

Granit
13th April 2012, 19:46
Alright, one learns as long as one keeps making mistakes...

On the topic I think I remember seeing a "frequency" filter mentioning “space”. I'll have a look through my archives and see what I'll find. Still, I'm quite sure someone already tried this.

*.mp4 guy
13th April 2012, 22:59
not just filter via low pass and half ass decompose the frame.

Ehm, wavelets approximate lowpass filters. On purpose. Additionally, wavelets are usually critically sampled via lifting operations, which you really don't want in this case. However without lifting and critical sampling, wavelets start to get quite slow and require a lot of precision when storing coefficients.

TheProfileth
15th April 2012, 03:01
Ehm, wavelets approximate lowpass filters. On purpose. Additionally, wavelets are usually critically sampled via lifting operations, which you really don't want in this case. However without lifting and critical sampling, wavelets start to get quite slow and require a lot of precision when storing coefficients.
Yeah I realized that after doing some research, still I really like the idea of being able to separate a frame into parts and being able to manipulate them and recombine them with ease. Then again maybe this sort of thing is too complicated to be easily implemented.