Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenCV
opencv
提交
af77111c
O
opencv
项目概览
OpenCV
/
opencv
上一次同步 8 个月
通知
989
Star
71100
Fork
55581
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
af77111c
编写于
11月 01, 2013
作者:
螃蟹Fighting
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove whitespace.
上级
af33c118
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
17 deletion
+15
-17
modules/ocl/src/haar.cpp
modules/ocl/src/haar.cpp
+5
-5
modules/ocl/src/opencl/haarobjectdetect.cl
modules/ocl/src/opencl/haarobjectdetect.cl
+6
-8
modules/ocl/src/opencl/haarobjectdetect_scaled2.cl
modules/ocl/src/opencl/haarobjectdetect_scaled2.cl
+4
-4
未找到文件。
modules/ocl/src/haar.cpp
浏览文件 @
af77111c
...
...
@@ -1059,11 +1059,11 @@ CvSeq *cv::ocl::OclCascadeClassifier::oclHaarDetectObjects( oclMat &gimg, CvMemS
{
sz
=
sizev
[
i
];
factor
=
scalev
[
i
];
int
ystep
=
cvRound
(
std
::
max
(
2.
,
factor
)
);
int
equRect_x
=
(
int
)(
factor
*
gcascade
->
p0
+
0.5
);
int
equRect_y
=
(
int
)(
factor
*
gcascade
->
p1
+
0.5
);
int
equRect_w
=
(
int
)(
factor
*
gcascade
->
p3
+
0.5
);
int
equRect_h
=
(
int
)(
factor
*
gcascade
->
p2
+
0.5
);
double
ystep
=
std
::
max
(
2.
,
factor
);
int
equRect_x
=
cvRound
(
factor
*
gcascade
->
p0
);
int
equRect_y
=
cvRound
(
factor
*
gcascade
->
p1
);
int
equRect_w
=
cvRound
(
factor
*
gcascade
->
p3
);
int
equRect_h
=
cvRound
(
factor
*
gcascade
->
p2
);
p
[
i
].
s
[
0
]
=
equRect_x
;
p
[
i
].
s
[
1
]
=
equRect_y
;
p
[
i
].
s
[
2
]
=
equRect_x
+
equRect_w
;
...
...
modules/ocl/src/opencl/haarobjectdetect.cl
浏览文件 @
af77111c
...
...
@@ -426,7 +426,6 @@ __kernel void __attribute__((reqd_work_group_size(8,8,1)))gpuRunHaarClassifierCa
{
if(result && lclidx %2 ==0 && lclidy %2 ==0 )
{
int queueindex = atomic_inc(lclcount);
lcloutindex[queueindex<<1] = (lclidy << 16) |
lclidx
;
lcloutindex[
(
queueindex<<1
)
+1]
=
as_int
((
float
)
variance_norm_factor
)
;
...
...
@@ -436,7 +435,6 @@ __kernel void __attribute__((reqd_work_group_size(8,8,1)))gpuRunHaarClassifierCa
{
if
(
result
)
{
int
queueindex
=
atomic_inc
(
lclcount
)
;
lcloutindex[queueindex<<1]
=
(
lclidy
<<
16
)
| lclidx;
lcloutindex[(queueindex<<1)+1] = as_int((float)variance_norm_factor);
...
...
@@ -563,20 +561,20 @@ __kernel void __attribute__((reqd_work_group_size(8,8,1)))gpuRunHaarClassifierCa
int
y
=
mad24
(
grpidy,grpszy,
((
temp
&
(
int
)
0xffff0000
)
>>
16
))
;
temp
=
glboutindex[0]
;
int4
candidate_result
;
candidate_result.zw
=
(
int2
)
convert_int_rt
n
(
round
(
factor*20.f
)
)
;
candidate_result.x
=
convert_int_rt
n
(
round
(
x*factor
)
)
;
candidate_result.y
=
convert_int_rt
n
(
round
(
y*factor
)
)
;
candidate_result.zw
=
(
int2
)
convert_int_rt
e
(
factor*20.f
)
;
candidate_result.x
=
convert_int_rt
e
(
x*factor
)
;
candidate_result.y
=
convert_int_rt
e
(
y*factor
)
;
atomic_inc
(
glboutindex
)
;
int
i
=
outputoff+temp+lcl_id
;
if
(
candidate[i].z
==
0
)
{
{
candidate[i]
=
candidate_result
;
}
else
{
{
for
(
i=i+1
;;i++)
{
{
if
(
candidate[i].z
==
0
)
{
candidate[i]
=
candidate_result
;
...
...
modules/ocl/src/opencl/haarobjectdetect_scaled2.cl
浏览文件 @
af77111c
...
...
@@ -259,19 +259,19 @@ __kernel void gpuRunHaarClassifierCascade_scaled2(
int
y
=
(
temp
&
(
int
)
0xffff0000
)
>>
16
;
temp
=
atomic_inc
(
glboutindex
)
;
int4
candidate_result
;
candidate_result.zw
=
(
int2
)
convert_int_rt
n
(
round
(
factor
*
20.f
)
)
;
candidate_result.zw
=
(
int2
)
convert_int_rt
e
(
factor
*
20.f
)
;
candidate_result.x
=
x
;
candidate_result.y
=
y
;
int
i
=
outputoff+temp+lcl_id
;
if
(
candidate[i].z
==
0
)
{
{
candidate[i]
=
candidate_result
;
}
else
{
{
for
(
i=i+1
;;i++)
{
{
if
(
candidate[i].z
==
0
)
{
candidate[i]
=
candidate_result
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录