yjxiong / temporal-segment-networks

Code & Models for Temporal Segment Networks (TSN) in ECCV 2016
BSD 2-Clause "Simplified" License
1.53k stars 477 forks source link

error when building dense_flow #276

Closed Light-- closed 4 years ago

Light-- commented 4 years ago

also mentioned in https://github.com/yjxiong/temporal-segment-networks/issues/122#issuecomment-561099235

i build on ubuntu16.04, cuda10, opencv2.4.13.6

$ cmake .. && make -j
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda-10.1 (found suitable exact version "10.1") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found LIBZIP: /usr/local/lib/libzip.so  
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   python
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found version "3.6.9") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/dense_flow/build
Scanning dependencies of target denseflow
[  7%] Building CXX object CMakeFiles/denseflow.dir/src/dense_flow_gpu.cpp.o
[ 14%] Building CXX object CMakeFiles/denseflow.dir/src/zip_utils.cpp.o
[ 21%] Building CXX object CMakeFiles/denseflow.dir/src/common.cpp.o
[ 28%] Building CXX object CMakeFiles/denseflow.dir/src/dense_flow.cpp.o
[ 35%] Building CXX object CMakeFiles/denseflow.dir/src/dense_warp_flow_gpu.cpp.o
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:12:0:
/usr/local/include/opencv2/xfeatures2d.hpp:213:103: error: expected ';' at end of member declaration
     virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE = 0;
                                                                                                       ^
/usr/local/include/opencv2/xfeatures2d.hpp:213:105: error: 'CV_OVERRIDE' does not name a type
     virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE = 0;
                                                                                                         ^
/usr/local/include/opencv2/xfeatures2d.hpp:217:59: error: expected ';' at end of member declaration
                           OutputArrayOfArrays descriptors ) CV_OVERRIDE;
                                                           ^
/usr/local/include/opencv2/xfeatures2d.hpp:217:61: error: 'CV_OVERRIDE' does not name a type
                           OutputArrayOfArrays descriptors ) CV_OVERRIDE;
                                                             ^
/usr/local/include/opencv2/xfeatures2d.hpp:934:22: error: no members matching 'cv::Feature2D::detectAndCompute' in 'class cv::Feature2D'
     using Feature2D::detectAndCompute; // overload, don't hide
                      ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:178:33: error: 'Stream' has not been declared
     void upload(InputArray arr, Stream& stream);
                                 ^
/usr/local/include/opencv2/core/cuda.hpp:195:36: error: 'Stream' has not been declared
     void download(OutputArray dst, Stream& stream) const;
                                    ^
/usr/local/include/opencv2/core/cuda.hpp:204:34: error: 'Stream' has not been declared
     void copyTo(OutputArray dst, Stream& stream) const;
                                  ^
/usr/local/include/opencv2/core/cuda.hpp:210:51: error: 'Stream' has not been declared
     void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
                                                   ^
/usr/local/include/opencv2/core/cuda.hpp:216:29: error: 'Stream' has not been declared
     GpuMat& setTo(Scalar s, Stream& stream);
                             ^
/usr/local/include/opencv2/core/cuda.hpp:222:46: error: 'Stream' has not been declared
     GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);
                                              ^
/usr/local/include/opencv2/core/cuda.hpp:228:48: error: 'Stream' has not been declared
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
                                                ^
/usr/local/include/opencv2/core/cuda.hpp:234:62: error: 'Stream' has not been declared
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
                                                              ^
/usr/local/include/opencv2/core/cuda.hpp:237:75: error: 'Stream' has not been declared
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
                                                                           ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:486:31: error: expected ')' before '&' token
     explicit BufferPool(Stream& stream);
                               ^
/usr/local/include/opencv2/core/cuda.hpp:666:26: error: 'Event' does not name a type
     void waitEvent(const Event& event);
                          ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'cv::cuda::GpuMat cv::cuda::GpuMat::clone() const':
/usr/local/include/opencv2/core/cuda.inl.hpp:157:13: error: no matching function for call to 'cv::cuda::GpuMat::copyTo(cv::cuda::GpuMat&) const'
     copyTo(m);
             ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:201:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray) const
     void copyTo(OutputArray dst) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:201:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/cuda.hpp:204:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, int&) const
     void copyTo(OutputArray dst, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:204:10: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/cuda.hpp:207:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray) const
     void copyTo(OutputArray dst, InputArray mask) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:207:10: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/cuda.hpp:210:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray, int&) const
     void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:210:10: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray) const':
/usr/local/include/opencv2/core/cuda.inl.hpp:164:37: error: no matching function for call to 'cv::cuda::GpuMat::copyTo(const cv::_OutputArray&, const cv::_InputArray&, cv::cuda::Stream&) const'
     copyTo(dst, mask, Stream::Null());
                                     ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:201:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray) const
     void copyTo(OutputArray dst) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:201:10: note:   candidate expects 1 argument, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:204:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, int&) const
     void copyTo(OutputArray dst, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:204:10: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:162:6: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray) const
 void GpuMat::copyTo(OutputArray dst, InputArray mask) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:162:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:210:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray, int&) const
     void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:210:10: note:   no known conversion for argument 3 from 'cv::cuda::Stream' to 'int&'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar)':
/usr/local/include/opencv2/core/cuda.inl.hpp:170:35: error: no matching function for call to 'cv::cuda::GpuMat::setTo(cv::Scalar&, cv::cuda::Stream&)'
     return setTo(s, Stream::Null());
                                   ^
/usr/local/include/opencv2/core/cuda.inl.hpp:168:9: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar)
 GpuMat& GpuMat::setTo(Scalar s)
         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:168:9: note:   candidate expects 1 argument, 2 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:216:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, int&)
     GpuMat& setTo(Scalar s, Stream& stream);
             ^
/usr/local/include/opencv2/core/cuda.hpp:216:13: note:   no known conversion for argument 2 from 'cv::cuda::Stream' to 'int&'
/usr/local/include/opencv2/core/cuda.hpp:219:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray)
     GpuMat& setTo(Scalar s, InputArray mask);
             ^
/usr/local/include/opencv2/core/cuda.hpp:219:13: note:   no known conversion for argument 2 from 'cv::cuda::Stream' to 'cv::InputArray {aka const cv::_InputArray&}'
/usr/local/include/opencv2/core/cuda.hpp:222:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray, int&)
     GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);
             ^
/usr/local/include/opencv2/core/cuda.hpp:222:13: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray)':
/usr/local/include/opencv2/core/cuda.inl.hpp:176:41: error: no matching function for call to 'cv::cuda::GpuMat::setTo(cv::Scalar&, const cv::_InputArray&, cv::cuda::Stream&)'
     return setTo(s, mask, Stream::Null());
                                         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:168:9: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar)
 GpuMat& GpuMat::setTo(Scalar s)
         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:168:9: note:   candidate expects 1 argument, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:216:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, int&)
     GpuMat& setTo(Scalar s, Stream& stream);
             ^
/usr/local/include/opencv2/core/cuda.hpp:216:13: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:174:9: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray)
 GpuMat& GpuMat::setTo(Scalar s, InputArray mask)
         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:174:9: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:222:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray, int&)
     GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);
             ^
/usr/local/include/opencv2/core/cuda.hpp:222:13: note:   no known conversion for argument 3 from 'cv::cuda::Stream' to 'int&'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const':
/usr/local/include/opencv2/core/cuda.inl.hpp:182:41: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(const cv::_OutputArray&, int&, cv::cuda::Stream&) const'
     convertTo(dst, rtype, Stream::Null());
                                         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 3 from 'cv::cuda::Stream' to 'int&'
/usr/local/include/opencv2/core/cuda.hpp:231:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta = 0.0) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:231:10: note:   no known conversion for argument 3 from 'cv::cuda::Stream' to 'double'
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const':
/usr/local/include/opencv2/core/cuda.inl.hpp:188:54: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(const cv::_OutputArray&, int&, double&, double&, cv::cuda::Stream&) const'
     convertTo(dst, rtype, alpha, beta, Stream::Null());
                                                      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 5 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   candidate expects 3 arguments, 5 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   candidate expects 4 arguments, 5 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 5 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   no known conversion for argument 5 from 'cv::cuda::Stream' to 'int&'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: At global scope:
/usr/local/include/opencv2/core/cuda.inl.hpp:192:6: error: prototype for 'void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, cv::cuda::Stream&) const' does not match any in class 'cv::cuda::GpuMat'
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const
      ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:237:10: error: candidates are: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: error:                 void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: error:                 void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:228:10: error:                 void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: error:                 void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'void cv::cuda::GpuMat::assignTo(cv::cuda::GpuMat&, int) const':
/usr/local/include/opencv2/core/cuda.inl.hpp:203:27: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int&) const'
         convertTo(m, _type);
                           ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   candidate expects 4 arguments, 2 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 2 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 2 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: In function 'cv::cuda::GpuMat cv::cuda::createContinuous(int, int, int)':
/usr/local/include/opencv2/core/cuda.inl.hpp:350:41: error: no matching function for call to 'createContinuous(int&, int&, int&, cv::cuda::GpuMat&)'
     createContinuous(rows, cols, type, m);
                                         ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:351:17: note: candidate: void cv::cuda::createContinuous(int, int, int, cv::OutputArray)
 CV_EXPORTS void createContinuous(int rows, int cols, int type, OutputArray arr);
                 ^
/usr/local/include/opencv2/core/cuda.hpp:351:17: note:   no known conversion for argument 4 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:347:8: note: candidate: cv::cuda::GpuMat cv::cuda::createContinuous(int, int, int)
 GpuMat createContinuous(int rows, int cols, int type)
        ^
