Issue 1:
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❔

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

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.

Add js under WRAP in opencv_contrib/modules/tracking/CMakeLists.txt.

Added using namespace cv::detail::tracking; to /opencv/modules/js/src/core_bindings.cpp.

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

Issue 2:
System information (version)

OpenCV => 4.0.0 - pre(Latest - master)

Operating System / Platform => Ubuntu 18.04 64 Bit

Compiler => GCC 7.3.0 (Default)

Detailed description

Hello there,

I found a simple & straightforward solution to the problems of OpenBLAS Library not being identified properly on Ubuntu machine (64-bit) in CMAKE configuring step, also may work on other Linux Distros :)

Completely Solves: #9953

Installation:

OpenBLAS can installed from respected default repository with the following command:

sudo apt install libopenblas-dev, libopenblas-base

Whereas LAPACK Library is little trickier to install, as OpenBLAS doesn't provide Lapacke header file(i cannot find the lapacke.h header fie ), Therefore I ought to install LAPACK Library instead, which works absolutely fine:

sudo apt install liblapacke-dev

sudo ln -s /usr/include/lapacke.h /usr/include/x86_64-linux-gnu # corrected path for the library

Setting Correct Path:

So, The only thing left is setting Correct Default Search Path for Include and Libs Directory of OpenBLAS Library which is as below :

Open_BLAS_INCLUDE_SEARCH_PATHS path: /usr/include/x86_64-linux-gnu

Open_BLAS_LIB_SEARCH_PATHS path: /usr/lib/x86_64-linux-gnu

Appending these respective additional Paths in OpenCVFindOpenBLAS.cmake :

opencv/cmake/OpenCVFindOpenBLAS.cmake

Line 46
in
eb981cc

SET(Open_BLAS_INCLUDE_SEARCH_PATHS

and

opencv/cmake/OpenCVFindOpenBLAS.cmake

Line 58
in
eb981cc

SET(Open_BLAS_LIB_SEARCH_PATHS

Completely solves the issue without altering any additional file in OpenCV. Kindly Add these additional paths to the above-mentioned file :)

Results:

Before appending path:

-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY)
.
.
-- LAPACK(LAPACK/Generic): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
-- LAPACK(LAPACK/Generic): Support is enabled.

After appending path:

-- Found OpenBLAS libraries: /usr/lib/x86_64-linux-gnu/libopenblas.so
-- Found OpenBLAS include: /usr/include/x86_64-linux-gnu
-- LAPACK(OpenBLAS): LAPACK_LIBRARIES: /usr/lib/x86_64-linux-gnu/libopenblas.so
-- LAPACK(OpenBLAS): Support is enabled.

After Correction, OpenBLAS library configured correctly with OpenCV on my system, Cheers.