Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
7818071b
Commit
7818071b
authored
Apr 05, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cuda: eliminate part of build warnings
parent
f93c1b94
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
103 additions
and
83 deletions
+103
-83
cuda_types.hpp
modules/core/include/opencv2/core/cuda_types.hpp
+7
-0
gpu_mat.cu
modules/core/src/cuda/gpu_mat.cu
+4
-4
cuda_host_mem.cpp
modules/core/src/cuda_host_mem.cpp
+3
-3
cuda_stream.cpp
modules/core/src/cuda_stream.cpp
+2
-2
lut.cu
modules/cudaarithm/src/cuda/lut.cu
+1
-1
mog.cpp
modules/cudabgsegm/src/mog.cpp
+13
-13
mog2.cpp
modules/cudabgsegm/src/mog2.cpp
+29
-29
cuvid_video_source.hpp
modules/cudacodec/src/cuvid_video_source.hpp
+5
-5
ffmpeg_video_source.hpp
modules/cudacodec/src/ffmpeg_video_source.hpp
+2
-2
video_reader.cpp
modules/cudacodec/src/video_reader.cpp
+2
-2
video_source.hpp
modules/cudacodec/src/video_source.hpp
+5
-5
precomp.hpp
modules/cudalegacy/src/precomp.hpp
+7
-0
seam_finders.hpp
...itching/include/opencv2/stitching/detail/seam_finders.hpp
+1
-1
optical_flow.cpp
modules/superres/src/optical_flow.cpp
+14
-14
optical_flow.hpp
modules/videostab/include/opencv2/videostab/optical_flow.hpp
+1
-1
wobble_suppression.hpp
...ideostab/include/opencv2/videostab/wobble_suppression.hpp
+1
-1
CMakeLists.txt
samples/gpu/CMakeLists.txt
+3
-0
opticalflow_nvidia_api.cpp
samples/gpu/opticalflow_nvidia_api.cpp
+3
-0
No files found.
modules/core/include/opencv2/core/cuda_types.hpp
View file @
7818071b
...
...
@@ -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.
*/
...
...
modules/core/src/cuda/gpu_mat.cu
View file @
7818071b
...
...
@@ -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)
...
...
modules/core/src/cuda_host_mem.cpp
View file @
7818071b
...
...
@@ -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
;
...
...
modules/core/src/cuda_stream.cpp
View file @
7818071b
...
...
@@ -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
&
);
...
...
modules/cudaarithm/src/cuda/lut.cu
View file @
7818071b
...
...
@@ -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;
...
...
modules/cudabgsegm/src/mog.cpp
View file @
7818071b
...
...
@@ -71,28 +71,28 @@ namespace
const
float
defaultNoiseSigma
=
30.0
f
*
0.5
f
;
const
float
defaultInitialWeight
=
0.05
f
;
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
...
...
modules/cudabgsegm/src/mog2.cpp
View file @
7818071b
...
...
@@ -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.5
f
;
// 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
);
...
...
modules/cudacodec/src/cuvid_video_source.hpp
View file @
7818071b
...
...
@@ -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.
...
...
modules/cudacodec/src/ffmpeg_video_source.hpp
View file @
7818071b
...
...
@@ -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_
;
...
...
modules/cudacodec/src/video_reader.cpp
View file @
7818071b
...
...
@@ -65,9 +65,9 @@ namespace
explicit
VideoReaderImpl
(
const
Ptr
<
VideoSource
>&
source
);
~
VideoReaderImpl
();
bool
nextFrame
(
OutputArray
frame
);
bool
nextFrame
(
OutputArray
frame
)
CV_OVERRIDE
;
FormatInfo
format
()
const
;
FormatInfo
format
()
const
CV_OVERRIDE
;
private
:
Ptr
<
VideoSource
>
videoSource_
;
...
...
modules/cudacodec/src/video_source.hpp
View file @
7818071b
...
...
@@ -78,11 +78,11 @@ class RawVideoSourceWrapper : public VideoSource
public
:
RawVideoSourceWrapper
(
const
Ptr
<
RawVideoSource
>&
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
<
RawVideoSource
>
source_
;
...
...
modules/cudalegacy/src/precomp.hpp
View file @
7818071b
...
...
@@ -47,6 +47,13 @@
#include <iostream>
#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/core/utility.hpp"
...
...
modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp
View file @
7818071b
...
...
@@ -262,7 +262,7 @@ public:
void
find
(
const
std
::
vector
<
cv
::
UMat
>
&
src
,
const
std
::
vector
<
cv
::
Point
>
&
corners
,
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
:
void
setGraphWeightsColor
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
img2
,
const
cv
::
Mat
&
mask1
,
const
cv
::
Mat
&
mask2
,
...
...
modules/superres/src/optical_flow.cpp
View file @
7818071b
...
...
@@ -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_
;
...
...
modules/videostab/include/opencv2/videostab/optical_flow.hpp
View file @
7818071b
...
...
@@ -133,7 +133,7 @@ public:
virtual
void
run
(
InputArray
frame0
,
InputArray
frame1
,
InputOutputArray
flowX
,
InputOutputArray
flowY
,
OutputArray
errors
);
OutputArray
errors
)
CV_OVERRIDE
;
private
:
Ptr
<
cuda
::
DensePyrLKOpticalFlow
>
optFlowEstimator_
;
...
...
modules/videostab/include/opencv2/videostab/wobble_suppression.hpp
View file @
7818071b
...
...
@@ -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_
;
...
...
samples/gpu/CMakeLists.txt
View file @
7818071b
...
...
@@ -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
)
...
...
samples/gpu/opticalflow_nvidia_api.cpp
View file @
7818071b
...
...
@@ -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
**
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment