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
10b7e4f1
Commit
10b7e4f1
authored
Mar 16, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改high和low的逻辑
parent
f0e955da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
8 deletions
+31
-8
TrackingRosEx.cpp
TrackingRosEx.cpp
+30
-8
TrackingRosEx.h
TrackingRosEx.h
+1
-0
No files found.
TrackingRosEx.cpp
View file @
10b7e4f1
...
...
@@ -318,7 +318,9 @@ void TrackingRos::Init(ros::NodeHandle& nh)
SDK_LOG
(
SDK_INFO
,
"front_camera_len = %d"
,
m_front_camera_len
);
nh
.
param
<
int32_t
>
(
"send_camera_image"
,
m_send_camera_image
,
0
);
SDK_LOG
(
SDK_INFO
,
"send_camera_image = %d"
,
m_send_camera_image
);
nh
.
param
<
float
>
(
"high_low_score"
,
m_high_low_score
,
0.5
);
SDK_LOG
(
SDK_INFO
,
"high_low_score = %f"
,
m_high_low_score
);
YAML
::
Node
config
=
YAML
::
LoadFile
(
file
.
c_str
());
auto
cfg
=
config
[
"TRACKING"
];
...
...
@@ -438,6 +440,9 @@ void TrackingRos::TimeQueueProcess(std::vector< TimeQueueDataPtr>& outs)
}
else
continue
;
obj
.
score
+=
m_high_low_score
;
if
(
obj
.
score
>
1.0
f
)
obj
.
score
=
1.0
f
;
if
(
_GET_VALID_VALUE
((
unsigned
char
)
0
,
m_recvMsgBit
))
{
//SDK_LOG(SDK_INFO, "send cloud obj x = %f, y = %f",obj.x,obj.y);
...
...
@@ -756,7 +761,10 @@ void TrackingRos::ThreadTrackingProcess()
#endif
m_frameNum
++
;
//SDK_LOG(SDK_INFO, "get objs size = %d,m_frameNum = %d",objsPtr->array.size(), m_frameNum);
std
::
vector
<
std
::
vector
<
float
>
>
input
;
std
::
vector
<
std
::
vector
<
float
>
>
inputH
;
std
::
vector
<
std
::
vector
<
float
>
>
inputL
;
std
::
vector
<
int
>
indexH
;
std
::
vector
<
int
>
indexL
;
for
(
int
i
=
0
;
i
<
objsPtr
->
array
.
size
();
i
++
)
{
jfx_common_msgs
::
det_tracking
&
obj
=
objsPtr
->
array
[
i
];
...
...
@@ -769,17 +777,28 @@ void TrackingRos::ThreadTrackingProcess()
data
.
push_back
(
obj
.
l
);
data
.
push_back
(
obj
.
w
);
data
.
push_back
(
obj
.
h
);
input
.
emplace_back
(
data
);
if
(
obj
.
score
<
m_high_low_score
)
{
inputL
.
emplace_back
(
data
);
indexL
.
emplace_back
(
i
);
}
else
{
inputH
.
emplace_back
(
data
);
indexH
.
emplace_back
(
i
);
}
}
std
::
vector
<
uint64_t
>
detectionsId
;
std
::
map
<
uint64_t
,
int
>
updateId
;
//std::vector<uint64_t> detectionsId;
std
::
map
<
uint64_t
,
int
>
updateHId
;
std
::
map
<
uint64_t
,
int
>
updateLId
;
std
::
vector
<
uint64_t
>
lostId
;
uint64_t
begin
=
GetCurTime
();
#ifdef _USING_NSIGHT_
nvtxRangePush
(
"m_tracker.Run"
);
#endif
m_tracker
.
Run
(
input
,
7
,
10
,
detectionsId
,
updateId
,
lostId
);
//m_tracker.Run(input,7,10, detectionsId, updateId, lostId);
m_tracker
.
Run
(
inputH
,
inputL
,
7
,
10
,
updateHId
,
updateLId
,
lostId
);
#ifdef _USING_NSIGHT_
nvtxRangePop
();
#endif
...
...
@@ -814,9 +833,12 @@ void TrackingRos::ThreadTrackingProcess()
jfx_common_msgs
::
det_tracking
input_obj
=
{};
int
last_type
=
-
1
;
int
is_need_send
=
0
;
//是否需要发送
if
(
update
Id
.
find
(
iter
.
first
)
!=
update
Id
.
end
())
if
(
update
HId
.
find
(
iter
.
first
)
!=
updateHId
.
end
()
||
updateLId
.
find
(
iter
.
first
)
!=
updateL
Id
.
end
())
{
obj
=
objsPtr
->
array
[
updateId
[
iter
.
first
]];
if
(
updateHId
.
find
(
iter
.
first
)
!=
updateHId
.
end
())
obj
=
objsPtr
->
array
[
indexH
[
updateHId
[
iter
.
first
]]];
if
(
updateLId
.
find
(
iter
.
first
)
!=
updateLId
.
end
())
obj
=
objsPtr
->
array
[
indexL
[
updateLId
[
iter
.
first
]]];
input_obj
=
obj
;
obj
.
obj_id
=
iter
.
first
;
std
::
vector
<
float
>
data
;
...
...
TrackingRosEx.h
View file @
10b7e4f1
...
...
@@ -73,6 +73,7 @@ public:
int
m_right_left_camera_y_len
=
7
;
//左右相机的过滤宽度米数
int
m_front_camera_len
=
0
;
//-前相机过滤的距离米数,0是不过滤,70就是过滤70米,但不过滤行人和机动车
int
m_send_camera_image
=
0
;
//是否发送相机图像,0是不发送,1是发送
float
m_high_low_score
=
0
.
5
f
;
//high和low划分的置信度数值
void
TimeQueueProcess
(
std
::
vector
<
TimeQueueDataPtr
>&
outs
);
...
...
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