<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.5.1-194-gc527b3cefd-dirty</li>
<li>OpenCV Contrib=&gt; 4.5.1-60-g4e85f8c6-dirty</li>
<li>Operating System / Platform =&gt; Ubuntu 64 Bit</li>
<li>Compiler =&gt; emscripten<g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Hi,<br>
I am able to generate a build which has linear KalmanFilter by including the <code class="notranslate">'KalmanFilter': ['correct','predict']</code> 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:</p>
<h5 dir="auto">Steps to reproduce</h5>
<ol dir="auto">
<li>Append  <code class="notranslate">“-DOPENCV_EXTRA_MODULES_PATH=/opencv_contrib/modules”</code>  to cmd in <code class="notranslate">get_cmake_cmd</code> method in build_js.py to include the extra modules in the build.</li>
<li>Add <code class="notranslate">js</code> under WRAP in <code class="notranslate">opencv_contrib/modules/tracking/CMakeLists.txt</code>.</li>
<li>Added <code class="notranslate">using namespace cv::detail::tracking;</code> to <code class="notranslate">/opencv/modules/js/src/core_bindings.cpp</code>.</li>
<li>Defined tracking as <code class="notranslate">tracking = {'AugmentedUnscentedKalmanFilterParams':['AugmentedUnscentedKalmanFilterParams'], 'UnscentedKalmanFilterParams': ['UnscentedKalmanFilterParams'], 'UkfSystemModel': ['measurementFunction','stateConversionFunction'], 'UnscentedKalmanFilter': ['correct','getErrorCov','getMeasurementNoiseCov','getState','predict'], }</code>   and added tracking to the whitelist <code class="notranslate">white_list = makeWhiteList([core, imgproc, tracking]). Not sure the above definition is the correct one. </code> in  <code class="notranslate">/opencv/platforms/js/opencv_js.config.py</code>.</li>
</ol>
<p dir="auto">After following the above steps i did not get any errors but the final build did not contain required <code class="notranslate">UnscentedKalmanFilter</code> module in it.<br>
Related issue: <a href="https://forum.opencv.org/t/opencv-js-build-tracking-module-in-opencv-contrib-but-encounter-generate-error/608" rel="nofollow">https://forum.opencv.org/t/opencv-js-build-tracking-module-in-opencv-contrib-but-encounter-generate-error/608</a></p>
   
<p dir="auto">Documentation of the module i want to include.  <a href="https://docs.opencv.org/3.4/d6/db3/kalman__filters_8hpp.html" rel="nofollow">https://docs.opencv.org/3.4/d6/db3/kalman__filters_8hpp.html</a></p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.0.0 - pre(Latest - master)</li>
<li>Operating System / Platform =&gt; Ubuntu 18.04 64 Bit</li>
<li>Compiler =&gt; GCC 7.3.0 (Default)</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Hello there,</p>
<p dir="auto">I found a simple &amp; 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 :)</p>
<p dir="auto"><strong>Completely Solves:</strong> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="269152063" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/9953" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/9953/hovercard" href="https://github.com/opencv/opencv/issues/9953">#9953</a></p>
<h3 dir="auto">Installation:</h3>
<p dir="auto">OpenBLAS can installed from respected default repository with the following command:</p>
<p dir="auto"><code class="notranslate">sudo apt install libopenblas-dev, libopenblas-base</code></p>
<p dir="auto">Whereas LAPACK Library is little trickier to install,  as OpenBLAS doesn't provide Lapacke header file(<em>i cannot find the <strong>lapacke.h</strong> header fie</em> ), Therefore I ought to install LAPACK Library instead, which works absolutely fine:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo apt install liblapacke-dev

sudo ln -s /usr/include/lapacke.h /usr/include/x86_64-linux-gnu # corrected path for the library "><pre class="notranslate"><code class="notranslate">sudo apt install liblapacke-dev

sudo ln -s /usr/include/lapacke.h /usr/include/x86_64-linux-gnu # corrected path for the library 
</code></pre></div>
<h3 dir="auto">Setting Correct Path:</h3>
<p dir="auto">So, The only thing left is setting Correct Default Search Path for Include and Libs Directory of OpenBLAS Library which is as below :</p>
<ul dir="auto">
<li>Open_BLAS_INCLUDE_SEARCH_PATHS path: <code class="notranslate"> /usr/include/x86_64-linux-gnu</code></li>
<li>Open_BLAS_LIB_SEARCH_PATHS path: <code class="notranslate">/usr/lib/x86_64-linux-gnu</code></li>
</ul>
<p dir="auto">Appending these respective additional Paths in <strong>OpenCVFindOpenBLAS.cmake</strong> :<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/opencv/opencv/blob/eb981cc7d7011f60a7a8dd03b9db9cd2dcdd8596/cmake/OpenCVFindOpenBLAS.cmake#L46">opencv/cmake/OpenCVFindOpenBLAS.cmake</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 46
      in
      <a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/eb981cc7d7011f60a7a8dd03b9db9cd2dcdd8596">eb981cc</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L46" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="46"></td>
          <td id="LC46" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">SET</span>(Open_BLAS_INCLUDE_SEARCH_PATHS </td>
        </tr>
    </tbody></table>
  </div>
</div>
<br>
and<br>
<div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/opencv/opencv/blob/eb981cc7d7011f60a7a8dd03b9db9cd2dcdd8596/cmake/OpenCVFindOpenBLAS.cmake#L58">opencv/cmake/OpenCVFindOpenBLAS.cmake</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 58
      in
      <a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/eb981cc7d7011f60a7a8dd03b9db9cd2dcdd8596">eb981cc</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L58" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="58"></td>
          <td id="LC58" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">SET</span>(Open_BLAS_LIB_SEARCH_PATHS </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Completely solves the issue without altering any additional file in OpenCV. <strong>Kindly Add these additional paths to the above-mentioned file :)</strong></p>
<h3 dir="auto">Results:</h3>
<h4 dir="auto">Before appending path:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- 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."><pre class="notranslate"><code class="notranslate">-- 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.
</code></pre></div>
<h4 dir="auto">After appending path:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- 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."><pre class="notranslate"><code class="notranslate">-- 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.
</code></pre></div>
<p dir="auto">After Correction, OpenBLAS library configured correctly with OpenCV on my system, Cheers.</p>