Filtering of Mammograms Based on Convolution with Directional Fractal Masks to Enhance Microcalcifications

The image processing of mammograms is very important for the early detection of breast pathologies, including cancer. This paper proposes a new technique based on directional fractal filtering for detecting microcalcification clusters or irregularly shaped microcalcifications. The proposed algorithm has two parts: a preprocessing step for detecting and locating microcalcification; and a second zooming, enhancement, and segmentation step. Detection is performed by image convolution using a set of masks with interesting fractal properties. Combined with other simple mathematical operations, remarkable contrast enhancement and segmentation are produced. The final result permits the clear delineation of the shape of individual microcalcifications. A comparison is made with other microcalcification enhancement techniques described in the literature.


Introduction
Microcalcifications are defined as calcium deposits inside the breast, which are associated with extra cell activity in breast tissue.If microcalcifications are grouped into clusters, a malignant tumor may develop.Clustered microcalcifications are defined by radiologists as the presence of more than three calcifications in a 1-cm 2 area [1].Calcifications are seen as bright dots in mammograms with different sizes and shapes, and they can be as small as 100 µm.Accordingly, detecting microcalcifications is very difficult, and is more complicated in young women due to denser breast tissues, larger low-contrast areas, and highly correlated areas in mammograms.This poses a very challenging task for radiologists.For this reason, good spatial resolution is necessary for the accurate detection of microcalcifications.
Nowadays, the use of digital mammograms allows computer-aided detection (CAD) software to be used [2][3][4][5][6][7].CAD software helps radiologists during the diagnosis process, which it does almost automatically.The detection process of microcalcifications generally involves the following steps: image enhancement, detection of the region of interest (ROI), feature extraction, and feature selection.In our case, automatic detection is not pursued, but is rather a visual aid for radiologists.Thus, classification and pattern recognition algorithms are not described here.
There are many methods for detecting microcalcifications [8,9], and the most commonly used ones are contrast stretching, convolution mask enhancement, local statistical enhancement, adaptive region enhancement, background elimination, morphological processing, wavelet reconstruction, and anisotropic diffusion [8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24].Our method differs from other fractal techniques, which attempt to model the fractal structure in order to identify a target or to remove the background [9][10][11][12].Our algorithms are based on convolution mask enhancement, and their novelty lies in the use of sets of masks with fractal properties, with maximal gray distribution for a given pixel number and directional properties.This work is a medical application and a development of a previous study [13].
One main point of our approach is the conservation of the histogram into the zoomed images using the set of fractal masks.This is possible thanks to the maximal distribution of gray pixel values over the mask area for a given number of pixels [13].The generated masks perform as directional filters to enhance the image in a histogram invariant form.Thus, a complete or directional contrast enhancement of microcalcifications can be performed.This enhanced zooming technique is inspired by Hoffmann microscopy [13].
Contrast enhancement is performed by calculating the difference between the exponential and the logarithm of the convolved images.Finally, visual segmentation is carried out by the XOR logical operator between both images.Thanks to this visual zooming, enhancement, and segmentation, shapes and sizes of microcalcifications can be analyzed more easily and accurately by radiologists.
This paper is organized as follows.Section 2 presents the proposed algorithm.Section 3 describes the algorithm implementation and the results.Finally, Section 4 offers the main conclusions.

Description of the algorithm
The first filtering step is the convolution of the original image by a suitable set of oriented fractals with maximal gray distribution and a flat histogram.Fractal masks are obtained by the logical operation XOR applied to two orthogonal copies of a gray gradient image.This results in an image with a Menger sponge-like structure [25].These filters can be controlled by three parameters: size, angular orientation, and grayscale.
From another point of view, this filtering procedure can be considered a type of diffusion filter with an anisotropic kernel, and it produces a directional blurring of the image.However, while other filters, such as the Gaussian filter, are linear and space-invariant, fractal diffusion is nonlinear and space-variant in the general case [26].Due to this blurring effect, nearest neighborhood zooming of the original image has previously been performed to avoid any loss of resolution.The larger the fractal mask, the more pronounced the blurring is.If the directional effect is not desired, it is canceled using masks with a 180-degree difference in orientation.The number of pixels in both dimensions is multiplied by the dimension of the square fractal mask in pixels.For example, if the fractal mask has 5 × 5 pixels, the original mammogram is multiplied by 5 in both dimensions.The simplest approach is a single convolution between the image and the fractal kernel: This mask convolution produces a new image, similar to an interpolated one, but with minimal histogram alteration.Instead of solving the complete diffusion equation (2), a scale space of the image can be created using fractal kernels of varying pixel sizes [27,28].Rotational gradients can also be analyzed utilizing rotated kernels of the same size and subtracting the resulting images, whose Appl.Sci.2019, 9, 1194 3 of 16 outcome is a multi-angle analysis approach.In this work, only the multi-angle study was performed.The full scale space approach will be developed in future works.
As previously described, the set of fractal masks is generated by combining two orthogonal grayscale ramp images using the XOR logical operation.The final masks are obtained by rotating the original fractal to the desired angle with no interpolation and allowing the black extra pixels to cover the entire image.The resultant filtering images can be seen in Figure 1.
Appl.Sci.2019, 9, x FOR PEER REVIEW 3 of 18 outcome is a multi-angle analysis approach.In this work, only the multi-angle study was performed.The full scale space approach will be developed in future works.

, ) I div c x y t I c I c x y t I t (2)
As previously described, the set of fractal masks is generated by combining two orthogonal grayscale ramp images using the XOR logical operation.The final masks are obtained by rotating the original fractal to the desired angle with no interpolation and allowing the black extra pixels to cover the entire image.The resultant filtering images can be seen in Figure 1.The XOR fractal has a flat histogram so that the convolution with these masks for image zooming maintains the original image histogram with minimal changes, as seen in Figure 2. Due to this property, the histogram is completely black.Mask convolution with this set of fractals can be used for zooming and denoising, as shown in a previous study [13].In this work, all the aforementioned properties of these masks are applied to The XOR fractal has a flat histogram so that the convolution with these masks for image zooming maintains the original image histogram with minimal changes, as seen in Figure 2. Due to this property, the histogram is completely black.
Appl.Sci.2019, 9, x FOR PEER REVIEW 3 of 18 outcome is a multi-angle analysis approach.In this work, only the multi-angle study was performed.The full scale space approach will be developed in future works.

, ) I div c x y t I c I c x y t I t (2)
As previously described, the set of fractal masks is generated by combining two orthogonal grayscale ramp images using the XOR logical operation.The final masks are obtained by rotating the original fractal to the desired angle with no interpolation and allowing the black extra pixels to cover the entire image.The resultant filtering images can be seen in Figure 1.The XOR fractal has a flat histogram so that the convolution with these masks for image zooming maintains the original image histogram with minimal changes, as seen in Figure 2. Due to this property, the histogram is completely black.Mask convolution with this set of fractals can be used for zooming and denoising, as shown in a previous study [13].In this work, all the aforementioned properties of these masks are applied to Mask convolution with this set of fractals can be used for zooming and denoising, as shown in a previous study [13].In this work, all the aforementioned properties of these masks are applied to produce tunable edges, zooming, and the segmentation of microcalcifications to enhance their main features.
The main algorithm is divided into two parts: 1.
A preprocessing step to detect and localize microcalcifications.

