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.2.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.2-py3-none-win_amd64.whl (189.2 kB view details)

Uploaded Python 3Windows x86-64

vapoursynth_hysteresis-1.1.2-py3-none-win32.whl (189.2 kB view details)

Uploaded Python 3Windows x86

vapoursynth_hysteresis-1.1.2-py3-none-manylinux_2_28_x86_64.whl (512.8 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

vapoursynth_hysteresis-1.1.2-py3-none-macosx_11_0_arm64.whl (158.8 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vapoursynth_hysteresis-1.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 8093156ac535bc6aeaafb4cd5787d7426bd8989d62232d6a53f2a67a66e8f7c2
MD5 4c45ad9882232783bfd6f35d26036a9f
BLAKE2b-256 4fdadb0fe00bdcd49e083be641048a76d450ec54c6433d7813e117f9190fd6e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.2.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.2-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for vapoursynth_hysteresis-1.1.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1ff586230f7150cda8c2c33ac45ff856e78bfc000d2b59714170fe39b77e218f
MD5 e607ab8f1f44ccaaac621dc88e0d9749
BLAKE2b-256 43a2f80d036b2a95a566f6250fb5cd77cb5599667ce7c0696815870b56c1d380

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.2-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.2-py3-none-win32.whl.

File metadata

File hashes

Hashes for vapoursynth_hysteresis-1.1.2-py3-none-win32.whl
Algorithm Hash digest
SHA256 26119e2fa918235889eb7993954990f09a8bd30192544820acdd817d798528a3
MD5 e8b121a012cc75199b2a86f28cae94dd
BLAKE2b-256 24b2d6e3ca0b23dea5eda2687bff88df28bfa362bbe02ab20fd0b8e0345b45d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.2-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.2-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_hysteresis-1.1.2-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fe784a7d3f83848f648f491c2e30e867b1638f0e24342c494fdb9743f464f30b
MD5 f35e016267c69d1edf3409af086298ed
BLAKE2b-256 3de3f928d75eb88903389dfaaebca59b58629308e0556fdf88199c2745bbe043

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.2-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.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vapoursynth_hysteresis-1.1.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c277bc208bd973fcdb62010c4dd65088598caec49bf7563e8940fe742a5ced54
MD5 20270db573cebe7d51734a697621bb7f
BLAKE2b-256 5bf91de3ed4d06adf0bc62dda7e141a11909858a7d29a1945617fee9727972bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_hysteresis-1.1.2-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