-
In opencv/modules/calib3d/CMakeLists.txt, opencv/modules/features2d/CMakeLists.txt and opencv_contrib/modules/aruco/CMakeLists.txt
Add "js" parameter in ocv_define_module
-
In opencv/modules/js/src/core_bindings.cpp, add
Add:
\#include "opencv2/aruco.hpp" \#include "opencv2/calib3d.hpp" \#include "opencv2/features2d.hpp" using namespace cv::aruco;
-
In opencv/modules/js/src/embindgen.py
Add:
aruco = {'': ['drawMarker', 'detectMarkers', 'drawDetectedMarkers', 'estimatePoseSingleMarkers', 'drawAxis'], 'Dictionary': ['Dictionary', 'create', 'get', 'getPredefinedDictionary'], 'DetectorParameters': ['DetectorParameters', 'create']}
Modify:
white_list = makeWhiteList([core, imgproc, objdetect, video, dnn]) -> white_list = makeWhiteList([core, imgproc, objdetect, video, aruco]) return re.sub(r"^cv\.", "", name).replace(".", "_") -> return re.sub(r"^cv\.[a-zA-Z0-9]*\.|cv\.", "", name).replace(".", "_")
-
In opencv/platforms/js/build_js.py
Add:
"-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules",
Modify:
"-DBUILD_opencv_calib3d=off" -> "-DBUILD_opencv_calib3d=on" "-DBUILD_opencv_features2d=off" -> "-DBUILD_opencv_features2d=on"
-
In opencv/modules/imgproc/include/opencv2/imgproc.hpp
Comments
// CV_EXPORTS_W void drawMarker(CV_IN_OUT Mat& img, Point position, const Scalar& color, // int markerType = MARKER_CROSS, int markerSize=20, int thickness=1, // int line_type=8);
-
Notifications
You must be signed in to change notification settings - Fork 14
Some demos about opencv.js
ganwenyao/opencv_js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Some demos about opencv.js
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published