From 7818071ba27c12bb10ba3810b9f09187fb875550 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 5 Apr 2018 13:44:44 +0300 Subject: [PATCH] cuda: eliminate part of build warnings --- modules/core/include/opencv2/core/cuda_types.hpp | 7 +++ modules/core/src/cuda/gpu_mat.cu | 8 +-- modules/core/src/cuda_host_mem.cpp | 6 +-- modules/core/src/cuda_stream.cpp | 4 +- modules/cudaarithm/src/cuda/lut.cu | 2 +- modules/cudabgsegm/src/mog.cpp | 26 +++++----- modules/cudabgsegm/src/mog2.cpp | 58 +++++++++++----------- modules/cudacodec/src/cuvid_video_source.hpp | 10 ++-- modules/cudacodec/src/ffmpeg_video_source.hpp | 4 +- modules/cudacodec/src/video_reader.cpp | 4 +- modules/cudacodec/src/video_source.hpp | 10 ++-- modules/cudalegacy/src/precomp.hpp | 7 +++ .../opencv2/stitching/detail/seam_finders.hpp | 2 +- modules/superres/src/optical_flow.cpp | 28 +++++------ .../include/opencv2/videostab/optical_flow.hpp | 2 +- .../opencv2/videostab/wobble_suppression.hpp | 2 +- samples/gpu/CMakeLists.txt | 3 ++ samples/gpu/opticalflow_nvidia_api.cpp | 3 ++ 18 files changed, 103 insertions(+), 83 deletions(-) diff --git a/modules/core/include/opencv2/core/cuda_types.hpp b/modules/core/include/opencv2/core/cuda_types.hpp index f13a847..e2647c0 100644 --- a/modules/core/include/opencv2/core/cuda_types.hpp +++ b/modules/core/include/opencv2/core/cuda_types.hpp @@ -47,6 +47,13 @@ # error cuda_types.hpp header must be compiled as C++ #endif +#if defined(__OPENCV_BUILD) && defined(__clang__) +#pragma clang diagnostic ignored "-Winconsistent-missing-override" +#endif +#if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic ignored "-Wsuggest-override" +#endif + /** @file * @deprecated Use @ref cudev instead. */ diff --git a/modules/core/src/cuda/gpu_mat.cu b/modules/core/src/cuda/gpu_mat.cu index 987de9e..964442b 100644 --- a/modules/core/src/cuda/gpu_mat.cu +++ b/modules/core/src/cuda/gpu_mat.cu @@ -64,7 +64,7 @@ namespace class DefaultThrustAllocator: public cv::cuda::device::ThrustAllocator { public: - __device__ __host__ uchar* allocate(size_t numBytes) + __device__ __host__ uchar* allocate(size_t numBytes) CV_OVERRIDE { #ifndef __CUDA_ARCH__ uchar* ptr; @@ -74,7 +74,7 @@ namespace return NULL; #endif } - __device__ __host__ void deallocate(uchar* ptr, size_t numBytes) + __device__ __host__ void deallocate(uchar* ptr, size_t numBytes) CV_OVERRIDE { (void)numBytes; #ifndef __CUDA_ARCH__ @@ -105,8 +105,8 @@ namespace class DefaultAllocator : public GpuMat::Allocator { public: - bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize); - void free(GpuMat* mat); + bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize) CV_OVERRIDE; + void free(GpuMat* mat) CV_OVERRIDE; }; bool DefaultAllocator::allocate(GpuMat* mat, int rows, int cols, size_t elemSize) diff --git a/modules/core/src/cuda_host_mem.cpp b/modules/core/src/cuda_host_mem.cpp index 70dd840..3f1daf5 100644 --- a/modules/core/src/cuda_host_mem.cpp +++ b/modules/core/src/cuda_host_mem.cpp @@ -60,7 +60,7 @@ public: UMatData* allocate(int dims, const int* sizes, int type, void* data0, size_t* step, - int /*flags*/, UMatUsageFlags /*usageFlags*/) const + int /*flags*/, UMatUsageFlags /*usageFlags*/) const CV_OVERRIDE { size_t total = CV_ELEM_SIZE(type); for (int i = dims-1; i >= 0; i--) @@ -100,12 +100,12 @@ public: return u; } - bool allocate(UMatData* u, int /*accessFlags*/, UMatUsageFlags /*usageFlags*/) const + bool allocate(UMatData* u, int /*accessFlags*/, UMatUsageFlags /*usageFlags*/) const CV_OVERRIDE { return (u != NULL); } - void deallocate(UMatData* u) const + void deallocate(UMatData* u) const CV_OVERRIDE { if (!u) return; diff --git a/modules/core/src/cuda_stream.cpp b/modules/core/src/cuda_stream.cpp index 340cf10..3f619e8 100644 --- a/modules/core/src/cuda_stream.cpp +++ b/modules/core/src/cuda_stream.cpp @@ -560,8 +560,8 @@ namespace explicit StackAllocator(cudaStream_t stream); ~StackAllocator(); - bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize); - void free(GpuMat* mat); + bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize) CV_OVERRIDE; + void free(GpuMat* mat) CV_OVERRIDE; private: StackAllocator(const StackAllocator&); diff --git a/modules/cudaarithm/src/cuda/lut.cu b/modules/cudaarithm/src/cuda/lut.cu index 56efb8f..1769116 100644 --- a/modules/cudaarithm/src/cuda/lut.cu +++ b/modules/cudaarithm/src/cuda/lut.cu @@ -66,7 +66,7 @@ namespace LookUpTableImpl(InputArray lut); ~LookUpTableImpl(); - void transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null()); + void transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) CV_OVERRIDE; private: GpuMat d_lut; diff --git a/modules/cudabgsegm/src/mog.cpp b/modules/cudabgsegm/src/mog.cpp index c3712bc..8a43293 100644 --- a/modules/cudabgsegm/src/mog.cpp +++ b/modules/cudabgsegm/src/mog.cpp @@ -71,28 +71,28 @@ namespace const float defaultNoiseSigma = 30.0f * 0.5f; const float defaultInitialWeight = 0.05f; - class MOGImpl : public cuda::BackgroundSubtractorMOG + class MOGImpl CV_FINAL : public cuda::BackgroundSubtractorMOG { public: MOGImpl(int history, int nmixtures, double backgroundRatio, double noiseSigma); - void apply(InputArray image, OutputArray fgmask, double learningRate=-1); - void apply(InputArray image, OutputArray fgmask, double learningRate, Stream& stream); + void apply(InputArray image, OutputArray fgmask, double learningRate=-1) CV_OVERRIDE; + void apply(InputArray image, OutputArray fgmask, double learningRate, Stream& stream) CV_OVERRIDE; - void getBackgroundImage(OutputArray backgroundImage) const; - void getBackgroundImage(OutputArray backgroundImage, Stream& stream) const; + void getBackgroundImage(OutputArray backgroundImage) const CV_OVERRIDE; + void getBackgroundImage(OutputArray backgroundImage, Stream& stream) const CV_OVERRIDE; - int getHistory() const { return history_; } - void setHistory(int nframes) { history_ = nframes; } + int getHistory() const CV_OVERRIDE { return history_; } + void setHistory(int nframes) CV_OVERRIDE { history_ = nframes; } - int getNMixtures() const { return nmixtures_; } - void setNMixtures(int nmix) { nmixtures_ = nmix; } + int getNMixtures() const CV_OVERRIDE { return nmixtures_; } + void setNMixtures(int nmix) CV_OVERRIDE { nmixtures_ = nmix; } - double getBackgroundRatio() const { return backgroundRatio_; } - void setBackgroundRatio(double backgroundRatio) { backgroundRatio_ = (float) backgroundRatio; } + double getBackgroundRatio() const CV_OVERRIDE { return backgroundRatio_; } + void setBackgroundRatio(double backgroundRatio) CV_OVERRIDE { backgroundRatio_ = (float) backgroundRatio; } - double getNoiseSigma() const { return noiseSigma_; } - void setNoiseSigma(double noiseSigma) { noiseSigma_ = (float) noiseSigma; } + double getNoiseSigma() const CV_OVERRIDE { return noiseSigma_; } + void setNoiseSigma(double noiseSigma) CV_OVERRIDE { noiseSigma_ = (float) noiseSigma; } private: //! re-initiaization method diff --git a/modules/cudabgsegm/src/mog2.cpp b/modules/cudabgsegm/src/mog2.cpp index f1a4008..e727dcf 100644 --- a/modules/cudabgsegm/src/mog2.cpp +++ b/modules/cudabgsegm/src/mog2.cpp @@ -78,52 +78,52 @@ namespace const unsigned char defaultShadowValue = 127; // value to use in the segmentation mask for shadows, set 0 not to do shadow detection const float defaultShadowThreshold = 0.5f; // Tau - shadow threshold, see the paper for explanation - class MOG2Impl : public cuda::BackgroundSubtractorMOG2 + class MOG2Impl CV_FINAL : public cuda::BackgroundSubtractorMOG2 { public: MOG2Impl(int history, double varThreshold, bool detectShadows); - void apply(InputArray image, OutputArray fgmask, double learningRate=-1); - void apply(InputArray image, OutputArray fgmask, double learningRate, Stream& stream); + void apply(InputArray image, OutputArray fgmask, double learningRate=-1) CV_OVERRIDE; + void apply(InputArray image, OutputArray fgmask, double learningRate, Stream& stream) CV_OVERRIDE; - void getBackgroundImage(OutputArray backgroundImage) const; - void getBackgroundImage(OutputArray backgroundImage, Stream& stream) const; + void getBackgroundImage(OutputArray backgroundImage) const CV_OVERRIDE; + void getBackgroundImage(OutputArray backgroundImage, Stream& stream) const CV_OVERRIDE; - int getHistory() const { return history_; } - void setHistory(int history) { history_ = history; } + int getHistory() const CV_OVERRIDE { return history_; } + void setHistory(int history) CV_OVERRIDE { history_ = history; } - int getNMixtures() const { return nmixtures_; } - void setNMixtures(int nmixtures) { nmixtures_ = nmixtures; } + int getNMixtures() const CV_OVERRIDE { return nmixtures_; } + void setNMixtures(int nmixtures) CV_OVERRIDE { nmixtures_ = nmixtures; } - double getBackgroundRatio() const { return backgroundRatio_; } - void setBackgroundRatio(double ratio) { backgroundRatio_ = (float) ratio; } + double getBackgroundRatio() const CV_OVERRIDE { return backgroundRatio_; } + void setBackgroundRatio(double ratio) CV_OVERRIDE { backgroundRatio_ = (float) ratio; } - double getVarThreshold() const { return varThreshold_; } - void setVarThreshold(double varThreshold) { varThreshold_ = (float) varThreshold; } + double getVarThreshold() const CV_OVERRIDE { return varThreshold_; } + void setVarThreshold(double varThreshold) CV_OVERRIDE { varThreshold_ = (float) varThreshold; } - double getVarThresholdGen() const { return varThresholdGen_; } - void setVarThresholdGen(double varThresholdGen) { varThresholdGen_ = (float) varThresholdGen; } + double getVarThresholdGen() const CV_OVERRIDE { return varThresholdGen_; } + void setVarThresholdGen(double varThresholdGen) CV_OVERRIDE { varThresholdGen_ = (float) varThresholdGen; } - double getVarInit() const { return varInit_; } - void setVarInit(double varInit) { varInit_ = (float) varInit; } + double getVarInit() const CV_OVERRIDE { return varInit_; } + void setVarInit(double varInit) CV_OVERRIDE { varInit_ = (float) varInit; } - double getVarMin() const { return varMin_; } - void setVarMin(double varMin) { varMin_ = (float) varMin; } + double getVarMin() const CV_OVERRIDE { return varMin_; } + void setVarMin(double varMin) CV_OVERRIDE { varMin_ = (float) varMin; } - double getVarMax() const { return varMax_; } - void setVarMax(double varMax) { varMax_ = (float) varMax; } + double getVarMax() const CV_OVERRIDE { return varMax_; } + void setVarMax(double varMax) CV_OVERRIDE { varMax_ = (float) varMax; } - double getComplexityReductionThreshold() const { return ct_; } - void setComplexityReductionThreshold(double ct) { ct_ = (float) ct; } + double getComplexityReductionThreshold() const CV_OVERRIDE { return ct_; } + void setComplexityReductionThreshold(double ct) CV_OVERRIDE { ct_ = (float) ct; } - bool getDetectShadows() const { return detectShadows_; } - void setDetectShadows(bool detectShadows) { detectShadows_ = detectShadows; } + bool getDetectShadows() const CV_OVERRIDE { return detectShadows_; } + void setDetectShadows(bool detectShadows) CV_OVERRIDE { detectShadows_ = detectShadows; } - int getShadowValue() const { return shadowValue_; } - void setShadowValue(int value) { shadowValue_ = (uchar) value; } + int getShadowValue() const CV_OVERRIDE { return shadowValue_; } + void setShadowValue(int value) CV_OVERRIDE { shadowValue_ = (uchar) value; } - double getShadowThreshold() const { return shadowThreshold_; } - void setShadowThreshold(double threshold) { shadowThreshold_ = (float) threshold; } + double getShadowThreshold() const CV_OVERRIDE { return shadowThreshold_; } + void setShadowThreshold(double threshold) CV_OVERRIDE { shadowThreshold_ = (float) threshold; } private: void initialize(Size frameSize, int frameType); diff --git a/modules/cudacodec/src/cuvid_video_source.hpp b/modules/cudacodec/src/cuvid_video_source.hpp index 085979f..3d7524a 100644 --- a/modules/cudacodec/src/cuvid_video_source.hpp +++ b/modules/cudacodec/src/cuvid_video_source.hpp @@ -62,11 +62,11 @@ public: explicit CuvidVideoSource(const String& fname); ~CuvidVideoSource(); - FormatInfo format() const; - void start(); - void stop(); - bool isStarted() const; - bool hasError() const; + FormatInfo format() const CV_OVERRIDE; + void start() CV_OVERRIDE; + void stop() CV_OVERRIDE; + bool isStarted() const CV_OVERRIDE; + bool hasError() const CV_OVERRIDE; private: // Callback for handling packages of demuxed video data. diff --git a/modules/cudacodec/src/ffmpeg_video_source.hpp b/modules/cudacodec/src/ffmpeg_video_source.hpp index aa58321..6431c30 100644 --- a/modules/cudacodec/src/ffmpeg_video_source.hpp +++ b/modules/cudacodec/src/ffmpeg_video_source.hpp @@ -56,9 +56,9 @@ public: FFmpegVideoSource(const String& fname); ~FFmpegVideoSource(); - bool getNextPacket(unsigned char** data, int* size, bool* endOfFile); + bool getNextPacket(unsigned char** data, int* size, bool* endOfFile) CV_OVERRIDE; - FormatInfo format() const; + FormatInfo format() const CV_OVERRIDE; private: FormatInfo format_; diff --git a/modules/cudacodec/src/video_reader.cpp b/modules/cudacodec/src/video_reader.cpp index da4a6a6..3024cd9 100644 --- a/modules/cudacodec/src/video_reader.cpp +++ b/modules/cudacodec/src/video_reader.cpp @@ -65,9 +65,9 @@ namespace explicit VideoReaderImpl(const Ptr& source); ~VideoReaderImpl(); - bool nextFrame(OutputArray frame); + bool nextFrame(OutputArray frame) CV_OVERRIDE; - FormatInfo format() const; + FormatInfo format() const CV_OVERRIDE; private: Ptr videoSource_; diff --git a/modules/cudacodec/src/video_source.hpp b/modules/cudacodec/src/video_source.hpp index 99fd4db..9f2ed29 100644 --- a/modules/cudacodec/src/video_source.hpp +++ b/modules/cudacodec/src/video_source.hpp @@ -78,11 +78,11 @@ class RawVideoSourceWrapper : public VideoSource public: RawVideoSourceWrapper(const Ptr& source); - FormatInfo format() const; - void start(); - void stop(); - bool isStarted() const; - bool hasError() const; + FormatInfo format() const CV_OVERRIDE; + void start() CV_OVERRIDE; + void stop() CV_OVERRIDE; + bool isStarted() const CV_OVERRIDE; + bool hasError() const CV_OVERRIDE; private: Ptr source_; diff --git a/modules/cudalegacy/src/precomp.hpp b/modules/cudalegacy/src/precomp.hpp index 9eda7e0..e87cc86 100644 --- a/modules/cudalegacy/src/precomp.hpp +++ b/modules/cudalegacy/src/precomp.hpp @@ -47,6 +47,13 @@ #include #include +#if defined(__OPENCV_BUILD) && defined(__clang__) +#pragma clang diagnostic ignored "-Winconsistent-missing-override" +#endif +#if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic ignored "-Wsuggest-override" +#endif + #include "opencv2/cudalegacy.hpp" #include "opencv2/core/utility.hpp" diff --git a/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp b/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp index fb91989..904f0ec 100644 --- a/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp @@ -262,7 +262,7 @@ public: void find(const std::vector &src, const std::vector &corners, std::vector &masks) CV_OVERRIDE; - void findInPair(size_t first, size_t second, Rect roi); + void findInPair(size_t first, size_t second, Rect roi) CV_OVERRIDE; private: void setGraphWeightsColor(const cv::Mat &img1, const cv::Mat &img2, const cv::Mat &mask1, const cv::Mat &mask2, diff --git a/modules/superres/src/optical_flow.cpp b/modules/superres/src/optical_flow.cpp index b18b27c..cd6153a 100644 --- a/modules/superres/src/optical_flow.cpp +++ b/modules/superres/src/optical_flow.cpp @@ -441,8 +441,8 @@ namespace public: explicit GpuOpticalFlow(int work_type); - void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2); - void collectGarbage(); + void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE; + void collectGarbage() CV_OVERRIDE; protected: virtual void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2) = 0; @@ -510,8 +510,8 @@ namespace { public: Brox_CUDA(); - void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2); - void collectGarbage(); + void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE; + void collectGarbage() CV_OVERRIDE; inline double getAlpha() const CV_OVERRIDE { return alpha_; } inline void setAlpha(double val) CV_OVERRIDE { alpha_ = val; } @@ -527,7 +527,7 @@ namespace inline void setSolverIterations(int val) CV_OVERRIDE { solverIterations_ = val; } protected: - void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2); + void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2) CV_OVERRIDE; private: double alpha_; @@ -597,8 +597,8 @@ namespace { public: PyrLK_CUDA(); - void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2); - void collectGarbage(); + void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE; + void collectGarbage() CV_OVERRIDE; inline int getWindowSize() const CV_OVERRIDE { return winSize_; } inline void setWindowSize(int val) CV_OVERRIDE { winSize_ = val; } @@ -608,7 +608,7 @@ namespace inline void setIterations(int val) CV_OVERRIDE { iterations_ = val; } protected: - void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2); + void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2) CV_OVERRIDE; private: int winSize_; @@ -669,8 +669,8 @@ namespace { public: Farneback_CUDA(); - void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2); - void collectGarbage(); + void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE; + void collectGarbage() CV_OVERRIDE; inline double getPyrScale() const CV_OVERRIDE { return pyrScale_; } inline void setPyrScale(double val) CV_OVERRIDE { pyrScale_ = val; } @@ -688,7 +688,7 @@ namespace inline void setFlags(int val) CV_OVERRIDE { flags_ = val; } protected: - void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2); + void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2) CV_OVERRIDE; private: double pyrScale_; @@ -761,8 +761,8 @@ namespace { public: DualTVL1_CUDA(); - void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2); - void collectGarbage(); + void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE; + void collectGarbage() CV_OVERRIDE; inline double getTau() const CV_OVERRIDE { return tau_; } inline void setTau(double val) CV_OVERRIDE { tau_ = val; } @@ -782,7 +782,7 @@ namespace inline void setUseInitialFlow(bool val) CV_OVERRIDE { useInitialFlow_ = val; } protected: - void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2); + void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2) CV_OVERRIDE; private: double tau_; diff --git a/modules/videostab/include/opencv2/videostab/optical_flow.hpp b/modules/videostab/include/opencv2/videostab/optical_flow.hpp index 63f0f3b..5e06941 100644 --- a/modules/videostab/include/opencv2/videostab/optical_flow.hpp +++ b/modules/videostab/include/opencv2/videostab/optical_flow.hpp @@ -133,7 +133,7 @@ public: virtual void run( InputArray frame0, InputArray frame1, InputOutputArray flowX, InputOutputArray flowY, - OutputArray errors); + OutputArray errors) CV_OVERRIDE; private: Ptr optFlowEstimator_; diff --git a/modules/videostab/include/opencv2/videostab/wobble_suppression.hpp b/modules/videostab/include/opencv2/videostab/wobble_suppression.hpp index 19a5a74..d60ae6d 100644 --- a/modules/videostab/include/opencv2/videostab/wobble_suppression.hpp +++ b/modules/videostab/include/opencv2/videostab/wobble_suppression.hpp @@ -124,7 +124,7 @@ class CV_EXPORTS MoreAccurateMotionWobbleSuppressorGpu : public MoreAccurateMoti { public: void suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result); - virtual void suppress(int idx, const Mat &frame, Mat &result); + virtual void suppress(int idx, const Mat &frame, Mat &result) CV_OVERRIDE; private: cuda::GpuMat frameDevice_, resultDevice_; diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index ecea028..075c63a 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -30,6 +30,9 @@ if(NOT BUILD_EXAMPLES OR NOT OCV_DEPENDENCIES_FOUND) endif() project(gpu_samples) +if(COMMAND ocv_warnings_disable) + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wsuggest-override -Winconsistent-missing-override) +endif() ocv_include_modules_recurse(${OPENCV_CUDA_SAMPLES_REQUIRED_DEPS}) if(HAVE_opencv_xfeatures2d) ocv_include_modules_recurse(opencv_xfeatures2d) diff --git a/samples/gpu/opticalflow_nvidia_api.cpp b/samples/gpu/opticalflow_nvidia_api.cpp index be332d7..a60a7a8 100644 --- a/samples/gpu/opticalflow_nvidia_api.cpp +++ b/samples/gpu/opticalflow_nvidia_api.cpp @@ -16,6 +16,9 @@ #include "opencv2/cudalegacy.hpp" #include "opencv2/highgui.hpp" +#include "opencv2/core/core_c.h" // FIXIT legacy API +#include "opencv2/highgui/highgui_c.h" // FIXIT legacy API + #if !defined(HAVE_CUDA) int main( int, const char** ) { -- 2.7.4