Skip to content

refactor(fast_corners): de-duplicate fast_corners module (#47)#64

Merged
kalwalt merged 1 commit into
feat/refactor-jsfeat-nextfrom
refactor/47-dedup-fast-corners
Jul 8, 2026
Merged

refactor(fast_corners): de-duplicate fast_corners module (#47)#64
kalwalt merged 1 commit into
feat/refactor-jsfeat-nextfrom
refactor/47-dedup-fast-corners

Conversation

@kalwalt

@kalwalt kalwalt commented Jul 8, 2026

Copy link
Copy Markdown
Member

Third slice of #47, following the #62/#63 pattern. Targets the feat/refactor-jsfeat-next integration branch.

Note: stacked on #63 (imgproc) since both edit src/jsfeatNext.ts — merge #63 first and this PR's diff reduces to its own commit.

What changed

  • src/fast_corners/fast_corners.ts — type-only stub replaced by the real implementation, moved verbatim from the monolith (set_threshold, detect, private _cmp_offsets). It imports _cmp_score_16 from ./fast_private, which was already a real module.
  • src/jsfeatNext.ts — shrinks by ~225 lines.

Verification

  • tsc --noEmit → clean
  • npm test57/57 (the detector parity suite pins fast_corners.detect output against original jsfeat)
  • UMD bundle smoke-checked: instanceof chain, static-constant inheritance, corner detection on a synthetic image
  • Bonus: all examples/*.html were manually verified against a locally built bundle of the refactor(imgproc): de-duplicate imgproc module (#47) #63 branch — no issues found
  • dist//types/ untouched (rebuilt once when the integration branch merges to dev)

Advances #47. Remaining queue: pyramid_tlinalgorbyape06motion_estimator (+ inline kernels, which also tightens the any slots in core.ts) → optical_flow_lk.

🤖 Generated with Claude Code

@kalwalt kalwalt added this to the Parity & Modernization milestone Jul 8, 2026
@kalwalt kalwalt self-assigned this Jul 8, 2026
@kalwalt kalwalt added enhancement New feature or request Typescript all about Typescript code design javascript tests labels Jul 8, 2026
Third de-duplication step of #47, following the #62/#63 pattern.

- src/fast_corners/fast_corners.ts: replace the type-only stub with the
  REAL implementation moved verbatim from the monolith (set_threshold,
  detect, _cmp_offsets; imports _cmp_score_16 from ./fast_private, which
  was already a real module).
- src/jsfeatNext.ts: shrinks by ~225 lines; attaches fast_corners from its
  module.

Verified behavior-preserving: tsc --noEmit clean; npm test 57/57 (detector
parity suite pins fast_corners.detect against original jsfeat); UMD bundle
smoke-checked (instanceof chain, static inheritance, corner detection on a
synthetic image).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kalwalt kalwalt force-pushed the refactor/47-dedup-fast-corners branch from 4ab2bca to b820b27 Compare July 8, 2026 12:03
@kalwalt kalwalt merged commit 73ec9d4 into feat/refactor-jsfeat-next Jul 8, 2026
4 checks passed
@kalwalt kalwalt deleted the refactor/47-dedup-fast-corners branch July 10, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code design enhancement New feature or request javascript tests Typescript all about Typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant