Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
8c41c614
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8c41c614
编写于
3月 25, 2013
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #700 from cuda-geek/fix_build_with_cuda
fix master build with CUDA after latest 2.4 merge
上级
04eabf8d
dd9e786a
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
45 addition
and
40 deletion
+45
-40
modules/gpu/src/hough.cpp
modules/gpu/src/hough.cpp
+2
-0
modules/gpu/src/matrix_reductions.cpp
modules/gpu/src/matrix_reductions.cpp
+1
-0
modules/gpu/src/stereocsbp.cpp
modules/gpu/src/stereocsbp.cpp
+1
-0
modules/gpu/test/test_bgfg.cpp
modules/gpu/test/test_bgfg.cpp
+4
-4
modules/nonfree/perf/perf_gpu.cpp
modules/nonfree/perf/perf_gpu.cpp
+1
-1
modules/nonfree/perf/perf_precomp.hpp
modules/nonfree/perf/perf_precomp.hpp
+1
-0
modules/nonfree/src/precomp.hpp
modules/nonfree/src/precomp.hpp
+1
-1
modules/nonfree/test/test_main.cpp
modules/nonfree/test/test_main.cpp
+1
-1
modules/superres/src/btv_l1_gpu.cpp
modules/superres/src/btv_l1_gpu.cpp
+32
-32
modules/superres/src/precomp.hpp
modules/superres/src/precomp.hpp
+1
-1
未找到文件。
modules/gpu/src/hough.cpp
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录