Skip to main content

No project description provided

Project description

AddNoise

AddNoise generates film like noise or other effects (like rain) by adding random noise to a video clip. This noise may optionally be horizontally or vertically correlated to cause streaking.

Original https://github.com/HomeOfVapourSynthEvolution/VapourSynth-AddGrain ported from AviSynth plugin http://forum.doom9.org/showthread.php?t=111849

ref type=0 type=1 type=2 type=3 type=4

Installation

pip install vsnoise

Or Releases for Windows builds

Then it can be used normally

import vapoursynth as vs
vs.core.noise.Add(...)

Usage

noise.Add(vnode clip[, int type=0, float var=1.0, float uvar=0.0, float hcorr=0.0, float vcorr=0.0, float xsize = 2.0, float ysize = 2.0, int seed=-1, int constant=False, int every=1, int opt=0])
  • clip: Clip to process. Any format with either integer sample type of 8-16 bit depth or float sample type of 32 bit depth is supported.

  • type: Type of noise.

    • 0 = Gaussian
    • 1 = Perlin
    • 2 = Simplex
    • 3 = Fractional Brownian Motion over simplex
    • 4 = Poisson
      • Use var to control "sensitivity"
      • Should be used for intensity (Y for YUV) or RGB
  • var, uvar: The variance (strength) of the luma and chroma noise, 0 is disabled. uvar does nothing for GRAY and RGB formats.

  • hcorr, vcorr: Horizontal and vertical correlation, which causes a nifty streaking effect. Only for Gaussian noise. Range 0.0-1.0.

  • xsize, ysize: size of Perlin and Simplex noise. Less than 2 for Perlin may generate visible boundaries.

  • seed: Specifies a repeatable noise sequence. Set to at least 0 to use.

  • constant: Specifies a constant noise pattern on every frame.

  • every: Specify the period of frames for each noise pattern.

  • opt: Sets which cpu optimizations to use.

    • 0 = auto detect
    • 1 = use c
    • 2 = use sse2
    • 3 = use avx2
    • 4 = use avx512

The correlation factors are actually just implemented as exponential smoothing which give a weird side affect that I did not attempt to adjust. But this means that as you increase either corr factor you will have to also increase the stddev (noise amount) in order to get the same visible amount of noise, since it is being smooth out a bit.

Increase both corr factors can somewhat give clumps, or larger noise size.

And there is an interesting effect with, say, noise.Add(var=800, vcorr=0.9) or any huge amount of strongly vertical noise. It can make a scene look like it is raining.

Compilation

meson build
ninja -C build
ninja -C build install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vsnoise-1.1.tar.gz (295.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vsnoise-1.1-py3-none-win_amd64.whl (33.2 kB view details)

Uploaded Python 3Windows x86-64

vsnoise-1.1-py3-none-manylinux_2_42_x86_64.whl (37.5 kB view details)

Uploaded Python 3manylinux: glibc 2.42+ x86-64

File details

Details for the file vsnoise-1.1.tar.gz.

File metadata

  • Download URL: vsnoise-1.1.tar.gz
  • Upload date:
  • Size: 295.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for vsnoise-1.1.tar.gz
Algorithm Hash digest
SHA256 96c77c0f4a505a9c4e99cd1b845f5984e012c2ddad27730457592a7611e80139
MD5 18f10ad1a3735afdc4a5c690cc60a3aa
BLAKE2b-256 72ee687c32322cc686a004d94f40d07fb94514f91c7d9f2560275b995cb5ff0f

See more details on using hashes here.

File details

Details for the file vsnoise-1.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: vsnoise-1.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for vsnoise-1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 882ec60f057073ce06491f1e496782a348ad90b93969c507ccdf8346048286a6
MD5 1d310f6aba53df98fbc5c4ffba349451
BLAKE2b-256 4751ab4889cda83bdb56b098495b32ae6115b3d619584300697b1d0e3eb3530a

See more details on using hashes here.

File details

Details for the file vsnoise-1.1-py3-none-manylinux_2_42_x86_64.whl.

File metadata

File hashes

Hashes for vsnoise-1.1-py3-none-manylinux_2_42_x86_64.whl
Algorithm Hash digest
SHA256 24e42af79b5925edc80ebe98e61088deab4a1dd081a469591b51535069934fec
MD5 ea7a1a66579cfd010ac448d33b35e78b
BLAKE2b-256 0ba4959751703ad6c1ea3e0fda7e9d12e9cc293fc4a7ca030218908828c7384c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page