PDA

View Full Version : Need denoising advice


HymnToLife
20th March 2009, 00:12
Hi folks :)

As the title says, how would I go about denoising something like this (http://itsuki.fkraiem.org/stuff/spicy.orig.png)? (I'm also downscaling it to 1280x720 since it's very bad as is.)

Here's what I've tried so far:

Crop(0, 0, -2, -0)

FFT3DGPU(sigma=5, sigma2=5.5, sigma3=6, sigma4=7.5, plane=1)

Spline64Resize(width(last)*2, height(last)*2)
TurnLeft().SangNom(aa=255).TurnRight().SangNom(aa=255)
Spline36Resize(1280, 720)

LimitedSharpenFaster(edgemode=1, strength=175, overshoot=1, soft=20)
Toon(.6)

and here (http://itsuki.fkraiem.org/stuff/spicy.filtered.png)'s the result. A bit better, but I'm sure it can be improved.

Thanks for the help :)

Sagekilla
20th March 2009, 01:40
Looks pretty good to me. You can try dfttest, which tends to work very nicely on animated content. Also looks like they did a point resize 720x480 -> 1920x1080 conversion. If you're lucky, M4G might be able to write an appropriate convolution that would do a better job than Sangnom could on it. Probably save you quite a bit of processing too, since you'd just have to do FFT3D --> convolution --> Resize --> Sharpen --> Toon.

Also, try combining your crop and resize in one step (Spline64Resize(width(), height(), 0, 0, -2, 0)).

*.mp4 guy
21st March 2009, 04:31
The source was treated as interlaced, and then interpolated incorrectly.

you can fix this with:
converttoyv12().separatefields()
even = selecteven.lanczosresize(width, height, 0, -0.25, width, height, taps=7)
odd = selectodd.lanczosresize(width, height, 0, 0.25, width, height, taps=7)

average(odd, 0.5, even, 0.5)

However, because the source was interpolated from 1280*720 (you can downsize to 1280*720, then reinterpolate and lose nothing) you might aswell just use this and call it a day.
spline36resize(1280, 720)
The output of the above is very similar to your script, but obviously it will be much faster. If you want to do any processing to the video, do it all after it has been downsized to 1280*720, since operating on the larger source would be both slower and less efective, while not gaining you any accuracy, as it contains no additional information.

HymnToLife
21st March 2009, 23:48
Thanks to both of you for the advice. dfttest gives better results indeed. It's also slower since it doesn't run on GPU but everything has a cost. ^_^