## 2 Materials and Methods
### Binary Image Construction  
A binary image is composed of a matrix containing only 0s and 1s, where the 1s represent the object of interest [38]. To obtain a binarized image, pixel values within a defined range are converted to 1s, while all other pixels are set to 0 (Figure 10b). This process is important for applying the HT and allows total isolation of the blastocyst (Figure 10c), TE (Figure 10d), and blastocoel plus ICM (Figure 10e). Segmentation of the image into blastocyst, TE, and blastocoel plus ICM allows the extraction of several variables. In this process, variation and similarity of texture, uniformity in gray-level distribution, proximity of the grayscale to the GLCM diagonal in ICM and blastocoel, mean gray level, and standard deviation of gray level are extracted. In addition, brightest and darkest regions, average brightness, most frequent light intensity (modal value), binary image sum, blastocyst radius, and area measurements are calculated. Figure 8: Directions of the Prewitt gradient operator. From the convolution masks, the Prewitt differentiation operator calculates the gradient in the vertical direction through the \(Gy\) matrix, while \(Gx\) calculates the gradient in the horizontal direction. \(Gy\) and \(Gx\) matrixes are also called derivative masks and are applied to calculate the difference of pixel intensities in an edge region of the image. Figure 9: Extraction of gradient magnitude (GM) maxima. (**a**) Grayscale image of the blastocyst. (**b**) Extraction of the GM. (**c**) Extraction of GM maxima. The textures were examined by the local binary pattern (LBP) algorithm and by constructing a gray-level cooccurrence matrix (GLCM). The LBP algorithm is a widely applied approach to recognize and analyze texture in images [39]. In this study, the LBP technique was applied to determine the textures of the ICM, TE, and EX. In Matlab(r), the LBP algorithm is included in the Computer Vision Toolbox(tm) [40]. Feature extraction using the LBP algorithm consists of two main steps (Figure 11), thresholding and encoding. In the first step, all neighboring pixels in each defined area (e.g., pattern) are compared to the value of the central pixel. Then, all values of the neighboring pixels are changed to a binary value (0 if lower than the value of the central pixel or 1 if larger). After this transformation, the encoding step involves conversion of the binary number obtained to a decimal value [39]. The GLCM algorithm was also applied to examine the textures of the ICM, TE, and the blastocel plus ICM images obtained by segmentation. This statistical method, included in the Image Processing Toolbox(tm), essentially examines texture by analyzing the spatial relationships among pixels, specifically how often pairs of pixels with specific values and in a specified spatial relationship occur in an image. This analysis yields the GLCM, from which statistical measures are extracted [29]. Using this algorithm, it is possible to extract information such as variation of the texture level, texture similarities, uniformity of the gray-level distribution, and proximity of the grayscale to the GLCM diagonal. The brightness and darkness variables of the image were then extracted from the TE and blastocel + ICM images. The darkness of the image was measured as the sum of the  
Figure 11: Representation of the Local Binary Pattern (LBP) algorithm. (**a**) The initial blastocyst image. (**b**) The matrix of pixel values obtained from an area of the image. (**c**) The binary matrix derived using the LBP algorithm. The values of this matrix (0s and 1s) are read clockwise starting from the left-most upper quadrant following the arrow. (**d**) Through this process, a binary number is obtained and converted to a decimal number. This process is repeated until the entire image is processed. Figure 10: Isolation of the blastocyst, trophectoderm, and blastocel plus inner cell mass (ICM). (**a**) Maxima of gradient magnitude. (**b**) Binary transformation using a defined range.