Skip to content

Feat: Add Title ROI masking#29

Open
poketonova wants to merge 1 commit into
mainfrom
feat/scanner-title-masking
Open

Feat: Add Title ROI masking#29
poketonova wants to merge 1 commit into
mainfrom
feat/scanner-title-masking

Conversation

@poketonova

@poketonova poketonova commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Feat: Add Title ROI masking

Overview

This PR introduces robust handling for scanner noise and detection errors, ensuring high-fidelity card processing.

1. Title ROI Masking

Implements bitwise AND masking for the top 15% of the homography result to isolate the card title, effectively reducing scanner artifact noise. Unit testing for this logic is implemented via tests/scanner/ocr.spec.js using jest-image-snapshot. Note that this approach introduces a minor, calculated latency overhead per frame.

2. Lighting Compensation

Addresses variable ambient lighting conditions by applying Contrast Limited Adaptive Histogram Equalization (CLAHE) on the Y channel, coupled with Adaptive Otsu's thresholding implemented within a WebGL fragment shader for GPU-accelerated performance.

3. Mis-detection Handling Strategy

Implements a multi-layered verification strategy:

  • Secondary OCR Validation: Hamming distance comparison against the master price list.
  • Confidence Score Thresholding: Detections with confidence < 0.85 are automatically flagged for manual review.
  • Geometric Validation: ORB feature matching as a geometry validation layer against card template features.

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pokemon-collectr Ready Ready Preview, Comment Jun 12, 2026 3:05pm

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