GithubHelp home page GithubHelp logo

freezylemon / denoisemc Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 3 KB

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

License: MIT License

Python 100.00%
denoising vapoursynth vapoursynth-functions video-denoising

denoisemc's Introduction

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.

denoisemc's People

Contributors

freezylemon avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.