mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
cuda: eliminate part of build warnings
This commit is contained in:
parent
f93c1b942a
commit
7818071ba2
@ -47,6 +47,13 @@
|
|||||||
# error cuda_types.hpp header must be compiled as C++
|
# error cuda_types.hpp header must be compiled as C++
|
||||||
#endif
|
#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
|
/** @file
|
||||||
* @deprecated Use @ref cudev instead.
|
* @deprecated Use @ref cudev instead.
|
||||||
*/
|
*/
|
||||||
|
@ -64,7 +64,7 @@ namespace
|
|||||||
class DefaultThrustAllocator: public cv::cuda::device::ThrustAllocator
|
class DefaultThrustAllocator: public cv::cuda::device::ThrustAllocator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
__device__ __host__ uchar* allocate(size_t numBytes)
|
__device__ __host__ uchar* allocate(size_t numBytes) CV_OVERRIDE
|
||||||
{
|
{
|
||||||
#ifndef __CUDA_ARCH__
|
#ifndef __CUDA_ARCH__
|
||||||
uchar* ptr;
|
uchar* ptr;
|
||||||
@ -74,7 +74,7 @@ namespace
|
|||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
__device__ __host__ void deallocate(uchar* ptr, size_t numBytes)
|
__device__ __host__ void deallocate(uchar* ptr, size_t numBytes) CV_OVERRIDE
|
||||||
{
|
{
|
||||||
(void)numBytes;
|
(void)numBytes;
|
||||||
#ifndef __CUDA_ARCH__
|
#ifndef __CUDA_ARCH__
|
||||||
@ -105,8 +105,8 @@ namespace
|
|||||||
class DefaultAllocator : public GpuMat::Allocator
|
class DefaultAllocator : public GpuMat::Allocator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize);
|
bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize) CV_OVERRIDE;
|
||||||
void free(GpuMat* mat);
|
void free(GpuMat* mat) CV_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DefaultAllocator::allocate(GpuMat* mat, int rows, int cols, size_t elemSize)
|
bool DefaultAllocator::allocate(GpuMat* mat, int rows, int cols, size_t elemSize)
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
|
|
||||||
UMatData* allocate(int dims, const int* sizes, int type,
|
UMatData* allocate(int dims, const int* sizes, int type,
|
||||||
void* data0, size_t* step,
|
void* data0, size_t* step,
|
||||||
int /*flags*/, UMatUsageFlags /*usageFlags*/) const
|
int /*flags*/, UMatUsageFlags /*usageFlags*/) const CV_OVERRIDE
|
||||||
{
|
{
|
||||||
size_t total = CV_ELEM_SIZE(type);
|
size_t total = CV_ELEM_SIZE(type);
|
||||||
for (int i = dims-1; i >= 0; i--)
|
for (int i = dims-1; i >= 0; i--)
|
||||||
@ -100,12 +100,12 @@ public:
|
|||||||
return u;
|
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);
|
return (u != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void deallocate(UMatData* u) const
|
void deallocate(UMatData* u) const CV_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!u)
|
if (!u)
|
||||||
return;
|
return;
|
||||||
|
@ -560,8 +560,8 @@ namespace
|
|||||||
explicit StackAllocator(cudaStream_t stream);
|
explicit StackAllocator(cudaStream_t stream);
|
||||||
~StackAllocator();
|
~StackAllocator();
|
||||||
|
|
||||||
bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize);
|
bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize) CV_OVERRIDE;
|
||||||
void free(GpuMat* mat);
|
void free(GpuMat* mat) CV_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StackAllocator(const StackAllocator&);
|
StackAllocator(const StackAllocator&);
|
||||||
|
@ -66,7 +66,7 @@ namespace
|
|||||||
LookUpTableImpl(InputArray lut);
|
LookUpTableImpl(InputArray lut);
|
||||||
~LookUpTableImpl();
|
~LookUpTableImpl();
|
||||||
|
|
||||||
void transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null());
|
void transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) CV_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GpuMat d_lut;
|
GpuMat d_lut;
|
||||||
|
@ -71,28 +71,28 @@ namespace
|
|||||||
const float defaultNoiseSigma = 30.0f * 0.5f;
|
const float defaultNoiseSigma = 30.0f * 0.5f;
|
||||||
const float defaultInitialWeight = 0.05f;
|
const float defaultInitialWeight = 0.05f;
|
||||||
|
|
||||||
class MOGImpl : public cuda::BackgroundSubtractorMOG
|
class MOGImpl CV_FINAL : public cuda::BackgroundSubtractorMOG
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MOGImpl(int history, int nmixtures, double backgroundRatio, double noiseSigma);
|
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=-1) CV_OVERRIDE;
|
||||||
void apply(InputArray image, OutputArray fgmask, double learningRate, Stream& stream);
|
void apply(InputArray image, OutputArray fgmask, double learningRate, Stream& stream) CV_OVERRIDE;
|
||||||
|
|
||||||
void getBackgroundImage(OutputArray backgroundImage) const;
|
void getBackgroundImage(OutputArray backgroundImage) const CV_OVERRIDE;
|
||||||
void getBackgroundImage(OutputArray backgroundImage, Stream& stream) const;
|
void getBackgroundImage(OutputArray backgroundImage, Stream& stream) const CV_OVERRIDE;
|
||||||
|
|
||||||
int getHistory() const { return history_; }
|
int getHistory() const CV_OVERRIDE { return history_; }
|
||||||
void setHistory(int nframes) { history_ = nframes; }
|
void setHistory(int nframes) CV_OVERRIDE { history_ = nframes; }
|
||||||
|
|
||||||
int getNMixtures() const { return nmixtures_; }
|
int getNMixtures() const CV_OVERRIDE { return nmixtures_; }
|
||||||
void setNMixtures(int nmix) { nmixtures_ = nmix; }
|
void setNMixtures(int nmix) CV_OVERRIDE { nmixtures_ = nmix; }
|
||||||
|
|
||||||
double getBackgroundRatio() const { return backgroundRatio_; }
|
double getBackgroundRatio() const CV_OVERRIDE { return backgroundRatio_; }
|
||||||
void setBackgroundRatio(double backgroundRatio) { backgroundRatio_ = (float) backgroundRatio; }
|
void setBackgroundRatio(double backgroundRatio) CV_OVERRIDE { backgroundRatio_ = (float) backgroundRatio; }
|
||||||
|
|
||||||
double getNoiseSigma() const { return noiseSigma_; }
|
double getNoiseSigma() const CV_OVERRIDE { return noiseSigma_; }
|
||||||
void setNoiseSigma(double noiseSigma) { noiseSigma_ = (float) noiseSigma; }
|
void setNoiseSigma(double noiseSigma) CV_OVERRIDE { noiseSigma_ = (float) noiseSigma; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! re-initiaization method
|
//! re-initiaization method
|
||||||
|
@ -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 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
|
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:
|
public:
|
||||||
MOG2Impl(int history, double varThreshold, bool detectShadows);
|
MOG2Impl(int history, double varThreshold, bool detectShadows);
|
||||||
|
|
||||||
void apply(InputArray image, OutputArray fgmask, double learningRate=-1);
|
void apply(InputArray image, OutputArray fgmask, double learningRate=-1) CV_OVERRIDE;
|
||||||
void apply(InputArray image, OutputArray fgmask, double learningRate, Stream& stream);
|
void apply(InputArray image, OutputArray fgmask, double learningRate, Stream& stream) CV_OVERRIDE;
|
||||||
|
|
||||||
void getBackgroundImage(OutputArray backgroundImage) const;
|
void getBackgroundImage(OutputArray backgroundImage) const CV_OVERRIDE;
|
||||||
void getBackgroundImage(OutputArray backgroundImage, Stream& stream) const;
|
void getBackgroundImage(OutputArray backgroundImage, Stream& stream) const CV_OVERRIDE;
|
||||||
|
|
||||||
int getHistory() const { return history_; }
|
int getHistory() const CV_OVERRIDE { return history_; }
|
||||||
void setHistory(int history) { history_ = history; }
|
void setHistory(int history) CV_OVERRIDE { history_ = history; }
|
||||||
|
|
||||||
int getNMixtures() const { return nmixtures_; }
|
int getNMixtures() const CV_OVERRIDE { return nmixtures_; }
|
||||||
void setNMixtures(int nmixtures) { nmixtures_ = nmixtures; }
|
void setNMixtures(int nmixtures) CV_OVERRIDE { nmixtures_ = nmixtures; }
|
||||||
|
|
||||||
double getBackgroundRatio() const { return backgroundRatio_; }
|
double getBackgroundRatio() const CV_OVERRIDE { return backgroundRatio_; }
|
||||||
void setBackgroundRatio(double ratio) { backgroundRatio_ = (float) ratio; }
|
void setBackgroundRatio(double ratio) CV_OVERRIDE { backgroundRatio_ = (float) ratio; }
|
||||||
|
|
||||||
double getVarThreshold() const { return varThreshold_; }
|
double getVarThreshold() const CV_OVERRIDE { return varThreshold_; }
|
||||||
void setVarThreshold(double varThreshold) { varThreshold_ = (float) varThreshold; }
|
void setVarThreshold(double varThreshold) CV_OVERRIDE { varThreshold_ = (float) varThreshold; }
|
||||||
|
|
||||||
double getVarThresholdGen() const { return varThresholdGen_; }
|
double getVarThresholdGen() const CV_OVERRIDE { return varThresholdGen_; }
|
||||||
void setVarThresholdGen(double varThresholdGen) { varThresholdGen_ = (float) varThresholdGen; }
|
void setVarThresholdGen(double varThresholdGen) CV_OVERRIDE { varThresholdGen_ = (float) varThresholdGen; }
|
||||||
|
|
||||||
double getVarInit() const { return varInit_; }
|
double getVarInit() const CV_OVERRIDE { return varInit_; }
|
||||||
void setVarInit(double varInit) { varInit_ = (float) varInit; }
|
void setVarInit(double varInit) CV_OVERRIDE { varInit_ = (float) varInit; }
|
||||||
|
|
||||||
double getVarMin() const { return varMin_; }
|
double getVarMin() const CV_OVERRIDE { return varMin_; }
|
||||||
void setVarMin(double varMin) { varMin_ = (float) varMin; }
|
void setVarMin(double varMin) CV_OVERRIDE { varMin_ = (float) varMin; }
|
||||||
|
|
||||||
double getVarMax() const { return varMax_; }
|
double getVarMax() const CV_OVERRIDE { return varMax_; }
|
||||||
void setVarMax(double varMax) { varMax_ = (float) varMax; }
|
void setVarMax(double varMax) CV_OVERRIDE { varMax_ = (float) varMax; }
|
||||||
|
|
||||||
double getComplexityReductionThreshold() const { return ct_; }
|
double getComplexityReductionThreshold() const CV_OVERRIDE { return ct_; }
|
||||||
void setComplexityReductionThreshold(double ct) { ct_ = (float) ct; }
|
void setComplexityReductionThreshold(double ct) CV_OVERRIDE { ct_ = (float) ct; }
|
||||||
|
|
||||||
bool getDetectShadows() const { return detectShadows_; }
|
bool getDetectShadows() const CV_OVERRIDE { return detectShadows_; }
|
||||||
void setDetectShadows(bool detectShadows) { detectShadows_ = detectShadows; }
|
void setDetectShadows(bool detectShadows) CV_OVERRIDE { detectShadows_ = detectShadows; }
|
||||||
|
|
||||||
int getShadowValue() const { return shadowValue_; }
|
int getShadowValue() const CV_OVERRIDE { return shadowValue_; }
|
||||||
void setShadowValue(int value) { shadowValue_ = (uchar) value; }
|
void setShadowValue(int value) CV_OVERRIDE { shadowValue_ = (uchar) value; }
|
||||||
|
|
||||||
double getShadowThreshold() const { return shadowThreshold_; }
|
double getShadowThreshold() const CV_OVERRIDE { return shadowThreshold_; }
|
||||||
void setShadowThreshold(double threshold) { shadowThreshold_ = (float) threshold; }
|
void setShadowThreshold(double threshold) CV_OVERRIDE { shadowThreshold_ = (float) threshold; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initialize(Size frameSize, int frameType);
|
void initialize(Size frameSize, int frameType);
|
||||||
|
@ -62,11 +62,11 @@ public:
|
|||||||
explicit CuvidVideoSource(const String& fname);
|
explicit CuvidVideoSource(const String& fname);
|
||||||
~CuvidVideoSource();
|
~CuvidVideoSource();
|
||||||
|
|
||||||
FormatInfo format() const;
|
FormatInfo format() const CV_OVERRIDE;
|
||||||
void start();
|
void start() CV_OVERRIDE;
|
||||||
void stop();
|
void stop() CV_OVERRIDE;
|
||||||
bool isStarted() const;
|
bool isStarted() const CV_OVERRIDE;
|
||||||
bool hasError() const;
|
bool hasError() const CV_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Callback for handling packages of demuxed video data.
|
// Callback for handling packages of demuxed video data.
|
||||||
|
@ -56,9 +56,9 @@ public:
|
|||||||
FFmpegVideoSource(const String& fname);
|
FFmpegVideoSource(const String& fname);
|
||||||
~FFmpegVideoSource();
|
~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:
|
private:
|
||||||
FormatInfo format_;
|
FormatInfo format_;
|
||||||
|
@ -65,9 +65,9 @@ namespace
|
|||||||
explicit VideoReaderImpl(const Ptr<VideoSource>& source);
|
explicit VideoReaderImpl(const Ptr<VideoSource>& source);
|
||||||
~VideoReaderImpl();
|
~VideoReaderImpl();
|
||||||
|
|
||||||
bool nextFrame(OutputArray frame);
|
bool nextFrame(OutputArray frame) CV_OVERRIDE;
|
||||||
|
|
||||||
FormatInfo format() const;
|
FormatInfo format() const CV_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ptr<VideoSource> videoSource_;
|
Ptr<VideoSource> videoSource_;
|
||||||
|
@ -78,11 +78,11 @@ class RawVideoSourceWrapper : public VideoSource
|
|||||||
public:
|
public:
|
||||||
RawVideoSourceWrapper(const Ptr<RawVideoSource>& source);
|
RawVideoSourceWrapper(const Ptr<RawVideoSource>& source);
|
||||||
|
|
||||||
FormatInfo format() const;
|
FormatInfo format() const CV_OVERRIDE;
|
||||||
void start();
|
void start() CV_OVERRIDE;
|
||||||
void stop();
|
void stop() CV_OVERRIDE;
|
||||||
bool isStarted() const;
|
bool isStarted() const CV_OVERRIDE;
|
||||||
bool hasError() const;
|
bool hasError() const CV_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ptr<RawVideoSource> source_;
|
Ptr<RawVideoSource> source_;
|
||||||
|
@ -47,6 +47,13 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#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/cudalegacy.hpp"
|
||||||
#include "opencv2/core/utility.hpp"
|
#include "opencv2/core/utility.hpp"
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ public:
|
|||||||
|
|
||||||
void find(const std::vector<cv::UMat> &src, const std::vector<cv::Point> &corners,
|
void find(const std::vector<cv::UMat> &src, const std::vector<cv::Point> &corners,
|
||||||
std::vector<cv::UMat> &masks) CV_OVERRIDE;
|
std::vector<cv::UMat> &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:
|
private:
|
||||||
void setGraphWeightsColor(const cv::Mat &img1, const cv::Mat &img2, const cv::Mat &mask1, const cv::Mat &mask2,
|
void setGraphWeightsColor(const cv::Mat &img1, const cv::Mat &img2, const cv::Mat &mask1, const cv::Mat &mask2,
|
||||||
|
@ -441,8 +441,8 @@ namespace
|
|||||||
public:
|
public:
|
||||||
explicit GpuOpticalFlow(int work_type);
|
explicit GpuOpticalFlow(int work_type);
|
||||||
|
|
||||||
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2);
|
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE;
|
||||||
void collectGarbage();
|
void collectGarbage() CV_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2) = 0;
|
virtual void impl(const GpuMat& input0, const GpuMat& input1, GpuMat& dst1, GpuMat& dst2) = 0;
|
||||||
@ -510,8 +510,8 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Brox_CUDA();
|
Brox_CUDA();
|
||||||
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2);
|
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE;
|
||||||
void collectGarbage();
|
void collectGarbage() CV_OVERRIDE;
|
||||||
|
|
||||||
inline double getAlpha() const CV_OVERRIDE { return alpha_; }
|
inline double getAlpha() const CV_OVERRIDE { return alpha_; }
|
||||||
inline void setAlpha(double val) CV_OVERRIDE { alpha_ = val; }
|
inline void setAlpha(double val) CV_OVERRIDE { alpha_ = val; }
|
||||||
@ -527,7 +527,7 @@ namespace
|
|||||||
inline void setSolverIterations(int val) CV_OVERRIDE { solverIterations_ = val; }
|
inline void setSolverIterations(int val) CV_OVERRIDE { solverIterations_ = val; }
|
||||||
|
|
||||||
protected:
|
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:
|
private:
|
||||||
double alpha_;
|
double alpha_;
|
||||||
@ -597,8 +597,8 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PyrLK_CUDA();
|
PyrLK_CUDA();
|
||||||
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2);
|
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE;
|
||||||
void collectGarbage();
|
void collectGarbage() CV_OVERRIDE;
|
||||||
|
|
||||||
inline int getWindowSize() const CV_OVERRIDE { return winSize_; }
|
inline int getWindowSize() const CV_OVERRIDE { return winSize_; }
|
||||||
inline void setWindowSize(int val) CV_OVERRIDE { winSize_ = val; }
|
inline void setWindowSize(int val) CV_OVERRIDE { winSize_ = val; }
|
||||||
@ -608,7 +608,7 @@ namespace
|
|||||||
inline void setIterations(int val) CV_OVERRIDE { iterations_ = val; }
|
inline void setIterations(int val) CV_OVERRIDE { iterations_ = val; }
|
||||||
|
|
||||||
protected:
|
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:
|
private:
|
||||||
int winSize_;
|
int winSize_;
|
||||||
@ -669,8 +669,8 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Farneback_CUDA();
|
Farneback_CUDA();
|
||||||
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2);
|
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE;
|
||||||
void collectGarbage();
|
void collectGarbage() CV_OVERRIDE;
|
||||||
|
|
||||||
inline double getPyrScale() const CV_OVERRIDE { return pyrScale_; }
|
inline double getPyrScale() const CV_OVERRIDE { return pyrScale_; }
|
||||||
inline void setPyrScale(double val) CV_OVERRIDE { pyrScale_ = val; }
|
inline void setPyrScale(double val) CV_OVERRIDE { pyrScale_ = val; }
|
||||||
@ -688,7 +688,7 @@ namespace
|
|||||||
inline void setFlags(int val) CV_OVERRIDE { flags_ = val; }
|
inline void setFlags(int val) CV_OVERRIDE { flags_ = val; }
|
||||||
|
|
||||||
protected:
|
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:
|
private:
|
||||||
double pyrScale_;
|
double pyrScale_;
|
||||||
@ -761,8 +761,8 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DualTVL1_CUDA();
|
DualTVL1_CUDA();
|
||||||
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2);
|
void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) CV_OVERRIDE;
|
||||||
void collectGarbage();
|
void collectGarbage() CV_OVERRIDE;
|
||||||
|
|
||||||
inline double getTau() const CV_OVERRIDE { return tau_; }
|
inline double getTau() const CV_OVERRIDE { return tau_; }
|
||||||
inline void setTau(double val) CV_OVERRIDE { tau_ = val; }
|
inline void setTau(double val) CV_OVERRIDE { tau_ = val; }
|
||||||
@ -782,7 +782,7 @@ namespace
|
|||||||
inline void setUseInitialFlow(bool val) CV_OVERRIDE { useInitialFlow_ = val; }
|
inline void setUseInitialFlow(bool val) CV_OVERRIDE { useInitialFlow_ = val; }
|
||||||
|
|
||||||
protected:
|
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:
|
private:
|
||||||
double tau_;
|
double tau_;
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
|
|
||||||
virtual void run(
|
virtual void run(
|
||||||
InputArray frame0, InputArray frame1, InputOutputArray flowX, InputOutputArray flowY,
|
InputArray frame0, InputArray frame1, InputOutputArray flowX, InputOutputArray flowY,
|
||||||
OutputArray errors);
|
OutputArray errors) CV_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ptr<cuda::DensePyrLKOpticalFlow> optFlowEstimator_;
|
Ptr<cuda::DensePyrLKOpticalFlow> optFlowEstimator_;
|
||||||
|
@ -124,7 +124,7 @@ class CV_EXPORTS MoreAccurateMotionWobbleSuppressorGpu : public MoreAccurateMoti
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result);
|
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:
|
private:
|
||||||
cuda::GpuMat frameDevice_, resultDevice_;
|
cuda::GpuMat frameDevice_, resultDevice_;
|
||||||
|
@ -30,6 +30,9 @@ if(NOT BUILD_EXAMPLES OR NOT OCV_DEPENDENCIES_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(gpu_samples)
|
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})
|
ocv_include_modules_recurse(${OPENCV_CUDA_SAMPLES_REQUIRED_DEPS})
|
||||||
if(HAVE_opencv_xfeatures2d)
|
if(HAVE_opencv_xfeatures2d)
|
||||||
ocv_include_modules_recurse(opencv_xfeatures2d)
|
ocv_include_modules_recurse(opencv_xfeatures2d)
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
#include "opencv2/cudalegacy.hpp"
|
#include "opencv2/cudalegacy.hpp"
|
||||||
#include "opencv2/highgui.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)
|
#if !defined(HAVE_CUDA)
|
||||||
int main( int, const char** )
|
int main( int, const char** )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user