Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PeTrack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pedestrian Dynamics Empiricism
PeTrack
Commits
656ec6b4
Commit
656ec6b4
authored
2 years ago
by
Schrödter, Tobias
Browse files
Options
Downloads
Patches
Plain Diff
Use correct 0-based index when setting the marker ID
parent
0d5b386a
No related branches found
No related tags found
1 merge request
!198
Use correct 0-based index when setting the marker ID
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/personStorage.h
+1
-1
1 addition, 1 deletion
include/personStorage.h
src/personStorage.cpp
+4
-4
4 additions, 4 deletions
src/personStorage.cpp
with
5 additions
and
5 deletions
include/personStorage.h
+
1
−
1
View file @
656ec6b4
...
...
@@ -123,7 +123,7 @@ public:
// rueckgabewert false wenn keine hoeheninformationen in tracker datensatz vorliegt
bool
printHeightDistribution
();
void
setMarkerHeights
(
const
std
::
unordered_map
<
int
,
float
>
&
heights
);
void
setMarkerID
(
int
person
,
int
markerIDs
,
bool
manual
=
false
);
void
setMarkerID
(
int
person
Index
,
int
markerIDs
,
bool
manual
=
false
);
void
setMarkerIDs
(
const
std
::
unordered_map
<
int
,
int
>
&
markerIDs
);
void
purge
(
int
frame
);
...
...
This diff is collapsed.
Click to expand it.
src/personStorage.cpp
+
4
−
4
View file @
656ec6b4
...
...
@@ -1107,16 +1107,16 @@ void PersonStorage::setMarkerHeights(const std::unordered_map<int, float> &heigh
/**
* Sets/Overwrites the markerID for a specific person and all trackpaints belonging to that person
* @param personI
D
internal id of persons (0 based)
* @param personI
ndex
internal id of persons (0 based)
* @param markerIDs new marker ID
*/
void
PersonStorage
::
setMarkerID
(
int
personI
D
,
int
markerID
,
bool
manual
)
void
PersonStorage
::
setMarkerID
(
int
personI
ndex
,
int
markerID
,
bool
manual
)
{
if
(
manual
)
{
mAutosave
.
trackPersonModified
();
}
auto
&
person
=
mPersons
.
at
(
personI
D
);
auto
&
person
=
mPersons
.
at
(
personI
ndex
);
person
.
setMarkerID
(
markerID
);
for
(
auto
&
trackPoint
:
person
)
// over TrackPoints
{
...
...
@@ -1138,7 +1138,7 @@ void PersonStorage::setMarkerIDs(const std::unordered_map<int, int> &markerIDs)
if
(
markerIDs
.
find
(
personID
)
!=
std
::
end
(
markerIDs
))
{
int
markerID
=
markerIDs
.
at
(
personID
);
setMarkerID
(
personID
,
markerID
);
setMarkerID
(
i
,
markerID
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment