Skip to content

Add The Perfect Filter - #180

Closed
Vestaia wants to merge 1 commit into
OpenTabletDriver:masterfrom
Vestaia:add-the-perfect-filter
Closed

Vestaia wants to merge 1 commit into
OpenTabletDriver:masterfrom
Vestaia:add-the-perfect-filter

Conversation

@Vestaia

@Vestaia Vestaia commented Sep 21, 2026

Copy link
Copy Markdown

The Perfect Filter

This is a semi-spectral latent space filter that performs noise rejection without smoothing. Note this version is structurally different from the original release, the following description will differ from the original post on reddit. This provides a filter with the properties

  • Zero smoothing, will not soften corners or slow inputs.
  • Substantially higher noise rejection than smoothing/averaging filters (Devocub, etc..) at the same latency.
  • Zero-latency mode while still achieving modest noise rejection (~50%).
  • Resistant to both input and output jitter

Filter concept (see my project page for full implementation details)

The filter establishes a latent space through construction of a symmetric matrix of the form

$$L = I + \sum_{m=2}^{M} \frac{D_m^{T}D_m} {\lambda_{\max}\!\left(D_m^{T}D_m\right)}$$

Where D_n are fininte differences operators of n'th order. This is then eigen decomposed through a Jacobian solver to produce transformation matrices

$$L = Q\Lambda Q^T, \qquad Lq_k = \lambda_k q_k$$

Mapping the input window (x) into the eigenbasis (latent space):

$$z = Q^T x, \qquad z_k = q_k^T x$$

Reconstruction using only the first (K) lowest-eigenvalue modes. This step rejects noise by only including low-order eigenvectors.

$$\hat{x} = Q_K Q_K^T x = \sum_{k=0}^{K-1}(q_k^T x)\,q_k$$

Validation

  • Tested successfully in OpenTabletDriver 0.6.7.
  • Release build targets .NET 8 and produces a single plugin DLL.
  • Non-tablet reports are passed through unchanged.
  • The plugin stops scheduled output when physical input becomes stale.
  • Licensed under SUL-1.0.

Release

  • Plugin version: 1.1.2.0
  • Minimum OpenTabletDriver version: 0.6.7.0
  • Release ZIP contains A.PerfectFilter.dll at its top level.
  • ZIP SHA-256: F6B8B6A07DC3FC0D97637CEB5292FD4487C91A06F439FC311D8E7663A2B4C36C

@Vestaia Vestaia closed this Sep 21, 2026
@Vestaia
Vestaia deleted the add-the-perfect-filter branch September 21, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant