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.2.tar.gz (280.2 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.2-py3-none-win_amd64.whl (32.6 kB view details)

Uploaded Python 3Windows x86-64

vsnoise-1.2-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.2.tar.gz.

File metadata

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

File hashes

Hashes for vsnoise-1.2.tar.gz
Algorithm Hash digest
SHA256 8b261f1ab3e12048fcf8536278193c6a0d841b166efe8b58828ede2912ff29dd
MD5 a7ae08aa5ed5d9d43d7d572c3b480058
BLAKE2b-256 d8863b4855b8912bf4c6df02702fb8338c680963921fc2728eb6684ee54b3d04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vsnoise-1.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 32.6 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.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2f9ac1bb1d87b41f5e154a8ee02225d1f469b884402f9ab94af78449f516dc80
MD5 b866136112f3a01a9199ba6ac9dd9bfb
BLAKE2b-256 0a5f1d61e568029efc494ffb64feed987051a33bb66deeb152e7ad5a61f35648

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vsnoise-1.2-py3-none-manylinux_2_42_x86_64.whl
Algorithm Hash digest
SHA256 0bd968a3856e6a95196f63f48152e0378518b53fc862529e7f4a9ceb8558504e
MD5 fc2c79279684cacab5ea08e5b6b90ff4
BLAKE2b-256 7cfeecf1a3369d3eaa89bfc3ed9f38253f67c34957c3af5c1b02fd1d68f0854e

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