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
6edf7d1b
Commit
6edf7d1b
authored
Jun 01, 2023
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改检测轨迹阈值
parent
8374ccf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
Track3D.cpp
BaseTracker/Track3D.cpp
+12
-7
Track3D.h
BaseTracker/Track3D.h
+2
-0
No files found.
BaseTracker/Track3D.cpp
View file @
6edf7d1b
...
...
@@ -180,6 +180,8 @@ void Track3D::Init(const std::vector<float>& data)
tmp
[
3
]
-=
2
*
_PI_
;
while
(
tmp
[
3
]
<
-
_PI_
)
tmp
[
3
]
+=
2
*
_PI_
;
m_startPoint
.
x
=
tmp
[
0
];
m_startPoint
.
y
=
tmp
[
1
];
BaseTrack
::
Init
(
tmp
);
}
...
...
@@ -418,24 +420,27 @@ void Track3D::UpdateDataCheck(const std::vector<float>& data, std::vector<float>
double
rot_y
=
tmp
[
3
];
double
rot_y_detect
=
rot_y
;
//检测到的朝向
int
dataSource
=
data
[
8
];
float
length_start
=
sqrt
(
pow
(
m_startPoint
.
x
-
tmp
[
0
],
2
)
+
pow
(
m_startPoint
.
y
-
tmp
[
1
],
2
));
if
(
m_obj
&&
m_points
.
size
()
>
1
)
{
float
speed
=
sqrt
(
pow
(
kf_
->
x_
[
7
],
2
)
+
pow
(
kf_
->
x_
[
8
],
2
));
const
int
speed_cout_max
=
5
;
if
(
speed
>
0.1
&&
m_last_speed
>
0.1
)
{
m_dist_thred
=
DIST_THRED
;
m_speed_change
=
0
;
}
else
{
if
(
speed
>
m_last_speed
&&
fabs
(
speed
-
m_last_speed
)
>
0.0
1
)
if
(
speed
<
0.
1
)
{
m_speed_change
=
m_speed_change
<
speed_cout_max
?
m_speed_change
+
1
:
speed_cout_max
;
m_dist_thred
-=
0.1
*
m_speed_change
;
m_speed_change
=
m_speed_change
<
speed_cout_max
?
m_speed_change
+
1
:
speed_cout_max
;
}
else
if
(
speed
<
m_last_speed
&&
fabs
(
speed
-
m_last_speed
)
>
0.01
)
else
{
m_speed_change
=
m_speed_change
>
-
speed_cout_max
?
m_speed_change
-
1
:
-
speed_cout_max
;
m_dist_thred
-=
0.1
*
m_speed_change
;
m_speed_change
=
m_speed_change
>
0
?
m_speed_change
-
1
:
0
;
}
m_dist_thred
+=
0.3
*
m_speed_change
;
if
(
m_dist_thred
<
DIST_THRED
)
m_dist_thred
=
DIST_THRED
;
else
if
(
m_dist_thred
>
2.0
f
)
...
...
@@ -451,7 +456,7 @@ void Track3D::UpdateDataCheck(const std::vector<float>& data, std::vector<float>
);
m_last_speed
=
speed
;
}
if
(
dataSource
==
1
&&
m_points
.
size
()
>=
5
&&
IsClosePoint
(
m_points
,
m_dist_thred
)
==
0
)
if
(
dataSource
==
1
&&
m_points
.
size
()
>=
5
&&
length_start
>
4.0
f
&&
IsClosePoint
(
m_points
,
m_dist_thred
)
==
0
)
{
double
center_rot_y
=
calc_tangent_direction
(
m_points
);
m_center_rot_y
=
center_rot_y
;
...
...
BaseTracker/Track3D.h
View file @
6edf7d1b
...
...
@@ -87,6 +87,8 @@ public:
float
m_dist_thred
=
2
.
0
f
;
float
m_last_speed
=
0
.
0
f
;
int
m_speed_change
=
0
;
point2d
m_startPoint
;
};
double
correct_angle
(
std
::
vector
<
point2d
>&
points
);
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