---
abstract: 'In laparoscopic surgery, image quality can be severely degraded by surgical smoke, which not only introduces error for the image processing (used in image guided surgery), but also reduces the visibility of the surgeons. In this paper, we propose to enhance the laparoscopic images by decomposing them into unwanted smoke part and enhanced part using a variational approach. The proposed method relies on the observation that smoke has low contrast and low inter-channel differences. A cost function is defined based on this prior knowledge and is solved using an augmented Lagrangian method. The obtained unwanted smoke component is then subtracted from the original degraded image, resulting in the enhanced image. The obtained quantitative scores in terms of FADE, JNBM and RE metrics show that our proposed method performs rather well. Furthermore, the qualitative visual inspection of the results show that it removes smoke effectively from the laparoscopic images.'
address: |
    $^{1}$ Norwegian Colour and Visual Computing Lab, Norwegian University of Science and Technology, Norway.\
    $^{2}$ L2TI-Institut Galilée, Université Paris 13, Sorbonne Paris Cité, Villetaneuse, France\
    $^{3}$The Intervention Centre, Oslo University Hospital, Oslo, Norway.\
    $^{4}$The Department of Informatics, University of Oslo, Oslo, Norway. 
bibliography:
- 'strings.bib'
- 'refs.bib'
title: A SMOKE REMOVAL METHOD for LAPAROSCOPIC IMAGES
---

Laparoscopic images, smoke removal, dehazing, variational, quality.