/usr/local/include/opencv2/core/cuda.inl.hpp:347:8: note:   candidate expects 3 arguments, 4 provided
/usr/local/include/opencv2/core/cuda.inl.hpp: In function 'cv::cuda::GpuMat cv::cuda::createContinuous(cv::Size, int)':
/usr/local/include/opencv2/core/cuda.inl.hpp:364:35: error: no matching function for call to 'createContinuous(cv::Size&, int&, cv::cuda::GpuMat&)'
     createContinuous(size, type, m);
                                   ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:351:17: note: candidate: void cv::cuda::createContinuous(int, int, int, cv::OutputArray)
 CV_EXPORTS void createContinuous(int rows, int cols, int type, OutputArray arr);
                 ^
/usr/local/include/opencv2/core/cuda.hpp:351:17: note:   candidate expects 4 arguments, 3 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:347:8: note: candidate: cv::cuda::GpuMat cv::cuda::createContinuous(int, int, int)
 GpuMat createContinuous(int rows, int cols, int type)
        ^
/usr/local/include/opencv2/core/cuda.inl.hpp:347:8: note:   no known conversion for argument 1 from 'cv::Size {aka cv::Size_<int>}' to 'int'
/usr/local/include/opencv2/core/cuda.inl.hpp:355:6: note: candidate: void cv::cuda::createContinuous(cv::Size, int, cv::OutputArray)
 void createContinuous(Size size, int type, OutputArray arr)
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:355:6: note:   no known conversion for argument 3 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/cuda.inl.hpp:361:8: note: candidate: cv::cuda::GpuMat cv::cuda::createContinuous(cv::Size, int)
 GpuMat createContinuous(Size size, int type)
        ^
/usr/local/include/opencv2/core/cuda.inl.hpp:361:8: note:   candidate expects 2 arguments, 3 provided
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:5:0:
/usr/local/include/opencv2/xfeatures2d.hpp:213:103: error: expected ';' at end of member declaration
     virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE = 0;
                                                                                                       ^
/usr/local/include/opencv2/xfeatures2d.hpp:213:105: error: 'CV_OVERRIDE' does not name a type
     virtual void compute( InputArray image, std::vector<KeyPoint>& keypoints, OutputArray descriptors ) CV_OVERRIDE = 0;
                                                                                                         ^
/usr/local/include/opencv2/xfeatures2d.hpp:217:59: error: expected ';' at end of member declaration
                           OutputArrayOfArrays descriptors ) CV_OVERRIDE;
                                                           ^
/usr/local/include/opencv2/xfeatures2d.hpp:217:61: error: 'CV_OVERRIDE' does not name a type
                           OutputArrayOfArrays descriptors ) CV_OVERRIDE;
                                                             ^
/usr/local/include/opencv2/core/cuda.inl.hpp: In constructor 'cv::cuda::HostMem::HostMem(cv::InputArray, cv::cuda::HostMem::AllocType)':
/usr/local/include/opencv2/core/cuda.inl.hpp:418:30: error: no matching function for call to 'cv::Mat::copyTo(cv::cuda::HostMem&'
     arr.getMat().copyTo(*this);
                              ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1790:10: note: candidate: void cv::Mat::copyTo(cv::OutputArray) const
     void copyTo( OutputArray m ) const;
          ^
/usr/local/include/opencv2/core/core.hpp:1790:10: note:   no known conversion for argument 1 from 'cv::cuda::HostMem' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/core.hpp:1792:10: note: candidate: void cv::Mat::copyTo(cv::OutputArray, cv::InputArray) const
     void copyTo( OutputArray m, InputArray mask ) const;
          ^
/usr/local/include/opencv2/core/core.hpp:1792:10: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'cv::cuda::HostMem cv::cuda::HostMem::clone() const':
/usr/local/include/opencv2/core/cuda.inl.hpp:457:31: error: no matching function for call to 'cv::Mat::copyTo(cv::cuda::HostMem&'
     createMatHeader().copyTo(m);
                               ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1790:10: note: candidate: void cv::Mat::copyTo(cv::OutputArray) const
     void copyTo( OutputArray m ) const;
          ^
/usr/local/include/opencv2/xfeatures2d.hpp:934:22: error: no members matching 'cv::Feature2D::detectAndCompute' in 'class cv::Feature2D'
     using Feature2D::detectAndCompute; // overload, don't hide
                      ^
/usr/local/include/opencv2/core/core.hpp:1790:10: note:   no known conversion for argument 1 from 'cv::cuda::HostMem' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/core.hpp:1792:10: note: candidate: void cv::Mat::copyTo(cv::OutputArray, cv::InputArray) const
     void copyTo( OutputArray m, InputArray mask ) const;
          ^
/usr/local/include/opencv2/core/core.hpp:1792:10: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp: At global scope:
/usr/local/include/opencv2/core/cuda.inl.hpp:621:1: error: prototype for 'cv::Mat::Mat(const cv::cuda::GpuMat&)' does not match any in class 'cv::Mat'
 Mat::Mat(const cuda::GpuMat& m)
 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1760:14: error: candidates are: cv::Mat::Mat(const cv::gpu::GpuMat&)
     explicit Mat(const gpu::GpuMat& m);
              ^
/usr/local/include/opencv2/core/core.hpp:1757:37: error:                 template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
     template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
                                     ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:178:33: error: 'Stream' has not been declared
     void upload(InputArray arr, Stream& stream);
                                 ^
/usr/local/include/opencv2/core/core.hpp:1755:37: error:                 template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1753:37: error:                 template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/cuda.hpp:195:36: error: 'Stream' has not been declared
     void download(OutputArray dst, Stream& stream) const;
                                    ^
/usr/local/include/opencv2/core/core.hpp:1751:51: error:                 template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
     template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1749:44: error:                 template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
     template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
                                            ^
/usr/local/include/opencv2/core/core.hpp:1747:37: error:                 template<class _Tp> cv::Mat::Mat(const std::vector<_RealType>&, bool)
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1745:5: error:                 cv::Mat::Mat(const IplImage*, bool)
     Mat(const IplImage* img, bool copyData=false);
     ^
/usr/local/include/opencv2/core/cuda.hpp:204:34: error: 'Stream' has not been declared
     void copyTo(OutputArray dst, Stream& stream) const;
                                  ^
/usr/local/include/opencv2/core/core.hpp:1743:5: error:                 cv::Mat::Mat(const CvMatND*, bool)
     Mat(const CvMatND* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1741:5: error:                 cv::Mat::Mat(const CvMat*, bool)
     Mat(const CvMat* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1739:5: error:                 cv::Mat::Mat(const cv::Mat&, const cv::Range*)
     Mat(const Mat& m, const Range* ranges);
     ^
/usr/local/include/opencv2/core/core.hpp:1738:5: error:                 cv::Mat::Mat(const cv::Mat&, const Rect&)
     Mat(const Mat& m, const Rect& roi);
     ^
/usr/local/include/opencv2/core/core.hpp:1737:5: error:                 cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     ^
/usr/local/include/opencv2/core/cuda.hpp:210:51: error: 'Stream' has not been declared
     void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1734:5: error:                 cv::Mat::Mat(int, const int*, int, void*, const size_t*)
     Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
     ^
/usr/local/include/opencv2/core/cuda.hpp:216:29: error: 'Stream' has not been declared
     GpuMat& setTo(Scalar s, Stream& stream);
                             ^
In file included from /usr/local/include/opencv2/core/core.hpp:4933:0,
                 from /usr/local/include/opencv2/video/tracking.hpp:50,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:151:8: error:                 cv::Mat::Mat(cv::Size, int, void*, size_t)
 inline Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/cuda.hpp:222:46: error: 'Stream' has not been declared
     GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);
                                              ^
/usr/local/include/opencv2/core/mat.hpp:129:8: error:                 cv::Mat::Mat(int, int, int, void*, size_t)
 inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:111:8: error:                 cv::Mat::Mat(const cv::Mat&)
 inline Mat::Mat(const Mat& m)
        ^
/usr/local/include/opencv2/core/mat.hpp:104:8: error:                 cv::Mat::Mat(int, const int*, int, const Scalar&)
 inline Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:98:8: error:                 cv::Mat::Mat(int, const int*, int)
 inline Mat::Mat(int _dims, const int* _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/cuda.hpp:228:48: error: 'Stream' has not been declared
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
                                                ^
/usr/local/include/opencv2/core/mat.hpp:91:8: error:                 cv::Mat::Mat(cv::Size, int, const Scalar&)
 inline Mat::Mat(Size _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:78:8: error:                 cv::Mat::Mat(int, int, int, const Scalar&)
 inline Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:85:8: error:                 cv::Mat::Mat(cv::Size, int)
 inline Mat::Mat(Size _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:72:8: error:                 cv::Mat::Mat(int, int, int)
 inline Mat::Mat(int _rows, int _cols, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:67:8: error:                 cv::Mat::Mat()
 inline Mat::Mat() : size(&rows)
        ^
/usr/local/include/opencv2/core/cuda.hpp:234:62: error: 'Stream' has not been declared
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
                                                              ^
/usr/local/include/opencv2/core/cuda.hpp:237:75: error: 'Stream' has not been declared
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
                                                                           ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:486:31: error: expected ')' before '&' token
     explicit BufferPool(Stream& stream);
                               ^
/usr/local/include/opencv2/core/cuda.hpp:666:26: error: 'Event' does not name a type
     void waitEvent(const Event& event);
                          ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:20:0:
/home/user/dense_flow/include/warp_flow.h: In function 'void ComputeMatch(const std::vector<cv::KeyPoint>&, const std::vector<cv::KeyPoint>&, const cv::Mat&, const cv::Mat&, std::vector<cv::Point_<float> >&, std::vector<cv::Point_<float> >&)':
/home/user/dense_flow/include/warp_flow.h:120:60: error: call of overloaded 'windowedMatchingMask(const std::vector<cv::KeyPoint>&, const std::vector<cv::KeyPoint>&, int, int)' is ambiguous
     Mat mask = windowedMatchingMask(kpts, prev_kpts, 25, 25);
                                                            ^
/home/user/dense_flow/include/warp_flow.h:8:9: note: candidate: cv::Mat windowedMatchingMask(const std::vector<cv::KeyPoint>&, const std::vector<cv::KeyPoint>&, float, float)
 cv::Mat windowedMatchingMask( const std::vector<cv::KeyPoint>& keypoints1, const std::vector<cv::KeyPoint>& keypoints2,
         ^
In file included from /usr/local/include/opencv2/calib3d/calib3d.hpp:47:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:7:
/usr/local/include/opencv2/features2d/features2d.hpp:874:16: note: candidate: cv::Mat cv::windowedMatchingMask(const std::vector<cv::KeyPoint>&, const std::vector<cv::KeyPoint>&, float, float)
 CV_EXPORTS Mat windowedMatchingMask( const vector<KeyPoint>& keypoints1, const vector<KeyPoint>& keypoints2,
                ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'cv::cuda::GpuMat cv::cuda::GpuMat::clone() const':
/usr/local/include/opencv2/core/cuda.inl.hpp:157:13: error: no matching function for call to 'cv::cuda::GpuMat::copyTo(cv::cuda::GpuMat&) const'
     copyTo(m);
             ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:201:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray) const
     void copyTo(OutputArray dst) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:201:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/cuda.hpp:204:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, int&) const
     void copyTo(OutputArray dst, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:204:10: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/cuda.hpp:207:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray) const
     void copyTo(OutputArray dst, InputArray mask) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:207:10: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/cuda.hpp:210:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray, int&) const
     void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:210:10: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray) const':
/usr/local/include/opencv2/core/cuda.inl.hpp:164:37: error: no matching function for call to 'cv::cuda::GpuMat::copyTo(const cv::_OutputArray&, const cv::_InputArray&, cv::cuda::Stream&) const'
     copyTo(dst, mask, Stream::Null());
                                     ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:201:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray) const
     void copyTo(OutputArray dst) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:201:10: note:   candidate expects 1 argument, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:204:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, int&) const
     void copyTo(OutputArray dst, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:204:10: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:162:6: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray) const
 void GpuMat::copyTo(OutputArray dst, InputArray mask) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:162:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:210:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray, int&) const
     void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:210:10: note:   no known conversion for argument 3 from 'cv::cuda::Stream' to 'int&'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar)':
