<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>3D Tracking Using Smartphones for a Marker-Based Optical Motion Capture System</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kengo Teramoto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ryo Mukainakano</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hiroki Watanabe</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hiromichi Hashizume</string-name>
          <email>has@nii.ac.jp</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Masanori Sugimoto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Hokkaido University</institution>
          ,
          <addr-line>Sapporo 060-0814</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National Institute of Informatics, Tokyo</institution>
          ,
          <addr-line>101-8430</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Our research group is developing a marker-based optical motion capture system using smartphones in a mobile setting. The proposed system can be realized with low cost, high accuracy of measurement, and can be easily deployed. This paper describes a 3D tracking technique using smartphones, which is one of the key parts of the proposed motion capture system. The system requires multiple smartphones, an LED light source, and speakers. The 3D coordinates of the cameras are obtained by acoustic localization, and the 3D coordinates of the markers are obtained by the principle of triangulation from the obtained images and the 3D coordinates of the smartphones. 3D tracking experiments using two smartphones in xed settings con rmed that the proposed system could achieve millimeter-level accuracy. Its 3D tracking performance in a handheld setting was also tested.</p>
      </abstract>
      <kwd-group>
        <kwd>3D tracking</kwd>
        <kwd>Motion capture</kwd>
        <kwd>Smartphone</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>A motion capture system (MCS) is used in scenarios such as sports science,
medical research, the creation of CG models in games, and movies. Among them, a
marker-based optical MCS is the most popular MCS because it can measure with
high accuracy. However, the commercialized optical MCS is extremely expensive
at a cost ranging from tens to hundreds of thousands of US dollars. In addition,
it is necessary to accurately measure the positional relationship between
multiple cameras, requiring high deployment costs. As a result, such systems are
usually used in a xed nonmobile setting. In contrast, smartphones have become
ubiquitous in today's world. Smartphones contain different types of sensors such
as cameras, speakers, microphones, and inertial sensors, and they can be used
for various applications. Our research group is developing an MCS using
smartphones, thereby making the system mobile. The proposed system can be realized
at a low cost because it employs users' smartphones, an LED light source, and
three loudspeakers. Moreover, the proposed system can measure the positions of
markers with high accuracy and can be easily deployed without manually
measuring the positional relationship between cameras. This paper evaluated the
performance of one of the key technologies of the proposed system, 3D
tracking, and con rmed that it could achieve millimeter-level accuracy in estimating
the 3D positions of moving markers. The system was also tested in a handheld
setting to verify its 3D tracking performance.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        There are various types of MCSs; those using cameras are called optical MCSs
and comprise two major types. One is marker-based (e.g., [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]), in which the
3D coordinates of the markers attached to a human body are calculated by the
principle of triangulation using images captured with multiple cameras. Some
MCSs implementing high resolution and high frame rate cameras can accurately
capture high-speed motions, and it is also possible to capture multiperson
motions simultaneously in a wide indoor space. However, if the markers enter a
blind spot, they cannot be detected. To alleviate this problem, the number of
cameras must be increased. The other MCS type is markerless and does not
require a marker to be attached to subjects (e.g., [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]). The regions of subjects
are extracted from photographed images by using image recognition techniques,
and their 3D movement is estimated by tracking them in real time. Although
the markerless type has the advantage that it can reduce the physical burdens
of subjects, its measurement accuracy does not achieve that of the marker-based
MCS. The markerless MCS using smartphones with built-in camera was
proposed by Wang et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Through experiments on tracking a moving person,
the average error in 500 frames was reported to be 4.23 cm; however, the authors
did not discuss deployment issues related to smartphone localization. Another
example of an MCS using smartphones was proposed by Pascu et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. In their
system, smartphones are attached to various parts of a person's body to capture
motions through the smartphone's built-in acceleration sensors.
3
3.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Proposed System</title>
      <sec id="sec-3-1">
        <title>System Overview</title>
        <p>A marker-based optical type MCS was investigated to achieve higher accuracy