2.
The isolation, enhancement and segmentation of a particular microcalcification.
The first part of the algorithm begins with edge enhancement.This is achieved by calculating the standard deviation of all the fractal convolved images from 0 to 360 degrees in increments of 45 degrees.According to the ImageJ user guide [29], the Z project operation calculates the standard deviation of a stack of slices using an image with a real number of pixel values.ImageJ calculates the standard deviation of the set of the same position pixels in a set of images.For example, the (0,0) pixel value is selected in all images of the stack and then the standard deviation of these values is calculated.This result is the new pixel value of the final image.All ImageJ commands are defined and operate on images.Fractal mask size determines the width of edges and the scale of the enhanced features.Rotationally symmetric features contribute from all angles, thus their contrast is more enhanced than other less symmetric ones.This is useful for microcalcification detection because most are approximately circular in shape.Therefore, this preferential filtering for symmetric shapes can be used as a preprocessing step for more sophisticated classification techniques.Our approach allows ROI to be automatically or manually selected, as radiologists recommend.
The second part of our approach consists of zooming, contrast enhancement, and segmentation, as explained below: 1.
Zoom the region of interest of the image around the microcalcification clusters.Use simple nearest neighbor zooming without interpolation.

2.
Use a complete set of fractal filters for pixel diffusion.Convolve each fractal mask with the original ROI.A very good zooming factor is × 8 when a set of fractal masks composed of 5 × 5 pixels is used, with angular increments of 45 degrees from 0 to 315 degrees.

3.
Duplicate the resulting image, and then calculate the logarithm of the first image and the exponential of the second one.

4.
Apply the logical operation XOR between both images.After the previous enhance contrast step, the XOR operation produces a grayscale segmented image.This result permits the definition of isolevel regions and a clear delineation of the shape of the selected microcalcification.The logical XOR operation between images is described in the Image user guide [29].
Having completed these operations, the result is a set of grayscale level areas that allows a very accurate determination of the shape and size of each microcalcification, while minimizing the contribution of the surrounding tissues to the image.
An example of algorithm performance is presented using the Lena image.As seen in Figure 3, directional edges can be calculated in a short computational time, as noted in Table 1.The zooming step preserves the histogram with minimal changes, as shown in Figure 4.The computational time is also short due to the efficiency of the FFT algorithm on which the convolution of fractal masks is based.the XOR operation produces a grayscale segmented image.This result permits the definition of isolevel regions and a clear delineation of the shape of the selected microcalcification.The logical XOR operation between images is described in the Image user guide [29].
Having completed these operations, the result is a set of grayscale level areas that allows a very accurate determination of the shape and size of each microcalcification, while minimizing the contribution of the surrounding tissues to the image.Appl.Sci.2019, 9, x FOR PEER REVIEW 5 of 18 An example of algorithm performance is presented using the Lena image.As seen in Figure 3, directional edges can be calculated in a short computational time, as noted in Table 1.The zooming step preserves the histogram with minimal changes, as shown in Figure 4.The computational time is also short due to the efficiency of the FFT algorithm on which the convolution of fractal masks is based.

Results and Discussion
The performance of the fractal convolution filter was evaluated by the ImageJ software [30] with 40 digital mammograms.All the processing steps were implemented as a simple macro inside the program.The mathematical and logical operators were provided by the host software package.Mammograms were provided by the Department of Radiology of the Puerta de Hierro University Hospital after careful data anonymization and ethical consent, and from the database called the Breast Cancer Digital Repository (BCDR), created by a consortium formed between the University of Oporto and the Centro Extremeño de Tecnologias Avanzadas (CETA) [31].The mammograms with dense background tissues and those showing the presence of microcalcifications were previously selected by a radiologist.
For illustrative purposes, three representative cases were selected for the following figures.The first is an example of a dense mammogram.The second shows localized dense tissues.The last depicts dense tissue placed above microcalcifications. Figure 5

