Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
290030d0
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,发现更多精彩内容 >>
提交
290030d0
编写于
8月 23, 2012
作者:
A
Anatoly Baksheev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
possibility to enable /mp compiler flag from cmake
fixed MCVC warnings
上级
5648e49d
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
30 addition
and
23 deletion
+30
-23
CMakeLists.txt
CMakeLists.txt
+2
-1
cmake/OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+5
-0
modules/gpu/src/cascadeclassifier.cpp
modules/gpu/src/cascadeclassifier.cpp
+1
-1
modules/gpu/src/cuda/ccomponetns.cu
modules/gpu/src/cuda/ccomponetns.cu
+10
-5
modules/gpu/src/cuda/resize.cu
modules/gpu/src/cuda/resize.cu
+2
-2
modules/gpu/src/fgd_bgfg.cpp
modules/gpu/src/fgd_bgfg.cpp
+1
-1
modules/gpu/src/graphcuts.cpp
modules/gpu/src/graphcuts.cpp
+2
-6
modules/gpu/src/hough.cpp
modules/gpu/src/hough.cpp
+1
-1
modules/imgproc/perf/perf_remap.cpp
modules/imgproc/perf/perf_remap.cpp
+6
-6
未找到文件。
CMakeLists.txt
浏览文件 @
290030d0
...
...
@@ -197,6 +197,8 @@ OCV_OPTION(ENABLE_SSE41 "Enable SSE4.1 instructions"
OCV_OPTION
(
ENABLE_SSE42
"Enable SSE4.2 instructions"
OFF
IF
(
CMAKE_COMPILER_IS_GNUCXX
AND
(
X86 OR X86_64
))
)
OCV_OPTION
(
ENABLE_NOISY_WARNINGS
"Show all warnings even if they are too noisy"
OFF
)
OCV_OPTION
(
OPENCV_WARNINGS_ARE_ERRORS
"Treat warnings as errors"
OFF
)
OCV_OPTION
(
ENABLE_MULTI_PROCESSOR_COMPILATION
"Enabling multi-processory compilation"
OFF IF MSVC
)
# uncategorized options
# ===================================================
...
...
@@ -758,7 +760,6 @@ if(HAVE_CUDA)
status
(
" Use CUBLAS:"
HAVE_CUBLAS THEN YES ELSE NO
)
status
(
" NVIDIA GPU arch:"
${
OPENCV_CUDA_ARCH_BIN
}
)
status
(
" NVIDIA PTX archs:"
${
OPENCV_CUDA_ARCH_BIN
}
)
status
(
" NVIDIA GPU features:"
${
OPENCV_CUDA_ARCH_FEATURES
}
)
endif
()
# ========================== python ==========================
...
...
cmake/OpenCVCompilerOptions.cmake
浏览文件 @
290030d0
...
...
@@ -283,3 +283,8 @@ if(MSVC)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4251"
)
#class 'std::XXX' needs to have dll-interface to be used by clients of YYY
endif
()
endif
()
if
(
MSVC AND ENABLE_MULTI_PROCESSOR_COMPILATION
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/MP"
)
endif
()
modules/gpu/src/cascadeclassifier.cpp
浏览文件 @
290030d0
...
...
@@ -155,7 +155,7 @@ public:
cv
::
Size
ncvMinSize
=
this
->
getClassifierCvSize
();
if
(
ncvMinSize
.
width
<
(
unsigned
)
minSize
.
width
&&
ncvMinSize
.
height
<
(
unsigned
)
minSize
.
height
)
if
(
ncvMinSize
.
width
<
minSize
.
width
&&
ncvMinSize
.
height
<
minSize
.
height
)
{
ncvMinSize
.
width
=
minSize
.
width
;
ncvMinSize
.
height
=
minSize
.
height
;
...
...
modules/gpu/src/cuda/ccomponetns.cu
浏览文件 @
290030d0
...
...
@@ -43,6 +43,7 @@
#include <opencv2/gpu/device/vec_traits.hpp>
#include <opencv2/gpu/device/vec_math.hpp>
#include <opencv2/gpu/device/emulation.hpp>
#include <iostream>
#include <stdio.h>
...
...
@@ -128,7 +129,8 @@ namespace cv { namespace gpu { namespace device
template
<
typename
T
>
struct
InInterval
<
T
,
1
>
{
__host__
__device__
__forceinline__
InInterval
(
const
float4
&
_lo
,
const
float4
&
_hi
)
:
lo
(
-
_lo
.
x
),
hi
(
_hi
.
x
)
{};
typedef
typename
VecTraits
<
T
>::
elem_type
E
;
__host__
__device__
__forceinline__
InInterval
(
const
float4
&
_lo
,
const
float4
&
_hi
)
:
lo
((
E
)(
-
_lo
.
x
)),
hi
((
E
)
_hi
.
x
)
{};
T
lo
,
hi
;
template
<
typename
I
>
__device__
__forceinline__
bool
operator
()
(
const
I
&
a
,
const
I
&
b
)
const
...
...
@@ -138,10 +140,12 @@ namespace cv { namespace gpu { namespace device
}
};
template
<
typename
T
>
struct
InInterval
<
T
,
3
>
{
typedef
typename
VecTraits
<
T
>::
elem_type
E
;
__host__
__device__
__forceinline__
InInterval
(
const
float4
&
_lo
,
const
float4
&
_hi
)
:
lo
(
VecTraits
<
T
>::
make
(
-
_lo
.
x
,
-
_lo
.
y
,
-
_lo
.
z
)),
hi
(
VecTraits
<
T
>::
make
(
_hi
.
x
,
_hi
.
y
,
_hi
.
z
)){};
:
lo
(
VecTraits
<
T
>::
make
(
(
E
)(
-
_lo
.
x
),
(
E
)(
-
_lo
.
y
),
(
E
)(
-
_lo
.
z
))),
hi
(
VecTraits
<
T
>::
make
((
E
)
_hi
.
x
,
(
E
)
_hi
.
y
,
(
E
)
_hi
.
z
)){};
T
lo
,
hi
;
template
<
typename
I
>
__device__
__forceinline__
bool
operator
()
(
const
I
&
a
,
const
I
&
b
)
const
...
...
@@ -155,8 +159,9 @@ namespace cv { namespace gpu { namespace device
template
<
typename
T
>
struct
InInterval
<
T
,
4
>
{
typedef
typename
VecTraits
<
T
>::
elem_type
E
;
__host__
__device__
__forceinline__
InInterval
(
const
float4
&
_lo
,
const
float4
&
_hi
)
:
lo
(
VecTraits
<
T
>::
make
(
-
_lo
.
x
,
-
_lo
.
y
,
-
_lo
.
z
,
-
_lo
.
w
)),
hi
(
VecTraits
<
T
>::
make
(
_hi
.
x
,
_hi
.
y
,
_hi
.
z
,
-
_hi
.
w
)){};
:
lo
(
VecTraits
<
T
>::
make
(
(
E
)(
-
_lo
.
x
),
(
E
)(
-
_lo
.
y
),
(
E
)(
-
_lo
.
z
),
(
E
)(
-
_lo
.
w
))),
hi
(
VecTraits
<
T
>::
make
((
E
)
_hi
.
x
,
(
E
)
_hi
.
y
,
(
E
)
_hi
.
z
,
(
E
)
_hi
.
w
)){};
T
lo
,
hi
;
template
<
typename
I
>
__device__
__forceinline__
bool
operator
()
(
const
I
&
a
,
const
I
&
b
)
const
...
...
@@ -499,11 +504,11 @@ namespace cv { namespace gpu { namespace device
int
tileSizeX
=
TILE_COLS
,
tileSizeY
=
TILE_ROWS
;
while
(
grid
.
x
>
1
||
grid
.
y
>
1
)
{
dim3
mergeGrid
(
ceilf
(
grid
.
x
/
2.0
),
ceilf
(
grid
.
y
/
2.0
));
dim3
mergeGrid
(
(
int
)
ceilf
(
grid
.
x
/
2.
f
),
(
int
)
ceilf
(
grid
.
y
/
2.
f
));
dim3
mergeBlock
(
STA_SIZE_MERGE_X
,
STA_SIZE_MERGE_Y
);
// debug log
// std::cout << "merging: " << grid.y << " x " << grid.x << " ---> " << mergeGrid.y << " x " << mergeGrid.x << " for tiles: " << tileSizeY << " x " << tileSizeX << std::endl;
crossMerge
<<<
mergeGrid
,
mergeBlock
,
0
,
stream
>>>
(
2
,
2
,
tileSizeY
,
tileSizeX
,
edges
,
comps
,
ceilf
(
grid
.
y
/
2.0
)
-
grid
.
y
/
2
,
ceilf
(
grid
.
x
/
2.0
)
-
grid
.
x
/
2
);
crossMerge
<<<
mergeGrid
,
mergeBlock
,
0
,
stream
>>>
(
2
,
2
,
tileSizeY
,
tileSizeX
,
edges
,
comps
,
(
int
)
ceilf
(
grid
.
y
/
2.
f
)
-
grid
.
y
/
2
,
(
int
)
ceilf
(
grid
.
x
/
2.
f
)
-
grid
.
x
/
2
);
tileSizeX
<<=
1
;
tileSizeY
<<=
1
;
grid
=
mergeGrid
;
...
...
modules/gpu/src/cuda/resize.cu
浏览文件 @
290030d0
...
...
@@ -226,8 +226,8 @@ namespace cv { namespace gpu { namespace device
(
void
)
srcWhole
;
(
void
)
xoff
;
(
void
)
yoff
;
int
iscale_x
=
round
(
fx
);
int
iscale_y
=
round
(
fy
);
int
iscale_x
=
(
int
)
round
(
fx
);
int
iscale_y
=
(
int
)
round
(
fy
);
if
(
std
::
abs
(
fx
-
iscale_x
)
<
FLT_MIN
&&
std
::
abs
(
fy
-
iscale_y
)
<
FLT_MIN
)
ResizeDispatcherStream
<
IntegerAreaFilter
,
T
>::
call
(
src
,
fx
,
fy
,
dst
,
stream
);
...
...
modules/gpu/src/fgd_bgfg.cpp
浏览文件 @
290030d0
...
...
@@ -412,7 +412,7 @@ namespace
changeMask
.
setTo
(
cv
::
Scalar
::
all
(
0
));
funcs
[
prevFrame
.
channels
()
-
1
][
curFrame
.
channels
()
-
1
](
prevFrame
,
curFrame
,
make_uchar3
(
bestThres
[
0
],
bestThres
[
1
],
bestThres
[
2
]),
changeMask
,
0
);
funcs
[
prevFrame
.
channels
()
-
1
][
curFrame
.
channels
()
-
1
](
prevFrame
,
curFrame
,
make_uchar3
(
(
uchar
)
bestThres
[
0
],
(
uchar
)
bestThres
[
1
],
(
uchar
)
bestThres
[
2
]),
changeMask
,
0
);
}
// performs change detection for Foreground detection algorithm
...
...
modules/gpu/src/graphcuts.cpp
浏览文件 @
290030d0
...
...
@@ -63,15 +63,11 @@ namespace cv { namespace gpu { namespace device
}
}}}
float4
scalarToCudaType
(
const
cv
::
Scalar
&
in
)
static
float4
scalarToCudaType
(
const
cv
::
Scalar
&
in
)
{
float4
res
;
res
.
x
=
in
[
0
];
res
.
y
=
in
[
1
];
res
.
z
=
in
[
2
];
res
.
w
=
in
[
3
];
return
res
;
return
make_float4
((
float
)
in
[
0
],
(
float
)
in
[
1
],
(
float
)
in
[
2
],
(
float
)
in
[
3
]);
}
void
cv
::
gpu
::
connectivityMask
(
const
GpuMat
&
image
,
GpuMat
&
mask
,
const
cv
::
Scalar
&
lo
,
const
cv
::
Scalar
&
hi
,
Stream
&
s
)
{
CV_Assert
(
!
image
.
empty
());
...
...
modules/gpu/src/hough.cpp
浏览文件 @
290030d0
...
...
@@ -112,7 +112,7 @@ void cv::gpu::HoughLinesGet(const GpuMat& accum, GpuMat& lines, float rho, float
ensureSizeIsEnough
(
2
,
maxLines
,
CV_32FC2
,
lines
);
int
count
=
linesGetResult_gpu
(
accum
,
lines
.
ptr
<
float2
>
(
0
),
lines
.
ptr
<
int
>
(
1
),
maxLines
,
rho
,
theta
,
threshold
,
doSort
);
int
count
=
linesGetResult_gpu
(
accum
,
lines
.
ptr
<
float2
>
(
0
),
lines
.
ptr
<
int
>
(
1
),
maxLines
,
rho
,
theta
,
(
float
)
threshold
,
doSort
);
if
(
count
>
0
)
lines
.
cols
=
count
;
...
...
modules/imgproc/perf/perf_remap.cpp
浏览文件 @
290030d0
...
...
@@ -44,16 +44,16 @@ PERF_TEST_P( TestRemap, Remap,
switch
(
map1_type
)
{
case
CV_32FC1
:
map1
.
at
<
float
>
(
j
,
i
)
=
src
.
cols
-
i
;
map2
.
at
<
float
>
(
j
,
i
)
=
j
;
map1
.
at
<
float
>
(
j
,
i
)
=
(
float
)(
src
.
cols
-
i
)
;
map2
.
at
<
float
>
(
j
,
i
)
=
(
float
)
j
;
break
;
case
CV_32FC2
:
map1
.
at
<
Vec2f
>
(
j
,
i
)[
0
]
=
src
.
cols
-
i
;
map1
.
at
<
Vec2f
>
(
j
,
i
)[
1
]
=
j
;
map1
.
at
<
Vec2f
>
(
j
,
i
)[
0
]
=
(
float
)(
src
.
cols
-
i
)
;
map1
.
at
<
Vec2f
>
(
j
,
i
)[
1
]
=
(
float
)
j
;
break
;
case
CV_16SC2
:
map1
.
at
<
Vec2s
>
(
j
,
i
)[
0
]
=
src
.
cols
-
i
;
map1
.
at
<
Vec2s
>
(
j
,
i
)[
1
]
=
j
;
map1
.
at
<
Vec2s
>
(
j
,
i
)[
0
]
=
(
float
)(
src
.
cols
-
i
)
;
map1
.
at
<
Vec2s
>
(
j
,
i
)[
1
]
=
(
float
)
j
;
break
;
default:
CV_Assert
(
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录