Professional Documents
Culture Documents
Abstract—This paper presents an improvement to the PY3D task at a time. The pipeline technique is also introduced to
Visual Odometry Algorithm aiming for real time embeded optimize processor downtime. Using the parallelism model
solutions. The availability of Multicore Systems on Chip de- becomes very useful for processing large amounts of in-
mand new software aproaches in order better benefit from formation quickly and efficiently. This method has other
the computacional power. In new complex digital systems inherent advantages due to the division of processing tasks
designs, power consumption is a severe retriction and clock and, one of the most important is the ability to distribute pro-
frequency limitation pushes to the parallelism expoitation in cessing on existing CPU cores. This distribution allows for
order to cope with computational intensive applications such as maximum utilization of the resources available to perform
vision. We propose parallel branches by hardware replication the processing, achieving considerable performance gains,
when there is no data dependency in a two stages pipeline in the case of this article the around 50 percent compared
to complete the algotithm. The proposal minimizes downtime to serialized version.
during processing thus seeking better performances. The tests It can be highlighted some works that used this technic
performed, applying the proposed method, were extracted with for performance improvements. Zhang cite c1 ’s work
good results, reaching twice the processing speed performed stands out parallel feature used on NVIDIA GPUs, the
by the original algorithm. The conclusion that the method implementation was centralized on the consumption step,
is promising can yield even more guaranteed gains, expand- calculating particle weight, and improving response time
ing image subdivisions and applying parallel processing. The [1]. Another recent method proposed for better response
number of cores that a processor can provide can also help to time for visual SLAM was proposed by Pereira [2], the
achieve even better performance gains. proposal was to modify SLAR Direct Sparse Odometer
(DSO) and implement code parallelization techniques us-
1. Introduction ing OpenMP, an API which support multi-platform shared
memory multiprocessing programming, several policy-based
code modifications have been made to make the SLAM
Currently, one of the relevant topics is Visual Simultane-
algorithm considerably faster.
ous Localization and Mapping (VSLAM) due to numerous
advantages over other existing methods, such as: cost; acces- This article is structured as follows, starting with related
sibility; precision; dependence on external signals, among works session where an explanation of the work is made
others. Its application can also be highlighted in: robotics, and a brief comparison with the proposed method. In the
augmented reality, Virtual applications. following, we have a problem definition session of that
One of the problems with this type of application is the contextualizing and defining the problem to be dealt with,
high response time. Applications that use this technology right after we have overview of the proposal explaining the
face many challenges, and one of the most pertinent is method didactically, we also have a design and implemen-
optimization and processing speed. This article proposes a tation section technically explaining the work done. And a
method to minimize this problem through parallel process- session of experiments and results, where the presented and
ing, making it possible so you can perform more than one discussed and, finally, a conclusion session.
2. Related Works simplicity and more compact. Another classification related
to visual odometry refers to the way information is pro-
The proposed method in this paper has as reference the cessed, which can follow two main lines: direct method and
works that also use parallelism to obtain performance gains, indirect method. [5] [6]
as already mentioned, the work by Pereira [2] which use the In the method used, direct information coming directly
OpenMP library to perform this task. The proposal of this from the camera, and not indirect, there is a pre-processing
paper doesn’t use library ready to execution parallel, but step of the images received by the camera, generating inter-
proposes an algorithm that parallelizes parts of the code to mediate values that will be used in a second step referring to
obtain better response times. the probabilistic model. In the project, the indirect method
In the work by Zhang [1] takes parallel processing to was followed, generating geometric measures, such as points
Graphics Processing Uni (GPU). Using NVIDIA graph- and vectors, performing a geometric optimization, which
ics card and using Compute Unified Device Architecture in the case of the direct method is defined as photometric
(CUDA) to achieve performance gains in Find and Simulta- optimization. [4] [5]
neous Mapping (SLAM) algorithms. Approach that guaran- The last definition made for this work concerns the
tees considerable performance gains by taking into account amount of sampled points that would be used. There are
specific hardware for calculations. At the proposed work basically three levels of sampling: sparse, semi-dense and
or parallelism is being performed on the CPU, not using dense methods. The sparse methods use a limited amount
auxiliary hardware to perform the calculations required to of strategic image points, such as corners and edges in
perform parallelism. Fig ??, we have an example of the sparse method. There
In the ENGEL [5] article, a method of visual odometry is no correlation between these points. In dense methods,
that uses a straightforward and sparse monocular configu- the objective is to capture as many points as possible in the
ration is presented, a combination indicated by him as the image, making a correlation between them. The project was
best for real-time applications. But for more robust appli- proposed followed by algorithms that implement the sparse
cations, the indirect method such as the one displayed for method. [5]
FORSTER [6] article that proposed the SVO method: Semi-
Direct Visual Odometry for Monocular and Multicamera, a
probabilistic depth estimation algorithm, is indicated that
allows us track corners and weak edges in environments
with little or high-frequency texture.
Another relevant proposal is the work of Mur-Artal
[3], a robust system that implements the visual odometry
algorithm. In this one of the relevant points that can be
highlighted are the good results presented regarding the
automatic corrections in difficult situations of movement Figure 1. Sparse sampling levels
disturbances.
One of the works that was researched and used as a For obtain performance gains in the reconstruction of
reference and from material supply for the experiments three-dimensional maps using the monocular visual odome-
was KITTI(Karlsruhe Institute of Technology) dataset. The try sparse method. It is proposed to divide the input images
project collected images using a car equipped with two color into four parts to be processed in parallel, and each part of
cameras and two PointGrey Flea2 grayscale video cameras the image to be processed in two steps: extraction of points
(10 Hz, resolution: 1392 x 512 pixels, aperture: 90 degrees of interest and calculation of descriptors. The purpose of
x 35 degrees), a scanner Velodyne HDL-64E 3D laser (10 separating the method into two distinct steps is to be able to
Hz, 64-ray laser, range: 100 m), a GPS / IMU tracking unit perform in the pipeline. When an image’s processing stage
with RTK correction signals (open sky tracking errors ¡ 5 is already in the second step, a next image can be called
cm) and a computer activated in the Real-time database. to run the first stage of calculations. Therefore minimizing
Collecting a total of 3 Tera Bytes of data approximately. downtime in the execution stream.
[10]
4. Proposal Overview
3. Problem definition
To process the images in the proposed method, initially
The algorithms that implement the visual odometry the images are subdivided, so that each part of the image is
method aim to allow an agent to estimate its spatial location processed in a new thread, unlike the traditional method
using only visual information captured by cameras. There in which the images are processed entirely in a single
are variations in the technique that can be used, one of which master thread. In Fig. 2 represents the subdivisions made
would be how to catch the images, that can follow three to the images in this job. For the tests, 4 subdivisions were
different lines: monocular, stereo and omnidirectional. The produced that can be scaled to new subdivisions in the
project in question will be developed using the monocular future, depending on the processing cores existing in the
method as it is a more attractive method in terms of cost, hardware used. The images used to carry out the experiments
were taken from the KITTI data set, a comparative refer- 5. Design and Implementation
ence set for visual odometry, which consists of 22 stereo
sequences with 11 sequences of real training trajectories and For implementation, modifications were made to the
11 unconfirmed soil sequences for evaluation. [10] PY3D visual odometry software developed by the Signal
and Image Processing Laboratory (LaPSI) which is part of
the Department of Electrical Engineering (DELET) and the
Graduate Program in Electrical Engineering (PPGEE) of the
Federal University. from Rio Grande do Sul (UFRGS). In
this algorithm 3 main modifications were made:
• Implementation of image subdivisions;
• New offset calculations and image size;
• Code separation in two stages for parallelization.
Generate the 3D map of the environment, which are:
Figure 2. image subdivisions for parallel processing frame and camera position, these two inputs are necessary to
be able to perform the calculations inherent to the process, in
To obtain even better performance gains, a pipeline Fig. 4 the step is illustrated and then it proceeds to the image
for the algorithm was also implemented. For this part, the subdivision stage. For the tests, a loop was implemented
main tasks of the algorithm were subdivided into two large that loads the images from the kitty data set and also the
groups called: stage 1 and stage 2. These steps contain positions of the camera. For this implementation, was used
the tasks with the longest response time for processing the of the python language and the opencv library were used to
algorithm, which should in its final step generate a 3D map handle the images.
of the environment. Stage 1 contains the features extraction
calculation, in which the Shi-Tomasi algorithm is used to
detect the detection of corners in the image. In stage 2,
the task of tracking the features extracted in stage 1 is
assigned, in the next image, Lucas Kanade’s algorithm was
used for this task. The implementation of the pipeline allows
parallel processing from phase 1 to phase 2, by the time the
features are being tracked in phase 2, it is already possible
to be extracting a new features in the next image. In Fig
ref fig: pipeline is to apply a diagram of the operation
flow of the proposed method. Can be seen: image capture,
Figure 4. Image Capture
image subdivision, point extraction block (step 1), descriptor
calculation block (step 2). Each stage is promoted to a new In the original algortimo flow everything is done in a
chain so that each stage can be processed in parallel. single master thread as seen in Fig. 5.