in a mobile setting. The proposed system mainly performs three processes. The
rst process is to perform localization of smartphones and obtain their 3D
positional relationship. The second process is to conduct the frame interpolation
between smartphones so that captured images by different smartphone cameras
are time-synchronized. The third process determines the 3D positions of markers
to be attached to a person's body and captured by each smartphone using
triangulation. This paper describes the current implementation status of the system
using two smartphones.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Smartphone Localization</title>
        <p>
          For the localization of the smartphones, the time-of-arrival (ToA) trilateration
method [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] using optical and acoustic signals was used. To perform time
synchronization between smartphones and a transmitter, optical and acoustic signals are
simultaneously transmitted from the transmitter. In addition, the signals are
respectively received by a camera and a microphone built into the smartphone.
The transmitter is composed of one LED light source and three loudspeakers.
The frequency of the optical signal is set to one-third of the camera frame rate.
The phase of the optical signal is detected by the three-point demodulation
method [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] and is used as a reference point for time synchronization between
the transmitter and smartphones. An acoustic signal emitted from each speaker
is called a sync pattern having two sinusoidal waves with different frequencies
and lasting 4 ms. A method called FDM-PAM [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] can accurately detect the
signal reception time and estimate the distance between the speaker and
smartphones. By conducting ToA trilateration using three speakers, the 3D positions
of smartphones are identi ed.
3.3
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>Frame Interpolation</title>
        <p>Although a reference point of time synchronization for ToA trilateration is
accurately identi ed by individual smartphone cameras as discussed in Section
3.2, their shutter timings are different from each other. In Fig. 1, differences
between a signal emission time of an LED light and shutter timings of smartphones
1 and 2 are obtained as t1d and t2d, respectively. Therefore, a moving target is
captured at different times by different smartphones, which produces
localization errors. To solve the problem, a frame interpolation method is applied to
obtain the target image at the same timing by different smartphones,</p>
        <p>
          As shown in Fig. 1, a target is captured at the k-th frame by the smartphone
