Graphics Reference
In-Depth Information
As the mobile platform in this project we use the HTC Inspire 4G, a smart phone
with a single core, 1GHz Qualcomm Snapdragon S2 MSM8255 application proces-
sor. ItsmainCPUhas Qualcomm's Scorpion architecture, similar to theARMCortex-
A8 and Cortex-A9 CPU cores. The device is running Android version 2.3.3. While its
camera produces images with 8 mega pixel resolution, we used the preview images
which are 240
×
320.
8.2.1 Edge Detection
Inspired by biological vision [ 6 - 8 ], in which edge detection has a fundamental role
[ 9 ], we started by looking at the ways we could apply gradients to accomplish our
goal of giving our app the power of “seeing.” Since we were focusing on a mobile
implementation, we started with the computationally least expensive implementation
of gradients. If the camera image is given by matrix A , its x - and y -gradients are
conveniently defined as [ 10 ]:
G x (
i
,
j
) =
A
(
i
,
j
+
1
)
A
(
i
,
j
1
)
G y (
i
,
j
) =
A
(
i
+
1
,
j
)
A
(
i
1
,
j
)
In order to continue the analysis with the minimum computational complexity,
instead of the standard L 2 gradient magnitude (which involves square roots, which are
computationally expensive on a mobile device and use more power than necessary),
we focused on an alternative, L 1 magnitude gradient:
G m =|
G x |+|
G y |
Another approximation we applied in order to save on computations and battery
life was the use of the green image component provided by the camera instead of
calculating the luminance. This approximation works well as long as the ink in
the game is not bright green and thus, practically indistinguishable from the white
background in the green channel.
8.2.2 Tic-Tac-Tandroid Vision
Board detection . The first vision block specific to tic-tac-toe is the detection of the
game board, which is composed of four lines—two vertical and two horizontal. This
simple arrangement, along with manageable camera distortion and nicely thick (but
not too thick) lines, allowed us to locate the tic-tac-toe board and its cells in a fairly
simple manner, as illustrated in the screenshot in Fig. 8.2 :
Search WWH ::




Custom Search