Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
J
jfx_kalman_filter_src
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
oscar
jfx_kalman_filter_src
Commits
28652b56
Commit
28652b56
authored
Jun 08, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
adfe92a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
Track3D.cpp
BaseTracker/Track3D.cpp
+18
-18
No files found.
BaseTracker/Track3D.cpp
View file @
28652b56
...
...
@@ -131,24 +131,24 @@ void Track3D::Predict()
}
m_points
.
push_back
(
pos
);
//根据上上次的时间戳与上一次的时间戳的间隔来调整预测的数据
uint64_t
interval
=
100
;
if
(
m_obj
&&
m_lastLastTimestamp
!=
0
&&
m_obj
->
frame
!=
m_lastLastTimestamp
)
interval
=
m_obj
->
frame
-
m_lastLastTimestamp
;
float
v_rate
=
(
double
)
interval
/
100
;
if
(
v_rate
>
1.5
||
v_rate
<
0.5
)
{
SDK_LOG
(
SDK_INFO
,
"predict time error, v_rate = %f,m_lastLastTimestamp = %llu, frame = %llu, interval = %llu"
,
v_rate
,
m_lastLastTimestamp
,
m_obj
->
frame
,
interval
);
}
if
(
m_obj
&&
m_obj
->
frame
!=
m_lastLastTimestamp
)
m_lastLastTimestamp
=
m_obj
->
frame
;
else
if
(
m_obj
)
{
m_lastLastTimestamp
+=
100
;
m_obj
->
frame
=
m_lastLastTimestamp
;
}
kf_
->
F_
(
0
,
7
)
=
v_rate
;
kf_
->
F_
(
1
,
8
)
=
v_rate
;
kf_
->
F_
(
2
,
9
)
=
v_rate
;
//
uint64_t interval = 100;
//
if (m_obj && m_lastLastTimestamp != 0 && m_obj->frame != m_lastLastTimestamp)
//
interval = m_obj->frame - m_lastLastTimestamp;
//
float v_rate = (double)interval / 100;
//
if (v_rate > 1.5 || v_rate < 0.5)
//
{
//
SDK_LOG(SDK_INFO, "predict time error, v_rate = %f,m_lastLastTimestamp = %llu, frame = %llu, interval = %llu", v_rate, m_lastLastTimestamp, m_obj->frame, interval);
//
}
//
if (m_obj && m_obj->frame != m_lastLastTimestamp)
//
m_lastLastTimestamp = m_obj->frame;
//
else if (m_obj)
//
{
//
m_lastLastTimestamp += 100;
//
m_obj->frame = m_lastLastTimestamp;
//
}
//
kf_->F_(0, 7) = v_rate;
//
kf_->F_(1, 8) = v_rate;
//
kf_->F_(2, 9) = v_rate;
BaseTrack
::
Predict
();
}
void
Track3D
::
Update
(
const
std
::
vector
<
float
>&
data
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment