Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
ball_tracking
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Gomez-Gonzalez
ball_tracking
Commits
ccc68b32
Commit
ccc68b32
authored
4 years ago
by
Sebastian Gomez-Gonzalez
Browse files
Options
Downloads
Patches
Plain Diff
Documentation imprivement
This commit pushes additional documentation for the repo.
parent
1d0f65c5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Doxyfile
+2
-2
2 additions, 2 deletions
Doxyfile
README.md
+50
-0
50 additions, 0 deletions
README.md
src/stereo.cpp
+5
-1
5 additions, 1 deletion
src/stereo.cpp
with
57 additions
and
3 deletions
Doxyfile
+
2
−
2
View file @
ccc68b32
...
@@ -771,7 +771,7 @@ WARN_LOGFILE =
...
@@ -771,7 +771,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
# Note: If this tag is empty the current directory is searched.
INPUT = include/ include/ball_tracking
INPUT = include/ include/ball_tracking
README.md
# This tag can be used to specify the character encoding of the source files
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
...
@@ -920,7 +920,7 @@ FILTER_SOURCE_PATTERNS =
...
@@ -920,7 +920,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
# and want to reuse the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE =
USE_MDFILE_AS_MAINPAGE =
README.md
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# Configuration options related to source browsing
# Configuration options related to source browsing
...
...
This diff is collapsed.
Click to expand it.
README.md
+
50
−
0
View file @
ccc68b32
Ball Tracking Code
Ball Tracking Code
==================
==================
This library for ball tracking contains the implementation of the methods presented on this
[
paper
](
https://www.mdpi.com/2218-6581/8/4/90
)
. Some of the design goals of the library are:
*
Support different camera hardware
*
Support different algorithms along the pipeline for object detection
*
Easy to configure from a configuration file (JSON format)
*
Publisher-Subscriber architecture servers for the vision system
*
The algorithms can run on a CPU or GPU
### Support for different camera hardware
*
The camera support is implemented in a separate library called
[
libcamera
](
https://gitlab.tuebingen.mpg.de/sgomez/camera
)
.
*
At the time of this writing we only implemented the
**PvAPI**
interface for Prosillica cameras.
*
To support new cameras you only need to implement a class that Inherits from
**CamSetDriver**
*
Objects from the CamSetDriver class receive the camera set configuration and a callback to be called
when new images are received.
## Algorithm Pipeline
Implemented in "tracker.hpp":
*
**BallLogLikelihood**
: Receives an image and returns a likelihood image (of each pixel being the ball)
*
**Binarizer**
: Turns the likelihood image into a binary image (Ball, Not ball)
*
**FindBallBlob**
: Returns all candidate locations of the ball
**Note**
: The algorithms used are implemented both in the CPU and the GPU
### Configuration
How do we select:
*
Which algorithms to use on each step of the pipeline
*
The model parameters (when using ML)
*
The hyperparameters of
**Binarizer**
and
**FindBallBlob**
*
If the algorithms should run in the CPU or GPU
We do all that using a configuration file in JSON format. See an example in
[
examples/tracking/cpu_track_conf.json
](
./examples/tracking/cpu_track_conf.json
)
## Publisher - Subscriber
We have two separate important processes that communicate using the Publisher-Subscriber architecture
*
[
server
](
./examples/tracking/server.cpp
)
: Broadcasts the 2D pixel location of the ball in all the images to
all its subscribers
*
[
server3d
](
./examples/tracking/server3d.cpp
)
: Subscribes to the 2D server and broadcasts the 3D position
in world coordinates of the ball to all its subscribers
Both services use configuration files (JSON). You can see examples in the example folder.
## Installation
## Installation
The first step to install this library is to install the pre-requisits. The easiest way to install these
The first step to install this library is to install the pre-requisits. The easiest way to install these
...
...
This diff is collapsed.
Click to expand it.
src/stereo.cpp
+
5
−
1
View file @
ccc68b32
...
@@ -169,8 +169,11 @@ namespace ball_tracking {
...
@@ -169,8 +169,11 @@ namespace ball_tracking {
if
(
curr
.
is_obs
[
i
])
BOOST_LOG_TRIVIAL
(
trace
)
<<
"Obs "
<<
i
<<
": ("
<<
curr
.
obs2d
[
i
][
0
]
<<
", "
<<
curr
.
obs2d
[
i
][
1
]
<<
")"
;
if
(
curr
.
is_obs
[
i
])
BOOST_LOG_TRIVIAL
(
trace
)
<<
"Obs "
<<
i
<<
": ("
<<
curr
.
obs2d
[
i
][
0
]
<<
", "
<<
curr
.
obs2d
[
i
][
1
]
<<
")"
;
else
BOOST_LOG_TRIVIAL
(
trace
)
<<
"Obs "
<<
i
<<
": null"
;
else
BOOST_LOG_TRIVIAL
(
trace
)
<<
"Obs "
<<
i
<<
": null"
;
}
}
robotics
::
pt3d
pos3d
;
robotics
::
pt3d
pos3d
;
auto
t1
=
std
::
chrono
::
high_resolution_clock
::
now
();
bool
success
=
stereo
(
pos3d
,
curr
);
bool
success
=
stereo
(
pos3d
,
curr
);
auto
t2
=
std
::
chrono
::
high_resolution_clock
::
now
();
double
proc_time
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
milliseconds
>
(
t2
-
t1
).
count
();
zmqpp
::
message
out
;
zmqpp
::
message
out
;
json
out_obs
;
json
out_obs
;
if
(
success
)
{
if
(
success
)
{
...
@@ -179,6 +182,7 @@ namespace ball_tracking {
...
@@ -179,6 +182,7 @@ namespace ball_tracking {
json
out_msg
{
json
out_msg
{
{
"num"
,
num
},
{
"num"
,
num
},
{
"time"
,
time
},
{
"time"
,
time
},
{
"proc_time"
,
proc_time
},
{
"obs"
,
out_obs
}
{
"obs"
,
out_obs
}
};
};
BOOST_LOG_TRIVIAL
(
trace
)
<<
"Sending message: "
<<
out_msg
.
dump
();
BOOST_LOG_TRIVIAL
(
trace
)
<<
"Sending message: "
<<
out_msg
.
dump
();
...
...
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