Add QRCodeEncoder type definitions with main branch integration#91
Draft
Add QRCodeEncoder type definitions with main branch integration#91
Conversation
Co-authored-by: ttt43ttt <132509+ttt43ttt@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] no cv.QRCodeEncoder
Add missing QRCode type definitions and comprehensive documentation
Sep 5, 2025
Contributor
|
@copilot please merge code from |
# Conflicts: # src/types/opencv/objdetect.ts # test/QRCodeDetector.test.ts
Contributor
Author
Merged main branch and resolved conflicts. The merge integrates the better QRCodeDetector/QRCodeDetectorAruco definitions from main while preserving the QRCodeEncoder type definitions from this PR. All tests pass (37/37). Commit: b774a2c |
Copilot
AI
changed the title
Add missing QRCode type definitions and comprehensive documentation
Add QRCodeEncoder type definitions with main branch integration
Oct 7, 2025
Contributor
|
@copilot please merge code from main branch and resolve conflicts. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the missing
cv.QRCodeEncoderTypeScript definitions by adding comprehensive type support for QRCodeEncoder functionality. This PR has been updated to merge improvements from main branch (PR #92 and PR #97), which added better QRCodeDetector and QRCodeDetectorAruco implementations in separate files and fixed the boxPoints type definition.Issue Summary
Users reported that while
cv.QRCodeDetectorworks correctly and QRCodeEncoder constants likecv.QRCodeEncoder_CORRECT_LEVEL_Qare available, thecv.QRCodeEncoderclass itself was missing from the TypeScript definitions, causing compilation errors.Investigation Results
After thorough investigation of the OpenCV.js runtime, I discovered:
QRCodeEncoder_CorrectionLevel,QRCodeEncoder_EncodeMode, etc.) are availableChanges Made
1. Merged Main Branch Improvements (Two Merges)
src/types/opencv/QRCodeDetector.ts: Comprehensive QRCodeDetector with detectMulti, decodeMulti methodssrc/types/opencv/QRCodeDetectorAruco.ts: Full QRCodeDetectorAruco with parameters supportboxPointstype definition to match runtime behavior #97: Incorporated boxPoints type definition fix and additional improvementsboxPointstype to match runtime behavior2. QRCodeEncoder TypeScript Definitions
Added comprehensive type definitions to
src/types/opencv/objdetect.ts:3. Test Coverage
4. Documentation
Created
doc/QRCode-Support.mdwith:Runtime Behavior
Benefits
boxPointstype definition to match runtime behavior #97), and QRCodeEncoder support from this PRFixes #58.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.