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
8c41c614
Commit
8c41c614
authored
Mar 25, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #700 from cuda-geek/fix_build_with_cuda
fix master build with CUDA after latest 2.4 merge
parents
04eabf8d
dd9e786a
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
45 additions
and
40 deletions
+45
-40
hough.cpp
modules/gpu/src/hough.cpp
+2
-0
matrix_reductions.cpp
modules/gpu/src/matrix_reductions.cpp
+1
-0
stereocsbp.cpp
modules/gpu/src/stereocsbp.cpp
+1
-0
test_bgfg.cpp
modules/gpu/test/test_bgfg.cpp
+4
-4
perf_gpu.cpp
modules/nonfree/perf/perf_gpu.cpp
+1
-1
perf_precomp.hpp
modules/nonfree/perf/perf_precomp.hpp
+1
-0
precomp.hpp
modules/nonfree/src/precomp.hpp
+1
-1
test_main.cpp
modules/nonfree/test/test_main.cpp
+1
-1
btv_l1_gpu.cpp
modules/superres/src/btv_l1_gpu.cpp
+32
-32
precomp.hpp
modules/superres/src/precomp.hpp
+1
-1
No files found.
modules/gpu/src/hough.cpp
View file @
8c41c614
...
...
@@ -68,6 +68,8 @@ void cv::gpu::GeneralizedHough_GPU::release() {}
#else
/* !defined (HAVE_CUDA) */
#include "opencv2/core/utility.hpp"
namespace
cv
{
namespace
gpu
{
namespace
device
{
namespace
hough
...
...
modules/gpu/src/matrix_reductions.cpp
View file @
8c41c614
...
...
@@ -71,6 +71,7 @@ int cv::gpu::countNonZero(const GpuMat&, GpuMat&) { throw_nogpu(); return 0; }
void
cv
::
gpu
::
reduce
(
const
GpuMat
&
,
GpuMat
&
,
int
,
int
,
int
,
Stream
&
)
{
throw_nogpu
();
}
#else
#include "opencv2/core/utility.hpp"
namespace
{
...
...
modules/gpu/src/stereocsbp.cpp
View file @
8c41c614
...
...
@@ -55,6 +55,7 @@ cv::gpu::StereoConstantSpaceBP::StereoConstantSpaceBP(int, int, int, int, float,
void
cv
::
gpu
::
StereoConstantSpaceBP
::
operator
()(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
Stream
&
)
{
throw_nogpu
();
}
#else
/* !defined (HAVE_CUDA) */
#include "opencv2/core/utility.hpp"
namespace
cv
{
namespace
gpu
{
namespace
device
{
...
...
modules/gpu/test/test_bgfg.cpp
View file @
8c41c614
...
...
@@ -194,7 +194,7 @@ GPU_TEST_P(MOG, Update)
cv
::
gpu
::
MOG_GPU
mog
;
cv
::
gpu
::
GpuMat
foreground
=
createMat
(
frame
.
size
(),
CV_8UC1
,
useRoi
);
cv
::
BackgroundSubtractorMOG
mog_gold
;
cv
::
Ptr
<
cv
::
BackgroundSubtractorMOG
>
mog_gold
=
cv
::
createBackgroundSubtractorMOG
()
;
cv
::
Mat
foreground_gold
;
for
(
int
i
=
0
;
i
<
10
;
++
i
)
...
...
@@ -211,7 +211,7 @@ GPU_TEST_P(MOG, Update)
mog
(
loadMat
(
frame
,
useRoi
),
foreground
,
(
float
)
learningRate
);
mog_gold
(
frame
,
foreground_gold
,
learningRate
);
mog_gold
->
apply
(
frame
,
foreground_gold
,
learningRate
);
ASSERT_MAT_NEAR
(
foreground_gold
,
foreground
,
0.0
);
}
...
...
@@ -270,7 +270,7 @@ GPU_TEST_P(MOG2, Update)
cv
::
gpu
::
GpuMat
foreground
=
createMat
(
frame
.
size
(),
CV_8UC1
,
useRoi
);
cv
::
Ptr
<
cv
::
BackgroundSubtractorMOG2
>
mog2_gold
=
cv
::
createBackgroundSubtractorMOG2
();
mog2_gold
.
setDetectShadows
(
detectShadow
);
mog2_gold
->
setDetectShadows
(
detectShadow
);
cv
::
Mat
foreground_gold
;
for
(
int
i
=
0
;
i
<
10
;
++
i
)
...
...
@@ -315,7 +315,7 @@ GPU_TEST_P(MOG2, getBackgroundImage)
cv
::
gpu
::
GpuMat
foreground
;
cv
::
Ptr
<
cv
::
BackgroundSubtractorMOG2
>
mog2_gold
=
cv
::
createBackgroundSubtractorMOG2
();
mog2_gold
.
setDetectShadows
(
detectShadow
);
mog2_gold
->
setDetectShadows
(
detectShadow
);
cv
::
Mat
foreground_gold
;
for
(
int
i
=
0
;
i
<
10
;
++
i
)
...
...
modules/nonfree/perf/perf_gpu.cpp
View file @
8c41c614
...
...
@@ -24,7 +24,7 @@ using namespace perf;
DEF_PARAM_TEST_1
(
Image
,
string
);
PERF_TEST_P
(
Image
,
GPU_SURF
,
Values
<
string
>
(
"gpu/perf/aloe.png"
))
Values
<
st
d
::
st
ring
>
(
"gpu/perf/aloe.png"
))
{
declare
.
time
(
50.0
);
...
...
modules/nonfree/perf/perf_precomp.hpp
View file @
8c41c614
...
...
@@ -20,6 +20,7 @@
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
#include "opencv2/nonfree/gpu.hpp"
#include "opencv2/ts/gpu_perf.hpp"
#endif
#ifdef GTEST_CREATE_SHARED_LIBRARY
...
...
modules/nonfree/src/precomp.hpp
View file @
8c41c614
...
...
@@ -59,7 +59,7 @@
#include "opencv2/nonfree/gpu.hpp"
#if defined(HAVE_CUDA)
#include "opencv2/
gpu
/stream_accessor.hpp"
#include "opencv2/
core
/stream_accessor.hpp"
#include "opencv2/gpu/device/common.hpp"
static
inline
void
throw_nogpu
()
{
CV_Error
(
CV_StsNotImplemented
,
"The called functionality is disabled for current build or platform"
);
}
...
...
modules/nonfree/test/test_main.cpp
View file @
8c41c614
...
...
@@ -21,7 +21,7 @@ int main(int argc, char **argv)
if
(
cmd
.
get
<
bool
>
(
"help"
))
{
cmd
.
print
Params
();
cmd
.
print
Message
();
return
0
;
}
...
...
modules/superres/src/btv_l1_gpu.cpp
View file @
8c41c614
...
...
@@ -78,8 +78,8 @@ namespace btv_l1_device
namespace
{
void
calcRelativeMotions
(
const
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
forwardMotions
,
const
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
backwardMotions
,
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
relForwardMotions
,
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
relBackwardMotions
,
void
calcRelativeMotions
(
const
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
forwardMotions
,
const
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
backwardMotions
,
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
relForwardMotions
,
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
relBackwardMotions
,
int
baseIdx
,
Size
size
)
{
const
int
count
=
static_cast
<
int
>
(
forwardMotions
.
size
());
...
...
@@ -115,7 +115,7 @@ namespace
}
}
void
upscaleMotions
(
const
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
lowResMotions
,
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
highResMotions
,
int
scale
)
void
upscaleMotions
(
const
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
lowResMotions
,
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
highResMotions
,
int
scale
)
{
highResMotions
.
resize
(
lowResMotions
.
size
());
...
...
@@ -129,8 +129,8 @@ namespace
}
}
void
buildMotionMaps
(
const
pair
<
GpuMat
,
GpuMat
>&
forwardMotion
,
const
pair
<
GpuMat
,
GpuMat
>&
backwardMotion
,
pair
<
GpuMat
,
GpuMat
>&
forwardMap
,
pair
<
GpuMat
,
GpuMat
>&
backwardMap
)
void
buildMotionMaps
(
const
std
::
pair
<
GpuMat
,
GpuMat
>&
forwardMotion
,
const
std
::
pair
<
GpuMat
,
GpuMat
>&
backwardMotion
,
std
::
pair
<
GpuMat
,
GpuMat
>&
forwardMap
,
std
::
pair
<
GpuMat
,
GpuMat
>&
backwardMap
)
{
forwardMap
.
first
.
create
(
forwardMotion
.
first
.
size
(),
CV_32FC1
);
forwardMap
.
second
.
create
(
forwardMotion
.
first
.
size
(),
CV_32FC1
);
...
...
@@ -169,7 +169,7 @@ namespace
btv_l1_device
::
diffSign
(
src1
.
reshape
(
1
),
src2
.
reshape
(
1
),
dst
.
reshape
(
1
),
StreamAccessor
::
getStream
(
stream
));
}
void
calcBtvWeights
(
int
btvKernelSize
,
double
alpha
,
vector
<
float
>&
btvWeights
)
void
calcBtvWeights
(
int
btvKernelSize
,
double
alpha
,
std
::
vector
<
float
>&
btvWeights
)
{
const
size_t
size
=
btvKernelSize
*
btvKernelSize
;
...
...
@@ -212,8 +212,8 @@ namespace
public
:
BTVL1_GPU_Base
();
void
process
(
const
vector
<
GpuMat
>&
src
,
GpuMat
&
dst
,
const
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
forwardMotions
,
const
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
backwardMotions
,
void
process
(
const
std
::
vector
<
GpuMat
>&
src
,
GpuMat
&
dst
,
const
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
forwardMotions
,
const
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
backwardMotions
,
int
baseIdx
);
void
collectGarbage
();
...
...
@@ -230,29 +230,29 @@ namespace
Ptr
<
DenseOpticalFlowExt
>
opticalFlow_
;
private
:
vector
<
Ptr
<
FilterEngine_GPU
>
>
filters_
;
std
::
vector
<
Ptr
<
FilterEngine_GPU
>
>
filters_
;
int
curBlurKernelSize_
;
double
curBlurSigma_
;
int
curSrcType_
;
vector
<
float
>
btvWeights_
;
std
::
vector
<
float
>
btvWeights_
;
int
curBtvKernelSize_
;
double
curAlpha_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
lowResForwardMotions_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
lowResBackwardMotions_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
lowResForwardMotions_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
lowResBackwardMotions_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
highResForwardMotions_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
highResBackwardMotions_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
highResForwardMotions_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
highResBackwardMotions_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
forwardMaps_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
backwardMaps_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
forwardMaps_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
backwardMaps_
;
GpuMat
highRes_
;
vector
<
Stream
>
streams_
;
vector
<
GpuMat
>
diffTerms_
;
vector
<
GpuMat
>
a_
,
b_
,
c_
;
std
::
vector
<
Stream
>
streams_
;
std
::
vector
<
GpuMat
>
diffTerms_
;
std
::
vector
<
GpuMat
>
a_
,
b_
,
c_
;
GpuMat
regTerm_
;
};
...
...
@@ -276,8 +276,8 @@ namespace
curAlpha_
=
-
1.0
;
}
void
BTVL1_GPU_Base
::
process
(
const
vector
<
GpuMat
>&
src
,
GpuMat
&
dst
,
const
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
forwardMotions
,
const
vector
<
pair
<
GpuMat
,
GpuMat
>
>&
backwardMotions
,
void
BTVL1_GPU_Base
::
process
(
const
std
::
vector
<
GpuMat
>&
src
,
GpuMat
&
dst
,
const
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
forwardMotions
,
const
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>&
backwardMotions
,
int
baseIdx
)
{
CV_Assert
(
scale_
>
1
);
...
...
@@ -418,18 +418,18 @@ namespace
GpuMat
curFrame_
;
GpuMat
prevFrame_
;
vector
<
GpuMat
>
frames_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
forwardMotions_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
backwardMotions_
;
vector
<
GpuMat
>
outputs_
;
std
::
vector
<
GpuMat
>
frames_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
forwardMotions_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
backwardMotions_
;
std
::
vector
<
GpuMat
>
outputs_
;
int
storePos_
;
int
procPos_
;
int
outPos_
;
vector
<
GpuMat
>
srcFrames_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
srcForwardMotions_
;
vector
<
pair
<
GpuMat
,
GpuMat
>
>
srcBackwardMotions_
;
std
::
vector
<
GpuMat
>
srcFrames_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
srcForwardMotions_
;
std
::
vector
<
std
::
pair
<
GpuMat
,
GpuMat
>
>
srcBackwardMotions_
;
GpuMat
finalOutput_
;
};
...
...
@@ -530,8 +530,8 @@ namespace
if
(
storePos_
>
0
)
{
pair
<
GpuMat
,
GpuMat
>&
forwardMotion
=
at
(
storePos_
-
1
,
forwardMotions_
);
pair
<
GpuMat
,
GpuMat
>&
backwardMotion
=
at
(
storePos_
,
backwardMotions_
);
std
::
pair
<
GpuMat
,
GpuMat
>&
forwardMotion
=
at
(
storePos_
-
1
,
forwardMotions_
);
std
::
pair
<
GpuMat
,
GpuMat
>&
backwardMotion
=
at
(
storePos_
,
backwardMotions_
);
opticalFlow_
->
calc
(
prevFrame_
,
curFrame_
,
forwardMotion
.
first
,
forwardMotion
.
second
);
opticalFlow_
->
calc
(
curFrame_
,
prevFrame_
,
backwardMotion
.
first
,
backwardMotion
.
second
);
...
...
@@ -542,9 +542,9 @@ namespace
void
BTVL1_GPU
::
processFrame
(
int
idx
)
{
const
int
startIdx
=
max
(
idx
-
temporalAreaRadius_
,
0
);
const
int
startIdx
=
std
::
max
(
idx
-
temporalAreaRadius_
,
0
);
const
int
procIdx
=
idx
;
const
int
endIdx
=
min
(
startIdx
+
2
*
temporalAreaRadius_
,
storePos_
);
const
int
endIdx
=
std
::
min
(
startIdx
+
2
*
temporalAreaRadius_
,
storePos_
);
const
int
count
=
endIdx
-
startIdx
+
1
;
...
...
modules/superres/src/precomp.hpp
View file @
8c41c614
...
...
@@ -62,7 +62,7 @@
#ifdef HAVE_OPENCV_GPU
#include "opencv2/gpu.hpp"
#ifdef HAVE_CUDA
#include "opencv2/
gpu
/stream_accessor.hpp"
#include "opencv2/
core
/stream_accessor.hpp"
#endif
#endif
...
...
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