Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
92fb499b
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,发现更多精彩内容 >>
提交
92fb499b
编写于
11月 22, 2010
作者:
V
Vadim Pisarevsky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added type selection in the Kalman filter (thanks to Nghia Ho for the patch; see ticket #693)
上级
e406dfee
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
20 deletion
+21
-20
modules/video/include/opencv2/video/tracking.hpp
modules/video/include/opencv2/video/tracking.hpp
+2
-2
modules/video/src/kalman.cpp
modules/video/src/kalman.cpp
+19
-18
未找到文件。
modules/video/include/opencv2/video/tracking.hpp
浏览文件 @
92fb499b
...
...
@@ -280,9 +280,9 @@ public:
//! the default constructor
CV_WRAP
KalmanFilter
();
//! the full constructor taking the dimensionality of the state, of the measurement and of the control vector
CV_WRAP
KalmanFilter
(
int
dynamParams
,
int
measureParams
,
int
controlParams
=
0
);
CV_WRAP
KalmanFilter
(
int
dynamParams
,
int
measureParams
,
int
controlParams
=
0
,
int
type
=
CV_32F
);
//! re-initializes Kalman filter. The previous content is destroyed.
void
init
(
int
dynamParams
,
int
measureParams
,
int
controlParams
=
0
);
void
init
(
int
dynamParams
,
int
measureParams
,
int
controlParams
=
0
,
int
type
=
CV_32F
);
//! computes predicted state
CV_WRAP
const
Mat
&
predict
(
const
Mat
&
control
=
Mat
());
...
...
modules/video/src/kalman.cpp
浏览文件 @
92fb499b
...
...
@@ -211,38 +211,39 @@ namespace cv
{
KalmanFilter
::
KalmanFilter
()
{}
KalmanFilter
::
KalmanFilter
(
int
dynamParams
,
int
measureParams
,
int
controlParams
)
KalmanFilter
::
KalmanFilter
(
int
dynamParams
,
int
measureParams
,
int
controlParams
,
int
type
)
{
init
(
dynamParams
,
measureParams
,
controlParams
);
init
(
dynamParams
,
measureParams
,
controlParams
,
type
);
}
void
KalmanFilter
::
init
(
int
DP
,
int
MP
,
int
CP
)
void
KalmanFilter
::
init
(
int
DP
,
int
MP
,
int
CP
,
int
type
)
{
CV_Assert
(
DP
>
0
&&
MP
>
0
);
CV_Assert
(
type
==
CV_32F
||
type
==
CV_64F
);
CP
=
std
::
max
(
CP
,
0
);
statePre
=
Mat
::
zeros
(
DP
,
1
,
CV_32F
);
statePost
=
Mat
::
zeros
(
DP
,
1
,
CV_32F
);
transitionMatrix
=
Mat
::
eye
(
DP
,
DP
,
CV_32F
);
statePre
=
Mat
::
zeros
(
DP
,
1
,
type
);
statePost
=
Mat
::
zeros
(
DP
,
1
,
type
);
transitionMatrix
=
Mat
::
eye
(
DP
,
DP
,
type
);
processNoiseCov
=
Mat
::
eye
(
DP
,
DP
,
CV_32F
);
measurementMatrix
=
Mat
::
zeros
(
MP
,
DP
,
CV_32F
);
measurementNoiseCov
=
Mat
::
eye
(
MP
,
MP
,
CV_32F
);
processNoiseCov
=
Mat
::
eye
(
DP
,
DP
,
type
);
measurementMatrix
=
Mat
::
zeros
(
MP
,
DP
,
type
);
measurementNoiseCov
=
Mat
::
eye
(
MP
,
MP
,
type
);
errorCovPre
=
Mat
::
zeros
(
DP
,
DP
,
CV_32F
);
errorCovPost
=
Mat
::
zeros
(
DP
,
DP
,
CV_32F
);
gain
=
Mat
::
zeros
(
DP
,
MP
,
CV_32F
);
errorCovPre
=
Mat
::
zeros
(
DP
,
DP
,
type
);
errorCovPost
=
Mat
::
zeros
(
DP
,
DP
,
type
);
gain
=
Mat
::
zeros
(
DP
,
MP
,
type
);
if
(
CP
>
0
)
controlMatrix
=
Mat
::
zeros
(
DP
,
CP
,
CV_32F
);
controlMatrix
=
Mat
::
zeros
(
DP
,
CP
,
type
);
else
controlMatrix
.
release
();
temp1
.
create
(
DP
,
DP
,
CV_32F
);
temp2
.
create
(
MP
,
DP
,
CV_32F
);
temp3
.
create
(
MP
,
MP
,
CV_32F
);
temp4
.
create
(
MP
,
DP
,
CV_32F
);
temp5
.
create
(
MP
,
1
,
CV_32F
);
temp1
.
create
(
DP
,
DP
,
type
);
temp2
.
create
(
MP
,
DP
,
type
);
temp3
.
create
(
MP
,
MP
,
type
);
temp4
.
create
(
MP
,
DP
,
type
);
temp5
.
create
(
MP
,
1
,
type
);
}
const
Mat
&
KalmanFilter
::
predict
(
const
Mat
&
control
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录