<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.0.0</li>
<li>Operating System / Platform =&gt; Ubuntu 18.04</li>
<li>Compiler =&gt; gcc 7.3.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Hi all,</p>
<p dir="auto">I am trying to compile OpenCV 4.0.0 release version on Ubuntu 18.04 but got this</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ 72%] Building CXX object modules/world/CMakeFiles/opencv_perf_gapi.dir/__/gapi/perf/internal/gapi_compiler_perf_tests.cpp.o
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp: In member function ‘virtual void opencv_test::CompilerPerfTest_TestPerformance_Test::PerfTestBody()’:
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:26:29: error: ‘split3’ is not a member of ‘cv::gapi’
   auto splitted = cv::gapi::split3(in);
                             ^~~~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:27:25: error: ‘addC’ is not a member of ‘cv::gapi’
   auto add1 = cv::gapi::addC({1}, std::get&lt;0&gt;(splitted));
                         ^~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:28:25: error: ‘addC’ is not a member of ‘cv::gapi’
   auto add2 = cv::gapi::addC({2}, std::get&lt;1&gt;(splitted));
                         ^~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:29:25: error: ‘addC’ is not a member of ‘cv::gapi’
   auto add3 = cv::gapi::addC({3}, std::get&lt;2&gt;(splitted));
                         ^~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:30:24: error: ‘merge3’ is not a member of ‘cv::gapi’
   auto out = cv::gapi::merge3(add1, add2, add3);
                        ^~~~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:35:65: error: ‘cv::gapi::core’ has not been declared
       c.apply(in_mat1, out_mat_gapi, cv::compile_args(cv::gapi::core::fluid::kernels()));
                                                                 ^~~~
modules/world/CMakeFiles/opencv_perf_gapi.dir/build.make:230: recipe for target 'modules/world/CMakeFiles/opencv_perf_gapi.dir/__/gapi/perf/internal/gapi_compiler_perf_tests.cpp.o' failed
make[2]: *** [modules/world/CMakeFiles/opencv_perf_gapi.dir/__/gapi/perf/internal/gapi_compiler_perf_tests.cpp.o] Error 1
CMakeFiles/Makefile2:8188: recipe for target 'modules/world/CMakeFiles/opencv_perf_gapi.dir/all' failed
make[1]: *** [modules/world/CMakeFiles/opencv_perf_gapi.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2"><pre class="notranslate"><code class="notranslate">[ 72%] Building CXX object modules/world/CMakeFiles/opencv_perf_gapi.dir/__/gapi/perf/internal/gapi_compiler_perf_tests.cpp.o
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp: In member function ‘virtual void opencv_test::CompilerPerfTest_TestPerformance_Test::PerfTestBody()’:
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:26:29: error: ‘split3’ is not a member of ‘cv::gapi’
   auto splitted = cv::gapi::split3(in);
                             ^~~~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:27:25: error: ‘addC’ is not a member of ‘cv::gapi’
   auto add1 = cv::gapi::addC({1}, std::get&lt;0&gt;(splitted));
                         ^~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:28:25: error: ‘addC’ is not a member of ‘cv::gapi’
   auto add2 = cv::gapi::addC({2}, std::get&lt;1&gt;(splitted));
                         ^~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:29:25: error: ‘addC’ is not a member of ‘cv::gapi’
   auto add3 = cv::gapi::addC({3}, std::get&lt;2&gt;(splitted));
                         ^~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:30:24: error: ‘merge3’ is not a member of ‘cv::gapi’
   auto out = cv::gapi::merge3(add1, add2, add3);
                        ^~~~~~
/home/owen/Downloads/opencv-4.0.0/modules/gapi/perf/internal/gapi_compiler_perf_tests.cpp:35:65: error: ‘cv::gapi::core’ has not been declared
       c.apply(in_mat1, out_mat_gapi, cv::compile_args(cv::gapi::core::fluid::kernels()));
                                                                 ^~~~
modules/world/CMakeFiles/opencv_perf_gapi.dir/build.make:230: recipe for target 'modules/world/CMakeFiles/opencv_perf_gapi.dir/__/gapi/perf/internal/gapi_compiler_perf_tests.cpp.o' failed
make[2]: *** [modules/world/CMakeFiles/opencv_perf_gapi.dir/__/gapi/perf/internal/gapi_compiler_perf_tests.cpp.o] Error 1
CMakeFiles/Makefile2:8188: recipe for target 'modules/world/CMakeFiles/opencv_perf_gapi.dir/all' failed
make[1]: *** [modules/world/CMakeFiles/opencv_perf_gapi.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
</code></pre></div>
<p dir="auto">Any idea? Thanks!</p>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; : 4.1.0.25</li>
<li>Operating System / Platform =&gt; :Unbuntu16.04 64 Bit</li>
<li>Compiler =&gt; :Pycharm Community Edition2017.2</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I use Opencv 4.1.0.25 for DIS Optical Flow, code as below , but I got the result  of UseMeanNormalization to calc distances of current imgs and reference image, I got results parameter "flows" all zeros. This could not be true result, for I picture the moving object. I don't know why this happened. And I try on OpenCV Online Document for help, but I could not find detail descriptions on how to use python code of DIS Optical flow</p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="```.python
ref = np.uint8(allimgs[0] * 255)
motions = []
flows = []
h, w = ref.shape
count = h * w
totalMotions = 0
#
dis = cv2.DISOpticalFlow_create(1) #for use PRESET_FAST = 1
dis.setUseMeanNormalization(True)
flows.append(np.zeros((h, w), np.float32))
for i in range(1, len(allimgs)):
    curr_img = np.uint8(allimgs[i] * 255)
    flow = np.zeros((h, w), np.float32)
    dis.calc(ref, curr_img, flow)
    flows.append(flow)
```"><pre class="notranslate"><code class="notranslate">```.python
ref = np.uint8(allimgs[0] * 255)
motions = []
flows = []
h, w = ref.shape
count = h * w
totalMotions = 0
#
dis = cv2.DISOpticalFlow_create(1) #for use PRESET_FAST = 1
dis.setUseMeanNormalization(True)
flows.append(np.zeros((h, w), np.float32))
for i in range(1, len(allimgs)):
    curr_img = np.uint8(allimgs[i] * 255)
    flow = np.zeros((h, w), np.float32)
    dis.calc(ref, curr_img, flow)
    flows.append(flow)
```
</code></pre></div>