Skip to content

refactor(orb): de-duplicate orb module (#47)#67

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

refactor(orb): de-duplicate orb module (#47)#67
kalwalt merged 1 commit into
feat/refactor-jsfeat-nextfrom
refactor/47-dedup-orb

Conversation

@kalwalt

@kalwalt kalwalt commented Jul 8, 2026

Copy link
Copy Markdown
Member

Sixth slice of #47, fresh off the integration branch.

What changed

  • src/orb/orb.ts — type-only stub replaced by the real implementation, verbatim from the monolith (describe). Imports bit_pattern_31 / rectify_patch from their existing real modules; one deliberate change: the constructor instantiates imgproc via direct module import instead of the jsfeatNext.imgproc static slot (established pattern).
  • src/jsfeatNext.ts — ~107 lines removed. Now ~460 lines of the original ~3,900.

Verification

  • tsc --noEmit → clean (caught a missing constants import during extraction; fixed before commit)
  • npm test57/57 — the orb parity test pins describe() output byte-for-byte against original jsfeat
  • UMD bundle smoke-checked (instanceof chain, descriptor computation)
  • dist//types/ untouched (rebuilt when the integration branch merges to dev)

Advances #47. Remaining: yape06motion_estimator (+ inline kernels → tightens the core.ts any slots) → optical_flow_lk.

🤖 Generated with Claude Code

Sixth de-duplication step of #47, following the established pattern.

- src/orb/orb.ts: replace the type-only stub with the REAL implementation
  moved verbatim from the monolith (describe). Imports bit_pattern_31 and
  rectify_patch from their existing real modules; the constructor now
  instantiates imgproc via direct module import instead of the
  jsfeatNext.imgproc static slot.
- src/jsfeatNext.ts: shrinks by ~107 lines.

Verified behavior-preserving: tsc --noEmit clean; npm test 57/57 (the orb
parity test pins describe() output byte-for-byte vs original jsfeat); UMD
bundle smoke-checked (instanceof, descriptor computation).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@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
@kalwalt kalwalt merged commit ce3078f into feat/refactor-jsfeat-next Jul 8, 2026
4 checks passed
@kalwalt kalwalt deleted the refactor/47-dedup-orb 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