Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
5da72400
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,发现更多精彩内容 >>
提交
5da72400
编写于
5月 06, 2013
作者:
V
Vladislav Vinogradov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
made dependecy from gpufilters optional
上级
f614e354
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
45 addition
and
5 deletion
+45
-5
modules/gpuimgproc/CMakeLists.txt
modules/gpuimgproc/CMakeLists.txt
+1
-1
modules/gpuimgproc/src/canny.cpp
modules/gpuimgproc/src/canny.cpp
+8
-0
modules/gpuimgproc/src/corners.cpp
modules/gpuimgproc/src/corners.cpp
+1
-1
modules/gpuimgproc/src/cuda/corners.cu
modules/gpuimgproc/src/cuda/corners.cu
+7
-1
modules/gpuimgproc/src/cuda/hough_circles.cu
modules/gpuimgproc/src/cuda/hough_circles.cu
+5
-0
modules/gpuimgproc/src/generalized_hough.cpp
modules/gpuimgproc/src/generalized_hough.cpp
+18
-0
modules/gpuimgproc/src/hough_circles.cpp
modules/gpuimgproc/src/hough_circles.cpp
+1
-1
modules/gpuimgproc/src/precomp.hpp
modules/gpuimgproc/src/precomp.hpp
+4
-1
未找到文件。
modules/gpuimgproc/CMakeLists.txt
浏览文件 @
5da72400
...
...
@@ -6,4 +6,4 @@ set(the_description "GPU-accelerated Image Processing")
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4127 /wd4100 /wd4324 /wd4512 /wd4515 -Wundef -Wmissing-declarations -Wshadow -Wunused-parameter
)
ocv_define_module
(
gpuimgproc opencv_imgproc
opencv_gpufilters OPTIONAL opencv_gpuarithm
)
ocv_define_module
(
gpuimgproc opencv_imgproc
OPTIONAL opencv_gpuarithm opencv_gpufilters
)
modules/gpuimgproc/src/canny.cpp
浏览文件 @
5da72400
...
...
@@ -122,7 +122,9 @@ namespace
GpuMat
mag_
;
GpuMat
map_
;
GpuMat
st1_
,
st2_
;
#ifdef HAVE_OPENCV_GPUFILTERS
Ptr
<
Filter
>
filterDX_
,
filterDY_
;
#endif
int
old_apperture_size_
;
};
...
...
@@ -152,10 +154,14 @@ namespace
}
else
{
#ifndef HAVE_OPENCV_GPUFILTERS
throw_no_cuda
();
#else
filterDX_
->
apply
(
image
,
dx_
);
filterDY_
->
apply
(
image
,
dy_
);
canny
::
calcMagnitude
(
dx_
,
dy_
,
mag_
,
L2gradient_
);
#endif
}
CannyCaller
(
edges
);
...
...
@@ -191,12 +197,14 @@ namespace
ensureSizeIsEnough
(
image_size
,
CV_32SC1
,
dx_
);
ensureSizeIsEnough
(
image_size
,
CV_32SC1
,
dy_
);
#ifdef HAVE_OPENCV_GPUFILTERS
if
(
apperture_size_
!=
3
&&
apperture_size_
!=
old_apperture_size_
)
{
filterDX_
=
gpu
::
createDerivFilter
(
CV_8UC1
,
CV_32S
,
1
,
0
,
apperture_size_
,
false
,
1
,
BORDER_REPLICATE
);
filterDY_
=
gpu
::
createDerivFilter
(
CV_8UC1
,
CV_32S
,
0
,
1
,
apperture_size_
,
false
,
1
,
BORDER_REPLICATE
);
old_apperture_size_
=
apperture_size_
;
}
#endif
ensureSizeIsEnough
(
image_size
,
CV_32FC1
,
mag_
);
ensureSizeIsEnough
(
image_size
,
CV_32SC1
,
map_
);
...
...
modules/gpuimgproc/src/corners.cpp
浏览文件 @
5da72400
...
...
@@ -45,7 +45,7 @@
using
namespace
cv
;
using
namespace
cv
::
gpu
;
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
|| !defined(HAVE_OPENCV_GPUFILTERS)
Ptr
<
gpu
::
CornernessCriteria
>
cv
::
gpu
::
createHarrisCorner
(
int
,
int
,
int
,
double
,
int
)
{
throw_no_cuda
();
return
Ptr
<
gpu
::
CornernessCriteria
>
();
}
Ptr
<
gpu
::
CornernessCriteria
>
cv
::
gpu
::
createMinEigenValCorner
(
int
,
int
,
int
,
int
)
{
throw_no_cuda
();
return
Ptr
<
gpu
::
CornernessCriteria
>
();
}
...
...
modules/gpuimgproc/src/cuda/corners.cu
浏览文件 @
5da72400
...
...
@@ -48,6 +48,10 @@
#include "opencv2/core/cuda/saturate_cast.hpp"
#include "opencv2/core/cuda/border_interpolate.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPUFILTERS
namespace
cv
{
namespace
gpu
{
namespace
cudev
{
namespace
imgproc
...
...
@@ -271,4 +275,6 @@ namespace cv { namespace gpu { namespace cudev
}
}}}
#endif
#endif // HAVE_OPENCV_GPUFILTERS
#endif // CUDA_DISABLER
modules/gpuimgproc/src/cuda/hough_circles.cu
浏览文件 @
5da72400
...
...
@@ -46,6 +46,10 @@
#include "opencv2/core/cuda/emulation.hpp"
#include "opencv2/core/cuda/dynamic_smem.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPUFILTERS
namespace
cv
{
namespace
gpu
{
namespace
cudev
{
namespace
hough_circles
...
...
@@ -251,5 +255,6 @@ namespace cv { namespace gpu { namespace cudev
}
}}}
#endif // HAVE_OPENCV_GPUFILTERS
#endif
/* CUDA_DISABLER */
modules/gpuimgproc/src/generalized_hough.cpp
浏览文件 @
5da72400
...
...
@@ -133,22 +133,32 @@ namespace
virtual
void
detectImpl
(
const
GpuMat
&
edges
,
const
GpuMat
&
dx
,
const
GpuMat
&
dy
,
OutputArray
positions
)
=
0
;
private:
#ifdef HAVE_OPENCV_GPUFILTERS
GpuMat
dx_
,
dy_
;
GpuMat
edges_
;
Ptr
<
gpu
::
CannyEdgeDetector
>
canny_
;
Ptr
<
gpu
::
Filter
>
filterDx_
;
Ptr
<
gpu
::
Filter
>
filterDy_
;
#endif
};
GeneralizedHoughBase
::
GeneralizedHoughBase
()
{
#ifdef HAVE_OPENCV_GPUFILTERS
canny_
=
gpu
::
createCannyEdgeDetector
(
50
,
100
);
filterDx_
=
gpu
::
createSobelFilter
(
CV_8UC1
,
CV_32S
,
1
,
0
);
filterDy_
=
gpu
::
createSobelFilter
(
CV_8UC1
,
CV_32S
,
0
,
1
);
#endif
}
void
GeneralizedHoughBase
::
setTemplate
(
InputArray
_templ
,
int
cannyThreshold
,
Point
templCenter
)
{
#ifndef HAVE_OPENCV_GPUFILTERS
(
void
)
_templ
;
(
void
)
cannyThreshold
;
(
void
)
templCenter
;
throw_no_cuda
();
#else
GpuMat
templ
=
_templ
.
getGpuMat
();
CV_Assert
(
templ
.
type
()
==
CV_8UC1
);
...
...
@@ -170,6 +180,7 @@ namespace
templCenter
=
Point
(
templ
.
cols
/
2
,
templ
.
rows
/
2
);
setTemplateImpl
(
edges_
,
dx_
,
dy_
,
templCenter
);
#endif
}
void
GeneralizedHoughBase
::
setTemplate
(
InputArray
_edges
,
InputArray
_dx
,
InputArray
_dy
,
Point
templCenter
)
...
...
@@ -186,6 +197,12 @@ namespace
void
GeneralizedHoughBase
::
detect
(
InputArray
_image
,
OutputArray
positions
,
int
cannyThreshold
)
{
#ifndef HAVE_OPENCV_GPUFILTERS
(
void
)
_image
;
(
void
)
positions
;
(
void
)
cannyThreshold
;
throw_no_cuda
();
#else
GpuMat
image
=
_image
.
getGpuMat
();
CV_Assert
(
image
.
type
()
==
CV_8UC1
);
...
...
@@ -204,6 +221,7 @@ namespace
canny_
->
detect
(
dx_
,
dy_
,
edges_
);
detectImpl
(
edges_
,
dx_
,
dy_
,
positions
);
#endif
}
void
GeneralizedHoughBase
::
detect
(
InputArray
_edges
,
InputArray
_dx
,
InputArray
_dy
,
OutputArray
positions
)
...
...
modules/gpuimgproc/src/hough_circles.cpp
浏览文件 @
5da72400
...
...
@@ -45,7 +45,7 @@
using
namespace
cv
;
using
namespace
cv
::
gpu
;
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
|| !defined(HAVE_OPENCV_GPUFILTERS)
Ptr
<
gpu
::
HoughCirclesDetector
>
cv
::
gpu
::
createHoughCirclesDetector
(
float
,
float
,
int
,
int
,
int
,
int
,
int
)
{
throw_no_cuda
();
return
Ptr
<
HoughCirclesDetector
>
();
}
...
...
modules/gpuimgproc/src/precomp.hpp
浏览文件 @
5da72400
...
...
@@ -44,7 +44,6 @@
#define __OPENCV_PRECOMP_H__
#include "opencv2/gpuimgproc.hpp"
#include "opencv2/gpufilters.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
...
...
@@ -56,4 +55,8 @@
# include "opencv2/gpuarithm.hpp"
#endif
#ifdef HAVE_OPENCV_GPUFILTERS
# include "opencv2/gpufilters.hpp"
#endif
#endif
/* __OPENCV_PRECOMP_H__ */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录