/usr/local/include/opencv2/core/cuda.inl.hpp:170:35: error: no matching function for call to 'cv::cuda::GpuMat::setTo(cv::Scalar&, cv::cuda::Stream&)'
     return setTo(s, Stream::Null());
                                   ^
/usr/local/include/opencv2/core/cuda.inl.hpp:168:9: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar)
 GpuMat& GpuMat::setTo(Scalar s)
         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:168:9: note:   candidate expects 1 argument, 2 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:216:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, int&)
     GpuMat& setTo(Scalar s, Stream& stream);
             ^
/usr/local/include/opencv2/core/cuda.hpp:216:13: note:   no known conversion for argument 2 from 'cv::cuda::Stream' to 'int&'
/usr/local/include/opencv2/core/cuda.hpp:219:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray)
     GpuMat& setTo(Scalar s, InputArray mask);
             ^
/usr/local/include/opencv2/core/cuda.hpp:219:13: note:   no known conversion for argument 2 from 'cv::cuda::Stream' to 'cv::InputArray {aka const cv::_InputArray&}'
/usr/local/include/opencv2/core/cuda.hpp:222:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray, int&)
     GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);
             ^
/usr/local/include/opencv2/core/cuda.hpp:222:13: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray)':
/usr/local/include/opencv2/core/cuda.inl.hpp:176:41: error: no matching function for call to 'cv::cuda::GpuMat::setTo(cv::Scalar&, const cv::_InputArray&, cv::cuda::Stream&)'
     return setTo(s, mask, Stream::Null());
                                         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:168:9: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar)
 GpuMat& GpuMat::setTo(Scalar s)
         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:168:9: note:   candidate expects 1 argument, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:216:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, int&)
     GpuMat& setTo(Scalar s, Stream& stream);
             ^
/usr/local/include/opencv2/core/cuda.hpp:216:13: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:174:9: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray)
 GpuMat& GpuMat::setTo(Scalar s, InputArray mask)
         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:174:9: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:222:13: note: candidate: cv::cuda::GpuMat& cv::cuda::GpuMat::setTo(cv::Scalar, cv::InputArray, int&)
     GpuMat& setTo(Scalar s, InputArray mask, Stream& stream);
             ^
/usr/local/include/opencv2/core/cuda.hpp:222:13: note:   no known conversion for argument 3 from 'cv::cuda::Stream' to 'int&'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const':
/usr/local/include/opencv2/core/cuda.inl.hpp:182:41: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(const cv::_OutputArray&, int&, cv::cuda::Stream&) const'
     convertTo(dst, rtype, Stream::Null());
                                         ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 3 from 'cv::cuda::Stream' to 'int&'
/usr/local/include/opencv2/core/cuda.hpp:231:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta = 0.0) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:231:10: note:   no known conversion for argument 3 from 'cv::cuda::Stream' to 'double'
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const':
/usr/local/include/opencv2/core/cuda.inl.hpp:188:54: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(const cv::_OutputArray&, int&, double&, double&, cv::cuda::Stream&) const'
     convertTo(dst, rtype, alpha, beta, Stream::Null());
                                                      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 5 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   candidate expects 3 arguments, 5 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   candidate expects 4 arguments, 5 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 5 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   no known conversion for argument 5 from 'cv::cuda::Stream' to 'int&'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: At global scope:
/usr/local/include/opencv2/core/cuda.inl.hpp:192:6: error: prototype for 'void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, cv::cuda::Stream&) const' does not match any in class 'cv::cuda::GpuMat'
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const
      ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:237:10: error: candidates are: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: error:                 void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: error:                 void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:228:10: error:                 void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: error:                 void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'void cv::cuda::GpuMat::assignTo(cv::cuda::GpuMat&, int) const':
/usr/local/include/opencv2/core/cuda.inl.hpp:203:27: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int&) const'
         convertTo(m, _type);
                           ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   candidate expects 4 arguments, 2 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 2 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 2 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: In function 'cv::cuda::GpuMat cv::cuda::createContinuous(int, int, int)':
/usr/local/include/opencv2/core/cuda.inl.hpp:350:41: error: no matching function for call to 'createContinuous(int&, int&, int&, cv::cuda::GpuMat&)'
     createContinuous(rows, cols, type, m);
                                         ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:351:17: note: candidate: void cv::cuda::createContinuous(int, int, int, cv::OutputArray)
 CV_EXPORTS void createContinuous(int rows, int cols, int type, OutputArray arr);
                 ^
/usr/local/include/opencv2/core/cuda.hpp:351:17: note:   no known conversion for argument 4 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:347:8: note: candidate: cv::cuda::GpuMat cv::cuda::createContinuous(int, int, int)
 GpuMat createContinuous(int rows, int cols, int type)
        ^
/usr/local/include/opencv2/core/cuda.inl.hpp:347:8: note:   candidate expects 3 arguments, 4 provided
/usr/local/include/opencv2/core/cuda.inl.hpp: In function 'cv::cuda::GpuMat cv::cuda::createContinuous(cv::Size, int)':
/usr/local/include/opencv2/core/cuda.inl.hpp:364:35: error: no matching function for call to 'createContinuous(cv::Size&, int&, cv::cuda::GpuMat&)'
     createContinuous(size, type, m);
                                   ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:351:17: note: candidate: void cv::cuda::createContinuous(int, int, int, cv::OutputArray)
 CV_EXPORTS void createContinuous(int rows, int cols, int type, OutputArray arr);
                 ^
/usr/local/include/opencv2/core/cuda.hpp:351:17: note:   candidate expects 4 arguments, 3 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:347:8: note: candidate: cv::cuda::GpuMat cv::cuda::createContinuous(int, int, int)
 GpuMat createContinuous(int rows, int cols, int type)
        ^
/usr/local/include/opencv2/core/cuda.inl.hpp:347:8: note:   no known conversion for argument 1 from 'cv::Size {aka cv::Size_<int>}' to 'int'
/usr/local/include/opencv2/core/cuda.inl.hpp:355:6: note: candidate: void cv::cuda::createContinuous(cv::Size, int, cv::OutputArray)
 void createContinuous(Size size, int type, OutputArray arr)
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:355:6: note:   no known conversion for argument 3 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/cuda.inl.hpp:361:8: note: candidate: cv::cuda::GpuMat cv::cuda::createContinuous(cv::Size, int)
 GpuMat createContinuous(Size size, int type)
        ^
/usr/local/include/opencv2/core/cuda.inl.hpp:361:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.inl.hpp: In constructor 'cv::cuda::HostMem::HostMem(cv::InputArray, cv::cuda::HostMem::AllocType)':
/usr/local/include/opencv2/core/cuda.inl.hpp:418:30: error: no matching function for call to 'cv::Mat::copyTo(cv::cuda::HostMem&'
     arr.getMat().copyTo(*this);
                              ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1790:10: note: candidate: void cv::Mat::copyTo(cv::OutputArray) const
     void copyTo( OutputArray m ) const;
          ^