Results and Discussion
The performance of the fractal convolution filter was evaluated by the ImageJ software [30] with 40 digital mammograms.All the processing steps were implemented as a simple macro inside the program.The mathematical and logical operators were provided by the host software package.Mammograms were provided by the Department of Radiology of the Puerta de Hierro University Hospital after careful data anonymization and ethical consent, and from the database called the Breast Cancer Digital Repository (BCDR), created by a consortium formed between the University of Oporto and the Centro Extremeño de Tecnologias Avanzadas (CETA) [31].The mammograms with dense background tissues and those showing the presence of microcalcifications were previously selected by a radiologist.
For illustrative purposes, three representative cases were selected for the following figures.The first is an example of a dense mammogram.The second shows localized dense tissues.The last depicts dense tissue placed above microcalcifications. Figure 5  After determining the ROI in the enhanced mammogram (Figure 6), it is zoomed by a factor of 8 x.After determining the ROI in the enhanced mammogram (Figure 6), it is zoomed by a factor of 8×.After determining the ROI in the enhanced mammogram (Figure 6), it is zoomed by a factor of 8 x.As seen in Figure 7a, the original zoomed image is pixilated, but mask convolution eliminates these artifacts.The result is shown in Figure 7b.Finally, mathematical operators (logarithm and exponential) were applied to copies of the processed ROI and their results were combined by the XOR operator.As shown in Figure 7c, the shape and dimensions of the microcalcification are well-enhanced.In Figure 8, the largest microcalcification was enlarged to detail its shape.The result of this segmentation process can be used for automatic classification, pattern matching, and machine learning postprocessing steps.The processing steps are shown in Figure 8a-c.As seen in Figure 7a, the original zoomed image is pixilated, but mask convolution eliminates these artifacts.The result is shown in Figure 7b.Finally, mathematical operators (logarithm and exponential) were applied to copies of the processed ROI and their results were combined by the XOR operator.As shown in Figure 7c, the shape and dimensions of the microcalcification are wellenhanced.In Figure 8, the largest microcalcification was enlarged to detail its shape.The result of this segmentation process can be used for automatic classification, pattern matching, and machine learning postprocessing steps.The processing steps are shown in figures 8a, 8b and 8c. Figure 9 shows a mammogram with localized-dense tissues.Albeit somewhat difficult, small calcifications can be noted on the left of the original image.They can be more clearly observed on the right of the enhanced image, and its clustered pattern organization is also noticeable.The possible malignant region is located and indicated in Figure 10.Another example of a detailed lesion is represented in Figure 11.A study based on the application of the presented algorithms allows the lesion to be considerably enhanced.Another example of a complex mammogram is presented in Figure 12, where dense tissue is located above the microcalcifications that are very difficult to visualize.The enhanced image is shown on the right of Figure 12.The final result reveals a significant number of microcalcifications.
As in the above-mentioned cases, analysis is focused on the ROI so that each microcalcification can be characterized.Figure 13 indicates the ROI to be analyzed, and the results are shown in Figure 14.In these cases, calcifications are more easily detected and their characterization would help to classify between malignant or benign lesions due to shape, as seen in Figure 15.In the original image, the microcalcification shape is barely noticeable.Nevertheless, shape becomes clearly discernible As seen in Figure 7a, the original zoomed image is pixilated, but mask convolution eliminates these artifacts.The result is shown in Figure 7b.Finally, mathematical operators (logarithm and exponential) were applied to copies of the processed ROI and their results were combined by the XOR operator.As shown in Figure 7c, the shape and dimensions of the microcalcification are wellenhanced.In Figure 8, the largest microcalcification was enlarged to detail its shape.The result of this segmentation process can be used for automatic classification, pattern matching, and machine learning postprocessing steps.The processing steps are shown in figures 8a, 8b and 8c. Figure 9 shows a mammogram with localized-dense tissues.Albeit somewhat difficult, small calcifications can be noted on the left of the original image.They can be more clearly observed on the right of the enhanced image, and its clustered pattern organization is also noticeable.The possible malignant region is located and indicated in Figure 10.Another example of a detailed lesion is represented in Figure 11.A study based on the application of the presented algorithms allows the lesion to be considerably enhanced.Another example of a complex mammogram is presented in Figure 12, where dense tissue is located above the microcalcifications that are very difficult to visualize.The enhanced image is shown on the right of Figure 12.The final result reveals a significant number of microcalcifications.
As in the above-mentioned cases, analysis is focused on the ROI so that each microcalcification can be characterized.Figure 13 indicates the ROI to be analyzed, and the results are shown in Figure 14.In these cases, calcifications are more easily detected and their characterization would help to classify between malignant or benign lesions due to shape, as seen in Figure 15.In the original image, the microcalcification shape is barely noticeable.Nevertheless, shape becomes clearly discernible Figure 9 shows a mammogram with localized-dense tissues.Albeit somewhat difficult, small calcifications can be noted on the left of the original image.They can be more clearly observed on the right of the enhanced image, and its clustered pattern organization is also noticeable.The possible malignant region is located and indicated in Figure 10.Another example of a detailed lesion is represented in Figure 11.A study based on the application of the presented algorithms allows the lesion to be considerably enhanced.Another example of a complex mammogram is presented in Figure 12, where dense tissue is located above the microcalcifications that are very difficult to visualize.The enhanced image is shown on the right of Figure 12.The final result reveals a significant number of microcalcifications.As in the above-mentioned cases, analysis is focused on the ROI so that each microcalcification can be characterized.Figure 13 indicates the ROI to be analyzed, and the results are shown in Figure 14.In these cases, calcifications are more easily detected and their characterization would help to classify between malignant or benign lesions due to shape, as seen in Figure 15.In the original image, the microcalcification shape is barely noticeable.Nevertheless, shape becomes clearly discernible after applying the proposed segmentation.The processing steps are shown in figures 15a, 15b and 15c.As in the above-mentioned cases, analysis is focused on the ROI so that each microcalcification can be characterized.Figure 13 indicates the ROI to be analyzed, and the results are shown in Figure 14.In these cases, calcifications are more easily detected and their characterization would help to classify between malignant or benign lesions due to shape, as seen in Figure 15.In the original image, the microcalcification shape is barely noticeable.Nevertheless, shape becomes clearly discernible after applying the proposed segmentation.The processing steps are shown in Figure 15a-c.Different algorithms have been applied to 40 digital mammograms to test the level of enhancement achieved by the proposed approach.The compared algorithms are: Local Contrast Enhancement (CLAHE) [32], an algorithm based on a multiscale wavelet analysis (Atrous) [33,34], and an algorithm based on wavelet sub-band decomposition (Haar) [35].They were selected because Different algorithms have been applied to 40 digital mammograms to test the level of enhancement achieved by the proposed approach.The compared algorithms are: Local Contrast Enhancement (CLAHE) [32], an algorithm based on a multiscale wavelet analysis (Atrous) [33,34], and an algorithm based on wavelet sub-band decomposition (Haar) [35].They were selected because Different algorithms have been applied to 40 digital mammograms to test the level of enhancement achieved by the proposed approach.The compared algorithms are: Local Contrast Enhancement (CLAHE) [32], an algorithm based on a multiscale wavelet analysis (Atrous) [33,34], and an algorithm based on wavelet sub-band decomposition (Haar) [35].They were selected because they are well-known and are tested ImageJ implemented plugins.
In Figure 16, the processed images of an ROI sample are represented.Different algorithms have been applied to 40 digital mammograms to test the level of enhancement achieved by the proposed approach.The compared algorithms are: Local Contrast Enhancement (CLAHE) [32], an algorithm based on a multiscale wavelet analysis (Atrous) [33,34], and an algorithm based on wavelet sub-band decomposition (Haar) [35].They were selected because they are well-known and are tested ImageJ implemented plugins.
In Figure 16, the processed images of an ROI sample are represented.In order to quantitatively validate all these results, we calculated the contrast improvement index (CII) defined in a previous study [9].This parameter was calculated using Formula (3): C is obtained by Formula ( 4) where f is the mean gray-level of a microcalcification area and b is the mean gray-level value of the background.
Table 2 provides the contrast improvement index results obtained with the different algorithms cited above.In order to quantitatively validate all these results, we calculated the contrast improvement index (CII) defined in a previous study [9].This parameter was calculated using Formula (3): C is obtained by Formula (4) where f is the mean gray-level of a microcalcification area and b is the mean gray-level value of the background.Table 2 provides the contrast improvement index results obtained with the different algorithms cited above.The contrast (CII) of the different microcalcifications depends on the grayscale of the microcalcifications and the background, the density of the surrounding tissue, and the complexity of the background.Accordingly, Table 2 shows how the CII values vary considerably.However, in all cases, the proposed algorithm confers improvement, while the other three algorithms produce less enhancement, and in some cases, even reduced contrast.This is why most recent references [3,22] tend to use hybrid approaches.
The results shown in Table 2 agree with the values provided in Table IV of the previous study [9], which reinforces the validity of the presented algorithm.It is noteworthy that the contrast enhancement achieved by fractal mask convolution is comparable, or even better, than the results of the referenced algorithms without removing the background.
Moreover, the peak signal-to-noise ratio (PSNR) and the average signal-to-noise ratio (ASNR) were calculated, and are shown in Tables 3 and 4, using Formulae ( 5) and ( 6) described in the previous study [9] for more robust comparison purposes.
where p is the maximum gray-level value of the microcalcification area and σ is the standard deviation in the background region.The results of Tables 3 and 4 confirm that the approach proposed herein produces a very good enhancement of the microcalcification region over the surrounding tissue, which would thus help radiologists in their visual discriminations.

