Image Stabilization with Model-Based Tracking for Beating Heart Surgery Gerhard Kurz, Uwe D. Hanebeck Intelligent Sensor-Actuator-Systems Laboratory (ISAS), Institute for Anthropomatics, Karlsruhe Institute of Technology (KIT), Germany Contact: gerhard.kurz@kit.edu, uwe.hanebeck@ieee.org Abstract: Performing surgery on the beating heart has significant advantages compared to cardiopulmonary bypass. However, when performed directly, it is very demanding for the surgeon. As an alternative, using a teleoperated robot for compensating the heart motion has been proposed. As an addition, this paper describes how stabilized images are obtained to create the illusion of operating on a stationary heart. For that purpose, the heart motion is tracked with a stochastic physical model. Based on correspondences obtained by motion tracking, image stabilization is considered as a scattered data interpolation problem. The proposed algorithms are evaluated on a heart phantom and in in-vivo experiments on a porcine heart, which show that there is very little residual motion in the stabilized images. Keywords: physical model, motion compensation, heart tracking, scattered data interpolation, B-Spline 1 Problem Surgery on the heart, for example coronary artery bypass graft (CABG), is commonly performed with cardiopulmonary bypass (CPB). When CPB is used, the heart is stopped and a heart-lung machine is employed to keep the patient alive. However, CPB introduces additional risks for the patient, such as anemia and cellular hypoxia. Furthermore, off-pump surgery has lower costs than surgery with CPB and hospital stays are shorter [1]. Consequently, it is desirable to avoid the use of CPB and to perform operations on the beating heart. Performing surgery on the beating heart is very demanding for the surgeon. Nakamura et al. suggest the use of a teleoperated robot that automatically compensated the movement of the beating heart [2]. In order to give the surgeon the illusion of operating on a stationary heart, image stabilization can be applied to the video stream of the beating heart. In the stabilized video stream, changes to the heart surface like cuts remain visible while the movement of the heart is canceled. In the following, we explain how this goal can be achieved. Different approaches have been attempted to create a stabilized view of the beating heart. Sub-sampling can be used to only show the heart when it is at the desired position. Experiments with an ECG-triggered stroboscopic light have been performed, but the results were unsatisfactory [1]. Some researchers use a global transformation for image stabilization. For example, Stoyanov et al. describe a method that is based on moving a virtual camera in order to compensate for the motion of the heart [3]. Because the heart is affected by non-uniform deformations, global transformations can only pro- vide a limited amount of stabilization [4]. To account for the non-uniform deformation of the heart, local transformations have been proposed. In [4] a geometric transformation based on linear interpolation within the triangles of a Delaunay triangulation is presented. A tracking approach based on thin plate splines is proposed in [5], which can also be used for image stabilization. 2 Methods In order to track the three-dimensional motion of the heart, a trinocular camera system is used to locate landmarks on the heart surface. Various approaches for tracking natural landmarks on the heart surface have been proposed, for example [4] and [6], but regions with insufficient texture and specular reflections make reliable tracking of natural landmarks difficult. Because image stabilization does not depend on whether the landmarks are natural or artificial, we only consider artificial landmarks. In addition to visual information we use a pressure sensor to obtain the pressure inside the left ventricle. Background knowledge about the physical properties of the heart is included by modeling the heart as a linear elastic physical body. This model is based on a system of stochastic partial differential equations and is described in detail in [7]. 239 A state-space model can be obtained by discretizing the continuous model in both space and time. Stochastic filtering techniques can then be applied to estimate the heart motion, while taking into account uncertainties of the measurement process and the model itself. The model is capable of handling both partial and complete occlusions, for example by blood, smoke or surgical instruments. Furthermore, the physical model ensures that only physically plausible movements are possible. The general goal of image stabilization is to remove motion from a video stream while preserving changes to color and texture. A reference image from a certain time step is given and information from the current image is transformed to ap- pear in the reference image. Image Stabilization can be performed by calculating an interpolation from two-dimensional point correspondences {(xi , yi , xt , yt ) | 1 ≤ i ≤ m} between the current image and the reference image. As the image is sup- i i posed to be warped to the reference image, the function f should interpolate (or at least approximate) these corresponding points. The corresponding points are interpolated by f if the equation (xi , yi )T = f (xt , yt ), i = 1, . . . , m i i is fulfilled. The problem of image stabilization is thus reduced to the problem of scattered data interpolation. The function f can be chosen from different families of functions. Common examples are global affine transformations [8] (which achieves only approximation), piecewise linear functions [4], B-Splines [9] and radial basis functions like thin plate splines [5], [8] (all of which achieve interpolation). Some of the methods for interpolation or approximation are only intended for functions Rn → R, but a mapping R2 → R2 is required. This can easily be achieved by considering two separate mappings x = f1 (xt , yt ) and y = f2 (xt , yt ). Alternatively, image stabilization can be performed in three dimensions: The point (xt , yt )T in the reference image is a projection of a point (X t , Y t , Z t )T on the current 3D surface. A function h : R3 → R3 then describes a mapping of (X t , Y t , Z t )T on the reference 3D surface to (X, Y, Z)T on the current 3D surface. This point (X, Y, Z)T is then projected back to (x, y) in the current image. The function h can be derived from the physical model, which describes the displacement of the heart surface at any point. This approach is introduced and evaluated in [10]. A refined version, that includes automatic adaptation of the model, has been published in [11]. 3 Results The presented image stabilization approaches have been evaluated both on a heart phantom and in an in-vivo experiment on a porcine heart. In both cases, a trinocular camera system consisting of three Pike F-210C cameras [12], each with a resolution of 1920 × 1080 pixels, has been used. The heart, as seen by one of the cameras, is depicted in Figure 1. Figure 1: Heart phantom (left) and porcine heart (right), both with markers. The experimental setup for the ex-vivo experiment consists of a pressure regulated artificial beating heart, which is located approximately 50 cm below the trinocular camera system. A pressure signal with amplitude 100 hPa and frequency 0.7 Hz causes the motion of the artificial heart. For evaluation, an image sequence consisting of 400 frames with a frame rate of 23 fps was recorded. The in-vivo experiment was performed at Heidelberg University Hospital. Markers were placed on the beating heart of a pig and a trinocular camera system was used to record a sequence of 337 frames at a frame rate of 31 fps. A cardiac catheter 240 was used to measure the pressure inside the left ventricle. The heart was mechanically stabilized with the commercially available Octopus stabilizer. Since the motion of the real heart surface is affected by breathing and by the motion of all four heart chambers, the physical model was extended with an excitation based on Fourier series. To analyze the residual motion in the stabilized images, the average difference across all k frames I1 , . . . , Ik to the reference frame Ireference was calculated for each pixel (x, y) and each color channel c ∈ {R, G, B} according to 1 Ierror (x, y, c) = k k t=1 |It (x, y, c) − Ireference (x, y, c)| . For the purpose of this evaluation, only points inside the convex hull of all landmarks are taken into account. The image of average differences Ierror was converted to grayscale in the range [0, 1] and visualized as a contour plot (see Figure 2 and 3). Figure 2: Average difference to reference frame for ex-vivo experiments (from left to right: unstabilized, affine transfor- mation, B-Spline). Figure 3: Average difference to reference frame for in-vivo experiments (from left to right: unstabilized, affine transfor- mation, B-Spline). The average error e across the entire image summed over all color channels can be obtained by   1 e= I   (x, y, c)  c∈{R,G,B} px y error  where p denotes the number of pixels inside the convex hull of all landmarks (see Table 1). For both experiments, the unstabilized image can be compared to a simple stabilization, which is based on a global affine transformation, and to a more sophisticated stabilization, which is based on multi-level B-Splines as described in [9]. Obviously, the affine transformation significantly reduces the heart motion but does not achieve the same quality of stabilization as the multi- level B-Spline approach. ex-vivo in-vivo unstabilized 0.186 0.133 affine 0.054 0.088 B-Spline 0.037 0.076 Table 1: Average error in the stabilized images 241 4 Discussion As the evaluation of the proposed algorithms demonstrates, it is possible create a stabilized view of the heart that is almost completely stationary. The results clearly show the superiority of the B-Spline transformation to the global affine transformation. This is not surprising since the affine transformation cannot properly deal with non-uniform deformations. Image stabilization depends on reliable tracking of the heart motion. The presented model-based technique allows robust tracking even in the presence of uncertainties and occlusions. As the in-vivo experiment illustrates, reliable tracking is not only possible with the heart phantom but under more difficult real-life conditions as well. Future work might include optimizations of stabilization accuracy in order to further reduce the amount of residual motion. Furthermore, integration with a surgical robot is required to create a system that can be used for surgery. Acknowledgments This work was partially supported by the German Research Foundation (DFG) within the Research Training Groups RTG 1126 “Intelligent Surgery - Development of new computer-based methods for the future working environment in visceral surgery”. We thank Evgeniya Ballmann for her work on physics-based motion compensation and Szabolcs Páli for his contributions to the in-vivo experiment. 5 References [1] T. J. Gilhuly, S. E. Salcudean, and S. V. Lichtenstein, “Evaluating Optical Stabilization of the Beating Heart,” IEEE Engineering in Medicine and Biology Magazine, pp. 133–140, 2003. [2] Y. Nakamura, K. Kishi, and H. Kawakami, “Heartbeat Synchronization for Robotic Cardiac Surgery,” in Proceedings of the IEEE International Conference on Robotics and Automation (ICRA 2001), (Seoul, Korea), pp. 2014–2019, May 2001. [3] D. Stoyanov and G. Yang, “Stabilization of Image Motion for Robotic Assisted Beating Heart Surgery,” Medical Image Computing and Computer-Assisted Intervention, vol. 10, pp. 417–424, 2007. [4] M. Gröger and G. Hirzinger, “Image Stabilisation of the Beating Heart by Local Linear Interpolation,” in Medical Imaging: Visualization, Image-Guided Procedures and Display, 2006. [5] R. Richa, P. Poignet, and C. Liu, “Three-dimensional Motion Tracking for Beating Heart Surgery Using a Thin-plate Spline Deformable Model,” International Journal of Robotics Research, vol. 20, pp. 218–230, Feb. 2010. [6] A. Noce, J. Triboulet, and P. Poignet, “Efficient Tracking of the Heart Using Texture,” in Proceedings of the Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBS 2007), (Lyon, France), pp. 4480–4483, Aug. 2007. [7] E. Bogatyrenko, P. Pompey, and U. D. Hanebeck, “Efficient physics-based tracking of heart surface motion for beating heart surgery robotic systems,” International Journal of Computer Assisted Radiology and Surgery (IJCARS 2010), vol. 6, pp. 387–399, Aug. 2010. [8] C. A. Glasbey and K. V. Mardia, “A Review of Image Warping Methods,” Journal of Applied Statistics, vol. 25, pp. 155–171, 1998. [9] S. Lee, G. Wolberg, and S. Y. Shin, “Scattered data interpolation with multilevel B-splines,” Visualization and Computer Graphics, IEEE Transactions, vol. 3 (3), pp. 228 – 244, 1997. [10] E. Bogatyrenko and U. D. Hanebeck, “Visual stabilization of a beating heart motion by model-based transforma- tion of image sequences,” in Proceedings of the 2011 American Control Conference (ACC 2011), (San Francisco, California, USA), June 2011. [11] E. Bogatyrenko and U. D. Hanebeck, “Adaptive model-based visual stabilization of image sequences,” in Proceed- ings of the 14th International Conference on Information Fusion (Fusion 2011), (Chicago, Illinois, USA), July 2011. [12] Allied Vision Technologies GmbH, PIKE Technical Manual V5.1.0, May 2011. 242