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
878d1e2b
Commit
878d1e2b
authored
Dec 27, 2021
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交更新
parent
683b72dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
Track3D.cpp
BaseTracker/Track3D.cpp
+11
-5
Track3D.h
BaseTracker/Track3D.h
+1
-0
No files found.
BaseTracker/Track3D.cpp
View file @
878d1e2b
...
...
@@ -34,8 +34,8 @@ double correct_angle(std::vector<point2d>& points)
Eigen
::
SelfAdjointEigenSolver
<
Eigen
::
MatrixXd
>
eig
(
C
);
// 产生的vec和val按照特征值升序排列
vec
=
eig
.
eigenvectors
();
val
=
eig
.
eigenvalues
();
SDK_LOG
(
SDK_INFO
,
"vec = [%f,%f,%f,%f]"
,
vec
(
0
,
0
),
vec
(
0
,
1
),
vec
(
1
,
0
),
vec
(
1
,
1
));
SDK_LOG
(
SDK_INFO
,
"val = [%f,%f]"
,
val
(
0
),
val
(
1
));
//
SDK_LOG(SDK_INFO, "vec = [%f,%f,%f,%f]", vec(0, 0), vec(0, 1), vec(1, 0), vec(1, 1));
//
SDK_LOG(SDK_INFO, "val = [%f,%f]", val(0), val(1));
// 打印
//cout << "X_copy: " << endl << X_copy
Eigen
::
Vector2d
dX
(
points
[
4
].
x
-
points
[
0
].
x
,
points
[
4
].
y
-
points
[
0
].
y
);
...
...
@@ -43,7 +43,7 @@ double correct_angle(std::vector<point2d>& points)
double
alpha
=
dX
.
transpose
()
*
orientation
;
if
(
alpha
<
0
)
orientation
=
-
orientation
;
SDK_LOG
(
SDK_INFO
,
"correct_angle orientation[0] = %f, orientation[1] = %f"
,
orientation
[
0
],
orientation
[
1
]);
//
SDK_LOG(SDK_INFO, "correct_angle orientation[0] = %f, orientation[1] = %f", orientation[0], orientation[1]);
double
center_rot_y
=
atan2
(
orientation
[
1
],
orientation
[
0
]);
return
center_rot_y
;
}
...
...
@@ -132,6 +132,12 @@ void Track3D::Predict()
m_points
.
push_back
(
pos
);
BaseTrack
::
Predict
();
}
void
Track3D
::
Update
(
const
std
::
vector
<
float
>&
data
)
{
std
::
vector
<
float
>
out
;
UpdateDataCheck
(
data
,
out
);
BaseTrack
::
Update
(
out
);
}
float
calcIOU
(
cv
::
RotatedRect
rect1
,
cv
::
RotatedRect
rect2
)
{
...
...
@@ -184,8 +190,8 @@ double Track3D::CalculateIou(const std::vector<float>& data)
//double i3d_iou = CuboidIoU(truth_poses, landmark_poses);
cv
::
RotatedRect
rect1
=
cv
::
RotatedRect
(
cv
::
Point2f
(
states
[
0
],
states
[
1
]),
cv
::
Size2f
(
states
[
3
],
states
[
4
]),
states
[
6
]
*
180
/
3.1415926
);
cv
::
RotatedRect
rect2
=
cv
::
RotatedRect
(
cv
::
Point2f
(
data
[
0
],
data
[
1
]),
cv
::
Size2f
(
data
[
3
],
data
[
4
]),
data
[
6
]
*
180
/
3.1415926
);
cv
::
RotatedRect
rect1
=
cv
::
RotatedRect
(
cv
::
Point2f
(
states
[
0
],
states
[
1
]),
cv
::
Size2f
(
states
[
4
],
states
[
5
]),
states
[
3
]
*
180
/
3.1415926
);
cv
::
RotatedRect
rect2
=
cv
::
RotatedRect
(
cv
::
Point2f
(
data
[
0
],
data
[
1
]),
cv
::
Size2f
(
data
[
4
],
data
[
5
]),
data
[
3
]
*
180
/
3.1415926
);
uint64_t
begin
=
GetCurTime
();
double
iou_3d
=
0.0
f
;
...
...
BaseTracker/Track3D.h
View file @
878d1e2b
...
...
@@ -34,6 +34,7 @@ public:
virtual
void
Init
(
const
std
::
vector
<
float
>&
data
);
virtual
void
Predict
();
virtual
void
Update
(
const
std
::
vector
<
float
>&
data
);
virtual
double
CalculateIou
(
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