<!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>High Performance GPU-Based Preprocessing for Time-of-Flight Imaging in Medical Applications</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jakob Wasza</string-name>
          <email>jakob.wasza@informatik.uni-erlangen.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sebastian Bauer</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Joachim Hornegger</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Erlangen Graduate School in Advanced Optical Technologies</institution>
          ,
          <addr-line>SAOT</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Pattern Recognition Lab, Friedrich-Alexander University Erlangen-Nuremberg</institution>
        </aff>
      </contrib-group>
      <fpage>324</fpage>
      <lpage>328</lpage>
      <abstract>
        <p>Time-of-Flight (ToF) imaging is a promising technology for real-time metric surface acquisition and has recently been proposed for a variety of medical applications. However, due to limitations of the sensor, range data from ToF cameras are subject to noise and contain invalid outliers. In this paper, we discuss a real-time capable framework for ToF preprocessing in a medical environment. The contribution of this work is threefold. First, we address the restoration of invalid measurements that typically occur with specular reflections on wet organ surfaces. Second, we compare the conventional bilateral filter with the recently introduced concept of guided image filtering for edge preserving de-noising. Third, we have implemented the pipeline on the graphics processing unit (GPU), enabling high-quality preprocessing in real-time. In experiments, the framework achieved a depth accuracy of 0.8 mm (1.4 mm) on synthetic (real) data, at a total runtime of 40 ms.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Recent advances in Time-of-Flight (ToF) imaging have opened new perspectives
