Skip to main content

Hysteresis filter as a VapourSynth plugin.

Project description

vapoursynth-hysteresis

Hysteresis filter as a VapourSynth plugin, with the same API as misc.Hysteresis() from vs-miscfilters-obsolete.

Description from vs-miscfilters-obsolete:

Grows the mask in clipa into the mask in clipb. This is an equivalent of the Avisynth function mt_hysteresis. Note that both clips are are expected to be in the typical mask range which means that all planes have to be in the 0-1 range for floating point formats.

Specifically, Hysteresis takes two bi-level masks clipa and clipb and generates another bi-level mask clip. Both clipa and clipb must have the same dimensions and format, and the output clip will also have that format.

If we treat the planes of the clips as representing 8-neighbourhood undirected 2D grid graphs, for each of the connected components in clipb, the whole component is copied to the output plane if and only if one of its pixels is also marked in the corresponding plane from clipa. The argument planes controls which planes to process, with the default being all. Any unprocessed planes will be copied from the corresponding plane in clipa.

Install

Via vsrepo:

vsrepo install hysteresis

Or manually on Windows: download a release from the Releases page and unzip hysteresis.dll into a plugins directory.

API

hysteresis.Hysteresis(
    clipa: vs.VideoNode,
    clipb: vs.VideoNode,
    planes: list[int] = [0, 1, 2]
)

Build

Rust v1.91.0-nightly and cargo may be used to build the project. Older versions will likely work fine but they aren't explicitly supported.

$ git clone https://github.com/sgt0/vapoursynth-hysteresis.git
$ cd vapoursynth-hysteresis

# Debug build.
$ cargo build

# Release (optimized) build.
$ cargo build --release

# Release build optimized for the host CPU.
$ RUSTFLAGS="-C target-cpu=native" cargo build --release

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

vapoursynth_hysteresis-1.1.3.tar.gz (15.1 kB view details)

Uploaded Source

Built Distributions

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

vapoursynth_hysteresis-1.1.3-py3-none-win_amd64.whl (189.3 kB view details)

Uploaded Python 3Windows x86-64

vapoursynth_hysteresis-1.1.3-py3-none-win32.whl (189.3 kB view details)

Uploaded Python 3Windows x86

vapoursynth_hysteresis-1.1.3-py3-none-manylinux_2_28_x86_64.whl (513.0 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

vapoursynth_hysteresis-1.1.3-py3-none-macosx_11_0_arm64.whl (159.0 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file vapoursynth_hysteresis-1.1.3.tar.gz.

File metadata

  • Download URL: vapoursynth_hysteresis-1.1.3.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for vapoursynth_hysteresis-1.1.3.tar.gz
Algorithm Hash digest
SHA256 f5a1d2a64eb23324f1f28b8bccf3910d1fd248657bdd57f8f1d1554850627eaf
MD5 f986424cf72d518710910cf2ff6444bd
BLAKE2b-256 8c94a695c807c23845158bf610ee01c259a1c88d534afa091195cedf98e1128c

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.3.tar.gz:

Publisher: publish.yml on sgt0/vapoursynth-hysteresis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_hysteresis-1.1.3-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for vapoursynth_hysteresis-1.1.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e2620e384b25d25d6ddc6a8ac8c56e86aae1b62985d52d19dd18e4818c417a3f
MD5 94b4bd074fd76c1ce5ce6819cdf43a9b
BLAKE2b-256 f568fd34bd5c1d8dbfddabdbdcca35aed95c2ec0f098ee91109b21045a8b0038

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.3-py3-none-win_amd64.whl:

Publisher: publish.yml on sgt0/vapoursynth-hysteresis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_hysteresis-1.1.3-py3-none-win32.whl.

File metadata

File hashes

Hashes for vapoursynth_hysteresis-1.1.3-py3-none-win32.whl
Algorithm Hash digest
SHA256 a14df00a0ae6855872bce8ca2a18ec07312ca272cfb40925b999f8db43f3271c
MD5 24031ff044512bfed750f4c43e592406
BLAKE2b-256 6897eccfa7c8c1fbf16d2e104e1402bf24ebc0b99436bd08f6d363b2088a22c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.3-py3-none-win32.whl:

Publisher: publish.yml on sgt0/vapoursynth-hysteresis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_hysteresis-1.1.3-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_hysteresis-1.1.3-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 888fbc231e45cfd830a14cbca0fae1c6d06f6472b5a17efaab4c58374bb98e34
MD5 0da9c95a1c8f35741543aa251a2bdcc7
BLAKE2b-256 2b1a215ee5296e4fb8c7f641e8a81ec0647e1dd345915e496087e6034bbd047b

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.3-py3-none-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on sgt0/vapoursynth-hysteresis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_hysteresis-1.1.3-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vapoursynth_hysteresis-1.1.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 714086aae456dbb0b800c8b5c1bfb4105136e4840057df45be29f928d919d421
MD5 cba4c527a6e221d024a5a2dfb8de235f
BLAKE2b-256 341b9ff58fb02b7de0f3672fe821b3c1ee06ff8d575680216a5b5c4a8e02d3bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.3-py3-none-macosx_11_0_arm64.whl:

Publisher: publish.yml on sgt0/vapoursynth-hysteresis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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