Files
opencv/modules/js
viwe-monai a233ea41f1 Merge pull request #30428 from viwe-monai:fix-js-mcc-whitelist-names
js: bind the mcc classes under their real 5.0 names (#30409) - #30428

Fixes #30409.

The JS whitelist still names the pre-5.0 mcc classes (`mcc_CheckerDetector`, `mcc_DetectorParameters`, `mcc_Checker`), but the classes now live in `modules/objdetect` as `mcc::CCheckerDetector`, `mcc::DetectorParametersMCC` and `mcc::CChecker` (`mcc_checker_detector.hpp`). The generator skips unmatched entries silently, so a default opencv.js build exports only the `mcc_ColorChart` enum.

Changes, following the working entry set from the issue:

- `platforms/js/opencv_js.config.py` and `modules/objdetect/misc/js/gen_dict.json` (both whitelist sources, kept identical): rename the three entries to the real class names and add `processWithROI` (the `CV_WRAP_AS` alias) and `CChecker::create`.
- Per the issue's findings, `getDetectionParams()` is left out (its `const DetectorParametersMCC&` return breaks the generated `select_overload` signature) and `getListColorChecker()`/`draw()` are left out (`std::vector<Ptr<CChecker>>` has no Embind registration, so they fail when called).
- `modules/js/src/core_bindings.cpp`: `using namespace cv::mcc;` in the objdetect block (next to `using namespace cv::aruco;`) and `typedef dnn::Net dnn_Net;` in the dnn block (for the `create(const dnn::Net&)` overload), mirroring the existing `aruco_DetectorParameters` / `QRCodeDetectorAruco_Params` typedef pattern.

Verification: every whitelisted method name was checked against `mcc_checker_detector.hpp` (all found; `processWithROI` is the `CV_WRAP_AS` alias of `process` at line 207). `gen_dict.json` parses and `opencv_js.config.py` compiles. A full `build_js.py --build_wasm` run needs Emscripten and is left to CI; the entry set itself is the one validated end-to-end against a downstream build in the issue (synthetic MCC24 chart detected, `getChartsRGB()` exact).
2026-10-21 10:24:03 +03:00
..
2024-10-18 08:37:32 -03:00
2026-02-14 15:37:33 +03:00
2026-04-29 16:36:02 +03:00
2020-12-03 14:18:54 +00:00