# Segmentation of Meristem Cells by an Automated Optimization Algorithm
## 2 Materials and Methods
### Overview of the Parametric Segmenting Tuning Technique (PST)  
The PST technique is briefly described here and employed to tune the segmentation algorithm. An image \(I\) of size \(N\times M\), where \(N\) and \(M\) are the width and height of the image, respectively, may be represented as a vector \(\alpha\) of size \(u=N\times M\). Let \(T\big{(}I,\overrightarrow{p}\big{)}\) represent the transformation of an image I into a binary one as a result of a segmentation algorithm, given a certain number \(r\) of parameters \(p\), where a grey level represents the object of interest and another one the background. Therefore, an \(r\)-dimensional solution space \(P^{r}\subseteq R^{r}\) generated by the transformation \(T\big{(}I,\overrightarrow{p}\big{)}\) can be defined, where each coordinate is given by a parameter and each point of the space represents a binary image. Considering image segmentation as an optimization problem, the best solution can be found by maximising a similarity function \(\Psi\) in \(P^{r}\), or minimising a distance function. The object function is defined as: \(\Psi:Z_{2}^{u}\times Z_{2}^{u}\longrightarrow R\), where \(\Psi\) is an indicator associated to each pair of neighbor images of \(Z_{2}^{u}\times Z_{2}^{u}\). Each binary image \(I_{n}\) is an element, in the space of possible solutions \(P^{r}\subseteq R^{r}\), generated by the transformation \(T\big{(}I,\overrightarrow{p}_{n}\big{)}\), as shown in Figure 5.  
Figure 4: Variation of the segmentation results by varying \(h\) in the proposed algorithm in the range. (**A**) Original image. (**B,C**) Under-segmented images. (**D**) Best-segmented image. (**E,F**) Over-segmented images. The best segmented image, in this example, was chosen by visual evaluation and is the one in which a greater coincidence was observed between the edges of the original meristem image and those of the resulting image. The decision criterion consists of finding the set of images with the highest associated index (maximization problem), or the lowest associated distance (minimization problem). Table 1 presents the four indices used here and explained in [15]: Sensitivity, Coverage, Minimum Distance and Co-linearity. The sensitivity and Minimum Distance Index relate the True Positive Rate (TPR) and the False Positive Rate (FPR). The relation between the TPR and the FPR is known as ROC space (Receiver Operating Characteristic). Let the binary set \(Z_{2}=\{0,1\}\) be the binary space \(u\)-dimensional \(Z_{2}^{u}=Z_{2}\times Z_{2}\times\ldots\times Z_{2}\)\(u\)-times. An element \(\alpha\) (image) of \(Z_{2}^{u}\) is an u-upla formed by \(Z_{2}\) elements. Thus, \(\alpha=(\alpha_{1},\alpha_{1},\ldots\alpha_{u})\), with \(\alpha_{i}\in Z_{2}\), that is, \(Z_{2}^{u}=\{\alpha=(\alpha_{1},\alpha_{1},\ldots\alpha_{u}),\forall,\alpha\in Z _{2}\times Z_{2}\times\ldots\times Z_{2}\wedge\alpha_{i}\in Z_{2}\}\). In other words, the optimal segmentation parameters are obtained by finding the best index value between each pair of neighboring images, which can be expressed mathematically as follows:  
\[ \begin{array}{c}\overrightarrow{p}^{\star}=\arg\bigl{\{}optimum(\Psi_{[ \cdot]}(I_{n},I_{n-1}))\bigr{\}}\\ \mbox{Subject to }:\,I_{n}\in Z_{2}^{u}\end{array}  \tag{1}\]  
Therefore, the best solution, noted by an asterisk \(\overrightarrow{p}^{\star}=[B^{*},h^{*},d^{*}]\), can be found in Figures 5 and 6, by sweeping the solution space and evaluating a similarity function between each pair of binary