Introduction {#sec:intro}
============

As one of the most important intra-operative data modality, laparoscopic images’ quality is of vital importance for navigation systems and for the operating surgeons [@stoyanov2012surgical]. The artifacts during laparoscopic images specificities include smoke, blood, dynamic illumination conditions, specular reflections, *etc* [@sdiri2016adaptive]. Smoke significantly reduces the contrast and radiance information for large areas of the scene. Computer vision algorithms’ performance and surgeons’ visibility would inevitably suffer from this degradation. Therefore, smoke removal in laparoscopic images becomes necessary to improve the image guided surgery conditions and to provide a better operation field visualization.

To the best of our knowledge, there is only a few recent works related to laparoscopic desmoking [@kotwal2016joint; @baid2017joint; @tchakaa2017chromaticity; @luo2017vision]. In these papers, the image desmoking problem is considered as a dehazing problem which has been studied for many years in the literature [@tan2008visibility; @he2011single]. In such problem, the atmospheric scattering model presented by Eq. (\[scattering\]) describes the formation of a hazy image and is widely used in computer vision [@narasimhan2002vision].

$$\label{scattering}
\mathbf{I}(x)=\mathbf{J}(x)t(x)+\mathbf{A}(1-t(x)),$$

where $\mathbf{I}$ is the observed intensity, $\mathbf{J}$ is the scene radiance representing the haze-free image, $t$ is the medium transmission map considered to be inversely related to the scene’s depth, and $\mathbf{A}$ is the airlight which is usually a constant as it is the global atmospheric light which is location independent.

However, while haze related to scene depth, smoke concentration is a local phenomenon which does not depend on the scene depth, but rather depends on the position of the tip of the thermal cutting instrument. Moreover, in laparoscopic images, the light source is provided from the instrument which is not evenly distributed, and the organ surface is not a Lambertian surface. These properties violate the assumptions underlying Eq. (\[scattering\]), which makes it inappropriate for laparoscopic images.

In this paper, we propose a novel laparoscopic images smoke removal method. More precisely, instead of resorting to the classical physical atmospheric model, we propose another model where the degraded image is separated to two parts: the weighted smoke part and the desmoked one that should be recovered. To estimate the smoke, our approach relies on two easily verifiable assumptions: smoke has a low contrast and low inter-channel differences.

The remainder of this paper is organized as follows. In Sec. \[sec:rel\_works\], a review of image dehazing as well as laparoscopic image desmoking methods are given. Sec. \[sec:method\] describes our proposed approach by defining the energy function and the optimization procedure. Finally, in Sec. \[sec:result\], experimental results are presented and some conclusions are drawn in Sec. \[sec:conclustion\].

RELATED WORKS {#sec:rel_works}
=============

Recently, some works were proposed for desmoking in laparoscopic images [@kotwal2016joint; @baid2017joint; @tchakaa2017chromaticity; @luo2017vision]. In [@kotwal2016joint], the authors formulated a joint desmoking and denoising problem as a Bayesian inference problem based on probabilistic graphical model. This work is then extended in [@baid2017joint] for desmoking, denoising and specularity removal. In [@tchakaa2017chromaticity], an adapted dark-channel prior combined with histogram equalization method is presented. In [@luo2017vision], a visibility-driven fusion defogging framework is proposed.

While there is few works related to laparoscopic images smoke removal, a similar problem referred to as image dehazing has also been studied in the literature. Many of the image dehazing works use the atmospheric scattering model and rely on the estimation of the transmission map $t$ or the depth map of the images and the airlight alternatively [@zhu2015fast; @he2011single; @tarel2009fast]. He *et al.* propose the dark channel approach based on a statistical observation from outdoor haze-free images: for most of the haze-free natural images, pixel values are very low for at least one channel [@he2011single]. The transmission map $t$ computed by this prior together with an estimated $\mathbf{A}$ calculated from the detected most haze-opaque region of the image are applied to invert Eq. (\[scattering\]), resulting in a haze free image. This is a well-known efficient approach and lots of recent methods are proposed based on it [@tchakaa2017chromaticity; @xu2012fast].

Some works have been also developed without estimating transmission or depth maps. Tan *et al.* [@tan2008visibility] tried to enhance the haze image directly by maximizing the local contrast under an airlight smooth constraint. In [@ancuti2013single], a multi-scale fusion dehazing method is proposed by deriving a white balance and contrast enhanced inputs.

In [@galdran2014variational], a variational contrast enhancement framework for image dehazing with a modified gray-world assumption is proposed. Later in [@galdran2015enhanced], an improved version is presented, where a saturation term is added to the variational cost function aiming to maximize the contrast and saturation together. In [@galdran2017fusion], Galdran *et al.* further improved their work by enhancing faraway regions where normally have more fog and preserving nearby low-fog regions. Those methods do not rely on a physical atmospheric model, but try to maximize contrast and saturation. However, the modified gray-world assumption and the assumption that pixels’ intensity is related to depth are violated in laparoscopic images.

Proposed smoke removal approach {#sec:method}
===============================

Variational techniques have attracted a considerable attention over the last years in signal/image processing literature. They have been found to be among the most powerful techniques in different fields such as enhancement, restoration, super resolution and disparity/motion estimation from a sequence of images. For this reason, we propose here a variational approach to remove smoke in laparoscopic images. More precisely, an energy function is first defined and then minimized (i.e optimized) via an augmented Lagrangian method, as we shall address next.

Energy function
---------------

Due to the aforementioned limitations of the atmospheric scattering model in laparoscopic images, we propose to consider another model where the degraded laparoscopic image is assumed to follow this decomposition strategy: $$\label{model}
\mathbf{I}^{c}=\mathbf{J}^{c}+\alpha^{c} \cdot \mathbf{F}^{c},$$ where $c\in\{R,G,B\} $ indicates the RGB channels, $\mathbf{I}$ is the obtained degraded image by laparoscopic camera, $\mathbf{J}$ contains the color image information, $\mathbf{F}$ is the unwanted smoke component and $\alpha^{c}$ is a scalar weight for every channel. Thus, the smoked images $\mathbf{I}$ is separated into two parts: the smoke part $\mathbf{F}$ and the enhanced one $\mathbf{J}$.

Based on the observations that smoke part’s variation is smooth and the RGB channel differences are low as a result of the whitish property of smoke, we propose to estimate the smoke part by minimizing the following energy function: $$\label{cost}
E=\frac{\lambda }{2}\left \| \mathbf{F}-\mathbf{I} \right \|^{2}+\left \| \mathbf{F}_{TV} \right \|_{2},$$ where $\mathbf{I}$ is the degraded color image in the RGB color space, $\mathbf{F}$ is the smoke part to be estimated, $\lambda$ is a scalar to adjust weights between the two terms of the equation, and $\left \| \mathbf{F} _{TV}\right \|_{2}$ is an isotropic total variation (TV)-norm which is given by: $$\label{tv}
\left \| \mathbf{F} _{TV}\right \|_{2}=\sum_{i} \sqrt{\beta _{x}^2[\mathbf{D}_{x}\mathbf{F}]_{i}^{2}+\beta _{y}^2[\mathbf{D}_{y}\mathbf{F}]_{i}^{2}+\beta _{c}^2[\mathbf{D}_{c}\mathbf{F}]_{i}^{2}},$$ where $\beta_{x}$, $\beta_{y}$, $\beta_{c}$ are three scalar parameters to balance the weights between the gradient of the color image and the inter-channel differences. $\mathbf{D}_{x}$, $\mathbf{D}_{y}$, $\mathbf{D}_{c}$ are the forward differential operators along the three dimensions. Thus, we have $\mathbf{D}_{x}\mathbf{F}=\mathbf{F}(x+1,y,c)-\mathbf{F}(x,y,c)$, $\mathbf{D}_{y}\mathbf{F}=\mathbf{F}(x,y+1,c)-\mathbf{F}(x,y,c)$, and $\mathbf{D}_{c}\mathbf{F}=\mathbf{F}(x,y,c+1)-\mathbf{F}(x,y,c)$. Note that $(x,y,c)$ represents the pixel coordinates of the color image with horizontal and vertical directions $(x,y)$ and channel direction $c$. Using matrix-vector notation, $[\mathbf{D}_{d}\mathbf{F}]_i$, with $d \in \{x,y,c\}$, denotes the $i$-th component of the one dimensional vector obtained from $\mathbf{D}_{d}\mathbf{F}$.

The first term in Eq. (\[cost\]) aims to keep the similarity between the estimated smoke part and the input degraded image. The second total variation norm part represents the properties of the smoke part: low contrast and low inter-channel differences.

After the estimation of global smoke $\textbf{F}$, the smoke free image $\textbf{J}$ is then calculated as: $$\label{final}
\mathbf{J}^{c}=\mathbf{I}^{c}-\alpha^{c} \cdot \mathbf{F}^{c},$$ where $\alpha^{c}$ is defined as the mean values of the estimated smoke image over the RGB channels.

Optimization method
-------------------

The energy function minimization problem can be solved by employing the augmented Lagrangian method [@chan2011augmented], which will be described in the following. The function, given by Eq. (\[cost\]), is split by introducing an intermediate new variable $\textbf{u}$: $$\label{spliting}
\begin{split}
&\displaystyle{\min_{\textbf{F}}  \quad \frac{\lambda }{2}\left \| \mathbf{F}-\mathbf{I} \right \|^{2}+\left \| \mathbf{u} \right \|_{2}}, \\
&\textrm{\textit{s. t.}} \quad \mathbf{F}_{TV}-\mathbf{u}=0.
\end{split}$$ The augmented Lagrangian for Eq. (\[spliting\]) is:

$$\label{split}
    L_{\rho}(\mathbf{F},\mathbf{u},\mathbf{y})=\frac{\lambda }{2}\left \| \mathbf{F}-\mathbf{I} \right \|^{2}+\left \| \mathbf{u} \right \|_{2}+\mathbf{y}^{T}(\mathbf{F}_{TV}-\mathbf{u})+\frac{\rho}{2}\left \|\mathbf{F} _{TV}- \mathbf{u}\right \|^{2},$$

where $\rho$ is a non-negative constant parameter called penalty parameter and $\mathbf{y}=[\mathbf{y}_{x}^{\top},\mathbf{y}_{y}^{\top},\mathbf{y}_{c}^{\top}]^{\top}$ is the Lagrange multipliers vector and $\mathbf{u}=[\mathbf{u}_{x}^{\top},\mathbf{u}_{y}^{\top},\mathbf{u}_{c}^{\top}]^{\top}$. Then, the alternating direction method (ADM) [@boyd2011distributed] is used to solve the following minimization sub-problems iteratively:

$$\label{subproblem}
    \begin{split}
    \textbf{F}^{k+1}&:=\operatorname*{argmin}_{\textbf{F}} L_{\rho}(\textbf{F},\textbf{u}^{k},\textbf{y}^{k}),\\
    &=\operatorname*{argmin}_{\textbf{F}} \frac{\lambda }{2}\left \| \mathbf{F}-\mathbf{I} \right \|^{2}+(\mathbf{y}^{k})^{\top}(\mathbf{F}_{TV}-\mathbf{u}^{k})+\frac{\rho}{2}\left \|\mathbf{F} _{TV}- \mathbf{u}^{k}\right \|^{2},  \\
        \textbf{u}^{k+1}&:=\operatorname*{argmin}_{\textbf{u}} L_{\rho}(\textbf{F}^{k+1},\textbf{u},\textbf{y}^{k}),\\
    &=\operatorname*{argmin}_{\textbf{u}} \left \| \mathbf{u} \right \|_{2}+ (\mathbf{y}^{k})^{\top}(\mathbf{F}_{TV}^{k+1}-\mathbf{u})+\frac{\rho}{2}\left \|\mathbf{F} _{TV}^{k+1}- \mathbf{u}\right \|^{2},  \\
        \textbf{y}^{k+1}&:= \textbf{y}^{k}+\rho(\textbf{F}_{TV}^{k+1}-\textbf{u}^{k+1}).
    \end{split}$$

By introducing the operator $\textbf{D}=[\beta _{x}\textbf{D}_{x}^{\top},\beta _{y}\textbf{D}_{y}^{\top},\beta _{c}\textbf{D}_{c}^{\top}]^{\top}$, the $\textbf{F}$-minimization subproblem leads to the following solution: $$\label{fproblem}
\mathbf{F}=\mathcal{F}^{-1}[\frac{\mathcal{F}[\lambda \mathbf{I}+\rho\mathbf{D}^{\top}\mathbf{u}-\mathbf{D}^{\top}\mathbf{y}]}{\lambda+\rho(\left | \beta_{x}\mathcal{F}[\textbf{D}_{x}]\right |^{2}+\left |\beta_{y}\mathcal{F}[\textbf{D}_{y}]\right |^{2}+\left|\beta_{c}\mathcal{F}[\textbf{D}_{c}]\right |^{2} )}],$$ where $\mathcal{F}$ is the Fourier transform operator. Then, the $\textbf{u}$ minimization subproblem results in: $$\label{uproblem}
\mathbf{u}_{x}=\mbox{max}\left \{  \mathbf{v}-\frac{1}{\rho},0 \right \} \cdot \frac{\mathbf{v}_{x}}{\mathbf{v}},$$ where $\mathbf{v}_{x}=\beta_{x} \textbf{D}_{x}\textbf{F}+(\frac{1}{\rho})\textbf{y}_{x}$. Similar definition is applied to $\textbf{v}_{y}$, $\textbf{v}_{c}$, and $\textbf{v}=\mbox{max} \{ \sqrt{\left|\textbf{v}_{x}\right|^{2}+\left|\textbf{v}_{y}\right|^{2} +\left|\textbf{v}_{c}\right|^{2}}, \epsilon  \}$ with $\epsilon $ a small constant. In a similar way, $\textbf{u}_{y}$ and $\textbf{u}_{c}$ are determined to obtain the vector $\mathbf{u}$. More details about these solutions can be found in [@chan2011numerical].

EXPERIMENTAL RESULTS {#sec:result}
====================

In vivo procedure datasets [@giannarou2013probabilistic; @ye2017self], taken from Hamlyn Centre Laparoscopic / Endoscopic Video Dataset Page[^1], are used for validation. *Dataset1* has 96 smoked images and *Dataset2* contains 4031 images. In order to show the benefits of the proposed method, we will compare it to the following recent ones [@he2011single; @galdran2015enhanced; @galdran2017fusion]. The first one is the atmospheric model based image dehazing method with dark channel prior [@he2011single]. This method will be designated by DCP. It is important to note here that similar approach has been investigated in [@tchakaa2017chromaticity] to remove smoke by adding thresholding or refining steps. However, the later approach has not been considered in our evaluation because of its sensitivity to different parameters which should be empirically selected for input smoked images of the large experimental dataset. The second one, which will be denoted by E-VAR, corresponds to an enhanced variational approach developed in [@galdran2015enhanced]. Finally, the third one, designated by F-VAR, is a fusion-based variational technique [@galdran2017fusion]. The parameters setting used in this experiment are: $\lambda=1$ for Eq. (\[cost\]), $\beta_{x}=\beta_{y}=\beta_{c}=1$ for Eq. (\[tv\]) and $\rho=5$.

![image](img192.png){width="3.3cm"}

![image](DCP192.png){width="3.3cm"}

![image](VARF192.png){width="3.3cm"}

![image](VARE192.png){width="3.3cm"}

![image](OUR192.png){width="3.3cm"}

![image](4003.png){width="3.3cm"}

![image](DCP4003.png){width="3.3cm"}

![image](VARF4003.png){width="3.3cm"}

![image](VARE4003.png){width="3.3cm"}

![image](OUR4003.png){width="3.3cm"}

![image](3366.png){width="3.3cm"}

(a)

![image](DCP3366.png){width="3.3cm"}

(b)

![image](VARF3366.png){width="3.3cm"}

(c)

![image](VARE3366.png){width="3.3cm"}

(d)

![image](OUR3366.png){width="3.3cm"}

(e)

![image](fade.png){width="1.1\linewidth"}

(a)

![image](JNBM.png){width="1.1\linewidth"}

(b)

![image](e.png){width="1.1\linewidth"}

(c)

**Quantitative evaluation:** Examples of three images are shown in Fig. \[fig:res1\](a). As the ground-truth information for a smoked laparoscopic image is not available, we propose to employ two no-reference image quality metrics and another metric that compares the visibility of edges before and after smoke removal. For the purpose of evaluating the ability of smoke removal, a referenceless Fog Aware Density Evaluator (FADE) has been used to evaluate the perceptual fog density [@choi2015referenceless; @fog]. A lower FADE value means a lower perceptual fog density. Besides, a just noticeable blur based no-reference objective image sharpness metric (JNBM) [@ferzli2009no] is used to evaluate the perceptual sharpness. A higher value means higher perceptual sharpness or lower blurriness. Further more, we employ a metric, proposed by Hautière *et al.* [@hautiere2011blind], which aims to assess the ability of restoring edges (RE) that are not visible in **I** but are in **J** (obtained after smoke removal). This metric will be designated by RE. A higher RE value means a better edge restoration.

Tables \[result1\] and \[result2\] show mean and standard deviation of the scores of the different approaches for *Dataset1* and *Dataset2*. Fig. \[fig:res2\] illustrates the scores of the three metrics on *Dataset2*. All the three metrics show better scores for our approach. In terms of FADE metric, the DCP method removes smoke well. However, it scarifies the perceptual quality as shown in Fig. \[fig:res1\]  (b) as a result of the constant airlight assumption. E-VAR removes more smoke than F-VAR. F-VAR’s results indicate that there are still high smoke density in the images. Our proposed method’s smoke density is the lowest. The proposed approach removes the smooth smoke component of the image resulting in a contrast enhanced image, which has the best scores for JNBM and RE.

**Qualitative evaluation:** In this part, we evaluate the different methods subjectively. Fig. \[fig:res1\] illustrates the results for three laparoscopic images from the two datasets. It can be observed, from Fig. \[fig:res1\](b), that the DCP method can remove the smoke effectively but causes an unnatural color change in the desmoked images. Moreover, as shown in Fig. \[fig:res1\](c), the smoke is not well removed by the F-VAR approach as smoke is independent of depth in laparoscopic images and this approach tries to preserve image information on nearby region under the assumption that the concentration of the haze is related with depth. E-VAR [@galdran2015enhanced] method relies mildly on the physical model, leads to the fine result shown in Fig. \[fig:res1\](d). Finally, Fig. \[fig:res1\](e) shows that our proposed method allows to remove smoke effectively, leading to an output image with enhanced contrast.

Therefore, all the obtained results confirm the benefits of the proposed desmoking method for laparoscopic images.

Conclusion {#sec:conclustion}
==========

Unlike most of the natural image dehazing methods which rely on a physical model, we propose in this paper a variational desmoking method for laparoscopic images. The aim is to remove the smoke from the scene, thus to improve the image guided surgery condition as well as the surgeons’ visibility. Quantitative and qualitative evaluations are performed and show that the proposed approach reduces the smoke effectively while preserving the important perceptual information of the image. Further work should include a more robust prior about the smoke.

[^1]: http://hamlyn.doc.ic.ac.uk/vision/
