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
d126a7ca
Commit
d126a7ca
authored
Jun 01, 2023
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改5个点是否计算轨迹的逻辑
parent
7660e684
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
Track3D.cpp
BaseTracker/Track3D.cpp
+13
-13
No files found.
BaseTracker/Track3D.cpp
View file @
d126a7ca
...
...
@@ -7,7 +7,7 @@
#include <opencv2/opencv.hpp>
#include <algorithm>
#define DIST_THRED
1
#define DIST_THRED
0.5
double
calc_tangent_direction
(
const
std
::
vector
<
point2d
>&
points
)
{
if
(
points
.
size
()
<
5
)
{
...
...
@@ -79,21 +79,21 @@ int IsClosePoint(std::vector<point2d>& points)
{
if
(
points
.
size
()
!=
5
)
return
1
;
float
lenAllX
=
fabs
(
points
[
0
].
x
-
points
[
1
].
x
)
+
fabs
(
points
[
0
].
x
-
points
[
2
].
x
)
+
fabs
(
points
[
0
].
x
-
points
[
3
].
x
)
+
fabs
(
points
[
0
].
x
-
points
[
4
].
x
);
float
lenX
=
fabs
(
points
[
0
].
x
-
points
[
4
].
x
);
float
lenAllY
=
fabs
(
points
[
0
].
y
-
points
[
1
].
y
)
+
fabs
(
points
[
0
].
y
-
points
[
2
].
y
)
+
fabs
(
points
[
0
].
y
-
points
[
3
].
y
)
+
fabs
(
points
[
0
].
y
-
points
[
4
].
y
);
float
lenY
=
fabs
(
points
[
0
].
y
-
points
[
4
].
y
);
if
(
lenX
>
DIST_THRED
)
float
len01
=
sqrt
(
pow
(
points
[
0
].
x
-
points
[
1
].
x
,
2
)
+
pow
(
points
[
0
].
y
-
points
[
1
].
y
,
2
));
float
len02
=
sqrt
(
pow
(
points
[
0
].
x
-
points
[
2
].
x
,
2
)
+
pow
(
points
[
0
].
y
-
points
[
2
].
y
,
2
));
float
len03
=
sqrt
(
pow
(
points
[
0
].
x
-
points
[
3
].
x
,
2
)
+
pow
(
points
[
0
].
y
-
points
[
3
].
y
,
2
));
float
len04
=
sqrt
(
pow
(
points
[
0
].
x
-
points
[
4
].
x
,
2
)
+
pow
(
points
[
0
].
y
-
points
[
4
].
y
,
2
));
float
lenAll
=
len01
+
len02
+
len03
+
len04
;
int
isFar
=
0
;
if
(
len04
>
DIST_THRED
)
{
float
rateX
=
lenAll
X
/
lenX
;
if
(
rateX
>
1.
75
&&
rateX
<
2.2
5
)
return
0
;
float
rateX
=
lenAll
/
len04
;
if
(
rateX
>
1.
5
&&
rateX
<
2.
5
)
isFar
=
1
;
}
if
(
lenY
>
DIST_THRED
)
if
(
isFar
==
1
)
{
float
rateY
=
lenAllY
/
lenY
;
if
(
rateY
>
1.75
&&
rateY
<
2.25
)
return
0
;
return
0
;
}
return
1
;
}
...
...
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