Graphics Reference
In-Depth Information
Table 8.3 Tic-Tac-Tandroid
code profiling
Tic-Tac-Tandroid code blocks
Average execution
times in Java [ms]
Image color formatting
18.0
Luma extraction (Green)
3.3
Gradients (Sobel, L 1 )
25.6
Board segmentation
7.5
Symbol detection
8.5
AI
0.1
Graphics and display
4.1
Other
145.5
Java. Table 8.3 contains the results of code profiling, presenting the averages over
100 frames of steady-state operation. The camera images we use have a resolution
of 240
320.
From this information we concluded that the best candidate for initial experiments
withNeon vision acceleration is the block that calculates gradients, because this block
is SIMD-friendly and is the longest pole in the tent among vision blocks.
UncannyCV Neon Library. In order to avoid reinventing the wheel, we looked
for available vision libraries for Neon and found the UncannyCV library by Uncan-
nyVision [ 16 ]. We obtained an evaluation copy and learned that this library offers
a wide range of low-level vision functions accelerated on Neon: convolution ker-
nels for various data types, morphological operations, image resizing, rotation, and
transpose, color conversions, integral image, Sobel and Canny edge detection, lens
distortion correction, Hough transform for lines, Harris corners, etc.
Comparing Performance on ARM and Neon . Next we present the measure-
ment results of average and minimum execution times for the edge detection kernels
processing a 240
×
320-pixel image. The reason we include the minimum times is to
provide additional data to those researchers who may be able to prevent the operating
system from interrupting the image processing tasks.We also present the average exe-
cution times for each video frame at the app level. We called UncannyCV functions
using the Java SDK tools, which is different from what was originally intended—to
be called from theAndroidNDK tools. This probably explains the difference between
the anticipated execution time of Sobel on a 240
×
320 image (0.5ms) [ 16 ] and the
execution times we measured: on average 11.4ms, and the minimum was 1.9ms. In
the following tables we present the results of our measurements. We measured the
performance of Roberts and Sobel edge detection in Java SDK on ARM and Sobel
and Canny edge detection using UncannyCV Neon code when called from Java
SDK. We measured average execution times (Table 8.4 ), minimum execution times
(Table 8.5 ), and average app execution times (Table 8.6 ) as the app uses different
approaches and different cores to calculate the results.
In conclusion, thanks to the generous support from Uncanny Vision, we were
able to demonstrate the benefits of implementing gradients on Neon instead on the
×
 
Search WWH ::




Custom Search