<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.0.0-pre</li>
<li>Operating System / Platform =&gt; Ubuntu 16.04.5 LTS 64 Bit</li>
<li>Compiler =&gt; c++</li>
</ul>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">Compiling opencv with "cmake -D WITH_QT=ON" will fail at FilterWidget.cpp</p>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">diffFilterWidget.cpp</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    #include &lt;opencv2/imgproc.hpp&gt;
    #include &lt;opencv2/imgproc/types_c.h&gt;

    #include &lt;unordered_map&gt;

    #include &lt;QComboBox&gt;
    #include &lt;QLabel&gt;
    #include &lt;QString&gt;
    #include &lt;QVBoxLayout&gt;

    #include &quot;../../util/util.hpp&quot;
    #include &quot;diffFilterWidget.hpp&quot;
    namespace cvv
    {
    namespace qtutil
    {"><pre lang="#include" class="notranslate"><code class="notranslate">    #include &lt;opencv2/imgproc.hpp&gt;
    #include &lt;opencv2/imgproc/types_c.h&gt;

    #include &lt;unordered_map&gt;

    #include &lt;QComboBox&gt;
    #include &lt;QLabel&gt;
    #include &lt;QString&gt;
    #include &lt;QVBoxLayout&gt;

    #include "../../util/util.hpp"
    #include "diffFilterWidget.hpp"
    namespace cvv
    {
    namespace qtutil
    {
</code></pre></div>
<h5 dir="auto">Solution</h5>
<p dir="auto">Adding <code class="notranslate">using namespace cv;</code> after <code class="notranslate">#include "diffFilterWidget.hpp"</code> solved the scope issue</p>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.0.0rc</li>
<li>Operating System / Platform =&gt; Ubuntu 18.04, 4.15.0-38-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38892637" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv_contrib/issues/41" data-hovercard-type="pull_request" data-hovercard-url="/opencv/opencv_contrib/pull/41/hovercard" href="https://github.com/opencv/opencv_contrib/pull/41">#41</a>-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux</li>
<li>Compiler =&gt; gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0</li>
<li>Nvidia Driver 410.73</li>
<li>Cuda 10.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">When compiling with the command line make -VERBOSE=1 -j12 the compile fails at<br>
/devel/software/opencv_contrib-4.0.0/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp: In member function ‘virtual void cvv::qtutil::DiffFilterFunction::applyFilter(cvv::qtutil::DiffFilterFunction::InputArray, cvv::qtutil::DiffFilterFunction::OutputArray) const’:<br>
/devel/software/opencv_contrib-4.0.0/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp:72:44: error: ‘COLOR_BGR2HSV’ was not declared in this scope<br>
cv::cvtColor(in.at(0).get(), originalHSV, COLOR_BGR2HSV);</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">cmake -D CMAKE_BUILD_TYPE=Release <br>
-D CMAKE_INSTALL_PREFIX=$cwd/installation/OpenCV-"$cvVersion" <br>
-D INSTALL_C_EXAMPLES=OFF <br>
-D INSTALL_PYTHON_EXAMPLES=ON <br>
-D WITH_TBB=ON <br>
-D WITH_V4L=OFF <br>
-D WITH_QT=ON <br>
-D WITH_OPENGL=ON <br>
-D OPENCV_EXTRA_MODULES_PATH=/devel/software/opencv_contrib-"$cvVersion"/modules <br>
-D BUILD_EXAMPLES=ON ..</p>
<p dir="auto">make -VERBOSE=1 -j12<br>
<a href="https://github.com/opencv/opencv/files/2581908/CMakeOutput.log">CMakeOutput.log</a><br>
<a href="https://github.com/opencv/opencv/files/2581910/CMakeError.log">CMakeError.log</a></p>
<p dir="auto"><a href="https://github.com/opencv/opencv/files/2581914/make_out.txt">make_out.txt</a></p>