theothergrantdavidson / opencv-ts

A place for the typescript bindings for OpencvJS
Apache License 2.0
51 stars 18 forks source link

Add vconcat and hconcat #12

Closed Piemontez closed 2 years ago

Piemontez commented 2 years ago

These methods below represent the calls with the "InputArrayOfArrays" parameter similar to the c++ calls.

cv.hconcat(srcs: MatVector, dst: Mat): void; cv.vconcat(srcs: MatVector, dst: Mat): void;

Support documentation: https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga4676b1376cdc4e528dab6bd9edc51c1a

https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga558e169e15adcc46b8cdcc6cd215070f

theothergrantdavidson commented 2 years ago

Just an FYI (I should have remembered this when I actually approved the PR), when the WASM is compiled it doesn't carry across every function overload that is mentioned in the c++ documentation that opencv has so I have to retrospectively go back and fix the hconcat and vconcat definitions. In the case of vconcat and hconcat they only exported one of the functions for it when compiling the WASM. You can see the changes I made In the commits below.

https://github.com/theothergrantdavidson/opencv-ts/commit/8fc4d0291db88c220b3a84790c3f4f7b98559eda https://github.com/theothergrantdavidson/opencv-ts/commit/f4e41f7f3b0ce0d4cd14360445eb9924c46db048