Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
cc6a87fc
O
Opencv
项目概览
Greenplum
/
Opencv
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
cc6a87fc
编写于
11月 16, 2010
作者:
A
Alexey Spizhevoy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed big in gpu::HOGDescriptor, added property into CPU's HOGDescriptor
上级
e9545773
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
9 deletion
+11
-9
modules/gpu/src/cuda/hog.cu
modules/gpu/src/cuda/hog.cu
+4
-4
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+6
-3
modules/objdetect/src/hog.cpp
modules/objdetect/src/hog.cpp
+1
-2
未找到文件。
modules/gpu/src/cuda/hog.cu
浏览文件 @
cc6a87fc
...
...
@@ -446,7 +446,7 @@ __global__ void compute_gradients_8UC4_kernel(int height, int width, const PtrEl
if
(
threadIdx
.
x
==
0
)
{
val
=
x
>
0
?
row
[
x
-
1
]
:
row
[
x
+
1
];
val
=
x
>
0
?
row
[
x
-
1
]
:
row
[
1
];
sh_row
[
0
]
=
val
.
x
;
sh_row
[(
nthreads
+
2
)]
=
val
.
y
;
sh_row
[
2
*
(
nthreads
+
2
)]
=
val
.
z
;
...
...
@@ -454,7 +454,7 @@ __global__ void compute_gradients_8UC4_kernel(int height, int width, const PtrEl
if
(
threadIdx
.
x
==
blockDim
.
x
-
1
)
{
val
=
(
x
<
width
-
1
)
?
row
[
x
+
1
]
:
row
[
x
-
1
];
val
=
(
x
<
width
-
1
)
?
row
[
x
+
1
]
:
row
[
width
-
2
];
sh_row
[
blockDim
.
x
+
1
]
=
val
.
x
;
sh_row
[
blockDim
.
x
+
1
+
(
nthreads
+
2
)]
=
val
.
y
;
sh_row
[
blockDim
.
x
+
1
+
2
*
(
nthreads
+
2
)]
=
val
.
z
;
...
...
@@ -553,10 +553,10 @@ __global__ void compute_gradients_8UC1_kernel(int height, int width, const PtrEl
sh_row
[
threadIdx
.
x
+
1
]
=
row
[
x
-
2
];
if
(
threadIdx
.
x
==
0
)
sh_row
[
0
]
=
x
>
0
?
row
[
x
-
1
]
:
row
[
x
+
1
];
sh_row
[
0
]
=
x
>
0
?
row
[
x
-
1
]
:
row
[
1
];
if
(
threadIdx
.
x
==
blockDim
.
x
-
1
)
sh_row
[
blockDim
.
x
+
1
]
=
(
x
<
width
-
1
)
?
row
[
x
+
1
]
:
row
[
x
-
1
];
sh_row
[
blockDim
.
x
+
1
]
=
(
x
<
width
-
1
)
?
row
[
x
+
1
]
:
row
[
width
-
2
];
__syncthreads
();
if
(
x
<
width
)
...
...
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
浏览文件 @
cc6a87fc
...
...
@@ -360,20 +360,22 @@ struct CV_EXPORTS_W HOGDescriptor
{
public:
enum
{
L2Hys
=
0
};
enum
{
DEFAULT_NLEVELS
=
64
};
CV_WRAP
HOGDescriptor
()
:
winSize
(
64
,
128
),
blockSize
(
16
,
16
),
blockStride
(
8
,
8
),
cellSize
(
8
,
8
),
nbins
(
9
),
derivAperture
(
1
),
winSigma
(
-
1
),
histogramNormType
(
HOGDescriptor
::
L2Hys
),
L2HysThreshold
(
0.2
),
gammaCorrection
(
true
)
histogramNormType
(
HOGDescriptor
::
L2Hys
),
L2HysThreshold
(
0.2
),
gammaCorrection
(
true
),
nlevels
(
DEFAULT_NLEVELS
)
{}
CV_WRAP
HOGDescriptor
(
Size
_winSize
,
Size
_blockSize
,
Size
_blockStride
,
Size
_cellSize
,
int
_nbins
,
int
_derivAperture
=
1
,
double
_winSigma
=-
1
,
int
_histogramNormType
=
HOGDescriptor
::
L2Hys
,
double
_L2HysThreshold
=
0.2
,
bool
_gammaCorrection
=
false
)
double
_L2HysThreshold
=
0.2
,
bool
_gammaCorrection
=
false
,
int
_nlevels
=
DEFAULT_NLEVELS
)
:
winSize
(
_winSize
),
blockSize
(
_blockSize
),
blockStride
(
_blockStride
),
cellSize
(
_cellSize
),
nbins
(
_nbins
),
derivAperture
(
_derivAperture
),
winSigma
(
_winSigma
),
histogramNormType
(
_histogramNormType
),
L2HysThreshold
(
_L2HysThreshold
),
gammaCorrection
(
_gammaCorrection
)
gammaCorrection
(
_gammaCorrection
)
,
nlevels
(
_nlevels
)
{}
CV_WRAP
HOGDescriptor
(
const
String
&
filename
)
...
...
@@ -429,6 +431,7 @@ public:
CV_PROP
double
L2HysThreshold
;
CV_PROP
bool
gammaCorrection
;
CV_PROP
vector
<
float
>
svmDetector
;
CV_PROP
int
nlevels
;
};
...
...
modules/objdetect/src/hog.cpp
浏览文件 @
cc6a87fc
...
...
@@ -872,11 +872,10 @@ void HOGDescriptor::detectMultiScale(
double
scale0
,
int
groupThreshold
)
const
{
double
scale
=
1.
;
const
int
maxLevels
=
64
;
int
levels
=
0
;
vector
<
double
>
levelScale
;
for
(
levels
=
0
;
levels
<
maxL
evels
;
levels
++
)
for
(
levels
=
0
;
levels
<
nl
evels
;
levels
++
)
{
levelScale
.
push_back
(
scale
);
if
(
cvRound
(
img
.
cols
/
scale
)
<
winSize
.
width
||
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录