# Wavelia Breast Imaging: The Optical Breast Contour Detection Subsystem
## 2 Materials and Methods
### Optical Breast Contour Detection (OBCD) Subsystem: The 3D Breast Surface Reconstruction Procedure
#### 2.3.2 Denoising Procedure  
Until the previous step, the pendulum breast point cloud has been transformed into an elevation point cloud \(Pc_{C}\) on the xy plane, while preserving the z coordinates. The aim of the denoising procedure is to remove the artifacts and the ring remaining points and to fill the zones with no points. To do this, the denoising procedure combines morphological information of the pendulum breast, and 2D imaging processing. At the beginning of this procedure \(Pc_{C}\) is used to generate a _reference rectangular grid for denoising_ which is then used to perform a first artifacts removal process on \(Pc_{C}\). To perform this process, the following parameters are used:  
* \(x_{min}\), \(x_{max}\), \(y_{min}\) and \(y_{max}\): these values correspond to the minimum and maximum x and y coordinates of the bounding box of \(Pc_{C}\);
* _mesh resolution (Dxy)_: it corresponds to the desired resolution on the xy plane for the 3D breast reconstructed mesh, before the linear stretching transformation (see definition also in Appendix B.2);
* \(s_{max}\): this is the maximal stretching factor, as computed in the previous step (see Section 2.3.1);
* \(x_{size}\) and \(y_{size}\): these are integer values. They correspond to the size of the rectangular grid along the x and y axes after the linear stretching transformation. These values are computed by using Equations (14) and (15), where \(Dxy\)-\(s_{max}\) corresponds to the stretched mesh resolution, after the stretching transformation. To preserve small parts like the nipple, after the stretching transformation, it was decided to increase the stretched mesh resolution by a factor of 2, as indicated in Equations (14) and (15). \[x_{size}=\left[\frac{x_{max}-x_{min}}{Dxy\)-\(s_{max}\)-\(0.5}\right]\] (14) \[y_{size}=\left[\frac{y_{max}-y_{min}}{Dxy\)-\(s_{max}\)-\(0.5}\right]\] (15)  
By using \(x_{size}\) and \(y_{size}\) a rectangular grid on the xy plane is generated (see Figure 15(b)). Each of the z values in the grid (green points in Figure 15(a)) is computed as the mean value of all the z coordinates of the points located inside the associated small rectangular section (small blue rectangles in Figure 15(a)). If there are no points inside the small section, the associated z value is set to 0. This ensures a single z coordinate for each coordinates pair (x, y) on the grid. Figure 15: Procedure to compute \(s_{max}\). The obtained rectangular grid can be considered as a 2D image, where the intensity at each point (x,y) corresponds to the z-value (in mm) of the point (x,y,z) in a new stretched point cloud (see Figure 17a). To reduce the noise, remove the larger artifacts and obtain a very smooth grid without completely removing the nipple, a median filter is applied with a large kernel size (\(11\times 11\)) to the rectangular grid. The result is the _reference rectangular grid for denoising_ (see Figure 17b). The kernel size (\(11\times 11\)) has been selected among various kernel sizes, after testing on a series of both human and phantom breasts (test range from \(9\times 9\) to \(17\times 17\)). Figure 16: Procedure to generate a rectangular grid from a point cloud: (**a**) the rectangular grid configuration; (**b**) example of rectangular grid generation from the stretched point cloud corresponding to Patient 002. Figure 17: Procedure to generate the _reference rectangular grid for denoising_: (**a**) rectangular grid considered as a 2D image: in the right-hand image the z coordinates of the grid points are mapped to the color of the image; (**b**) _reference rectangular grid for denoising_ obtained by using a median \(11\times 11\) filter. The signed vertical distance (along the z axis) to the _reference rectangular grid for denoising_ is used as a criterion for the removal of points (positive distance for points above the grid and negative distance for points below the grid). The denoising is performed after splitting the breast into two vertical sections.