Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
1bf696f3
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,发现更多精彩内容 >>
提交
1bf696f3
编写于
3月 02, 2013
作者:
M
marina.kolpakova
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixes for soft cascade training app
上级
445f39a4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
5 deletion
+18
-5
apps/sft/config.cpp
apps/sft/config.cpp
+4
-1
apps/sft/include/sft/config.hpp
apps/sft/include/sft/config.hpp
+3
-0
apps/sft/sft.cpp
apps/sft/sft.cpp
+10
-3
modules/softcascade/src/soft_cascade_octave.cpp
modules/softcascade/src/soft_cascade_octave.cpp
+1
-1
未找到文件。
apps/sft/config.cpp
浏览文件 @
1bf696f3
...
...
@@ -69,6 +69,7 @@ void sft::Config::write(cv::FileStorage& fs) const
<<
"outXmlPath"
<<
outXmlPath
<<
"seed"
<<
seed
<<
"featureType"
<<
featureType
<<
"}"
;
}
...
...
@@ -99,6 +100,7 @@ void sft::Config::read(const cv::FileNode& node)
outXmlPath
=
(
std
::
string
)
node
[
"outXmlPath"
];
seed
=
(
int
)
node
[
"seed"
];
featureType
=
(
std
::
string
)
node
[
"featureType"
];
}
void
sft
::
write
(
cv
::
FileStorage
&
fs
,
const
string
&
,
const
Config
&
x
)
...
...
@@ -153,7 +155,8 @@ std::ostream& sft::operator<<(std::ostream& out, const Config& m)
<<
std
::
setw
(
14
)
<<
std
::
left
<<
"cascadeName"
<<
m
.
cascadeName
<<
std
::
endl
<<
std
::
setw
(
14
)
<<
std
::
left
<<
"outXmlPath"
<<
m
.
outXmlPath
<<
std
::
endl
<<
std
::
setw
(
14
)
<<
std
::
left
<<
"seed"
<<
m
.
seed
<<
std
::
endl
;
<<
std
::
setw
(
14
)
<<
std
::
left
<<
"seed"
<<
m
.
seed
<<
std
::
endl
<<
std
::
setw
(
14
)
<<
std
::
left
<<
"featureType"
<<
m
.
featureType
<<
std
::
endl
;
return
out
;
}
\ No newline at end of file
apps/sft/include/sft/config.hpp
浏览文件 @
1bf696f3
...
...
@@ -121,6 +121,9 @@ struct Config
// seed for random generation
int
seed
;
// channel feature type
string
featureType
;
// // bounding rectangle for actual example into example window
// cv::Rect exampleWindow;
};
...
...
apps/sft/sft.cpp
浏览文件 @
1bf696f3
...
...
@@ -104,7 +104,7 @@ int main(int argc, char** argv)
fso
<<
cfg
.
cascadeName
<<
"{"
<<
"stageType"
<<
"BOOST"
<<
"featureType"
<<
"ICF"
<<
"featureType"
<<
cfg
.
featureType
<<
"octavesNum"
<<
(
int
)
cfg
.
octaves
.
size
()
<<
"width"
<<
cfg
.
modelWinSize
.
width
<<
"height"
<<
cfg
.
modelWinSize
.
height
...
...
@@ -118,7 +118,12 @@ int main(int argc, char** argv)
int
nfeatures
=
cfg
.
poolSize
;
cv
::
Size
model
=
cfg
.
model
(
it
);
std
::
cout
<<
"Model "
<<
model
<<
std
::
endl
;
cv
::
Ptr
<
cv
::
FeaturePool
>
pool
=
cv
::
FeaturePool
::
create
(
model
,
nfeatures
);
int
nchannels
=
(
cfg
.
featureType
==
"HOG6MagLuv"
)
?
10
:
8
;
std
::
cout
<<
"number of feature channels is "
<<
nchannels
<<
std
::
endl
;
cv
::
Ptr
<
cv
::
FeaturePool
>
pool
=
cv
::
FeaturePool
::
create
(
model
,
nfeatures
,
nchannels
);
nfeatures
=
pool
->
size
();
...
...
@@ -130,7 +135,9 @@ int main(int argc, char** argv)
typedef
cv
::
Octave
Octave
;
cv
::
Ptr
<
Octave
>
boost
=
Octave
::
create
(
boundingBox
,
npositives
,
nnegatives
,
*
it
,
shrinkage
,
nfeatures
);
cv
::
Ptr
<
cv
::
ChannelFeatureBuilder
>
builder
=
cv
::
ChannelFeatureBuilder
::
create
(
cfg
.
featureType
);
std
::
cout
<<
"Channel builder "
<<
builder
->
info
()
->
name
()
<<
std
::
endl
;
cv
::
Ptr
<
Octave
>
boost
=
Octave
::
create
(
boundingBox
,
npositives
,
nnegatives
,
*
it
,
shrinkage
,
nfeatures
,
builder
);
std
::
string
path
=
cfg
.
trainPath
;
sft
::
ScaledDataset
dataset
(
path
,
*
it
);
...
...
modules/softcascade/src/soft_cascade_octave.cpp
浏览文件 @
1bf696f3
...
...
@@ -137,7 +137,7 @@ BoostedSoftCascadeOctave::BoostedSoftCascadeOctave(cv::Rect bb, int np, int nn,
int
w
=
boundingBox
.
width
;
int
h
=
boundingBox
.
height
;
integrals
.
create
(
poolSize
,
(
w
/
shrinkage
+
1
)
*
(
h
/
shrinkage
*
10
+
1
),
CV_32SC1
);
integrals
.
create
(
poolSize
,
(
w
/
shrinkage
+
1
)
*
(
h
/
shrinkage
*
builder
->
totalChannels
()
+
1
),
CV_32SC1
);
}
BoostedSoftCascadeOctave
::~
BoostedSoftCascadeOctave
(){}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录