GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — oneEuro filter: filtered poses are not rigid (the 16 values are smoothed independently) · Issue #766 · webarkit/jsartoolkitNFT

oneEuro filter: filtered poses are not rigid (the 16 values are smoothed independently) #766

New issue
Copy link
New issue
Copy link
Closed
#782
Closed
oneEuro filter: filtered poses are not rigid (the 16 values are smoothed independently)#766
#782
Copy link
Assignees
kalwalt

Description

@kalwalt
kalwalt
opened on Oct 31, 2026
Issue body actions

What happens

The tracker's oneEuro filter (src/tracker/filters/oneEuro.ts) gives all 16 pose values to one OneEuroFilter and smooths each value on its own. An average of rotation matrices is not a rotation, so a filtered pose's upper 3×3 drifts from orthonormal: its columns are no longer unit length or orthogonal, and its determinant moves away from 1. The renderer applies the result as a model matrix, so the content picks up a small scale and shear that follow the camera's motion.

The 'none' and 'native' filters keep the pose rigid.

Measured

Traces recorded with webarkit-studio's trace tools (webarkit/webarkit-studio#9), with @webarkit/jsartoolkit-nft 1.15.0. oneEuro.ts on master is the same file.

Filter Source Column norms of R det(R)
none / native Node build, static photo, 32 frames 1.0000 1.0000
oneEuro (0.0001, 0.01, warm-up 5) Node build, static photo down to 0.9995
oneEuro (same) browser, hand-held camera, 1452 frames, marker at 95–259 mm 0.9893 to 1.0007 0.984 to 1.000

The more the camera moves, the further the pose drifts: about 1% scale on a hand-held camera.

It also skews measurements built on the pose. Our trace diff read the hand-held trace as 5.6°/frame of rotation jitter, because acos((tr(AᵀB) − 1) / 2) assumes a rotation (a pose compared with itself gave 5.6°). After orthonormalizing, the real jitter is 0.06°/frame.

Expected

The filtered pose's R is a rotation: orthonormal, with determinant +1.

Possible fixes

  1. Smallest change: re-orthonormalize R after filtering (Gram-Schmidt on the columns, or the polar decomposition), and keep filtering the translation as now. This changes the filtered output slightly, so existing users would see poses differ.
  2. Proper fix: filter the translation as a vector and the rotation in its tangent space, so the step is log(R̂ₖ₋₁ᵀ Rₖ), as M4 step 4: One Euro filtering of the pose, with the rotation filtered in its tangent space webarkit#106 did for the nft-tracker. With the current package API this needs the lower-level step filter that Requirements for use as webarkit nft-tracker's One Euro core OneEuroFilter-ts#9 (item 5) asks for, or the module's own implementation.

Either way, a test could assert that every filtered pose has orthonormal columns and det ≈ 1 within a tolerance, on a moving sequence and not only a static one.

Related

  • Requirements for use as webarkit nft-tracker's One Euro core OneEuroFilter-ts#9: requirements for filtering a rotation in its tangent space (item 5).
  • M4 step 4: One Euro filtering of the pose, with the rotation filtered in its tangent space webarkit#106: One Euro on the rotation's manifold in the nft-tracker. It sets "every filtered R is orthonormal with determinant +1" as a requirement.
  • Proposal: data-oriented tracker API (configure / process → FrameResult) on ARToolKitNFTCore, shared by ARnft and aframe-nft #720: the tracker facade proposal, where the filter contract lives (D14, D19).

Generated by Claude Code

Activity

  1. kalwalt
    self-assigned this
    on Nov 1, 2026
  2. kalwalt
    added 2 commits that reference this issue on Nov 1, 2026

    chore: bump @webarkit/oneeurofilter-ts to 0.3.0

    6d46851

    chore: bump @webarkit/oneeurofilter-ts to 0.3.0 (#773)

    5d3b708
  3. kalwalt commented on Nov 2, 2026

    @kalwalt
    kalwalt
    on Nov 2, 2026
    MemberAuthor
    More actions

    Plan

    Going with the proper fix (option 2), now that @webarkit/oneeurofilter-ts 0.3.0 has filterStep() (#773 bumped it on dev):

    • Rotation: filtered on its tangent space. The step is ω = log(R̂ᵀR), smoothed with filterStep(), then R̂ ← R̂ · exp(ω̂), with one polar iteration per step so rounding cannot drift R̂ over long runs.
    • Translation: filtered as a vector with filter().
    • Parameters unchanged: one minCutOff / beta pair, the D19 defaults, and warmUp. For small rotations the change of R's entries is about the angle in radians, the same scale as the tangent step, so existing configurations should behave close to today, without the scale and shear.
    • Not kept: the old per-value filter. Filtered output will differ from 1.15.0, which the README, a D19 amendment and the PR will say.

    Tests:

    • every filtered pose has orthonormal columns and det(R) within 1e-9 of 1, on a moving sequence of 5,000 frames, and on the Node build's static photo where 0.9995 was measured;
    • the translation matches the package's filter();
    • a rotation about a coordinate axis is filtered exactly as its angle.

    Design and plan: specs/2026-11-02-oneeuro-tangent-space-{design,plan}.md, committed with the PR (fix: keep oneEuro-filtered poses rigid (#766)).


    Generated by Claude Code

  4. kalwalt
    added 2 commits that reference this issue on Nov 2, 2026

    perf: logSO3 allocates nothing above pi/2 (#766)

    64f31dc

    fix: keep oneEuro-filtered poses rigid (#766) (#775)

    7939ec4
  5. kalwalt
    closed this as completedin #782on Nov 3, 2026
  6. kalwalt
    added 2 commits that reference this issue on Nov 3, 2026

    chore: release 1.16.0 (#782)

    35818f4

    fix: keep the pose rigid when smoothing (#24)

    e6b2126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kalwalt
    kalwalt

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402792 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.