Skip to content

Run any temporal denoiser on motion-compensated frames, powered by MVTools.

License

Notifications You must be signed in to change notification settings

FreezyLemon/denoiseMC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

denoiseMC - Motion-compensated denoising, based on MVTools

This script requires MVTools.

def denoiseMC(clip, denoise_fn, radius: int = 2, search: int = 3, blksize: int = 16):

Parameters

denoise_fn is a function accepting one parameter (the video clip to denoise). Check the examples to understand how to use this parameter.

radius sets the temporal radius for motion compensation.

blksize sets the block size for MVTools' Analyse function. If blksize is 8 or larger, the motion vectors will be recalculated with blksize/2 to get finer results.

search sets the search mode for MVTools' Analyse and Recalculate functions.

Examples

Usage via defined function:

from denoiseMC import denoiseMC

def denoise(clip):
    return core.ttmpsm.TTempSmooth(clip, maxr=4)

# Make sure to set radius=4 so TTempSmooth can use maxr=4
denoised = denoiseMC(clip, radius=4, denoise_fn=denoise)

Lambdas are also possible:

from denoiseMC import denoiseMC

denoised = denoiseMC(clip, lambda c: core.ttmpsm.TTempSmooth(c))

How it works

This script creates a sequence of motion-compensated frames around each source frame, and then runs your denoising function on this sequence of frames. The motion-compensated frames are then discarded and only the (now denoised) source frame is returned.

About

Run any temporal denoiser on motion-compensated frames, powered by MVTools.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages