Issue 1:
System information (version)

OpenCV => opencv.js 4.1.0-pre

Operating System / Platform => Google Chrome 74.0.3729.39

Compiler => opencv.js WASM build from master branch as described here.

Detailed description

Executing cv.drawKeypoints now gives an error where it did not use to. (see https://github.com/ucisysarch/opencvjs/blob/master/test/features_2d.html)

Inferring from the errors shown below my guess is that it could just be a function signature mismatch in the bindings. When adding the 'flag' integer in javascript, the error says drawKeypoints does not accept 5 arguments, yet when omitting the flag, it says it cannot convert 'undefined' to an unsigned int, coincidentally the type of the omitted flag.

Steps to reproduce

cv.drawKeypoints(input, keyPoints, output, color, 0);

app.js:157 Uncaught BindingError: Function 'drawKeypoints' called with an invalid number of arguments (5) - expects one of (,,,function drawKeypoints(arg0, arg1, arg2) {
if (arguments.length !== 3) {
throwBindingError('function drawKeypoints called with ' + arguments.length + ' arguments, expected 3 args!');
}
var arg0Wired = argType0.toWireType(null, arg0); // Mat
var arg1Wired = argType1.toWireType(null, arg1); // emscripten::val
var arg2Wired = argType2.toWireType(null, arg2); // Mat
invoker(fn, arg0Wired, arg1Wired, arg2Wired);
},function drawKeypoints(arg0, arg1, arg2, arg3) {
if (arguments.length !== 4) {
throwBindingError('function drawKeypoints called with ' + arguments.length + ' arguments, expected 4 args!');
}
var arg0Wired = argType0.toWireType(null, arg0); // Mat
var arg1Wired = argType1.toWireType(null, arg1); // emscripten::val
var arg2Wired = argType2.toWireType(null, arg2); // Mat
var arg3Wired = argType3.toWireType(null, arg3); // Scalar
invoker(fn, arg0Wired, arg1Wired, arg2Wired, arg3Wired);
arg3Wired_dtor(arg3Wired); // Scalar
})!

cv.drawKeypoints(input, keyPoints, output, color); OR cv.drawKeypoints(input, keyPoints, output);

opencv.js:24 Uncaught TypeError: Cannot convert "undefined" to unsigned int
at Object.toWireType (.../opencv.js:24:8400437)
at __emval_as (.../opencv.js:24:8407557)
at wasm-function[311]:47
at wasm-function[313]:82
at wasm-function[970]:38
at wasm-function[914]:20
at Module.dynCall_viiii (.../opencv.js:24:8452614)
at dynCall_viiii_249 (eval at makeDynCaller (.../opencv.js:24:8383640), <anonymous>:4:12)
at Object.drawKeypoints (eval at new_ (.../opencv.js:24:8387470), <anonymous>:10:1)
at Object.proto.<computed> [as drawKeypoints] (.../opencv.js:24:8374345)

Issue 2:
Is it feasible to merge some Web-Sight and Quramy bindings with master ? I don't really know how it can be done, but I would like to do it if so.

It is used for example by @Quramy in his feature_matching demo (see here)

to use feature2d functions like cv.drawMatches, cv.knnMatch, cv.drawMatchesKnn, cv.drawKeypoints and so on which are not working in master repo (if I'm correct).

Errors

let kp = new cv.KeyPointVector();
let descriptors = new cv.Mat();
let orb = new cv.ORB();
orb.detectAndCompute(src, new cv.Mat(), kp, descriptors);
cv.drawKeypoints(src, kp, dst); // Error here
kp.delete();
orb.delete();

raise following error

TypeError: Cannot convert "undefined" to unsigned int

and

let kp = new cv.KeyPointVector();
let descriptors = new cv.Mat();
let orb = new cv.ORB();
orb.detectAndCompute(src, new cv.Mat(), kp, descriptors);

// Run a matcher.
let dm = new cv.DMatchVector();
let matcher = new cv.BFMatcher();
matcher.match(descriptors, descriptors, dm);
const matchingImage = new cv.Mat();
cv.drawMatchesKnn(src, descriptors, src, descriptors, dm, matchingImage);

raise

TypeError: cv.drawMatchesKnn is not a function

while

cv.drawMatches(src, descriptors, src, descriptors, dm, matchingImage); // Error (2)

raise

TypeError: Cannot convert "undefined" to unsigned int

Environnement

I built opencv.js upon opencv master branch and I added to core_bindings.cpp some lines from not merged pull request #12855 to get DMatch support (see here).