Jaded-Encoding-Thaumaturgy / vs-denoise

VapourSynth denoising, regression, and motion compensation functions
MIT License
18 stars 6 forks source link

Add Bilateral prefilter #44

Closed LightArrowsEXE closed 1 year ago

LightArrowsEXE commented 1 year ago

Bilateral filtering is useful for stuff like handling halos and the like, and since Prefilter is used by vsdehalo, it seems like a good call to add it here.

I propose two implementations: 1) Regular bilateral.

This is simply calling bilateral without doing anything special.

2) Double bilateral call, with one being passed to the second call as a ref clip.

This helps better preserve edges. See vsdehalo.bidehalo for reference. The idea is that you're doing two bilateral calls: the first call has a strong sigma/radius, and the second has a weaker sigma/radius. Ask zastin for more information, as he came up with this.

I think this is useful primarily for dehaloing operations, or for cases where you have very dirty edges and other prefilters affect those too much. It might also not be a bad idea to make the 1st option a default for vsdehalo.HQDeringmod, as it's generally a lot better than other options.

Setsugennoao commented 1 year ago

Added in https://github.com/Irrational-Encoding-Wizardry/vs-denoise/commit/957131e1b3d2e1da5469d465debbd73052075d01