A binding for `OpenCV::magnitude`.
Could you please implement a binding for OpenCV::magnitude, just like how https://github.com/justadudewhohacks/opencv4nodejs/pull/15 was done,
so that I could do
const magnitudes = await matrix_1.magnitudeAsync(matrix_2);
or
const magnitudes = await OpenCV.magnitudeAsync(matrix_1, matrix_2);
?
I’ve noticed .hMul, .add, .sqrt methods of opencv4nodejs, which I used instead, don’t have their asynchronous versions. Why is that? And do you think .magnitude should have an asynchronous binding?
The Async implementation is a generic implementation, so it is available mostly anywhere.
please consider finding an iso-prototyped function for magnitude(a,b) then simply duplicate the code, and that will work, with less than 2 works hours.
PR is our friend :)
Do not be scared by this code base.
Does that mean that the asynchronous variants of the .hMul/.add/.sqrt methods, .hMulAsync/.addAsync/.sqrtAsync, will also be available?
yep. Implement it once, get it twice 😄
But you must write it twice in the typings files.
that is also the case for optional parameters, all optional parameters can be provided directly, or provided as an optional object.