Skip to content

Investigate: small-marker pinball-demo.jpg not detected under downsampling (works in WebARKitLib-rs & jsartoolkitNFT) #53

Description

@kalwalt

Summary

With detection-side pyramid downsampling restored (#44 part A, #52), the original pinball-demo.jpg — a small marker in a large frame — fails to acquire: detection runs on the pyrDown'd frame and the marker falls below the detector threshold (No keypoints detected!). A marker-fills-frame image (pinball-demo-big.jpg, 1920×1440) tracks fine at the same pyrLevel.

The same pinball.jpg reference + pinball-demo.jpg scene does track in:

  • WebARKitLib-rs (Rust port), and
  • the jsartoolkitNFT Node.js version.

So the marker is detectable in principle; something in this C++/WASM detection path (or its parameters) is weaker for small markers under downsampling.

Hypotheses to investigate

  • Detector type / parameters differ from the Rust and NFT paths (TEBLID feature count TEBLID_MAX_FEATURES, FAST/AKAZE thresholds, featureImageMinSize).
  • Pyramid level chosen here is too aggressive for a small marker — the marker's effective size after pyrDown is below the descriptor's minimum.
  • Reference-image preprocessing / scale handling differs between the implementations.
  • nn_match_ratio / minNumMatches gating differences.

Suggested next steps

  1. Compare detector config (type, max features, thresholds, featureImageMinSize) across WebARKit (C++/WASM), WebARKitLib-rs, and jsartoolkitNFT.
  2. Log keypoint counts on the downsampled detectionFrame for pinball-demo.jpg at each pyrLevel; confirm whether the marker simply yields too few keypoints post-pyrDown.
  3. Evaluate whether featureImageMinSize should be larger (less aggressive downsampling) or whether small-marker scenes warrant a different floor.

Context

Filed as a follow-up to #44 (part A landed in #52). Not a regression in #52 — full-resolution detection on pinball-demo.jpg also exercises this; downsampling just makes it more visible.

Metadata

Metadata

Assignees

Labels

C/C++ codeconcerning the C/C++ code design and improvementsEmscriptenenhancementNew feature or request

Type

Fields

No fields configured for Task.

Projects

Status
To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions