Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
2eebd8d9
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,发现更多精彩内容 >>
提交
2eebd8d9
编写于
11月 29, 2012
作者:
V
Vladislav Vinogradov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed build under windows
上级
2e0161c6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
9 deletion
+9
-9
modules/gpu/src/icf.hpp
modules/gpu/src/icf.hpp
+3
-3
modules/gpu/src/softcascade.cpp
modules/gpu/src/softcascade.cpp
+6
-6
未找到文件。
modules/gpu/src/icf.hpp
浏览文件 @
2eebd8d9
...
...
@@ -88,11 +88,11 @@ struct __align__(8) Node
{
uchar4
rect
;
// ushort channel;
uint
threshold
;
u
nsigned
int
threshold
;
enum
{
THRESHOLD_MASK
=
0x0FFFFFFF
};
Node
(
const
uchar4
r
,
const
u
int
ch
,
const
u
int
t
)
:
rect
(
r
),
threshold
(
t
+
(
ch
<<
28
))
{}
Node
(
const
uchar4
r
,
const
u
nsigned
int
ch
,
const
unsigned
int
t
)
:
rect
(
r
),
threshold
(
t
+
(
ch
<<
28
))
{}
};
struct
__align__
(
16
)
Detection
...
...
@@ -144,7 +144,7 @@ struct CascadeInvoker
const
int
downscales
,
const
cudaStream_t
&
stream
=
0
)
const
;
template
<
bool
isUp
>
__device
void
detect
(
Detection
*
objects
,
const
u
int
ndetections
,
u
int
*
ctr
,
const
int
downscales
)
const
;
__device
void
detect
(
Detection
*
objects
,
const
u
nsigned
int
ndetections
,
unsigned
int
*
ctr
,
const
int
downscales
)
const
;
};
}
...
...
modules/gpu/src/softcascade.cpp
浏览文件 @
2eebd8d9
...
...
@@ -64,8 +64,8 @@ void cv::gpu::SCascade::read(const FileNode& fn) { Algorithm::read(fn); }
cv
::
gpu
::
device
::
icf
::
Level
::
Level
(
int
idx
,
const
Octave
&
oct
,
const
float
scale
,
const
int
w
,
const
int
h
)
:
octave
(
idx
),
step
(
oct
.
stages
),
relScale
(
scale
/
oct
.
scale
)
{
workRect
.
x
=
r
ound
(
w
/
(
float
)
oct
.
shrinkage
);
workRect
.
y
=
r
ound
(
h
/
(
float
)
oct
.
shrinkage
);
workRect
.
x
=
cvR
ound
(
w
/
(
float
)
oct
.
shrinkage
);
workRect
.
y
=
cvR
ound
(
h
/
(
float
)
oct
.
shrinkage
);
objSize
.
x
=
cv
::
saturate_cast
<
uchar
>
(
oct
.
size
.
x
*
relScale
);
objSize
.
y
=
cv
::
saturate_cast
<
uchar
>
(
oct
.
size
.
y
*
relScale
);
...
...
@@ -75,7 +75,7 @@ cv::gpu::device::icf::Level::Level(int idx, const Octave& oct, const float scale
scaling
[
0
]
=
scaling
[
1
]
=
1.
f
;
else
{
scaling
[
0
]
=
(
relScale
<
1.
f
)
?
0.89
f
*
::
pow
(
relScale
,
1.099
f
/
::
log
(
2
))
:
1.
f
;
scaling
[
0
]
=
(
relScale
<
1.
f
)
?
0.89
f
*
::
pow
(
relScale
,
1.099
f
/
::
log
(
2
.0
f
))
:
1.
f
;
scaling
[
1
]
=
relScale
*
relScale
;
}
}
...
...
@@ -199,7 +199,7 @@ struct cv::gpu::SCascade::Fields
// int feature = (int)(*(inIt +=2)) + feature_offset;
inIt
+=
3
;
// extract feature, Todo:check it
u
int
th
=
saturate_cast
<
u
int
>
((
float
)(
*
(
inIt
++
)));
u
nsigned
int
th
=
saturate_cast
<
unsigned
int
>
((
float
)(
*
(
inIt
++
)));
cv
::
FileNode
ftn
=
(
*
ftrs
)[
SC_F_RECT
];
cv
::
FileNodeIterator
r_it
=
ftn
.
begin
();
uchar4
rect
;
...
...
@@ -214,7 +214,7 @@ struct cv::gpu::SCascade::Fields
rect
.
w
-=
rect
.
y
;
}
u
int
channel
=
saturate_cast
<
u
int
>
((
int
)(
*
ftrs
)[
SC_F_CHANNEL
]);
u
nsigned
int
channel
=
saturate_cast
<
unsigned
int
>
((
int
)(
*
ftrs
)[
SC_F_CHANNEL
]);
vnodes
.
push_back
(
Node
(
rect
,
channel
,
th
));
++
ftrs
;
}
...
...
@@ -426,7 +426,7 @@ private:
GpuMat
nmag
(
fplane
,
cv
::
Rect
(
0
,
4
*
fh
,
fw
,
fh
));
GpuMat
nang
(
fplane
,
cv
::
Rect
(
0
,
5
*
fh
,
fw
,
fh
));
cv
::
gpu
::
multiply
(
mag
,
cv
::
Scalar
::
all
(
1.
f
/
(
8
*::
log
(
2
))),
nmag
,
1
,
-
1
,
s
);
cv
::
gpu
::
multiply
(
mag
,
cv
::
Scalar
::
all
(
1.
f
/
(
8
*::
log
(
2
.0
f
))),
nmag
,
1
,
-
1
,
s
);
cv
::
gpu
::
multiply
(
ang
,
cv
::
Scalar
::
all
(
1.
f
/
60.
f
),
nang
,
1
,
-
1
,
s
);
//create uchar magnitude
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录