/usr/local/include/opencv2/core/core.hpp:1790:10: note:   no known conversion for argument 1 from 'cv::cuda::HostMem' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/core.hpp:1792:10: note: candidate: void cv::Mat::copyTo(cv::OutputArray, cv::InputArray) const
     void copyTo( OutputArray m, InputArray mask ) const;
          ^
/usr/local/include/opencv2/core/core.hpp:1792:10: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: In member function 'cv::cuda::HostMem cv::cuda::HostMem::clone() const':
/usr/local/include/opencv2/core/cuda.inl.hpp:457:31: error: no matching function for call to 'cv::Mat::copyTo(cv::cuda::HostMem&'
     createMatHeader().copyTo(m);
                               ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1790:10: note: candidate: void cv::Mat::copyTo(cv::OutputArray) const
     void copyTo( OutputArray m ) const;
          ^
/usr/local/include/opencv2/core/core.hpp:1790:10: note:   no known conversion for argument 1 from 'cv::cuda::HostMem' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/core.hpp:1792:10: note: candidate: void cv::Mat::copyTo(cv::OutputArray, cv::InputArray) const
     void copyTo( OutputArray m, InputArray mask ) const;
          ^
/usr/local/include/opencv2/core/core.hpp:1792:10: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp: At global scope:
/usr/local/include/opencv2/core/cuda.inl.hpp:621:1: error: prototype for 'cv::Mat::Mat(const cv::cuda::GpuMat&)' does not match any in class 'cv::Mat'
 Mat::Mat(const cuda::GpuMat& m)
 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1760:14: error: candidates are: cv::Mat::Mat(const cv::gpu::GpuMat&)
     explicit Mat(const gpu::GpuMat& m);
              ^
/usr/local/include/opencv2/core/core.hpp:1757:37: error:                 template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
     template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1755:37: error:                 template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1753:37: error:                 template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1751:51: error:                 template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
     template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1749:44: error:                 template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
     template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
                                            ^
/usr/local/include/opencv2/core/core.hpp:1747:37: error:                 template<class _Tp> cv::Mat::Mat(const std::vector<_RealType>&, bool)
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1745:5: error:                 cv::Mat::Mat(const IplImage*, bool)
     Mat(const IplImage* img, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1743:5: error:                 cv::Mat::Mat(const CvMatND*, bool)
     Mat(const CvMatND* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1741:5: error:                 cv::Mat::Mat(const CvMat*, bool)
     Mat(const CvMat* m, bool copyData=false);
     ^
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp: In function 'void calcDenseWarpFlowGPU(std::__cxx11::string, int, int, int, int, std::vector<std::vector<unsigned char> >&, std::vector<std::vector<unsigned char> >&)':
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:90:49: error: no matching function for call to 'cv::cuda::FarnebackOpticalFlow::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
      alg_farn->calc(d_frame_0, d_frame_1, d_flow);
                                                 ^
/usr/local/include/opencv2/core/core.hpp:1739:5: error:                 cv::Mat::Mat(const cv::Mat&, const cv::Range*)
     Mat(const Mat& m, const Range* ranges);
     ^
/usr/local/include/opencv2/core/core.hpp:1738:5: error:                 cv::Mat::Mat(const cv::Mat&, const Rect&)
     Mat(const Mat& m, const Rect& roi);
     ^
/usr/local/include/opencv2/core/core.hpp:1737:5: error:                 cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     ^
/usr/local/include/opencv2/core/core.hpp:1734:5: error:                 cv::Mat::Mat(int, const int*, int, void*, const size_t*)
     Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
     ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:14:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:94:49: error: no matching function for call to 'cv::cuda::OpticalFlowDual_TVL1::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
      alg_tvl1->calc(d_frame_0, d_frame_1, d_flow);
                                                 ^
In file included from /usr/local/include/opencv2/core/core.hpp:4933:0,
                 from /usr/local/include/opencv2/video/tracking.hpp:50,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/mat.hpp:151:8: error:                 cv::Mat::Mat(cv::Size, int, void*, size_t)
 inline Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
        ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:14:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/core/mat.hpp:129:8: error:                 cv::Mat::Mat(int, int, int, void*, size_t)
 inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/usr/local/include/opencv2/core/mat.hpp:111:8: error:                 cv::Mat::Mat(const cv::Mat&)
 inline Mat::Mat(const Mat& m)
        ^
/usr/local/include/opencv2/core/mat.hpp:104:8: error:                 cv::Mat::Mat(int, const int*, int, const Scalar&)
 inline Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:98:8: error:                 cv::Mat::Mat(int, const int*, int)
 inline Mat::Mat(int _dims, const int* _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:91:8: error:                 cv::Mat::Mat(cv::Size, int, const Scalar&)
 inline Mat::Mat(Size _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:78:8: error:                 cv::Mat::Mat(int, int, int, const Scalar&)
 inline Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:85:8: error:                 cv::Mat::Mat(cv::Size, int)
 inline Mat::Mat(Size _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:72:8: error:                 cv::Mat::Mat(int, int, int)
 inline Mat::Mat(int _rows, int _cols, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:67:8: error:                 cv::Mat::Mat()
 inline Mat::Mat() : size(&rows)
        ^
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:99:54: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int, double)'
      d_frame_0.convertTo(d_buf_0, CV_32F, 1.0 / 255.0);
                                                      ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:100:54: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int, double)'
      d_frame_1.convertTo(d_buf_1, CV_32F, 1.0 / 255.0);
                                                      ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:101:45: error: no matching function for call to 'cv::cuda::BroxOpticalFlow::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
      alg_brox->calc(d_buf_0, d_buf_1, d_flow);
                                             ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:14:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:109:39: error: no matching function for call to 'split(cv::cuda::GpuMat&, cv::cuda::GpuMat [2])'
             cuda::split(d_flow, planes);
                                       ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:0:
/usr/local/include/opencv2/cudaarithm.hpp:453:17: note: candidate: void cv::cuda::split(cv::InputArray, cv::cuda::GpuMat*, cv::cuda::Stream&)
 CV_EXPORTS void split(InputArray src, GpuMat* dst, Stream& stream = Stream::Null());
                 ^
/usr/local/include/opencv2/cudaarithm.hpp:453:17: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/usr/local/include/opencv2/cudaarithm.hpp:455:17: note: candidate: void cv::cuda::split(cv::InputArray, std::vector<cv::cuda::GpuMat>&, cv::cuda::Stream&)
 CV_EXPORTS void split(InputArray src, std::vector<GpuMat>& dst, Stream& stream = Stream::Null());
                 ^
/usr/local/include/opencv2/cudaarithm.hpp:455:17: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:112:33: error: no matching function for call to 'cv::Mat::Mat(cv::cuda::GpuMat&)'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1760:14: note: candidate: cv::Mat::Mat(const cv::gpu::GpuMat&)
     explicit Mat(const gpu::GpuMat& m);
              ^
/usr/local/include/opencv2/core/core.hpp:1760:14: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::gpu::GpuMat&'
/usr/local/include/opencv2/core/core.hpp:1757:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
     template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1757:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:112:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::MatCommaInitializer_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1755:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1755:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:112:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point3_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1753:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1753:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:112:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1751:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
     template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1751:51: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:112:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Matx<_Tp, m, n>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1749:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
     template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
                                            ^
/usr/local/include/opencv2/core/core.hpp:1749:44: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:112:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Vec<_Tp, m>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1747:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_RealType>&, bool)
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1747:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:112:33: note:   'cv::cuda::GpuMat' is not derived from 'const std::vector<_RealType>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1745:5: note: candidate: cv::Mat::Mat(const IplImage*, bool)
     Mat(const IplImage* img, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1745:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const IplImage* {aka const _IplImage*}'
/usr/local/include/opencv2/core/core.hpp:1743:5: note: candidate: cv::Mat::Mat(const CvMatND*, bool)
     Mat(const CvMatND* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1743:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMatND*'
/usr/local/include/opencv2/core/core.hpp:1741:5: note: candidate: cv::Mat::Mat(const CvMat*, bool)
     Mat(const CvMat* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1741:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMat*'
/usr/local/include/opencv2/core/core.hpp:1739:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
     Mat(const Mat& m, const Range* ranges);
     ^
/usr/local/include/opencv2/core/core.hpp:1739:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1738:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
     Mat(const Mat& m, const Rect& roi);
     ^
/usr/local/include/opencv2/core/core.hpp:1738:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1737:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     ^
/usr/local/include/opencv2/core/core.hpp:1737:5: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1734:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
     Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
     ^
/usr/local/include/opencv2/core/core.hpp:1734:5: note:   candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/core.hpp:4933:0,
                 from /usr/local/include/opencv2/video/tracking.hpp:50,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:151:8: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
 inline Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:151:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:129:8: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
 inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:129:8: note:   candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:111:8: note: candidate: cv::Mat::Mat(const cv::Mat&)
 inline Mat::Mat(const Mat& m)
        ^
/usr/local/include/opencv2/core/mat.hpp:111:8: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::Mat&'
/usr/local/include/opencv2/core/mat.hpp:104:8: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
 inline Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:104:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:98:8: note: candidate: cv::Mat::Mat(int, const int*, int)
 inline Mat::Mat(int _dims, const int* _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:98:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:91:8: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
 inline Mat::Mat(Size _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:91:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:78:8: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
 inline Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:78:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:85:8: note: candidate: cv::Mat::Mat(cv::Size, int)
 inline Mat::Mat(Size _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:85:8: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:72:8: note: candidate: cv::Mat::Mat(int, int, int)
 inline Mat::Mat(int _rows, int _cols, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:72:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:67:8: note: candidate: cv::Mat::Mat()
 inline Mat::Mat() : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:67:8: note:   candidate expects 0 arguments, 1 provided
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:113:33: error: no matching function for call to 'cv::Mat::Mat(cv::cuda::GpuMat&)'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1760:14: note: candidate: cv::Mat::Mat(const cv::gpu::GpuMat&)
     explicit Mat(const gpu::GpuMat& m);
              ^
/usr/local/include/opencv2/core/core.hpp:1760:14: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::gpu::GpuMat&'
/usr/local/include/opencv2/core/core.hpp:1757:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
     template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1757:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:113:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::MatCommaInitializer_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1755:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1755:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:113:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point3_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1753:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1753:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:113:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1751:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
     template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1751:51: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:113:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Matx<_Tp, m, n>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1749:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
     template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
                                            ^
/usr/local/include/opencv2/core/core.hpp:1749:44: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:113:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Vec<_Tp, m>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1747:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_RealType>&, bool)
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1747:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:113:33: note:   'cv::cuda::GpuMat' is not derived from 'const std::vector<_RealType>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/core.hpp:1745:5: note: candidate: cv::Mat::Mat(const IplImage*, bool)
     Mat(const IplImage* img, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1745:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const IplImage* {aka const _IplImage*}'
/usr/local/include/opencv2/core/core.hpp:1743:5: note: candidate: cv::Mat::Mat(const CvMatND*, bool)
     Mat(const CvMatND* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1743:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMatND*'
/usr/local/include/opencv2/core/core.hpp:1741:5: note: candidate: cv::Mat::Mat(const CvMat*, bool)
     Mat(const CvMat* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1741:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMat*'
/usr/local/include/opencv2/core/core.hpp:1739:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
     Mat(const Mat& m, const Range* ranges);
     ^
/usr/local/include/opencv2/core/core.hpp:1739:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1738:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
     Mat(const Mat& m, const Rect& roi);
     ^
/usr/local/include/opencv2/core/core.hpp:1738:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1737:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     ^
/usr/local/include/opencv2/core/core.hpp:1737:5: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1734:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
     Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
     ^
/usr/local/include/opencv2/core/core.hpp:1734:5: note:   candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/core.hpp:4933:0,
                 from /usr/local/include/opencv2/video/tracking.hpp:50,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:151:8: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
 inline Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:151:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:129:8: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
 inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:129:8: note:   candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:111:8: note: candidate: cv::Mat::Mat(const cv::Mat&)
 inline Mat::Mat(const Mat& m)
        ^
/usr/local/include/opencv2/core/mat.hpp:111:8: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::Mat&'
/usr/local/include/opencv2/core/mat.hpp:104:8: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
 inline Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:104:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:98:8: note: candidate: cv::Mat::Mat(int, const int*, int)
 inline Mat::Mat(int _dims, const int* _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:98:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:91:8: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
 inline Mat::Mat(Size _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:91:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:78:8: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
 inline Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:78:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:85:8: note: candidate: cv::Mat::Mat(cv::Size, int)
 inline Mat::Mat(Size _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:85:8: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:72:8: note: candidate: cv::Mat::Mat(int, int, int)
 inline Mat::Mat(int _rows, int _cols, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:72:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:67:8: note: candidate: cv::Mat::Mat()
 inline Mat::Mat() : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:67:8: note:   candidate expects 0 arguments, 1 provided
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:139:49: error: no matching function for call to 'cv::cuda::FarnebackOpticalFlow::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
      alg_farn->calc(d_frame_0, d_frame_1, d_flow);
                                                 ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:14:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:143:49: error: no matching function for call to 'cv::cuda::OpticalFlowDual_TVL1::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
      alg_tvl1->calc(d_frame_0, d_frame_1, d_flow);
                                                 ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:14:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:148:54: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int, double)'
      d_frame_0.convertTo(d_buf_0, CV_32F, 1.0 / 255.0);
                                                      ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:149:54: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int, double)'
      d_frame_1.convertTo(d_buf_1, CV_32F, 1.0 / 255.0);
                                                      ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:150:45: error: no matching function for call to 'cv::cuda::BroxOpticalFlow::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
      alg_brox->calc(d_buf_0, d_buf_1, d_flow);
                                             ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:14:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_warp_flow_gpu.cpp:159:39: error: no matching function for call to 'split(cv::cuda::GpuMat&, cv::cuda::GpuMat [2])'
             cuda::split(d_flow, planes);
                                       ^
In file included from /home/user/dense_flow/src/dense_warp_flow_gpu.cpp:13:0:
/usr/local/include/opencv2/cudaarithm.hpp:453:17: note: candidate: void cv::cuda::split(cv::InputArray, cv::cuda::GpuMat*, cv::cuda::Stream&)
 CV_EXPORTS void split(InputArray src, GpuMat* dst, Stream& stream = Stream::Null());
                 ^
/usr/local/include/opencv2/cudaarithm.hpp:453:17: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/usr/local/include/opencv2/cudaarithm.hpp:455:17: note: candidate: void cv::cuda::split(cv::InputArray, std::vector<cv::cuda::GpuMat>&, cv::cuda::Stream&)
 CV_EXPORTS void split(InputArray src, std::vector<GpuMat>& dst, Stream& stream = Stream::Null());
                 ^
/usr/local/include/opencv2/cudaarithm.hpp:455:17: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp: In function 'void calcDenseFlowGPU(std::__cxx11::string, int, int, int, int, std::vector<std::vector<unsigned char> >&, std::vector<std::vector<unsigned char> >&, std::vector<std::vector<unsigned char> >&, int, int)':
/home/user/dense_flow/src/dense_flow_gpu.cpp:76:64: error: no matching function for call to 'cv::cuda::FarnebackOpticalFlow::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
                     alg_farn->calc(d_frame_0, d_frame_1, d_flow);
                                                                ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:7:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:80:64: error: no matching function for call to 'cv::cuda::OpticalFlowDual_TVL1::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
                     alg_tvl1->calc(d_frame_0, d_frame_1, d_flow);
                                                                ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:7:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:85:69: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int, double)'
                     d_frame_0.convertTo(d_buf_0, CV_32F, 1.0 / 255.0);
                                                                     ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp:86:69: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int, double)'
                     d_frame_1.convertTo(d_buf_1, CV_32F, 1.0 / 255.0);
                                                                     ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp:87:60: error: no matching function for call to 'cv::cuda::BroxOpticalFlow::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
                     alg_brox->calc(d_buf_0, d_buf_1, d_flow);
                                                            ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:7:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:104:39: error: no matching function for call to 'split(cv::cuda::GpuMat&, cv::cuda::GpuMat [2])'
             cuda::split(d_flow, planes);
                                       ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:0:
/usr/local/include/opencv2/cudaarithm.hpp:453:17: note: candidate: void cv::cuda::split(cv::InputArray, cv::cuda::GpuMat*, cv::cuda::Stream&)
 CV_EXPORTS void split(InputArray src, GpuMat* dst, Stream& stream = Stream::Null());
                 ^
/usr/local/include/opencv2/cudaarithm.hpp:453:17: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/usr/local/include/opencv2/cudaarithm.hpp:455:17: note: candidate: void cv::cuda::split(cv::InputArray, std::vector<cv::cuda::GpuMat>&, cv::cuda::Stream&)
 CV_EXPORTS void split(InputArray src, std::vector<GpuMat>& dst, Stream& stream = Stream::Null());
                 ^
/usr/local/include/opencv2/cudaarithm.hpp:455:17: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:107:33: error: no matching function for call to 'cv::Mat::Mat(cv::cuda::GpuMat&)'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1760:14: note: candidate: cv::Mat::Mat(const cv::gpu::GpuMat&)
     explicit Mat(const gpu::GpuMat& m);
              ^
/usr/local/include/opencv2/core/core.hpp:1760:14: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::gpu::GpuMat&'
/usr/local/include/opencv2/core/core.hpp:1757:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
     template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1757:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:107:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::MatCommaInitializer_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1755:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1755:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:107:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point3_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1753:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1753:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:107:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1751:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
     template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1751:51: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:107:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Matx<_Tp, m, n>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1749:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
     template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
                                            ^
/usr/local/include/opencv2/core/core.hpp:1749:44: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:107:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Vec<_Tp, m>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1747:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_RealType>&, bool)
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1747:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:107:33: note:   'cv::cuda::GpuMat' is not derived from 'const std::vector<_RealType>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1745:5: note: candidate: cv::Mat::Mat(const IplImage*, bool)
     Mat(const IplImage* img, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1745:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const IplImage* {aka const _IplImage*}'
/usr/local/include/opencv2/core/core.hpp:1743:5: note: candidate: cv::Mat::Mat(const CvMatND*, bool)
     Mat(const CvMatND* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1743:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMatND*'
/usr/local/include/opencv2/core/core.hpp:1741:5: note: candidate: cv::Mat::Mat(const CvMat*, bool)
     Mat(const CvMat* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1741:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMat*'
/usr/local/include/opencv2/core/core.hpp:1739:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
     Mat(const Mat& m, const Range* ranges);
     ^
/usr/local/include/opencv2/core/core.hpp:1739:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1738:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
     Mat(const Mat& m, const Rect& roi);
     ^
/usr/local/include/opencv2/core/core.hpp:1738:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1737:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     ^
/usr/local/include/opencv2/core/core.hpp:1737:5: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1734:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
     Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
     ^
/usr/local/include/opencv2/core/core.hpp:1734:5: note:   candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/core.hpp:4933:0,
                 from /usr/local/include/opencv2/video/tracking.hpp:50,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/mat.hpp:151:8: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
 inline Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:151:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:129:8: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
 inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:129:8: note:   candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:111:8: note: candidate: cv::Mat::Mat(const cv::Mat&)
 inline Mat::Mat(const Mat& m)
        ^
/usr/local/include/opencv2/core/mat.hpp:111:8: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::Mat&'
/usr/local/include/opencv2/core/mat.hpp:104:8: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
 inline Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:104:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:98:8: note: candidate: cv::Mat::Mat(int, const int*, int)
 inline Mat::Mat(int _dims, const int* _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:98:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:91:8: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
 inline Mat::Mat(Size _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:91:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:78:8: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
 inline Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:78:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:85:8: note: candidate: cv::Mat::Mat(cv::Size, int)
 inline Mat::Mat(Size _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:85:8: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:72:8: note: candidate: cv::Mat::Mat(int, int, int)
 inline Mat::Mat(int _rows, int _cols, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:72:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:67:8: note: candidate: cv::Mat::Mat()
 inline Mat::Mat() : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:67:8: note:   candidate expects 0 arguments, 1 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp:108:33: error: no matching function for call to 'cv::Mat::Mat(cv::cuda::GpuMat&)'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1760:14: note: candidate: cv::Mat::Mat(const cv::gpu::GpuMat&)
     explicit Mat(const gpu::GpuMat& m);
              ^
/usr/local/include/opencv2/core/core.hpp:1760:14: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::gpu::GpuMat&'
/usr/local/include/opencv2/core/core.hpp:1757:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
     template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1757:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:108:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::MatCommaInitializer_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1755:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1755:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:108:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point3_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1753:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1753:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:108:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1751:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
     template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1751:51: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:108:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Matx<_Tp, m, n>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1749:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
     template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
                                            ^
/usr/local/include/opencv2/core/core.hpp:1749:44: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:108:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Vec<_Tp, m>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1747:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_RealType>&, bool)
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1747:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:108:33: note:   'cv::cuda::GpuMat' is not derived from 'const std::vector<_RealType>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1745:5: note: candidate: cv::Mat::Mat(const IplImage*, bool)
     Mat(const IplImage* img, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1745:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const IplImage* {aka const _IplImage*}'
/usr/local/include/opencv2/core/core.hpp:1743:5: note: candidate: cv::Mat::Mat(const CvMatND*, bool)
     Mat(const CvMatND* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1743:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMatND*'
/usr/local/include/opencv2/core/core.hpp:1741:5: note: candidate: cv::Mat::Mat(const CvMat*, bool)
     Mat(const CvMat* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1741:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMat*'
/usr/local/include/opencv2/core/core.hpp:1739:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
     Mat(const Mat& m, const Range* ranges);
     ^
/usr/local/include/opencv2/core/core.hpp:1739:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1738:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
     Mat(const Mat& m, const Rect& roi);
     ^
/usr/local/include/opencv2/core/core.hpp:1738:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1737:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     ^
/usr/local/include/opencv2/core/core.hpp:1737:5: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1734:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
     Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
     ^
/usr/local/include/opencv2/core/core.hpp:1734:5: note:   candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/core.hpp:4933:0,
                 from /usr/local/include/opencv2/video/tracking.hpp:50,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/mat.hpp:151:8: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
 inline Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:151:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:129:8: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
 inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:129:8: note:   candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:111:8: note: candidate: cv::Mat::Mat(const cv::Mat&)
 inline Mat::Mat(const Mat& m)
        ^
/usr/local/include/opencv2/core/mat.hpp:111:8: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::Mat&'
/usr/local/include/opencv2/core/mat.hpp:104:8: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
 inline Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:104:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:98:8: note: candidate: cv::Mat::Mat(int, const int*, int)
 inline Mat::Mat(int _dims, const int* _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:98:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:91:8: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
 inline Mat::Mat(Size _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:91:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:78:8: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
 inline Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:78:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:85:8: note: candidate: cv::Mat::Mat(cv::Size, int)
 inline Mat::Mat(Size _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:85:8: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:72:8: note: candidate: cv::Mat::Mat(int, int, int)
 inline Mat::Mat(int _rows, int _cols, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:72:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:67:8: note: candidate: cv::Mat::Mat()
 inline Mat::Mat() : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:67:8: note:   candidate expects 0 arguments, 1 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp: In function 'void calcDenseFlowPureGPU(std::__cxx11::string, int, int, int, int, std::vector<std::vector<unsigned char> >&, std::vector<std::vector<unsigned char> >&, std::vector<std::vector<unsigned char> >&)':
/home/user/dense_flow/src/dense_flow_gpu.cpp:160:65: error: no matching function for call to 'cv::cudacodec::VideoReader::nextFrame(cv::cuda::GpuMat&)'
             bool success = video_stream->nextFrame(capture_frame);
                                                                 ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:8:0:
/usr/local/include/opencv2/cudacodec.hpp:297:18: note: candidate: virtual bool cv::cudacodec::VideoReader::nextFrame(cv::OutputArray)
     virtual bool nextFrame(OutputArray frame) = 0;
                  ^
/usr/local/include/opencv2/cudacodec.hpp:297:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:168:44: error: no matching function for call to 'cv::cuda::GpuMat::copyTo(cv::cuda::GpuMat&)'
             capture_frame.copyTo(prev_image);
                                            ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:201:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray) const
     void copyTo(OutputArray dst) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:201:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/cuda.hpp:204:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, int&) const
     void copyTo(OutputArray dst, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:204:10: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:162:6: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray) const
 void GpuMat::copyTo(OutputArray dst, InputArray mask) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:162:6: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:210:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray, int&) const
     void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:210:10: note:   candidate expects 3 arguments, 1 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp:169:59: error: invalid initialization of reference of type 'cv::InputArray {aka const cv::_InputArray&}' from expression of type 'cv::cuda::GpuMat'
             cvtColor(prev_image, prev_gray, COLOR_BGR2GRAY);
                                                           ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:51:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/imgproc/imgproc.hpp:1087:19: note: in passing argument 1 of 'void cv::cvtColor(cv::InputArray, cv::OutputArray, int, int)'
 CV_EXPORTS_W void cvtColor( InputArray src, OutputArray dst, int code, int dstCn=0 );
                   ^
/home/user/dense_flow/src/dense_flow_gpu.cpp:173:54: error: no matching function for call to 'cv::cudacodec::VideoReader::nextFrame(cv::cuda::GpuMat&)'
                 video_stream->nextFrame(capture_frame);
                                                      ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:8:0:
/usr/local/include/opencv2/cudacodec.hpp:297:18: note: candidate: virtual bool cv::cudacodec::VideoReader::nextFrame(cv::OutputArray)
     virtual bool nextFrame(OutputArray frame) = 0;
                  ^
/usr/local/include/opencv2/cudacodec.hpp:297:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:176:47: error: no matching function for call to 'cv::cuda::GpuMat::copyTo(cv::cuda::GpuMat&)'
             capture_frame.copyTo(capture_image);
                                               ^
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:201:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray) const
     void copyTo(OutputArray dst) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:201:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/usr/local/include/opencv2/core/cuda.hpp:204:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, int&) const
     void copyTo(OutputArray dst, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:204:10: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:162:6: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray) const
 void GpuMat::copyTo(OutputArray dst, InputArray mask) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:162:6: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:210:10: note: candidate: void cv::cuda::GpuMat::copyTo(cv::OutputArray, cv::InputArray, int&) const
     void copyTo(OutputArray dst, InputArray mask, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:210:10: note:   candidate expects 3 arguments, 1 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp:177:65: error: invalid initialization of reference of type 'cv::InputArray {aka const cv::_InputArray&}' from expression of type 'cv::cuda::GpuMat'
             cvtColor(capture_image, capture_gray, COLOR_BGR2GRAY);
                                                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:51:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/imgproc/imgproc.hpp:1087:19: note: in passing argument 1 of 'void cv::cvtColor(cv::InputArray, cv::OutputArray, int, int)'
 CV_EXPORTS_W void cvtColor( InputArray src, OutputArray dst, int code, int dstCn=0 );
                   ^
/home/user/dense_flow/src/dense_flow_gpu.cpp:181:67: error: no matching function for call to 'cv::cuda::FarnebackOpticalFlow::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
                     alg_farn->calc(prev_gray, capture_gray, d_flow);
                                                                   ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:7:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:185:67: error: no matching function for call to 'cv::cuda::OpticalFlowDual_TVL1::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
                     alg_tvl1->calc(prev_gray, capture_gray, d_flow);
                                                                   ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:7:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:190:69: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int, double)'
                     prev_gray.convertTo(d_buf_0, CV_32F, 1.0 / 255.0);
                                                                     ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp:191:72: error: no matching function for call to 'cv::cuda::GpuMat::convertTo(cv::cuda::GpuMat&, int, double)'
                     capture_gray.convertTo(d_buf_1, CV_32F, 1.0 / 255.0);
                                                                        ^
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int) const
 void GpuMat::convertTo(OutputArray dst, int rtype) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:180:6: note:   candidate expects 2 arguments, 3 provided
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:228:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, int&) const
     void convertTo(OutputArray dst, int rtype, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:228:10: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/core/cuda.hpp:1047:0,
                 from /usr/local/include/opencv2/cudaarithm.hpp:50,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double) const
 void GpuMat::convertTo(OutputArray dst, int rtype, double alpha, double beta) const
      ^
/usr/local/include/opencv2/core/cuda.inl.hpp:186:6: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
In file included from /usr/local/include/opencv2/cudaarithm.hpp:50:0,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:
/usr/local/include/opencv2/core/cuda.hpp:234:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:234:10: note:   candidate expects 4 arguments, 3 provided
/usr/local/include/opencv2/core/cuda.hpp:237:10: note: candidate: void cv::cuda::GpuMat::convertTo(cv::OutputArray, int, double, double, int&) const
     void convertTo(OutputArray dst, int rtype, double alpha, double beta, Stream& stream) const;
          ^
/usr/local/include/opencv2/core/cuda.hpp:237:10: note:   candidate expects 5 arguments, 3 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp:192:60: error: no matching function for call to 'cv::cuda::BroxOpticalFlow::calc(cv::cuda::GpuMat&, cv::cuda::GpuMat&, cv::cuda::GpuMat&)'
                     alg_brox->calc(d_buf_0, d_buf_1, d_flow);
                                                            ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:7:0:
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note: candidate: virtual void cv::cuda::DenseOpticalFlow::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray, cv::cuda::Stream&)
     virtual void calc(InputArray I0, InputArray I1, InputOutputArray flow, Stream& stream = Stream::Null()) = 0;
                  ^
/usr/local/include/opencv2/cudaoptflow.hpp:80:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:200:59: error: no matching function for call to 'cv::cudacodec::VideoReader::nextFrame(cv::cuda::GpuMat&)'
                 if (!video_stream->nextFrame(capture_frame)) break;
                                                           ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:8:0:
/usr/local/include/opencv2/cudacodec.hpp:297:18: note: candidate: virtual bool cv::cudacodec::VideoReader::nextFrame(cv::OutputArray)
     virtual bool nextFrame(OutputArray frame) = 0;
                  ^
/usr/local/include/opencv2/cudacodec.hpp:297:18: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::OutputArray {aka const cv::_OutputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:204:39: error: no matching function for call to 'split(cv::cuda::GpuMat&, cv::cuda::GpuMat [2])'
             cuda::split(d_flow, planes);
                                       ^
In file included from /home/user/dense_flow/src/dense_flow_gpu.cpp:6:0:
/usr/local/include/opencv2/cudaarithm.hpp:453:17: note: candidate: void cv::cuda::split(cv::InputArray, cv::cuda::GpuMat*, cv::cuda::Stream&)
 CV_EXPORTS void split(InputArray src, GpuMat* dst, Stream& stream = Stream::Null());
                 ^
/usr/local/include/opencv2/cudaarithm.hpp:453:17: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/usr/local/include/opencv2/cudaarithm.hpp:455:17: note: candidate: void cv::cuda::split(cv::InputArray, std::vector<cv::cuda::GpuMat>&, cv::cuda::Stream&)
 CV_EXPORTS void split(InputArray src, std::vector<GpuMat>& dst, Stream& stream = Stream::Null());
                 ^
/usr/local/include/opencv2/cudaarithm.hpp:455:17: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'cv::InputArray {aka const cv::_InputArray&}'
/home/user/dense_flow/src/dense_flow_gpu.cpp:207:33: error: no matching function for call to 'cv::Mat::Mat(cv::cuda::GpuMat&)'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1760:14: note: candidate: cv::Mat::Mat(const cv::gpu::GpuMat&)
     explicit Mat(const gpu::GpuMat& m);
              ^
/usr/local/include/opencv2/core/core.hpp:1760:14: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::gpu::GpuMat&'
/usr/local/include/opencv2/core/core.hpp:1757:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
     template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1757:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:207:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::MatCommaInitializer_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1755:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1755:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:207:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point3_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1753:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1753:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:207:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point_<_Tp>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1751:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
     template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1751:51: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:207:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Matx<_Tp, m, n>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1749:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
     template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
                                            ^
/usr/local/include/opencv2/core/core.hpp:1749:44: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:207:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Vec<_Tp, m>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1747:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_RealType>&, bool)
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1747:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:207:33: note:   'cv::cuda::GpuMat' is not derived from 'const std::vector<_RealType>'
             Mat flow_x(planes[0]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1745:5: note: candidate: cv::Mat::Mat(const IplImage*, bool)
     Mat(const IplImage* img, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1745:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const IplImage* {aka const _IplImage*}'
/usr/local/include/opencv2/core/core.hpp:1743:5: note: candidate: cv::Mat::Mat(const CvMatND*, bool)
     Mat(const CvMatND* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1743:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMatND*'
/usr/local/include/opencv2/core/core.hpp:1741:5: note: candidate: cv::Mat::Mat(const CvMat*, bool)
     Mat(const CvMat* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1741:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMat*'
/usr/local/include/opencv2/core/core.hpp:1739:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
     Mat(const Mat& m, const Range* ranges);
     ^
/usr/local/include/opencv2/core/core.hpp:1739:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1738:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
     Mat(const Mat& m, const Rect& roi);
     ^
/usr/local/include/opencv2/core/core.hpp:1738:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1737:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     ^
/usr/local/include/opencv2/core/core.hpp:1737:5: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1734:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
     Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
     ^
/usr/local/include/opencv2/core/core.hpp:1734:5: note:   candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/core.hpp:4933:0,
                 from /usr/local/include/opencv2/video/tracking.hpp:50,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/mat.hpp:151:8: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
 inline Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:151:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:129:8: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
 inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:129:8: note:   candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:111:8: note: candidate: cv::Mat::Mat(const cv::Mat&)
 inline Mat::Mat(const Mat& m)
        ^
/usr/local/include/opencv2/core/mat.hpp:111:8: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::Mat&'
/usr/local/include/opencv2/core/mat.hpp:104:8: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
 inline Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:104:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:98:8: note: candidate: cv::Mat::Mat(int, const int*, int)
 inline Mat::Mat(int _dims, const int* _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:98:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:91:8: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
 inline Mat::Mat(Size _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:91:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:78:8: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
 inline Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:78:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:85:8: note: candidate: cv::Mat::Mat(cv::Size, int)
 inline Mat::Mat(Size _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:85:8: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:72:8: note: candidate: cv::Mat::Mat(int, int, int)
 inline Mat::Mat(int _rows, int _cols, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:72:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:67:8: note: candidate: cv::Mat::Mat()
 inline Mat::Mat() : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:67:8: note:   candidate expects 0 arguments, 1 provided
/home/user/dense_flow/src/dense_flow_gpu.cpp:208:33: error: no matching function for call to 'cv::Mat::Mat(cv::cuda::GpuMat&)'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1760:14: note: candidate: cv::Mat::Mat(const cv::gpu::GpuMat&)
     explicit Mat(const gpu::GpuMat& m);
              ^
/usr/local/include/opencv2/core/core.hpp:1760:14: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::gpu::GpuMat&'
/usr/local/include/opencv2/core/core.hpp:1757:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
     template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1757:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:208:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::MatCommaInitializer_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1755:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1755:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:208:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point3_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1753:37: note: candidate: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1753:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:208:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Point_<_Tp>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1751:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
     template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
                                                   ^
/usr/local/include/opencv2/core/core.hpp:1751:51: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:208:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Matx<_Tp, m, n>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1749:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
     template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
                                            ^
/usr/local/include/opencv2/core/core.hpp:1749:44: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:208:33: note:   'cv::cuda::GpuMat' is not derived from 'const cv::Vec<_Tp, m>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1747:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_RealType>&, bool)
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
                                     ^
/usr/local/include/opencv2/core/core.hpp:1747:37: note:   template argument deduction/substitution failed:
/home/user/dense_flow/src/dense_flow_gpu.cpp:208:33: note:   'cv::cuda::GpuMat' is not derived from 'const std::vector<_RealType>'
             Mat flow_y(planes[1]);
                                 ^
In file included from /usr/local/include/opencv2/video/tracking.hpp:50:0,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/core.hpp:1745:5: note: candidate: cv::Mat::Mat(const IplImage*, bool)
     Mat(const IplImage* img, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1745:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const IplImage* {aka const _IplImage*}'
/usr/local/include/opencv2/core/core.hpp:1743:5: note: candidate: cv::Mat::Mat(const CvMatND*, bool)
     Mat(const CvMatND* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1743:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMatND*'
/usr/local/include/opencv2/core/core.hpp:1741:5: note: candidate: cv::Mat::Mat(const CvMat*, bool)
     Mat(const CvMat* m, bool copyData=false);
     ^
/usr/local/include/opencv2/core/core.hpp:1741:5: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const CvMat*'
/usr/local/include/opencv2/core/core.hpp:1739:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
     Mat(const Mat& m, const Range* ranges);
     ^
/usr/local/include/opencv2/core/core.hpp:1739:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1738:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&)
     Mat(const Mat& m, const Rect& roi);
     ^
/usr/local/include/opencv2/core/core.hpp:1738:5: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1737:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     ^
/usr/local/include/opencv2/core/core.hpp:1737:5: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/core.hpp:1734:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
     Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
     ^
/usr/local/include/opencv2/core/core.hpp:1734:5: note:   candidate expects 5 arguments, 1 provided
In file included from /usr/local/include/opencv2/core/core.hpp:4933:0,
                 from /usr/local/include/opencv2/video/tracking.hpp:50,
                 from /home/user/dense_flow/include/common.h:10,
                 from /home/user/dense_flow/include/dense_flow.h:8,
                 from /home/user/dense_flow/src/dense_flow_gpu.cpp:4:
/usr/local/include/opencv2/core/mat.hpp:151:8: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
 inline Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:151:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:129:8: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t)
 inline Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
        ^
/usr/local/include/opencv2/core/mat.hpp:129:8: note:   candidate expects 5 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:111:8: note: candidate: cv::Mat::Mat(const cv::Mat&)
 inline Mat::Mat(const Mat& m)
        ^
/usr/local/include/opencv2/core/mat.hpp:111:8: note:   no known conversion for argument 1 from 'cv::cuda::GpuMat' to 'const cv::Mat&'
/usr/local/include/opencv2/core/mat.hpp:104:8: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&)
 inline Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:104:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:98:8: note: candidate: cv::Mat::Mat(int, const int*, int)
 inline Mat::Mat(int _dims, const int* _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:98:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:91:8: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&)
 inline Mat::Mat(Size _sz, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:91:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:78:8: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&)
 inline Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:78:8: note:   candidate expects 4 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:85:8: note: candidate: cv::Mat::Mat(cv::Size, int)
 inline Mat::Mat(Size _sz, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:85:8: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:72:8: note: candidate: cv::Mat::Mat(int, int, int)
 inline Mat::Mat(int _rows, int _cols, int _type) : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:72:8: note:   candidate expects 3 arguments, 1 provided
/usr/local/include/opencv2/core/mat.hpp:67:8: note: candidate: cv::Mat::Mat()
 inline Mat::Mat() : size(&rows)
        ^
/usr/local/include/opencv2/core/mat.hpp:67:8: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/local/include/opencv2/optflow.hpp:69:0,
                 from /home/user/dense_flow/src/dense_flow.cpp:6:
/usr/local/include/opencv2/optflow/pcaflow.hpp:120:66: error: expected ';' at end of member declaration
   void calc( InputArray I0, InputArray I1, InputOutputArray flow ) CV_OVERRIDE;
                                                                  ^
/usr/local/include/opencv2/optflow/pcaflow.hpp:120:68: error: 'CV_OVERRIDE' does not name a type
   void calc( InputArray I0, InputArray I1, InputOutputArray flow ) CV_OVERRIDE;
                                                                    ^
/usr/local/include/opencv2/optflow/pcaflow.hpp:121:23: error: expected ';' at end of member declaration
   void collectGarbage() CV_OVERRIDE;
                       ^
/usr/local/include/opencv2/optflow/pcaflow.hpp:121:25: error: 'CV_OVERRIDE' does not name a type
   void collectGarbage() CV_OVERRIDE;
                         ^
/usr/local/include/opencv2/optflow/pcaflow.hpp:124:28: error: 'UMat' has not been declared
   void findSparseFeatures( UMat &from, UMat &to, std::vector<Point2f> &features,
                            ^
/usr/local/include/opencv2/optflow/pcaflow.hpp:124:40: error: 'UMat' has not been declared
   void findSparseFeatures( UMat &from, UMat &to, std::vector<Point2f> &features,
                                        ^
/usr/local/include/opencv2/optflow/pcaflow.hpp:127:26: error: 'UMat' has not been declared
   void removeOcclusions( UMat &from, UMat &to, std::vector<Point2f> &features,
                          ^
/usr/local/include/opencv2/optflow/pcaflow.hpp:127:38: error: 'UMat' has not been declared
   void removeOcclusions( UMat &from, UMat &to, std::vector<Point2f> &features,
                                      ^
In file included from /usr/local/include/opencv2/optflow.hpp:70:0,
                 from /home/user/dense_flow/src/dense_flow.cpp:6:
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:185:33: error: expected ';' at end of member declaration
   void write( FileStorage &fs ) const CV_OVERRIDE;
                                 ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:185:39: error: 'CV_OVERRIDE' does not name a type
   void write( FileStorage &fs ) const CV_OVERRIDE;
                                       ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:187:33: error: expected ';' at end of member declaration
   void read( const FileNode &fn ) CV_OVERRIDE;
                                 ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:187:35: error: 'CV_OVERRIDE' does not name a type
   void read( const FileNode &fn ) CV_OVERRIDE;
                                   ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:230:43: error: expected ';' at end of member declaration
     void operator()( const Range &range ) const CV_OVERRIDE
                                           ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:230:49: error: 'CV_OVERRIDE' does not name a type
     void operator()( const Range &range ) const CV_OVERRIDE
                                                 ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:275:33: error: expected ';' at end of member declaration
   void write( FileStorage &fs ) const CV_OVERRIDE
                                 ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:275:39: error: 'CV_OVERRIDE' does not name a type
   void write( FileStorage &fs ) const CV_OVERRIDE
                                       ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:288:33: error: expected ';' at end of member declaration
   void read( const FileNode &fn ) CV_OVERRIDE
                                 ^
/usr/local/include/opencv2/optflow/sparse_matching_gpc.hpp:288:35: error: 'CV_OVERRIDE' does not name a type
   void read( const FileNode &fn ) CV_OVERRIDE
                                   ^
/home/user/dense_flow/src/dense_flow.cpp: In function 'void calcDenseFlow(std::__cxx11::string, int, int, int, std::vector<std::vector<unsigned char> >&, std::vector<std::vector<unsigned char> >&, std::vector<std::vector<unsigned char> >&)':
/home/user/dense_flow/src/dense_flow.cpp:21:13: error: 'DualTVL1OpticalFlow' is not a member of 'cv::optflow'
     cv::Ptr<cv::optflow::DualTVL1OpticalFlow> alg_tvl1 = cv::optflow::DualTVL1OpticalFlow::create();
             ^
/home/user/dense_flow/src/dense_flow.cpp:21:13: error: 'DualTVL1OpticalFlow' is not a member of 'cv::optflow'
/home/user/dense_flow/src/dense_flow.cpp:21:45: error: template argument 1 is invalid
     cv::Ptr<cv::optflow::DualTVL1OpticalFlow> alg_tvl1 = cv::optflow::DualTVL1OpticalFlow::create();
                                             ^
/home/user/dense_flow/src/dense_flow.cpp:21:71: error: 'cv::optflow::DualTVL1OpticalFlow' has not been declared
     cv::Ptr<cv::optflow::DualTVL1OpticalFlow> alg_tvl1 = cv::optflow::DualTVL1OpticalFlow::create();
                                                                       ^
/home/user/dense_flow/src/dense_flow.cpp:48:29: error: base operand of '->' is not a pointer
                     alg_tvl1->calc(prev_gray, capture_gray, flow);
                             ^
CMakeFiles/denseflow.dir/build.make:134: recipe for target 'CMakeFiles/denseflow.dir/src/dense_warp_flow_gpu.cpp.o' failed
make[2]: *** [CMakeFiles/denseflow.dir/src/dense_warp_flow_gpu.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/denseflow.dir/build.make:110: recipe for target 'CMakeFiles/denseflow.dir/src/dense_flow_gpu.cpp.o' failed
make[2]: *** [CMakeFiles/denseflow.dir/src/dense_flow_gpu.cpp.o] Error 1
CMakeFiles/denseflow.dir/build.make:86: recipe for target 'CMakeFiles/denseflow.dir/src/dense_flow.cpp.o' failed
make[2]: *** [CMakeFiles/denseflow.dir/src/dense_flow.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/denseflow.dir/all' failed
make[1]: *** [CMakeFiles/denseflow.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Light-- commented 4 years ago

In building TSN:

The problem may caused by different versions opencv exist in the OS conflict. Maybe they haven't been installed properly. e.g. install to the right path.

This is a contradiction: The build_all.sh install opencv 2.4.13.6, opencv 2.4.13.6 don't have opencv_contrib, so it surely will not have xfeatures2d. But dense_flow/src/dense_warp_flow_gpu.cpp needs xfeatures2d for compiling, so actually i have to modify the build_all.sh to install opencv3.x, not 2.x and changed the api format from 2.x to 3.x in dense_flow.cpp, accordingly

i solved it by: First: uninstall all the versions of opencv in the environment, until only the version that the Ubuntu16.04 OS built-in: opencv 2.4.9.1 left.

$ cd build # build is the original folder that you build to install opencv, if you lost that, try to rebuild to install opencv using CMAKE_INSTALL_PREFIX to specify the install path according to the install path you used before. 
$ sudo make uninstall

$ cd ..
$ sudo rm -r build
$ sudo rm -r /usr/local/include/opencv2 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv2 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv*

$ cd ..
$ sudo rm -r opencv4.0/ # delete the original folder completely after you saved the necessary files(like manually changed cmake files and so on.)

$ sudo apt-get remove opencv-doc opencv-data python-opencv

Then i install build and install Opencv3.4.2 according to yjxiong's README, passed. before this successful compile, I changed the build_all.sh and dense_flow.cpp a little bit. like

in build_all.sh

# version="2.4.13.6"
version="3.4.2"

in temporal-segment-networks/lib/dense_flow/src/dense_flow.cpp

    // cv::Ptr<cv::optflow::DualTVL1OpticalFlow> alg_tvl1 = cv::optflow::DualTVL1OpticalFlow::create();
    // alg_tvl1 = cv::optflow::createOptFlow_DualTVL1(); 
    Ptr<DenseOpticalFlow> alg_tvl1;
    alg_tvl1 = createOptFlow_DualTVL1(); 
xianguo-dev commented 4 years ago

I‘d like to know whether there are other places that also have to be rewritten?(Couse you said "like" and you show your two changes.)Thanks a lot!

Light-- commented 4 years ago

I‘d like to know whether there are other places that also have to be rewritten?(Couse you said "like" and you show your two changes.)Thanks a lot!

Almost the changes I mentioned above are all the ones i have made, at least they are the ones I can remember. If you run into the same problem as me, you can try it.