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
d024aaf5
Commit
d024aaf5
authored
Dec 17, 2021
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交测试
parent
14b44c60
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
13 deletions
+41
-13
BaseTracker.h
BaseTracker/BaseTracker.h
+6
-10
Component.cpp
common/Component.cpp
+31
-2
Component.h
common/Component.h
+4
-1
No files found.
BaseTracker/BaseTracker.h
View file @
d024aaf5
...
...
@@ -11,6 +11,7 @@
#include "Iou.h"
#include "LogBase.h"
#include <memory.h>
#include "Component.h"
#ifdef _KF_IOU_CUDA_
#include "bev_overlap_online.h"
#include "kalman_update_batch_online.h"
...
...
@@ -215,6 +216,10 @@ void BaseTracker<T>::AssociateDetectionsToTrackers(const std::vector<std::vector
tracker_ptr
.
get
()[
i
*
tra_size
+
j
]
=
tracker_states
[
i
][
j
];
}
}
std
::
string
dete_str
=
GetMatrixStr
(
detect_ptr
.
get
(),
measure_size
,
detections
.
size
());
std
::
string
track_str
=
GetMatrixStr
(
tracker_ptr
.
get
(),
tra_size
,
tracker_states
.
size
());
SDK_LOG
(
SDK_INFO
,
"detections = [%s]"
,
dete_str
.
c_str
());
SDK_LOG
(
SDK_INFO
,
"tracker_states = [%s]"
,
track_str
.
c_str
());
#ifdef _KF_IOU_CUDA_
bev_overlap
(
detections
.
size
(),
detect_ptr
.
get
(),
tracker_states
.
size
(),
tracker_ptr
.
get
(),
iou_ptr
.
get
());
#endif
...
...
@@ -227,16 +232,7 @@ void BaseTracker<T>::AssociateDetectionsToTrackers(const std::vector<std::vector
}
// Find association
std
::
string
str
;
for
(
int
i
=
0
;
i
<
detections
.
size
();
i
++
)
{
for
(
int
j
=
0
;
j
<
tracks
.
size
();
j
++
)
{
char
log
[
128
]
=
{};
sprintf
(
log
,
"%f,"
,
iou_matrix
[
i
][
j
]);
str
+=
log
;
}
}
std
::
string
str
=
GetMatrixStr
(
iou_matrix
,
detections
.
size
(),
tracks
.
size
());
SDK_LOG
(
SDK_INFO
,
"iou_matrix = [%s]"
,
str
.
c_str
());
HungarianMatching
(
iou_matrix
,
detections
.
size
(),
tracks
.
size
(),
association
);
...
...
common/Component.cpp
View file @
d024aaf5
...
...
@@ -10,4 +10,34 @@ uint64_t GetCurTime()
uint64_t
seconds
=
time
.
tv_sec
;
uint64_t
ttt
=
seconds
*
1000
*
1000
+
time
.
tv_usec
;
return
ttt
;
}
\ No newline at end of file
}
std
::
string
GetMatrixStr
(
float
*
data_ptr
,
int
col
,
int
row
)
{
std
::
string
str
;
for
(
int
i
=
0
;
i
<
row
;
i
++
)
{
for
(
int
j
=
0
;
j
<
col
;
j
++
)
{
char
log
[
128
]
=
{};
sprintf
(
log
,
"%f,"
,
data_ptr
[
i
][
j
]);
str
+=
log
;
}
}
return
str
;
}
std
::
string
GetMatrixStr
(
std
::
vector
<
std
::
vector
<
float
>>&
data_ptr
,
int
col
,
int
row
)
{
std
::
string
str
;
for
(
int
i
=
0
;
i
<
row
;
i
++
)
{
for
(
int
j
=
0
;
j
<
col
;
j
++
)
{
char
log
[
128
]
=
{};
sprintf
(
log
,
"%f,"
,
data_ptr
[
i
][
j
]);
str
+=
log
;
}
}
return
str
;
}
common/Component.h
View file @
d024aaf5
#
pragma
once
#include <string>
#include <vector>
uint64_t
GetCurTime
();
std
::
string
GetMatrixStr
(
float
*
data_ptr
,
int
col
,
int
row
);
std
::
string
GetMatrixStr
(
std
::
vector
<
std
::
vector
<
float
>>&
data_ptr
,
int
col
,
int
row
);
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