Skip to content

Comments

Add TypeScript definitions for Stitcher class#114

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-stitcher-class
Draft

Add TypeScript definitions for Stitcher class#114
Copilot wants to merge 5 commits intomainfrom
copilot/add-stitcher-class

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

The Stitcher class (panorama stitching) was requested but unavailable. The stitching module is disabled in the default OpenCV.js build, but TypeScript definitions enable proper typing when users rebuild with it enabled.

Changes

  • src/types/opencv/Stitcher.ts: Complete type definitions for Stitcher class

    • Core methods: create(), stitch(), estimateTransform(), composePanorama()
    • Configuration: resolution settings, confidence thresholds, wave correction
    • Constants: status codes (Stitcher_OK, etc.), modes (PANORAMA, SCANS)
  • src/types/opencv/_types.ts: Added exports for Stitcher, QRCodeDetector, QRCodeDetectorAruco

  • test/Stitcher.test.ts: Test suite with runtime availability checks

  • README.md: Documented optional modules and rebuild instructions

Usage

// Check availability before use
if ('Stitcher' in cv) {
  const stitcher = cv.Stitcher.create(cv.Stitcher_PANORAMA);
  const status = stitcher.stitch(images, pano);
  if (status === cv.Stitcher_OK) {
    // panorama created
  }
  stitcher.delete();
}

Module availability can be verified at runtime. Users needing Stitcher must rebuild OpenCV.js with stitching module enabled per workflow in .github/workflows/build-opencv-js.yml.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.opencv.org
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Stitcher Class</issue_title>
<issue_description>Any chance https://docs.opencv.org/3.4/d2/d8d/classcv_1_1Stitcher.html will be included in this library?</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 27, 2026 06:20
Co-authored-by: ttt43ttt <132509+ttt43ttt@users.noreply.github.com>
Co-authored-by: ttt43ttt <132509+ttt43ttt@users.noreply.github.com>
…ethod

Co-authored-by: ttt43ttt <132509+ttt43ttt@users.noreply.github.com>
Co-authored-by: ttt43ttt <132509+ttt43ttt@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Stitcher class from OpenCV library Add TypeScript definitions for Stitcher class Jan 27, 2026
Copilot AI requested a review from ttt43ttt January 27, 2026 06:25
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.

Stitcher Class

2 participants