Skip to content

Include UnscentedKalmanfilter in opencvjs wasm build #2870

Open
@AppariLalith

Description

@AppariLalith
System information (version)
  • OpenCV => 4.5.1-194-gc527b3cefd-dirty
  • OpenCV Contrib=> 4.5.1-60-g4e85f8c6-dirty
  • Operating System / Platform => Ubuntu 64 Bit
  • Compiler => emscripten:grey_question:
Detailed description

Hi,
I am able to generate a build which has linear KalmanFilter by including the 'KalmanFilter': ['correct','predict'] in the opencv_js.config.py file and running the python build command. Now I am trying to build a opencv js wasm build with UnscentedKalmanFilter but not sure how to proceed. I have tried the following steps:

Steps to reproduce
  1. Append “-DOPENCV_EXTRA_MODULES_PATH=/opencv_contrib/modules” to cmd in get_cmake_cmd method in build_js.py to include the extra modules in the build.
  2. Add js under WRAP in opencv_contrib/modules/tracking/CMakeLists.txt.
  3. Added using namespace cv::detail::tracking; to /opencv/modules/js/src/core_bindings.cpp.
  4. Defined tracking as tracking = {'AugmentedUnscentedKalmanFilterParams':['AugmentedUnscentedKalmanFilterParams'], 'UnscentedKalmanFilterParams': ['UnscentedKalmanFilterParams'], 'UkfSystemModel': ['measurementFunction','stateConversionFunction'], 'UnscentedKalmanFilter': ['correct','getErrorCov','getMeasurementNoiseCov','getState','predict'], } and added tracking to the whitelist white_list = makeWhiteList([core, imgproc, tracking]). Not sure the above definition is the correct one. in /opencv/platforms/js/opencv_js.config.py.

After following the above steps i did not get any errors but the final build did not contain required UnscentedKalmanFilter module in it.
Related issue: https://forum.opencv.org/t/opencv-js-build-tracking-module-in-opencv-contrib-but-encounter-generate-error/608

Documentation of the module i want to include. https://docs.opencv.org/3.4/d6/db3/kalman__filters_8hpp.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions