solvePnPRansac not in opencv.js although in white_list

I am trying to use solvePnPRansac and Rodrigues using opencv.js.

I built opencv.js from 4.5.1 and did the suggested fix for one bug that was reported with make_umd having to do with encoding for python 3.

It looks like calib3d is included in the white_list in opencv_js.config.py and the functions in calib3d are included in the white list. However, when I try cv.solvePnPRansac in the console, I get undefined.

It seems like calib3d isn’t really included by default in the build.
What would I have to change to get it included?

Thank you

I see various generated functions that seem related in /build_js/modules/js_bindings_generator/gen/bindings.cpp:

bool solvePnPRansac_wrapper(const cv::Mat& arg1, const cv::Mat& arg2, const cv::Mat& arg3, const cv::Mat& arg4, cv::Mat& arg5, cv::Mat& arg6, bool arg7, int arg8, float arg9, double arg10, cv::Mat& arg11, int arg12) {
return cv::solvePnPRansac(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
}

and

function(“solvePnPRansac”, select_overload<bool(const cv::Mat&, const cv::Mat&, const cv::Mat&, const cv::Mat&, cv::Mat&, cv::Mat&, bool, int, float, double, cv::Mat&, int)>(&Wrappers::solvePnPRansac_wrapper));

function("solvePnPRansac", select_overload<bool(const cv::Mat&, const cv::Mat&, const cv::Mat&, const cv::Mat&, cv::Mat&, cv::Mat&, bool, int, float, double, cv::Mat&)>(&Wrappers::solvePnPRansac_wrapper_1));

function("solvePnPRansac", select_overload<bool(const cv::Mat&, const cv::Mat&, const cv::Mat&, const cv::Mat&, cv::Mat&, cv::Mat&, bool, int, float, double)>(&Wrappers::solvePnPRansac_wrapper_2));

and I see the gen function code in embindgen.py successfully checking the white_list for solvePnPRansac

Hi, have you solved your problem? I have encountered a similar issue. I added the Inpaint function to the white_list, but the compiled JavaScript file doesn’t seem to include it.