for its use in medical engineering. In particular, the resolution (40k points),
frame rate (40 Hz) and validity information provided by the camera hold
potential for medical applications. ToF imaging has, among others, been proposed
for 3D endoscopy [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and intra-operative organ surface registration [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The
inherent high degree of accuracy for these tasks requires a preprocessing pipeline
to cope with the noisy and corrupted data obtained from the ToF sensor. Even
though a proper sensor calibration [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] can be used to eliminate systematic
errors, de-noising provides the fundamental basis to produce steady and reliable
surface data. At this, temporal averaging and edge preserving filters are
commonly used [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]. One issue that cannot be addressed by conventional filters is
the elimination of invalid depth values caused by specular reflections that lead
to saturated sensor elements. These effects often occur with ToF surface
acquisition of organs due to their shiny and wet surface. In this paper, we propose
to use a spectral domain method known from digital radiography to estimate
the depth information at invalid pixels. As low filter run times are a crucial
factor, we investigate the performance and robustness of the bilateral filter and
the recently introduced guided image filter for edge preserving de-noising. To
ultimately achieve real-time capability, we implemented all filters on the graphics
processing unit (GPU).
2
2.1
      </p>
    </sec>
    <sec id="sec-2">
      <title>Materials and Methods</title>
      <sec id="sec-2-1">
        <title>Preprocessing pipeline</title>
        <p>
          The preprocessing pipeline in this work consists of three modules that operate on
the distance information: (i) defect pixel interpolation, (ii) temporal averaging,
(iii) edge preserving de-noising.
(1)
(2)
(3)
(4)
Defect Pixel Interpolation. In order to correct invalid depth measurements,
we adopt a spectral domain method that was proposed by Aach and Metzler
for defect pixel interpolation in digital radiography [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. The basic assumption
is that the observed corrupted signal g can be expressed as a multiplication of
the ideal signal f with a binary defect mask w given by the validity information
provided by the camera. This corresponds to a convolution (∗) in the frequency
domain
        </p>
        <p>g = f · w ≡ G = F ∗ W
where F ,G and W denote the spectra of f , g and w, respectively. The unknown
complex coefficients of F are then estimated by an iterative spectral
deconvolution scheme and the restored ideal signal is obtained as</p>
        <p>f (x) = g (x) + (1 − w (x)) · fb(x)
where fb denotes the inverse Fourier transform of the estimated spectrum F .
Temporal Averaging. For a frame at time t we perform temporal de-noising
by computing the arithmetic mean of N successive frames gi
ft (x) =
1
N</p>
        <p>t</p>
        <p>X
i=t−N+1
gi (x)
We note that this filter can be implemented in a recursive manner, i.e.
ft (x) =
1
N</p>
        <p>
          (N · ft−1 (x) − gt−N (x) + gt (x))
This formulation provides an effective way to reduce GPU memory usage as not
all N frames have to be stored and accessed. As the evaluation of equation
(4) per pixel x can be executed in parallel, an implementation on the GPU is
straightforward.
Edge Preserving De-Noising. The bilateral filter proposed by Tomasi and
Manduchi [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] is a very popular spatial de-noising filter in ToF imaging. The
discrete version for the Gaussian case can be expressed as
f (x) =
1
Kx y ∈ ωx
        </p>
        <p>
          X g(y) exp
−
kx − yk2
σ2
s
exp
−
|g(x) − g(y)|
σ2
r
where g denotes the input image and ωx denotes a local window centered at
coordinate x. Kx is a normalization factor, σs and σr control the spatial and
range similarity, respectively. Due to its translational-variant kernel this filter
is computationally expensive. Nevertheless, it can be implemented efficiently
on the GPU as the evaluation of equation (5) for all pixels x can be performed
concurrently. In order to cope with boundary conditions and potentially
noncoalesced GPU memory access patterns the input image g is bound as a texture.
Recently, the guided image filter was proposed by He et al. [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. This filter has
a non-approximative linear-time algorithm for edge preserving filtering, thus,
being very promising for real-time ToF preprocessing. The filter output for a
pixel x can eventually be deduced as
f (x) =
        </p>
        <p>1
|ωx| y ∈ ωx</p>
        <p>X ay
!</p>
        <p>I(x) +</p>
        <p>1
|ωx| y ∈ ωx</p>
        <p>
          X by
where ωx denotes a local window centered at x and I denotes the guidance
image. The evaluation of the summations in equation (6) and the estimation
of the coefficients ay and by [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] can be done by using box filters. In turn, box
filtering can be performed efficiently by using integral images which provides the
basis for a linear-time algorithm. We employ the parallel-prefix-sum algorithm
as described in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] for the computation of integral images on the GPU.
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Experiments</title>
        <p>
          In order to assess the accuracy of the presented methods we evaluate the absolute
distance error between a ground truth and a template object on a per-pixel basis.
Synthetic Data. Deciding on a ground truth for the evaluation is a non-trivial
task as the ideal metric surface of the observed object is in general not known.
Therefore, we conduct experiments on simulated distance values reconstructed
from the z-buffer representation of a 3D scene. These values constitute the
unbiased ground truth in this experiment. We then approximate the temporal
noise on a per-pixel basis by adding an individual offset drawn from a normal
distribution with σ = 10 mm and μ = 0 mm. This standard deviation is
motivated by observations on real ToF data. In order to simulate the effect of
amplitude related noise variance and total reflections we additionally corrupt
the distance data by Perlin noise [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. For this study, we rendered a porcine liver
mesh segmented from a CT scan.
(5)
(6)
Real Data. The focus of the real data experiments is the comparison of a
common preprocessing pipeline (temporal averaging, edge preserving de-noising)
with a pipeline that additionally performs defect pixel interpolation. We
conducted the experiment using a PMD CamCube 3.0 with a resolution of 200 × 200
pixels. For the ground truth generation, we averaged 1000 frames acquired from
an uncorrupted liver phantom and applied a bilateral filter with σs = 50 mm and
σr = 5 pixels to smooth out systematic artifacts that could not be corrected by
sensor calibration. We then placed two pieces of aluminum foil onto the phantom
to simulate a reflective surface. Using this corrupted phantom, we assessed the
results of the standard preprocessing pipeline as applied for the ground truth
and the same pipeline performing a defect pixel interpolation as a first step.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Results</title>
      <p>We have implemented the defect pixel interpolation (DPI), temporal
averaging (TA), bilateral filter (BF) and guided image filter (GF) on a Quadro FX
2800M GPU using NVidia’s CUDA technology. Qualitative results for the
defect pixel interpolation on real data are depicted in Fig. 1. Without correction
the corrupted regions show a mean error of 68.4 ± 40.2 mm. Using defect pixel
interpolation we were able to reduce this error to 1.4 ± 1.1 mm. Qualitative and
quantitative results for the filter evaluation on synthetic data are shown in Fig. 2
and Table 1 whereby the error reduction is cumulative across filters while run
times are not. Using the presented preprocessing pipeline we were able to reduce
the mean error across the surface from 6.1 ± 8.2 mm to 0.4 ± 0.6 mm and 0.8 ± 2.1
mm for the bilateral and the guided image filter, respectively. The bilateral filter
shows a better accuracy at very strong edges (Fig. 2). Given a total pipeline
runtime of approximately 40 ms, real-time constraints are satisfied.</p>
      <sec id="sec-3-1">
        <title>Standard</title>
      </sec>
      <sec id="sec-3-2">
        <title>Error map DPI</title>
      </sec>
      <sec id="sec-3-3">
        <title>Error map</title>
        <p>Fig. 1. Defect pixel interpolation on real data.
a
t
a
d
F
o
T
p
a
m
r
o
r
r
E
s
lit
a
e
D</p>
        <p>Raw data</p>
        <p>DPI</p>
        <p>TA</p>
        <p>BF</p>
        <p>GF
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Discussion</title>
      <p>We have presented a real-time capable preprocessing pipeline for ToF imaging
in medical applications. The defect pixel interpolation yielded promising
results with regard to accuracy. Nonetheless, future research has to investigate
alternative spectral domain methods as well as spatial domain methods for the
restoration of invalid depth values. For edge preserving de-noising, guided image
filtering turned out to be an alternative to the bilateral filter. However, the latter
shows a better behavior at sharp edges. Future work has to investigate adaptive
variants of edge preserving filters that additionally account for the amplitude
related noise variance. Concerning runtime issues, we note that even on a current
mid-range GPU real-time constraints can be satisfied. This is a promising result
with regard to next-generation and potentially high-resolution ToF sensors.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Penne</surname>
            <given-names>J</given-names>
          </string-name>
          , Ho¨ller
          <string-name>
            <surname>K</surname>
          </string-name>
          , Stu¨rmer M, et al.
          <article-title>Time-of-flight 3D endoscopy</article-title>
          . Lect Notes Computer Sci.
          <year>2009</year>
          ;
          <volume>5761</volume>
          :
          <fpage>467</fpage>
          -
          <lpage>74</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Seitel</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santos</surname>
            <given-names>T</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mersmann</surname>
            <given-names>S</given-names>
          </string-name>
          , et al.
          <article-title>Time-of-Flight Kameras fu¨r die intraoperative Oberfla¨chenerfassung</article-title>
          .
          <source>Proc BVM</source>
          .
          <year>2010</year>
          ; p.
          <fpage>11</fpage>
          -
          <lpage>5</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Lindner</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schiller</surname>
            <given-names>I</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kolb</surname>
            <given-names>A</given-names>
          </string-name>
          , et al.
          <article-title>Time-of-Flight sensor calibration for accurate range sensing</article-title>
          .
          <source>Comput Vis Image Underst</source>
          .
          <year>2010</year>
          ; p. in press.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Aach</surname>
            <given-names>T</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Metzler</surname>
            <given-names>V</given-names>
          </string-name>
          .
          <article-title>Defect interpolation in digital radiography - how object-oriented transform coding helps</article-title>
          .
          <source>Proc SPIE</source>
          .
          <year>2001</year>
          ;
          <volume>4322</volume>
          :
          <fpage>824</fpage>
          -
          <lpage>35</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Tomasi</surname>
            <given-names>C</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manduchi</surname>
            <given-names>R</given-names>
          </string-name>
          .
          <article-title>Bilateral filtering for gray and color images</article-title>
          .
          <source>Proc ICCV</source>
          .
          <year>1998</year>
          ; p.
          <fpage>839</fpage>
          -
          <lpage>46</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>He</surname>
            <given-names>K</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sun</surname>
            <given-names>J</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tang</surname>
            <given-names>X</given-names>
          </string-name>
          .
          <article-title>Guided image filtering</article-title>
          . Lect Notes Computer Sci.
          <year>2010</year>
          ;
          <volume>6311</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>14</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Harris</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sengupta</surname>
            <given-names>S</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Owens</surname>
            <given-names>JD</given-names>
          </string-name>
          .
          <article-title>Parallel prefix sum (scan) with CUDA</article-title>
          . In: Nguyen H, editor.
          <source>GPU Gems 3</source>
          . Addison Wesley;
          <year>2007</year>
          . p.
          <fpage>1</fpage>
          -
          <lpage>18</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Perlin</surname>
            <given-names>K.</given-names>
          </string-name>
          <article-title>An image synthesizer</article-title>
          .
          <source>SIGGRAPH Comput Graph</source>
          .
          <year>1985</year>
          ;
          <volume>19</volume>
          (
          <issue>3</issue>
          ):
          <fpage>287</fpage>
          -
          <lpage>296</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>