Building Stitcher to OpenCV.js

What files do I need to change to build Stitcher and the stitching module to OpenCV.js? Is there any guide on editing the opencv_js.config.py file or other files needed for a custom build like this?

It seems like I found a way to build it with the flag --cmake_option DBUILD_opencv_stitching=ON, but I still can’t use it in Javascript.
I edited opencv_js.config.py to include stitching like this:

stitching = { 'Stitcher': ['create', 'stitch', 'setFeaturesFinder', 'setFeaturesMatcher', 'setSeamFinder', 'setBlender', 'setWarper', 'setEstimator', 'setWaveCorrection', 'setWaveCorrectKind', 'setBundleAdjuster', 'setRegistrationResol', 'setSeamEstimationResol', 'setCompositingResol', 'setPanoConfidenceThresh', 'setExposureCompensator'] }
but that still didn’t work

hmmm, i’ve never done this (and i won’t !) but:

  • you probably also need to add the stitching module to the whitelist here:
    opencv/platforms/js/opencv_js.config.py at 450e741f8d53ff12b4e194c7762adaefb952555a · opencv/opencv · GitHub

  • how do you expect a function like setSeamFinder to work w/o the resp. class in the api ?

  • you probably need to pare it down to the bare bones minimum for a start
    (create, stitch, and nothing else …)
    start with plain vanilla, then add the chocolate chips…

  • … and then write bloody tests for it !!!

  • a lot of functions expose cv::UMat in the api, but afaik, there’s no such thing in js (or java). major bummer.

  • look at this and be afraid, what else might be lurking anywhere