*4.1. Increase in Brightness and Contrast*

A preliminary process of image enhancement improves the quality of the original image. In particular, both brightness and contrast are increased so as to reduce or eliminate the light color halos around the cells caused by the staining process of the cytodiagnostic examination, which would

otherwise have compromised the detection process in the subsequent stages. The transformation applied to each RGB channel for each pixel (x,y) in the starting image is:

$$\mathbf{g}(\mathbf{x}, \mathbf{y}) = \alpha \cdot f(\mathbf{x}, \mathbf{y}) + \boldsymbol{\beta} \tag{2}$$

where α and β are the so-called gain and bias, respectively, which are parameters that regulate brightness and contrast, as shown in Figure 5. They were empirically determined: α = 1.5e, β = 6.

**Figure 5.** Input image (**a**), output image of brightness enhancement step (**b**).