Conclusions
A novel mask convolution enhancement algorithm based on the fractal properties of a set of masks is presented.The fractal masks are characterized by a maximal distribution of gray values over the entire area for a given pixel value, which makes their histogram flat.They also have directional properties, which allows the directional features to be studied in the analyzed images.The calculation of different operations with the processed images produces invariant histogram zooming, edge detection, contrast enhancement, and segmentation of microcalcifications.This approach favorably compares with previous techniques, like wavelet decomposition and other contrast enhancement

Figure 1 .
Figure 1.Complete set of oriented fractal masks with angular increments of 45 degrees.

Figure 1 .
Figure 1.Complete set of oriented fractal masks with angular increments of 45 degrees.

Figure 1 .
Figure 1.Complete set of oriented fractal masks with angular increments of 45 degrees.

Figure 4 .
Figure 4. Detail of the Lena image with 8 × zoom using the nearest neighbor and fractal convolution, respectively, and their histograms.
offers a typical example of a dense mammogram with microcalcifications.Enhanced images were achieved by convolving the original mammogram with a set of 5 × 5 fractals rotated in angular increments of 45, as previously explained.The result is shown on the right of Figure 5.

Figure 4 .
Figure 4. Detail of the Lena image with 8 × zoom using the nearest neighbor and fractal convolution, respectively, and their histograms.

