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
Compare revisions
master to 274-merge-doesn-t-delete-already-merged-person-from-further-evaluation
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
ped-dyn-emp/petrack
Select target project
No results found
274-merge-doesn-t-delete-already-merged-person-from-further-evaluation
Select Git revision
Branches
104-integrate-unit-and-regression-tests-in-ctest
106-reduce-duplicate-code-with-templates
107-crash-by-using-error-button
108-store-calculated-errors
111-looping-warning
115-pet-file-show-only-people
116-command-line-options
118-get3dpoint-2-methods-implemented-but-only-newer-used
118-get3dpoint-2-methods-implemented-but-only-newer-used-2
122-move-control-gui-tabs-to-separate-files
124-custom-messagebox-with-logging-capabilities-and-offscreen-scripting-support
125-delete-obsolete-markercolor-cpp-h
127-make-cpack-generator-for-windows-a-cache-variable
128-adding-manual-trackpoints-when-showonlypeople-is-on
13-reformat-project-with-clang-format
131-windows-uninstall-leaves-registry-entries
132-add-pedantic-to-compiler-flags
133-refactoring-the-findmulticolormarker-function
139-moving-trackpoint-broken
14-add-clang-tidy
140-height-limitations-on-multicolormarker
142-manual-setting-height-too-restrictive
146-structure-of-the-project
147-reducing-quality-of-wrong-path-not-working-with-color-marker
149-crash-when-holding-next-frame-button-down-too-long
15-fix-warnings
150-optimize-visual-representation-of-skeleton-coming-vfrom-c3d
152-use-not-readable-code-marker-for-fixed-head-position
154-license-header-missing-in-pmessagebox
16-tracker-track-bug
169-crash-in-trackerreal-calculate
172-enlarge-crop-rect-for-arucocodemarker-with-colormarker-detection
176-add-possibility-to-edit-chessboard-properties-to-gui
177-create-recognizer-class
178-add-tests-for-codemarkerwidget
178-create-options-class-for-code-marker
187-use-pointer-approach-for-ui-to-decrease-compile-time
188-raise-warning-level-and-fix-warnings-on-msvc
191-retrack-only-if-whole-path-leading-to-the-current-trackpoint-is-better
192-fix-playback-speed-for-image-sequence
195-support-mutliple-mocap-files
199-wrong-compile-date
20-remove-commented-code
201-allow-selection-of-multiple-mocap-files-in-file-dialog
2021-09-11-mac-installer
20220201-master-backup
205-confidential-issue
209-optimize-multicolormarkerwitharuco_dictmip36h12-test-case
210-make-minmarkerperimeter-and-maxmarkerperimeter-user-configured-for-multi-aruco
213-add-more-intrinsic-calibration-parameters
213-add-more-intrinsic-calibration-parameters-2
216-add-utility-script-for-comparison-of-regression-test-data
220-petrack-crashes-on-cvtcolor
222-mocap-time-offset-is-changed-when-read-in
223-refactor-personstorage-out-of-tracker
224-create-autosave-class-and-mechanism
227-add-script-which-checks-if-license-header-is-added-to-new-source-files
228-create-intrinisc-calibration-project-from-command-line
229-change-to-new-connect-syntax
231-change-mocap-dialog-to-same-style-as-rest
236-show-current-point
240-lk-optical-flow
242-only_people_nr_list-saved-wrong-in-pet-file
243-mocap-management-dialog-improve-usability
246-save-video-as-mp4-quick
247-flickering-of-the-trajectory-overlay
250-saving-pet-file-changes-values
251-follow-up-from-resolve-add-more-intrinsic-calibration-parameters
253-intrinsic-calibration-from-video
259-saving-trc-files-after-opening-a-new-project
269-make-shortcut-export
274-merge-doesn-t-delete-already-merged-person-from-further-evaluation
279-ask-if-intrinsic-calibration-should-be-changed-when-trajectory-already-present
283-make-sure-that-the-offscreen-plugin-is-also-included-in-windows-installer
284-check-frame-number-of-loaded-trc-files
291-move-to-frame
293-correct-move-trackpoint-along-visible-trajectory
296-fix-warning-on-msvc
299-correct-tab-order
302-disable-scrolling-in-spinboxes-when-not-desired
303-tooltip-chessboard-properties
305-intrinsic-calibration-switch-between-models
315-crash-when-using-5-calibration-points-for-extrinsic-calibration
316-ext-model-always-enabled
317-case-sensitivity-on-file-endings
321-version-in-pet-file-not-always-major-minor-patch
322-empty-lines-in-the-height-file
328-alt-doubleclickleft-also-triggers-alt-clickleft
328-alt-doubleclickleft-also-triggers-alt-clickleft-2
329-make-sure-that-every-slider-also-gets-a-spinbox
330-remove-non-const-global-pointer-to-control
332-setting-playback-speed-influences-exported-framerate-in-trajectory-files
333-make-slider-only-scrollable-when-clicking-on-them
333-make-slider-only-scrollable-when-clicking-on-them-2
338-greyscale-image-sequence-not-visable
34-check-includes
345-make-change-between-different-intrinsic-calibration-without-losing-trackpoints
348-autosave-popup-when-starting-without-project
349-extensibility-of-trackpoint
353-check-whether-mprofile-is-a-directory
Tags
CroMa
v0.10
v0.8
v0.9
v1.0
105 results
Swap
Target
ped-dyn-emp/petrack
Select target project
ped-dyn-emp/petrack
1 result
master
Select Git revision
Branches
104-integrate-unit-and-regression-tests-in-ctest
106-reduce-duplicate-code-with-templates
107-crash-by-using-error-button
108-store-calculated-errors
111-looping-warning
115-pet-file-show-only-people
116-command-line-options
118-get3dpoint-2-methods-implemented-but-only-newer-used
118-get3dpoint-2-methods-implemented-but-only-newer-used-2
122-move-control-gui-tabs-to-separate-files
124-custom-messagebox-with-logging-capabilities-and-offscreen-scripting-support
125-delete-obsolete-markercolor-cpp-h
127-make-cpack-generator-for-windows-a-cache-variable
128-adding-manual-trackpoints-when-showonlypeople-is-on
13-reformat-project-with-clang-format
131-windows-uninstall-leaves-registry-entries
132-add-pedantic-to-compiler-flags
133-refactoring-the-findmulticolormarker-function
139-moving-trackpoint-broken
14-add-clang-tidy
140-height-limitations-on-multicolormarker
142-manual-setting-height-too-restrictive
146-structure-of-the-project
147-reducing-quality-of-wrong-path-not-working-with-color-marker
149-crash-when-holding-next-frame-button-down-too-long
15-fix-warnings
150-optimize-visual-representation-of-skeleton-coming-vfrom-c3d
152-use-not-readable-code-marker-for-fixed-head-position
154-license-header-missing-in-pmessagebox
16-tracker-track-bug
169-crash-in-trackerreal-calculate
172-enlarge-crop-rect-for-arucocodemarker-with-colormarker-detection
176-add-possibility-to-edit-chessboard-properties-to-gui
177-create-recognizer-class
178-add-tests-for-codemarkerwidget
178-create-options-class-for-code-marker
187-use-pointer-approach-for-ui-to-decrease-compile-time
188-raise-warning-level-and-fix-warnings-on-msvc
191-retrack-only-if-whole-path-leading-to-the-current-trackpoint-is-better
192-fix-playback-speed-for-image-sequence
195-support-mutliple-mocap-files
199-wrong-compile-date
20-remove-commented-code
201-allow-selection-of-multiple-mocap-files-in-file-dialog
2021-09-11-mac-installer
20220201-master-backup
205-confidential-issue
209-optimize-multicolormarkerwitharuco_dictmip36h12-test-case
210-make-minmarkerperimeter-and-maxmarkerperimeter-user-configured-for-multi-aruco
213-add-more-intrinsic-calibration-parameters
213-add-more-intrinsic-calibration-parameters-2
216-add-utility-script-for-comparison-of-regression-test-data
220-petrack-crashes-on-cvtcolor
222-mocap-time-offset-is-changed-when-read-in
223-refactor-personstorage-out-of-tracker
224-create-autosave-class-and-mechanism
227-add-script-which-checks-if-license-header-is-added-to-new-source-files
228-create-intrinisc-calibration-project-from-command-line
229-change-to-new-connect-syntax
231-change-mocap-dialog-to-same-style-as-rest
236-show-current-point
240-lk-optical-flow
242-only_people_nr_list-saved-wrong-in-pet-file
243-mocap-management-dialog-improve-usability
246-save-video-as-mp4-quick
247-flickering-of-the-trajectory-overlay
250-saving-pet-file-changes-values
251-follow-up-from-resolve-add-more-intrinsic-calibration-parameters
253-intrinsic-calibration-from-video
259-saving-trc-files-after-opening-a-new-project
269-make-shortcut-export
274-merge-doesn-t-delete-already-merged-person-from-further-evaluation
279-ask-if-intrinsic-calibration-should-be-changed-when-trajectory-already-present
283-make-sure-that-the-offscreen-plugin-is-also-included-in-windows-installer
284-check-frame-number-of-loaded-trc-files
291-move-to-frame
293-correct-move-trackpoint-along-visible-trajectory
296-fix-warning-on-msvc
299-correct-tab-order
302-disable-scrolling-in-spinboxes-when-not-desired
303-tooltip-chessboard-properties
305-intrinsic-calibration-switch-between-models
315-crash-when-using-5-calibration-points-for-extrinsic-calibration
316-ext-model-always-enabled
317-case-sensitivity-on-file-endings
321-version-in-pet-file-not-always-major-minor-patch
322-empty-lines-in-the-height-file
328-alt-doubleclickleft-also-triggers-alt-clickleft
328-alt-doubleclickleft-also-triggers-alt-clickleft-2
329-make-sure-that-every-slider-also-gets-a-spinbox
330-remove-non-const-global-pointer-to-control
332-setting-playback-speed-influences-exported-framerate-in-trajectory-files
333-make-slider-only-scrollable-when-clicking-on-them
333-make-slider-only-scrollable-when-clicking-on-them-2
338-greyscale-image-sequence-not-visable
34-check-includes
345-make-change-between-different-intrinsic-calibration-without-losing-trackpoints
348-autosave-popup-when-starting-without-project
349-extensibility-of-trackpoint
353-check-whether-mprofile-is-a-directory
Tags
CroMa
v0.10
v0.8
v0.9
v1.0
105 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (4)
Ignore already merged trajectory in further computation
· a7d5c2a4
d.kilic
authored
3 years ago
and
d.kilic
committed
3 years ago
a7d5c2a4
Reformat
· b0285838
d.kilic
authored
3 years ago
and
d.kilic
committed
3 years ago
b0285838
Use Enum in mStatus instead of uchar
· 333ba6a7
d.kilic
authored
3 years ago
and
d.kilic
committed
3 years ago
333ba6a7
Moved comment according to review
· 5cc438c7
d.kilic
authored
3 years ago
and
d.kilic
committed
3 years ago
5cc438c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/tracker.h
+8
-1
8 additions, 1 deletion
include/tracker.h
src/tracker.cpp
+20
-9
20 additions, 9 deletions
src/tracker.cpp
with
28 additions
and
10 deletions
include/tracker.h
View file @
5cc438c7
...
...
@@ -209,11 +209,18 @@ std::ostream &operator<<(std::ostream &s, const TrackPerson &tp);
class
Tracker
{
private:
enum
class
TrackStatus
{
Tracked
,
NotTracked
,
Merged
};
Petrack
*
mMainWindow
;
cv
::
Mat
mGrey
,
mPrevGrey
;
std
::
vector
<
cv
::
Mat
>
mPrevPyr
,
mCurrentPyr
;
std
::
vector
<
cv
::
Point2f
>
mPrevFeaturePoints
,
mFeaturePoints
;
std
::
vector
<
uchar
>
mStatus
;
std
::
vector
<
TrackStatus
>
mStatus
;
int
mPrevFrame
;
std
::
vector
<
int
>
mPrevFeaturePointsIdx
;
std
::
vector
<
float
>
mTrackError
;
...
...
This diff is collapsed.
Click to expand it.
src/tracker.cpp
View file @
5cc438c7
...
...
@@ -777,7 +777,7 @@ int Tracker::insertFeaturePoints(int frame, size_t count, cv::Mat &img, int bord
for
(
size_t
i
=
0
;
i
<
count
;
++
i
)
{
if
(
mStatus
[
i
])
if
(
mStatus
[
i
]
==
TrackStatus
::
Tracked
)
{
v
=
Vec2F
(
mFeaturePoints
.
at
(
i
).
x
,
mFeaturePoints
.
at
(
i
).
y
);
// umwandlung nach TrackPoint bei "="
...
...
@@ -856,7 +856,8 @@ int Tracker::insertFeaturePoints(int frame, size_t count, cv::Mat &img, int bord
}
else
{
if
(
v
.
x
()
>=
dist
&&
v
.
y
()
>=
dist
&&
v
.
x
()
<=
img
.
cols
-
1
-
dist
&&
v
.
y
()
<=
img
.
rows
-
1
-
dist
)
if
(
mStatus
[
i
]
==
TrackStatus
::
NotTracked
&&
v
.
x
()
>=
dist
&&
v
.
y
()
>=
dist
&&
v
.
x
()
<=
img
.
cols
-
1
-
dist
&&
v
.
y
()
<=
img
.
rows
-
1
-
dist
)
{
debout
<<
"Warning: Lost trajectory inside picture of person "
<<
mPrevFeaturePointsIdx
[
i
]
+
1
<<
" at frame "
<<
frame
<<
"!"
<<
std
::
endl
;
...
...
@@ -877,12 +878,11 @@ int Tracker::insertFeaturePoints(int frame, size_t count, cv::Mat &img, int bord
*/
bool
Tracker
::
tryMergeTrajectories
(
const
TrackPoint
&
v
,
size_t
i
,
int
frame
)
{
bool
found
=
false
;
int
j
;
bool
found
=
false
;
const
auto
&
persons
=
mPersonStorage
.
getPersons
();
const
auto
&
person
=
persons
[
mPrevFeaturePointsIdx
[
i
]];
// nach trajektorie suchen, mit der eine verschmelzung erfolgen koennte
for
(
j
=
0
;
!
found
&&
j
<
static_cast
<
int
>
(
mPersonStorage
.
nbPersons
());
++
j
)
// ueber TrackPerson
for
(
int
j
=
0
;
!
found
&&
j
<
static_cast
<
int
>
(
mPersonStorage
.
nbPersons
());
++
j
)
// ueber TrackPerson
{
const
auto
&
other
=
persons
[
j
];
if
(
j
!=
mPrevFeaturePointsIdx
[
i
]
&&
other
.
trackPointExist
(
frame
)
&&
...
...
@@ -899,6 +899,7 @@ bool Tracker::tryMergeTrajectories(const TrackPoint &v, size_t i, int frame)
{
int
deleteIndex
=
mPersonStorage
.
merge
(
mPrevFeaturePointsIdx
[
i
],
j
);
int
idxOtherMerged
=
-
1
;
// shift index of feature points
for
(
size_t
k
=
0
;
k
<
mPrevFeaturePointsIdx
.
size
();
++
k
)
{
...
...
@@ -906,6 +907,15 @@ bool Tracker::tryMergeTrajectories(const TrackPoint &v, size_t i, int frame)
{
--
mPrevFeaturePointsIdx
[
k
];
}
else
if
(
mPrevFeaturePointsIdx
[
k
]
==
deleteIndex
)
{
idxOtherMerged
=
static_cast
<
int
>
(
k
);
}
}
if
(
idxOtherMerged
!=
-
1
)
{
// set status to 2, so the already merged person is ignored/skipped
mStatus
[
idxOtherMerged
]
=
TrackStatus
::
Merged
;
}
found
=
true
;
}
...
...
@@ -1142,7 +1152,8 @@ void Tracker::trackFeaturePointsLK(int level, bool adaptive)
mTrackError
[
i
]
=
localTrackError
[
0
]
*
10.
F
/
winSize
;
}
while
(
adaptive
&&
localStatus
[
0
]
==
0
&&
(
l
--
)
>
0
);
mStatus
[
i
]
=
localStatus
[
0
];
// status from OpenCV: 0 -> not tracked, 1 -> tracked
mStatus
[
i
]
=
localStatus
[
0
]
?
TrackStatus
::
Tracked
:
TrackStatus
::
NotTracked
;
}
}
...
...
@@ -1230,7 +1241,7 @@ void Tracker::useBackgroundFilter(QList<int> &trjToDel, BackgroundFilter *bgFilt
// Rahmen, in dem nicht vordergrund pflicht, insbesondere am rechten rand!!!! es wird gruenes von hand
// angelegtes bounding rect roi genutzt
if
((
mStatus
[
i
]
==
1
)
&&
x
>=
MAX
(
margin
,
rect
.
x
())
&&
if
((
mStatus
[
i
]
==
TrackStatus
::
Tracked
)
&&
x
>=
MAX
(
margin
,
rect
.
x
())
&&
x
<=
MIN
(
mGrey
.
cols
-
1
-
2
*
bS
-
margin
-
50
,
rect
.
x
()
+
rect
.
width
())
&&
y
>=
MAX
(
margin
,
rect
.
y
())
&&
y
<=
MIN
(
mGrey
.
rows
-
1
-
2
*
bS
-
margin
,
rect
.
y
()
+
rect
.
height
()))
{
...
...
@@ -1279,8 +1290,8 @@ void Tracker::refineViaNearDarkPoint()
// da in kontrastarmen regionen der angegebene fehler gering, aber das resultat haeufiger fehlerhaft ist
// es waere daher schoen, wenn der fehler in abhaengigkeit von kontrast in umgebung skaliert wuerde
// zb (max 0..255): normal 10..150 -> *1; klein 15..50 -> *3; gross 0..255 -> *.5
if
((
mTrackError
[
i
]
>
MAX_TRACK_ERROR
)
&&
(
mStatus
[
i
]
==
1
)
&&
x
>=
0
&&
x
<
mGrey
.
cols
&&
y
>=
0
&&
y
<
mGrey
.
rows
)
if
((
mTrackError
[
i
]
>
MAX_TRACK_ERROR
)
&&
(
mStatus
[
i
]
==
TrackStatus
::
Tracked
)
&&
x
>=
0
&&
x
<
mGrey
.
cols
&&
y
>=
0
&&
y
<
mGrey
.
rows
)
{
int
regionSize
=
myRound
(
mMainWindow
->
getHeadSize
(
nullptr
,
mPrevFeaturePointsIdx
[
i
],
mPrevFrame
)
/
...
...
This diff is collapsed.
Click to expand it.