Ask Your Question

Revision history [back]

Issue running mingw32-make in build folder

after running cmake on the source folder, then I ran mingw32-make on the build folder and this was the error output. Please I need a solutuion.

Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/dis_flow.cpp.obj C:\opencv\sources\modules\video\src\dis_flow.cpp:54:1: error: expected class-name before '{' token { ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:136:16: error: 'VariationalRefinement' was not declared in this scope vector<Ptr<VariationalRefinement> > variational_refinement_processors; ^~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:136:16: note: suggested alternative: 'setVariationalRefinementGamma' vector<Ptr<VariationalRefinement> > variational_refinement_processors; ^~~~~~~~~~~~~~~~~~~~~ setVariationalRefinementGamma C:\opencv\sources\modules\video\src\dis_flow.cpp:136:37: error: template argument 1 is invalid vector<Ptr<VariationalRefinement> > variational_refinement_processors; ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:136:39: error: template argument 1 is invalid vector<Ptr<VariationalRefinement> > variational_refinement_processors; ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:136:39: error: template argument 2 is invalid C:\opencv\sources\modules\video\src\dis_flow.cpp:58:10: error: 'void cv::DISOpticalFlowImpl::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray)' marked 'override', but does not override void calc(InputArray I0, InputArray I1, InputOutputArray flow) CV_OVERRIDE; ^~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:59:10: error: 'void cv::DISOpticalFlowImpl::collectGarbage()' marked 'override', but does not override void collectGarbage() CV_OVERRIDE; ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:79:9: error: 'int cv::DISOpticalFlowImpl::getFinestScale() const' marked 'override', but does not override int getFinestScale() const CV_OVERRIDE { return finest_scale; } ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:80:10: error: 'void cv::DISOpticalFlowImpl::setFinestScale(int)' marked 'override', but does not override void setFinestScale(int val) CV_OVERRIDE { finest_scale = val; } ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:81:9: error: 'int cv::DISOpticalFlowImpl::getPatchSize() const' marked 'override', but does not override int getPatchSize() const CV_OVERRIDE { return patch_size; } ^~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:82:10: error: 'void cv::DISOpticalFlowImpl::setPatchSize(int)' marked 'override', but does not override void setPatchSize(int val) CV_OVERRIDE { patch_size = val; } ^~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:83:9: error: 'int cv::DISOpticalFlowImpl::getPatchStride() const' marked 'override', but does not override int getPatchStride() const CV_OVERRIDE { return patch_stride; } ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:84:10: error: 'void cv::DISOpticalFlowImpl::setPatchStride(int)' marked 'override', but does not override void setPatchStride(int val) CV_OVERRIDE { patch_stride = val; } ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:85:9: error: 'int cv::DISOpticalFlowImpl::getGradientDescentIterations() const' marked 'override', but does not override int getGradientDescentIterations() const CV_OVERRIDE { return grad_descent_iter; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:86:10: error: 'void cv::DISOpticalFlowImpl::setGradientDescentIterations(int)' marked 'override', but does not override void setGradientDescentIterations(int val) CV_OVERRIDE { grad_descent_iter = val; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:87:9: error: 'int cv::DISOpticalFlowImpl::getVariationalRefinementIterations() const' marked 'override', but does not override int getVariationalRefinementIterations() const CV_OVERRIDE { return variational_refinement_iter; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:88:10: error: 'void cv::DISOpticalFlowImpl::setVariationalRefinementIterations(int)' marked 'override', but does not override void setVariationalRefinementIterations(int val) CV_OVERRIDE { variational_refinement_iter = val; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:89:11: error: 'float cv::DISOpticalFlowImpl::getVariationalRefinementAlpha() const' marked 'override', but does not override float getVariationalRefinementAlpha() const CV_OVERRIDE { return variational_refinement_alpha; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:90:10: error: 'void cv::DISOpticalFlowImpl::setVariationalRefinementAlpha(float)' marked 'override', but does not override void setVariationalRefinementAlpha(float val) CV_OVERRIDE { variational_refinement_alpha = val; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:91:11: error: 'float cv::DISOpticalFlowImpl::getVariationalRefinementDelta() const' marked 'override', but does not override float getVariationalRefinementDelta() const CV_OVERRIDE { return variational_refinement_delta; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:92:10: error: 'void cv::DISOpticalFlowImpl::setVariationalRefinementDelta(float)' marked 'override', but does not override void setVariationalRefinementDelta(float val) CV_OVERRIDE { variational_refinement_delta = val; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:93:11: error: 'float cv::DISOpticalFlowImpl::getVariationalRefinementGamma() const' marked 'override', but does not override float getVariationalRefinementGamma() const CV_OVERRIDE { return variational_refinement_gamma; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:94:10: error: 'void cv::DISOpticalFlowImpl::setVariationalRefinementGamma(float)' marked 'override', but does not override void setVariationalRefinementGamma(float val) CV_OVERRIDE { variational_refinement_gamma = val; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:96:10: error: 'bool cv::DISOpticalFlowImpl::getUseMeanNormalization() const' marked 'override', but does not override bool getUseMeanNormalization() const CV_OVERRIDE { return use_mean_normalization; } ^~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:97:10: error: 'void cv::DISOpticalFlowImpl::setUseMeanNormalization(bool)' marked 'override', but does not override void setUseMeanNormalization(bool val) CV_OVERRIDE { use_mean_normalization = val; } ^~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:98:10: error: 'bool cv::DISOpticalFlowImpl::getUseSpatialPropagation() const' marked 'override', but does not override bool getUseSpatialPropagation() const CV_OVERRIDE { return use_spatial_propagation; } ^~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:99:10: error: 'void cv::DISOpticalFlowImpl::setUseSpatialPropagation(bool)' marked 'override', but does not override void setUseSpatialPropagation(bool val) CV_OVERRIDE { use_spatial_propagation = val; } ^~~~~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp: In constructor 'cv::DISOpticalFlowImpl::DISOpticalFlowImpl()': C:\opencv\sources\modules\video\src\dis_flow.cpp:232:43: error: request for member 'push_back' in '((cv::DISOpticalFlowImpl*)this)->cv::DISOpticalFlowImpl::variational_refinement_processors', which is of non-class type 'int' variational_refinement_processors.push_back(VariationalRefinement::create()); ^~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:232:53: error: 'VariationalRefinement' has not been declared variational_refinement_processors.push_back(VariationalRefinement::create()); ^~~~~~~~~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'void cv::DISOpticalFlowImpl::prepareBuffers(cv::Mat&, cv::Mat&, cv::Mat&, bool)': C:\opencv\sources\modules\video\src\dis_flow.cpp:306:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setAlpha(variational_refinement_alpha); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:307:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setDelta(variational_refinement_delta); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:308:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setGamma(variational_refinement_gamma); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:309:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setSorIterations(5); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:310:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setFixedPointIterations(variational_refinement_iter); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'void cv::DISOpticalFlowImpl::ocl_prepareBuffers(cv::UMat&, cv::UMat&, cv::InputArray, bool)': C:\opencv\sources\modules\video\src\dis_flow.cpp:1274:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setAlpha(variational_refinement_alpha); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:1275:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setDelta(variational_refinement_delta); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:1276:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setGamma(variational_refinement_gamma); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:1277:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setSorIterations(5); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:1278:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->setFixedPointIterations(variational_refinement_iter); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'bool cv::DISOpticalFlowImpl::ocl_calc(cv::InputArray, cv::InputArray, cv::InputOutputArray)': C:\opencv\sources\modules\video\src\dis_flow.cpp:1403:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->calcUV(u_I0s[i], u_I1s[i], ^ C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'void cv::DISOpticalFlowImpl::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray)': C:\opencv\sources\modules\video\src\dis_flow.cpp:1493:48: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->calcUV(I0s[i], I1s[i], Ux[i], Uy[i]); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'void cv::DISOpticalFlowImpl::collectGarbage()': C:\opencv\sources\modules\video\src\dis_flow.cpp:1547:44: error: invalid types 'int[int]' for array subscript variational_refinement_processors[i]->collectGarbage(); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:1548:39: error: request for member 'clear' in '((cv::DISOpticalFlowImpl*)this)->cv::DISOpticalFlowImpl::variational_refinement_processors', which is of non-class type 'int' variational_refinement_processors.clear(); ^~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp: At global scope: C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:5: error: 'DISOpticalFlow' was not declared in this scope Ptr<DISOpticalFlow> DISOpticalFlow::create(int preset) ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:5: note: suggested alternative: 'DISOpticalFlowImpl' Ptr<DISOpticalFlow> DISOpticalFlow::create(int preset) ^~~~~~~~~~~~~~ DISOpticalFlowImpl C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:19: error: template argument 1 is invalid Ptr<DISOpticalFlow> DISOpticalFlow::create(int preset) ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:21: error: 'DISOpticalFlow' has not been declared Ptr<DISOpticalFlow> DISOpticalFlow::create(int preset) ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:21: warning: no previous declaration for 'int cv::create(int)' [-Wmissing-declarations] C:\opencv\sources\modules\video\src\dis_flow.cpp: In function 'int cv::create(int)': C:\opencv\sources\modules\video\src\dis_flow.cpp:1555:9: error: 'DISOpticalFlow' was not declared in this scope Ptr<DISOpticalFlow> dis = makePtr<DISOpticalFlowImpl>(); ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1555:9: note: suggested alternative: 'DISOpticalFlowImpl' Ptr<DISOpticalFlow> dis = makePtr<DISOpticalFlowImpl>(); ^~~~~~~~~~~~~~ DISOpticalFlowImpl C:\opencv\sources\modules\video\src\dis_flow.cpp:1555:23: error: template argument 1 is invalid Ptr<DISOpticalFlow> dis = makePtr<DISOpticalFlowImpl>(); ^ C:\opencv\sources\modules\video\src\dis_flow.cpp:1555:58: error: invalid user-defined conversion from 'cv::Ptr<cv::DISOpticalFlowImpl>' to 'int' [-fpermissive] Ptr<DISOpticalFlow> dis = makePtr<DISOpticalFlowImpl>(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from C:/opencv/sources/modules/core/include/opencv2/core/cvstd.hpp:1072, from C:/opencv/sources/modules/core/include/opencv2/core/base.hpp:58, from C:/opencv/sources/modules/core/include/opencv2/core.hpp:54, from C:/opencv/sources/modules/video/include/opencv2/video/tracking.hpp:47, from C:/opencv/sources/modules/video/include/opencv2/video.hpp:56, from C:\opencv\sources\modules\video\src\precomp.hpp:46, from C:\opencv\sources\modules\video\src\dis_flow.cpp:43: C:/opencv/sources/modules/core/include/opencv2/core/ptr.inl.hpp:222:1: note: candidate is: 'cv::Ptr<T>::operator T*() const [with T = cv::DISOpticalFlowImpl]' <near match> Ptr<T>::operator T* () const ^~~~~~ C:/opencv/sources/modules/core/include/opencv2/core/ptr.inl.hpp:222:1: note: no known conversion from 'cv::DISOpticalFlowImpl*' to 'int' C:\opencv\sources\modules\video\src\dis_flow.cpp:1556:8: error: base operand of '->' is not a pointer dis->setPatchSize(8); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1557:19: error: 'DISOpticalFlow' is not a class, namespace, or enumeration if (preset == DISOpticalFlow::PRESET_ULTRAFAST) ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1559:12: error: base operand of '->' is not a pointer dis->setFinestScale(2); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1560:12: error: base operand of '->' is not a pointer dis->setPatchStride(4); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1561:12: error: base operand of '->' is not a pointer dis->setGradientDescentIterations(12); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1562:12: error: base operand of '->' is not a pointer dis->setVariationalRefinementIterations(0); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1564:24: error: 'DISOpticalFlow' is not a class, namespace, or enumeration else if (preset == DISOpticalFlow::PRESET_FAST) ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1566:12: error: base operand of '->' is not a pointer dis->setFinestScale(2); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1567:12: error: base operand of '->' is not a pointer dis->setPatchStride(4); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1568:12: error: base operand of '->' is not a pointer dis->setGradientDescentIterations(16); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1569:12: error: base operand of '->' is not a pointer dis->setVariationalRefinementIterations(5); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1571:24: error: 'DISOpticalFlow' is not a class, namespace, or enumeration else if (preset == DISOpticalFlow::PRESET_MEDIUM) ^~~~~~~~~~~~~~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1573:12: error: base operand of '->' is not a pointer dis->setFinestScale(1); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1574:12: error: base operand of '->' is not a pointer dis->setPatchStride(3); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1575:12: error: base operand of '->' is not a pointer dis->setGradientDescentIterations(25); ^~ C:\opencv\sources\modules\video\src\dis_flow.cpp:1576:12: error: base operand of '->' is not a pointer dis->setVariationalRefinementIterations(5); ^~ mingw32-make[2]: *** [modules\video\CMakeFiles\opencv_video.dir\build.make:149: modules/video/CMakeFiles/opencv_video.dir/src/dis_flow.cpp.obj] Error 1 mingw32-make[1]: *** [CMakeFiles\Makefile2:4305: modules/video/CMakeFiles/opencv_video.dir/all] Error 2 mingw32-make: *** [Makefile:182: all] Error 2

Please who knows how to get around this?

click to hide/show revision 2
None

updated 2020-05-01 10:16:55 -0500

berak gravatar image

Issue running mingw32-make in build folder

after running cmake on the source folder, then I ran mingw32-make on the build folder and this was the error output. Please I need a solutuion.

 Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/dis_flow.cpp.obj
C:\opencv\sources\modules\video\src\dis_flow.cpp:54:1: error: expected class-name before '{' token
 {
 ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:136:16: error: 'VariationalRefinement' was not declared in this scope
     vector<Ptr<VariationalRefinement> > variational_refinement_processors;
                ^~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:136:16: note: suggested alternative: 'setVariationalRefinementGamma'
     vector<Ptr<VariationalRefinement> > variational_refinement_processors;
                ^~~~~~~~~~~~~~~~~~~~~
                setVariationalRefinementGamma
C:\opencv\sources\modules\video\src\dis_flow.cpp:136:37: error: template argument 1 is invalid
     vector<Ptr<VariationalRefinement> > variational_refinement_processors;
                                     ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:136:39: error: template argument 1 is invalid
     vector<Ptr<VariationalRefinement> > variational_refinement_processors;
                                       ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:136:39: error: template argument 2 is invalid
C:\opencv\sources\modules\video\src\dis_flow.cpp:58:10: error: 'void cv::DISOpticalFlowImpl::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray)' marked 'override', but does not override
     void calc(InputArray I0, InputArray I1, InputOutputArray flow) CV_OVERRIDE;
          ^~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:59:10: error: 'void cv::DISOpticalFlowImpl::collectGarbage()' marked 'override', but does not override
     void collectGarbage() CV_OVERRIDE;
          ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:79:9: error: 'int cv::DISOpticalFlowImpl::getFinestScale() const' marked 'override', but does not override
     int getFinestScale() const CV_OVERRIDE { return finest_scale; }
         ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:80:10: error: 'void cv::DISOpticalFlowImpl::setFinestScale(int)' marked 'override', but does not override
     void setFinestScale(int val) CV_OVERRIDE { finest_scale = val; }
          ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:81:9: error: 'int cv::DISOpticalFlowImpl::getPatchSize() const' marked 'override', but does not override
     int getPatchSize() const CV_OVERRIDE { return patch_size; }
         ^~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:82:10: error: 'void cv::DISOpticalFlowImpl::setPatchSize(int)' marked 'override', but does not override
     void setPatchSize(int val) CV_OVERRIDE { patch_size = val; }
          ^~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:83:9: error: 'int cv::DISOpticalFlowImpl::getPatchStride() const' marked 'override', but does not override
     int getPatchStride() const CV_OVERRIDE { return patch_stride; }
         ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:84:10: error: 'void cv::DISOpticalFlowImpl::setPatchStride(int)' marked 'override', but does not override
     void setPatchStride(int val) CV_OVERRIDE { patch_stride = val; }
          ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:85:9: error: 'int cv::DISOpticalFlowImpl::getGradientDescentIterations() const' marked 'override', but does not override
     int getGradientDescentIterations() const CV_OVERRIDE { return grad_descent_iter; }
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:86:10: error: 'void cv::DISOpticalFlowImpl::setGradientDescentIterations(int)' marked 'override', but does not override
     void setGradientDescentIterations(int val) CV_OVERRIDE { grad_descent_iter = val; }
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:87:9: error: 'int cv::DISOpticalFlowImpl::getVariationalRefinementIterations() const' marked 'override', but does not override
     int getVariationalRefinementIterations() const CV_OVERRIDE { return variational_refinement_iter; }
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:88:10: error: 'void cv::DISOpticalFlowImpl::setVariationalRefinementIterations(int)' marked 'override', but does not override
     void setVariationalRefinementIterations(int val) CV_OVERRIDE { variational_refinement_iter = val; }
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:89:11: error: 'float cv::DISOpticalFlowImpl::getVariationalRefinementAlpha() const' marked 'override', but does not override
     float getVariationalRefinementAlpha() const CV_OVERRIDE { return variational_refinement_alpha; }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:90:10: error: 'void cv::DISOpticalFlowImpl::setVariationalRefinementAlpha(float)' marked 'override', but does not override
     void setVariationalRefinementAlpha(float val) CV_OVERRIDE { variational_refinement_alpha = val; }
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:91:11: error: 'float cv::DISOpticalFlowImpl::getVariationalRefinementDelta() const' marked 'override', but does not override
     float getVariationalRefinementDelta() const CV_OVERRIDE { return variational_refinement_delta; }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:92:10: error: 'void cv::DISOpticalFlowImpl::setVariationalRefinementDelta(float)' marked 'override', but does not override
     void setVariationalRefinementDelta(float val) CV_OVERRIDE { variational_refinement_delta = val; }
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:93:11: error: 'float cv::DISOpticalFlowImpl::getVariationalRefinementGamma() const' marked 'override', but does not override
     float getVariationalRefinementGamma() const CV_OVERRIDE { return variational_refinement_gamma; }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:94:10: error: 'void cv::DISOpticalFlowImpl::setVariationalRefinementGamma(float)' marked 'override', but does not override
     void setVariationalRefinementGamma(float val) CV_OVERRIDE { variational_refinement_gamma = val; }
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:96:10: error: 'bool cv::DISOpticalFlowImpl::getUseMeanNormalization() const' marked 'override', but does not override
     bool getUseMeanNormalization() const CV_OVERRIDE { return use_mean_normalization; }
          ^~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:97:10: error: 'void cv::DISOpticalFlowImpl::setUseMeanNormalization(bool)' marked 'override', but does not override
     void setUseMeanNormalization(bool val) CV_OVERRIDE { use_mean_normalization = val; }
          ^~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:98:10: error: 'bool cv::DISOpticalFlowImpl::getUseSpatialPropagation() const' marked 'override', but does not override
     bool getUseSpatialPropagation() const CV_OVERRIDE { return use_spatial_propagation; }
          ^~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:99:10: error: 'void cv::DISOpticalFlowImpl::setUseSpatialPropagation(bool)' marked 'override', but does not override
     void setUseSpatialPropagation(bool val) CV_OVERRIDE { use_spatial_propagation = val; }
          ^~~~~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp: In constructor 'cv::DISOpticalFlowImpl::DISOpticalFlowImpl()':
C:\opencv\sources\modules\video\src\dis_flow.cpp:232:43: error: request for member 'push_back' in '((cv::DISOpticalFlowImpl*)this)->cv::DISOpticalFlowImpl::variational_refinement_processors', which is of non-class type 'int'
         variational_refinement_processors.push_back(VariationalRefinement::create());
                                           ^~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:232:53: error: 'VariationalRefinement' has not been declared
         variational_refinement_processors.push_back(VariationalRefinement::create());
                                                     ^~~~~~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'void cv::DISOpticalFlowImpl::prepareBuffers(cv::Mat&, cv::Mat&, cv::Mat&, bool)':
C:\opencv\sources\modules\video\src\dis_flow.cpp:306:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setAlpha(variational_refinement_alpha);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:307:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setDelta(variational_refinement_delta);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:308:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setGamma(variational_refinement_gamma);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:309:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setSorIterations(5);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:310:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setFixedPointIterations(variational_refinement_iter);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'void cv::DISOpticalFlowImpl::ocl_prepareBuffers(cv::UMat&, cv::UMat&, cv::InputArray, bool)':
C:\opencv\sources\modules\video\src\dis_flow.cpp:1274:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setAlpha(variational_refinement_alpha);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:1275:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setDelta(variational_refinement_delta);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:1276:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setGamma(variational_refinement_gamma);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:1277:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setSorIterations(5);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:1278:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->setFixedPointIterations(variational_refinement_iter);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'bool cv::DISOpticalFlowImpl::ocl_calc(cv::InputArray, cv::InputArray, cv::InputOutputArray)':
C:\opencv\sources\modules\video\src\dis_flow.cpp:1403:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->calcUV(u_I0s[i], u_I1s[i],
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'void cv::DISOpticalFlowImpl::calc(cv::InputArray, cv::InputArray, cv::InputOutputArray)':
C:\opencv\sources\modules\video\src\dis_flow.cpp:1493:48: error: invalid types 'int[int]' for array subscript
             variational_refinement_processors[i]->calcUV(I0s[i], I1s[i], Ux[i], Uy[i]);
                                                ^
C:\opencv\sources\modules\video\src\dis_flow.cpp: In member function 'void cv::DISOpticalFlowImpl::collectGarbage()':
C:\opencv\sources\modules\video\src\dis_flow.cpp:1547:44: error: invalid types 'int[int]' for array subscript
         variational_refinement_processors[i]->collectGarbage();
                                            ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:1548:39: error: request for member 'clear' in '((cv::DISOpticalFlowImpl*)this)->cv::DISOpticalFlowImpl::variational_refinement_processors', which is of non-class type 'int'
     variational_refinement_processors.clear();
                                       ^~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp: At global scope:
C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:5: error: 'DISOpticalFlow' was not declared in this scope
 Ptr<DISOpticalFlow> DISOpticalFlow::create(int preset)
     ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:5: note: suggested alternative: 'DISOpticalFlowImpl'
 Ptr<DISOpticalFlow> DISOpticalFlow::create(int preset)
     ^~~~~~~~~~~~~~
     DISOpticalFlowImpl
C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:19: error: template argument 1 is invalid
 Ptr<DISOpticalFlow> DISOpticalFlow::create(int preset)
                   ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:21: error: 'DISOpticalFlow' has not been declared
 Ptr<DISOpticalFlow> DISOpticalFlow::create(int preset)
                     ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1551:21: warning: no previous declaration for 'int cv::create(int)' [-Wmissing-declarations]
C:\opencv\sources\modules\video\src\dis_flow.cpp: In function 'int cv::create(int)':
C:\opencv\sources\modules\video\src\dis_flow.cpp:1555:9: error: 'DISOpticalFlow' was not declared in this scope
     Ptr<DISOpticalFlow> dis = makePtr<DISOpticalFlowImpl>();
         ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1555:9: note: suggested alternative: 'DISOpticalFlowImpl'
     Ptr<DISOpticalFlow> dis = makePtr<DISOpticalFlowImpl>();
         ^~~~~~~~~~~~~~
         DISOpticalFlowImpl
C:\opencv\sources\modules\video\src\dis_flow.cpp:1555:23: error: template argument 1 is invalid
     Ptr<DISOpticalFlow> dis = makePtr<DISOpticalFlowImpl>();
                       ^
C:\opencv\sources\modules\video\src\dis_flow.cpp:1555:58: error: invalid user-defined conversion from 'cv::Ptr<cv::DISOpticalFlowImpl>' to 'int' [-fpermissive]
     Ptr<DISOpticalFlow> dis = makePtr<DISOpticalFlowImpl>();
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from C:/opencv/sources/modules/core/include/opencv2/core/cvstd.hpp:1072,
                 from C:/opencv/sources/modules/core/include/opencv2/core/base.hpp:58,
                 from C:/opencv/sources/modules/core/include/opencv2/core.hpp:54,
                 from C:/opencv/sources/modules/video/include/opencv2/video/tracking.hpp:47,
                 from C:/opencv/sources/modules/video/include/opencv2/video.hpp:56,
                 from C:\opencv\sources\modules\video\src\precomp.hpp:46,
                 from C:\opencv\sources\modules\video\src\dis_flow.cpp:43:
C:/opencv/sources/modules/core/include/opencv2/core/ptr.inl.hpp:222:1: note: candidate is: 'cv::Ptr<T>::operator T*() const [with T = cv::DISOpticalFlowImpl]' <near match>
 Ptr<T>::operator T* () const
 ^~~~~~
C:/opencv/sources/modules/core/include/opencv2/core/ptr.inl.hpp:222:1: note:   no known conversion from 'cv::DISOpticalFlowImpl*' to 'int'
C:\opencv\sources\modules\video\src\dis_flow.cpp:1556:8: error: base operand of '->' is not a pointer
     dis->setPatchSize(8);
        ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1557:19: error: 'DISOpticalFlow' is not a class, namespace, or enumeration
     if (preset == DISOpticalFlow::PRESET_ULTRAFAST)
                   ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1559:12: error: base operand of '->' is not a pointer
         dis->setFinestScale(2);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1560:12: error: base operand of '->' is not a pointer
         dis->setPatchStride(4);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1561:12: error: base operand of '->' is not a pointer
         dis->setGradientDescentIterations(12);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1562:12: error: base operand of '->' is not a pointer
         dis->setVariationalRefinementIterations(0);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1564:24: error: 'DISOpticalFlow' is not a class, namespace, or enumeration
     else if (preset == DISOpticalFlow::PRESET_FAST)
                        ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1566:12: error: base operand of '->' is not a pointer
         dis->setFinestScale(2);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1567:12: error: base operand of '->' is not a pointer
         dis->setPatchStride(4);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1568:12: error: base operand of '->' is not a pointer
         dis->setGradientDescentIterations(16);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1569:12: error: base operand of '->' is not a pointer
         dis->setVariationalRefinementIterations(5);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1571:24: error: 'DISOpticalFlow' is not a class, namespace, or enumeration
     else if (preset == DISOpticalFlow::PRESET_MEDIUM)
                        ^~~~~~~~~~~~~~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1573:12: error: base operand of '->' is not a pointer
         dis->setFinestScale(1);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1574:12: error: base operand of '->' is not a pointer
         dis->setPatchStride(3);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1575:12: error: base operand of '->' is not a pointer
         dis->setGradientDescentIterations(25);
            ^~
C:\opencv\sources\modules\video\src\dis_flow.cpp:1576:12: error: base operand of '->' is not a pointer
         dis->setVariationalRefinementIterations(5);
            ^~
mingw32-make[2]: *** [modules\video\CMakeFiles\opencv_video.dir\build.make:149: modules/video/CMakeFiles/opencv_video.dir/src/dis_flow.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:4305: modules/video/CMakeFiles/opencv_video.dir/all] Error 2
mingw32-make: *** [Makefile:182: all] Error 22

Please who knows how to get around this?