Figure 7 .
Figure 7. Detail of the ROI selected in Figure 6.(a) Original zoomed ROI, (b) Fractal convolved and contrast enhanced ROI, (c) XOR segmented ROI.

Figure 9 .
Figure 9.The original and enhanced mammograms.

Figure 9 .
Figure 9.The original and enhanced mammograms.

Figure 9 .
Figure 9.The original and enhanced mammograms.

Figure 9 .
Figure 9.The original and enhanced mammograms.

Figure 12 .
Figure 12.The original and enhanced mammograms.

Figure 12 .
Figure 12.The original and enhanced mammograms.

Figure 16 .
Figure 16.ROI-processed images.(a) Original sample, (b) fractal mask, (c) Local Contrast Enhancement (CLAHE) algorithm, (d) Atrous algorithm, and (e) Haar algorithm.The histograms of the original ROI and the different processed images are shown in Figure 17 for comparison purposes.

Figure 17 .
Figure 17.Histogram of ROI.(a) Original sample.(b) Processed image with a fractal mask and no contrast enhancement.(c) Image processed with a fractal mask and log-exp contrast enhancement.(d) Processed image with the CLAHE algorithm.(e) Processed image with the Atrous algorithm.(f) Processed image with the Haar algorithm.

Table 1 .
Computational performance of our algorithm with an Intel I5 processor.

Table 1 .
Computational performance of our algorithm with an Intel I5 processor.