1 and k′ -th frame by the smartphone 2, and the difference between their shutter
timings is t2d t1d. Suppose that the positions of the target are given as (u1;k; v1;k)
and (u2;k′ ; v2;k′ ) in the images captured by the smartphones 1 and 2, respectively.
By conducting linear interpolation using the k′ -th and (k′ + 1)-th frames of the
smartphone 2, an interpolated target position (ui12;k+1; v1i2;k+1) corresponding the
(k + 1)-th frame of the smartphone 1 is estimated as
1
ui12;k+1 = (u2;k′ +1 u2;k′ )f2C ( f C (t2d t1d))
1
1
v1i2;k+1 = (v2;k′ +1 v2;k′ )f2C ( f C (t2d t1d));
1
where f1C and f2C are camera frame rates of the smartphones 1 and 2,
respectively.
When internal and external parameters of cameras are known, the 3D
coordinates of markers on the images captured by cameras are determined. The
internal parameters are those related to focal length, image center, and
distortion, and the external parameters are those related to rotation and translation.
The internal parameter matrices A1 and A2 of two smartphone cameras are
assumed to be known using the camera calibration method [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. The external
parameter matrices [R1jt1] and [R2jt2] of the smartphone cameras are composed
of translational and rotational components, respectively. The former is related
to the positions of the cameras and obtained through the localization method
described in the previous section. The latter is related to the orientation and
pose of the cameras and obtained by using built-in inertial sensors such as an
accelerometer, gyroscope and magnetic sensor. It is also possible to use a visual
marker attached at a neighboring area to the LED light (Fig. 3) and captured
by the camera to increase the level of the estimation accuracy of the rotational
components. By using the internal and external parameter matrices, perspective
projection matrices are given as P1 and P2. Suppose (u1; v1) and (u2; v2) in the
image plane of the two smartphones are a target point Qw = (Xw; Yw; Zw)T in
the world coordinate. Then, the following equations (1) and (2) related to the
3D coordinates of the target point hold.
(p1;31u1 p1;11)Xw+(p1;32u1 p1;12)Yw+(p1;33u1 p1;13)Zw = p1;14 p1;34u1 (1)
(p1;31v1 p1;21)Xw+(p1;32v1 p1;22)Yw+(p1;33v1 p1;23)Zw = p1;24 p1;34v1; (2)
where Pi (i=1,2) is given as
        </p>
        <p>2pi;11 pi;12 pi;13 pi;143
Pi = 4pi;21 pi;22 pi;23 pi;245 :</p>
        <p>pi;31 pi;32 pi;33 pi;34</p>
        <p>Qw is found by solving b = BQw, where B and b are given as Eqs. (4).
The least squares solution of the target point Q^w is given by Eq. (5). B+ is
the pseudo-inverse of B, and this method can be applied when the number of
cameras is three or more.</p>
        <p>2p1;31u1
B = 664pp21;;3311uv12
p2;31v2
p1;11 p1;32u1
p1;21 p1;32v1
p2;11 p2;32u2
p2;21 p2;32v2
p1;12 p1;33u1
p1;22 p1;33v1
p2;12 p2;33u2
p2;22 p2;33v2
p1;133</p>
        <p>2p1;14
p1;23 77 ; b = 664pp21;;1244
p2;135
p2;23 p2;24
p1;34u13
p1;34v1 7
p2;34u257
p2;34v2
^</p>
        <p>Qw = B+b; B+ = (BT B) 1BT
Ideally, once the transmitter and smartphones are synchronized, the proposed
method can conduct ToA trilateration for tracking smartphone positions by
(3)
(4)
(5)
using only acoustic signals as discussed in Section 3.2. However, this is not
possible in practice. Fig. 2 shows the phase values of optical signals acquired by
the left smartphone in 30-s measurements; it was con rmed that the phase value
changed during the measurements. The working frame rate of the smartphone
camera of 60.001 fps, despite having set the rate to exactly 60.0 fps, affected the
phase value. As a result, the standard deviations of the smartphone localization
in the measurements deteriorated, as shown in Table 1 (\without calibration").</p>
        <p>Fig. 2 shows that the phase value changes at a constant rate. Thus, it is
possible to conduct calibration by linear regression. In Table 1, \with calibration"
means using a smartphone with the calibration by linear regression, and \FG
synchronized" means that the optical signal generated by a function generator
was accurately set to one-third of the smartphone camera's frame rate (60.001
fps). The table shows that the localization results of the smartphone calibrated
by linear regression were improved to almost the same level as the localization
results of the FG synchronized smartphone and that the calibration by linear
regression proved to be effective. In our investigation, because actual frame rates
set to 60 fps differed between smartphones, their frame rates should be measured
and the linear regression for each smartphone should be conducted.</p>
        <p>X Y Z
with calibration 2.79 3.511 2.27
without calibration 14.63 26.19 35.73</p>
        <p>FG synchronized 2.77 2.87 3.46
The experimental setting is shown in Fig. 3. Two smartphones (iPhone 6s Plus)
were used for tracking two color markers attached to a moving square bar
under a uorescent lamp in a room. A transmitter was placed at a line-of-sight
position from the smartphones so they could capture transmitted optical and
acoustic signals. Then, three speakers (FT200D, Fostex) mounted on the
transmitter formed an equilateral triangle with a side length (baseline) of 300 mm,
and the light source consisting of 56 white LEDs (OSW54L5111P, OptoSupply)
was placed at the center of the triangle. The smartphone cameras had 1920 x
1080 pixels and were operated at 60 fps. Then, 20 Hz sinusoidal signals whose
frequency was one-third of the camera frame rate were generated by a function
generator (WF1948, NF Corporation) and emitted from the LED light. Sync
patterns transmitted from the three speakers were composed of a pair of
sinusoidal waves whose frequencies were 12.75 and 13.25 kHz, 13.75 and 14.25 kHz,
and 14.75 and 15.25 kHz, respectively. As they were emitted every 0.2 seconds
so the position update rate of the smartphones was 5 Hz. The linear regression
was conducted to compensate the clock difference between the smartphone as
discussed in Section 4.1.</p>
        <p>By receiving signals from the transmitter, the 3D position of each
smartphone was calculated. Then, the position, pose, and captured image data were
transferred from the smartphone to a PC via WiFi. The application software
running on the smartphones was implemented using Swift 4. The 3D position
estimation of markers was conducted using OpenCV 4.0 on the PC, and the
measurements were carried out 10 times.</p>
        <p>Two smartphone settings were tested in the experiments:
Experiment1 xed on a tripod as shown in Fig. 3, and
Experiment2 held by a user.</p>
        <p>The baseline between the two tripods was set to 0.39 m in Experiment 1 and users
holding a smartphone stood at the same positions of the tripods in Experiment 2.
The distance between the markers and smartphones ranged from 0.94 m to 1.04
m. Tracking results obtained by the proposed system were compared with those
by a high-performance and commercially off-the-shelf motion capture system
(MAC3D System, Motion Analysis Corporation) composed of 6 cameras (600 fps,
2048 x 1088 pixels) as the reference system. 3D tracking errors of the proposed
system were given as differences of estimated marker 3D positions from the
reference system.
4.3</p>
      </sec>
      <sec id="sec-3-4">
        <title>Experiment 1: Fixed on a Tripod</title>
        <p>
          Fig. 4, Fig. 5 and Table 2 show the tracking results. In Fig. 4 (a) and (b), the
bar was translated quickly (captured frames: 27) and slowly (captured frames:
82) in the horizontal direction. As shown in Table 2, root means square
errors (RMSEs) of the marker tracking were 7.15 mm (marker1, quick), 5.44 mm
(marker2, quick), 2.20 mm (marker1, quick) and 1.93 mm (marker2, slow),
respectively, without applying the frame interpolation method. The improvement
of the tracking performance ranged from 0.01 to 1.99 mm with this method. Fig.
5 (a) and (b) show the results when the bar was translated quickly (captured
frames: 21) and slowly (captured frames: 75) in the vertical direction. As shown
in Table 2, RMSEs were 1.89 mm (marker1, quick), 2.33 mm (marker2, quick),
2.77 mm (marker1, quick) and 1.34 mm (marker2, slow), respectively, without
applying the frame interpolation method. The improvement of the tracking
performance ranged from 0.10 to 0.34 mm with the frame interpolation. Fig. 6 shows
trajectories of the markers translated quickly and vertically (Fig. 5(a)). From
the gure, the estimated trajectories are more unstable in the z-axis (depth)
direction than in the x and y-axis directions. According to the theory of dilution
of precision (DOP) [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] discussed in global navigation satellite system (GNSS)
communities, the greater scattering along the z-axis was related to the shorter
distance (baseline, 0.39 m) between the smartphones than that between the
markers and the smartphones (0.97 - 1.04 m). By extending the baseline and
increasing the number of smartphones, the localization results would be more
stable and robust to the position estimation errors of smartphones, which tells
us a design guideline of the proposed system to ful ll a required level of the
performance.
Each user was asked to stand still, and capture a single marker moving
horizontally (captured frames: 51) using a handheld smartphone. The RMSE of the
tracking was 168.28 mm without the frame interpolation, which was slightly
improved to 153.79 mm with it. One of the causes of the performance
deterioration was related to inaccurate 3D localization of the smartphones which were
unstably held. The inaccuracy seemed signi cantly affected the marker tracking
results. Further investigations are being conducted.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion and Future Work</title>
      <p>This paper proposed a 3D tracking system using smartphones for a
markerbased optical MCS in a mobile setting. The proposed system did not request the
positions of the cameras to be set manually and could estimate them
automatically by ToA trilateration using optical and acoustic signals. The experimental
results showed that the proposed system could achieve 3D position estimation
of markers with millimeter-level accuracy in xed settings. A number of issues
remain to be investigated in our future work. The next step is to extend the
current system with more than two smartphones toward more accurate and precise
motion-capture systems.
3
2
1
0
1
2
5
marker 1
x
5numbe1r0 of fra1m5es
marker 2
om ]m
tfr [m2
n t
e in1
cem gpo0
la i</p>
      <p>n
p t</p>
      <p>r
isD ts-1</p>
      <p>a
om ]m
tfr [m2
n t
e in1
cem gpo0
la i</p>
      <p>n
p t</p>
      <p>r
isD tsa-1
20
20
. proposed system
(w/o interpolation)
. reference system
20</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>OptiTrack. "OptiTrack - Motion Capture Systems</surname>
          </string-name>
          <article-title>"</article-title>
          . OptiTrack. https://optitrack.com/, (accessed
          <year>2018</year>
          -
          <volume>11</volume>
          -01).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Tracklab</surname>
          </string-name>
          .
          <article-title>"Organic Motion OpenStage 2.0 - Tracklab"</article-title>
          . Tracklab. https://tracklab.com.au/products/hardware/organic-motion-openstage-2-0/, (accessed
          <year>2018</year>
          -
          <volume>11</volume>
          -01).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Tong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Dai</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Tan</surname>
          </string-name>
          .
          <article-title>"Outdoor Markerless Motion Capture with Sparse Handheld Video Cameras"</article-title>
          .
          <source>IEEE Transactions on Visualization and Computer Graphics</source>
          , vol.
          <volume>24</volume>
          , no.
          <issue>5</issue>
          , pp.
          <fpage>1856</fpage>
          -
          <lpage>1866</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>T.</given-names>
            <surname>Pascu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>White</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Z.</given-names>
            <surname>Patoli</surname>
          </string-name>
          .
          <article-title>"Motion Capture and Activity Tracking using Smartphone-driven Body Sensor Networks"</article-title>
          .
          <source>In Proceedings of INTECH</source>
          <year>2013</year>
          , London, UK, pp.
          <fpage>456</fpage>
          -
          <lpage>462</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>T.</given-names>
            <surname>Akiyama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Sugimoto</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Hashizume</surname>
          </string-name>
          .
          <article-title>"Time-of-arrival-based Smartphone Localization Using Visible Light Communication"</article-title>
          .
          <source>In Proceedings of IPIN</source>
          <year>2017</year>
          , Sapporo, Japan, DOI:10.1109/IPIN.
          <year>2017</year>
          .
          <volume>8115904</volume>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>M.</given-names>
            <surname>Nakamura</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Akiyama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Sugimoto</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Hashizume</surname>
          </string-name>
          ,
          <article-title>"FDM-PAM: Rapid and Precise Indoor 3D Localization using Acoustic Signal for Smartphone"</article-title>
          .
          <source>In Proceedings of UbiComp 2014 Adjunct</source>
          , Seattle, WA, pp.
          <fpage>123</fpage>
          -
          <lpage>126</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <article-title>"A exible new technique for camera calibration"</article-title>
          .
          <source>IEEE Transactions on Pattern Analysis and Machine Intelligence</source>
          . vol.
          <volume>22</volume>
          , no.
          <issue>11</issue>
          , pp.
          <fpage>1330</fpage>
          -
          <lpage>1334</lpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>R.B.</given-names>
            <surname>Langley</surname>
          </string-name>
          ,
          <article-title>"Dilution of precision"</article-title>
          .
          <source>GPS World</source>
          , vol.
          <volume>10</volume>
          , no.
          <issue>5</issue>
          , pp.
          <fpage>52</fpage>
          -
          <lpage>59</lpage>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>