1 Introduction

One of the main causes of casualty in female adults is breast cancer and the death rate keeps increasing in number. Studies reveal that early detection increases the chance of survival to 85% while late detection has only 10% chances of survival [1]. This makes early identification of breast cancer a notable factor in order to limit the death rate of breast cancer. Diagnostics and early stages engagement reduce the danger associated with the treatment. Tumour and certain activities in the tissue aid specialists to conduct timely diagnosis on a patient [13]. For ages, imaging techniques are used clinically as a primary method for identifying early breast cancer as well as differentiating breast tumors [35]. Wong et al. found out that the most popular imaging technique for screening breast cancer is mammography but comes with several false-negative rates among other disadvantages [33]. It also exposes patients to potentially harmful ionizing radiation that can turn out to be cancer tissues. These limitations in mammograms and other conventional methods tempted us to analyze the effectiveness of classifying breast thermograms using SVM.

Madhavi et al. proposed thermal imaging which provides a temperature representation woman’s breast is used [20]. The authors noticed that the images are captured with advanced and sensitive cameras with excessive temperature and spatial resolutions. It is majorly used because is a non-invasive screening technique that forecasts the hazard associated with the growth of cancer [20]. The latest technology SVM in conjunction with Anisotropic Diffusion and Gaussian filter fused together to enhance the image [6, 20]. Several works applied Canny edge detection after of level-set segmentation for better segmentation of Region of Interest (ROI) [3, 6, 20]. Devi et al. discovered that the features are extracted by computing different matrixes while t-test is used to fuse them. The authors used Kernel Principal Component Analysis (KPCA) to obtain significant features that are fed to LSSVM for classification using Radial Basis Function (RBF) as the kernel.

Nindrea et. al. noted that machine learning algorithms are successful in breast tissue classification as their searching process explains and differentiates the classification and conception data, whereby the model is decided upon data training analysis whose label classification is known already. Gogoi et al. discovered that the SVM is one of the latest technologies and the most repeatedly used classifier to recognize the pattern and has not been practiced to classify breast thermograms [9]. The least-square version of SVM is LSSVM which is a type of supervised learning system. It changes input data using kernel functions into a huge dimensional feature space to make transformed data to be more detectable than original data [20]. Kumar et al. realized that LSSVM depends on statistical learning theory. It is used in several applications like data analysis and pattern recognition meant for class and regression tests. In this research, the LSSVM technique is used to classify breast thermograms into healthy and sick images [20]. Present studies of SVM-based image classification have used many algorithms and techniques to enhance the performance metrics in their works. The method used by [20] gives 96% accuracy, 100% sensitivity, and 92% specificity. To further improve the accuracy of the state-of-the-art e apply the Gaussian filter and edge detection.

However, this accuracy can still be enhanced when images are filtered before diffusion and edges are detected in a line form.

The contribution of this work can be summarised as below:

  • The research proposes an Enhanced Filtering and Edge Detection (EFED) that combine Modified Anisotropic Diffusion (MAD) and Enhanced Level Set Segmentation (ELSS), that Increases the accuracy, specificity, and sensitivity of breast thermogram classification.

  • Improve the classification accuracy, specificity, and sensitivity of infrared imaging, by fusing Gaussian filter with Anisotropic Diffusion.

  • enhance an image while applying Canny edge detection to the output of level-set segmentation to stop the edge thee extending beyond a boundary.

  • It denoises a very noisy image before feeding the output to a filter and prevents blurring or staircase caused by an inefficient threshold parameter that determines the level of smoothness in anisotropic diffusion.

2 Related work

Kumar et al. enhanced breast vessel segmentation with Breast Vessel Extraction Algorithm (BVEA) that originates from retinal vessel extraction methods in order to detect breast cancer from the segment [19]. They provide a solution to the problem using the Gaussian filter to remove noise. The accuracy of the results was increased by using two-stereo cameras which improved the depth perception. This solution integrated an extraction algorithm and image enhancement, and breast vessels were extracted by using threshold and morphological operators. It provides higher accuracy and sensitivity of 96.5% and 98% respectively while that of specificity also remains high at 95%. However, the research was performed on a single set of with no validation from any other sources. Future work can be further improved when the algorithm is applied on a larger set of data from another source in order to compare and evaluate the model. Devi et al. enhanced the segmentation of the breast thermogram Region of Interest (ROI) to improve the classification of thermograms [6]. They offer an answer to the problem by using the Support Vector Machine – Radial Basis Function (SVM-RBF) classifier to improve the classification. This solution integrates SVM-RBF classifier with a Gaussian filter for smoothing and asymmetry analysis for abnormality detection. It improves classification accuracy by 0.69–0.95 in terms of (pixel shift error), 0.9705 sensitivity, and specificity of 0.97. As an outcome, the accuracy, sensitivity, and specificity in term of pixel shift error is accepted, but first thermograms datasets are not confirmed to have taken in a controlled environment by a proficient thermographer. This can lead to temperature measurement error as a result of the reflection of surrounding thermal radiation reflected onto measured object which is captured by a thermal camera. Díaz-Cortés et al. developed a segmentation technique to assist health specialists in breast cancer diagnosis [7]. They present a solution by utilising a swarm method called Dragonfly Algorithm (DA) to determine multi-threshold which offers a robustness and a lower cost of computation. This solution performed a research by fusing two segmentation techniques, Otsu’s method and Kapur’s entropy. It provides a better peak-signal-to-noise-ratio in comparison with other algorithms used in the validation. The future development of this work should consider high data set linked with clinical research to assess behaviour of skin cells with respect to time and individual pathology stages. Torres-Galván et al. used Convolutional Neural Network (CNN) to classify the thermograms as normal/abnormal classes[31]. The authors also used learning transfer; their experimental results show the transfer-learned ResNet-101 model had a sensitivity of 92.3% and a specificity of 53.8%.

Morales-Cervantes et al. analyzed breast thermograms to evaluate their efficiency as an alternative tool to mammography [24]. They presented a solution using an Infrared FlexCam Pro Camera for imaging, and a MATLAB automated program to interpret thermal images utilizing a thermal score. This solution was carried out using a classifier with computational thermal asymmetries, and breast areas that are most vascularized were compared after extraction. It provides a sensitivity of 100% and specificity of 68.68% while predictive value is the best at 100%. However, the positive predictive value is low and found to be 11.2%. For future work, a sophisticated machine learning or deep learning technique that is best for classifying subjects thermograms could yield better results an automatically generated Matlab program. Guirro et al. evaluated the efficiency of the thermogram image in breast cancer assessment to determine its reliability in clinical and research practice [12]. They solve problems by performing a thermography examination on adult females diagnosed with breast cancer and confirmed by biopsy. The solution carried out the research by using a thermal camera of sensitivity 0.1ºC to check the breast region temperature in a controlled temperature room. It provides accuracy, sensitivity, and specificity of 0.749, 0.857, and 0.60 respectively. These performance metrics are lower than most of the existing studies. Future work can use a neural network and not ThermaCam software to achieve better accuracy.

Sarigoz et al. determined the Digital Infrared Thermal Imaging (DITI) potential for breast lump diagnosis [27]. They measured the minimum and maximum temperature figures of every lesion site and its neighbor. They conducted examinations on patients using a FLIR thermal camera, and its software program for analysis. Prior to the thermal imaging of subjects, ultrasound and mammographic exams were taken for each subject. The thermal imaging result was checked against the histopathological results. The methodology is clearer even though not the best in terms of accuracy. The sensitivity of 95.24% is acceptable but the specificity of 72.73% can be improved. Gogoi et al. evaluated the efficiency of Infrared Breast Thermography in early abnormality detection in the breast to reduce the rate of incidence and mortality in breast cancer [9]. They studied the efficiency by conducting tumour location matching, intensity, and temperature-based analysis. For intensity and temperature-based analysis, they extracted many intensity and temperature features for their classification while suspicious regions’ locations were paired with mammograms’ tumour location in tumor location matching. They presented a solution to the issue by using a support vector machine to evaluate the classification performance of extracted intensity and temperature features. It depicts an accuracy of 83.22% showing some degree of imperfection. A support vector machine is utilized which has a feature to reduce classification error. However, the accuracy can be increased in the future if the study is done on larger datasets and using data asymptomatic patients as the validation tool. Gonzalez-Hernandez et al. have studied different dynamic infrared thermography modalities their benefits, limitations, and future development opportunities [11]. They offer a solution to induce a powerful period for thermal recovery and create a bigger contrast in infrared images. It provides the highest sensitivity and specificity of 100% utilizing the Bayesian Network. As a result, the sensitivity is accepted but Dynamic Infrared Thermography (DIT) should be used with Bayesian Network as a classifier. Jeyanathan et al. analysed the efficiency of breast thermograms to detect the accuracy of computer-aided detection (CAD) systems in the early diagnosis of breast anomalies [16]. They provide solution by using various classifiers like AdaBoost, linear regression, Naives Bayes, Gaussian discriminant analysis, K-nearest neighbour, and support vector machine on the features to compare the accuracy. It achieved best accuracy, sensitivity, and specificity of 91%, 87%, and 90% respectively with AdaBoost algorithm but accuracy is reduced to 83% using frontal thermogram views. Further analysis can be improved with a higher number of datasets for training.

Figueiredo et al. estimated the tumor depth of a breast to develop a technique capable of detecting the location of a geometric center of an internal tumor in a breast [8]. They used correlations, non-dimension solution of breast temperature field and variables definitions not depending on understanding of thermal properties and tissue metabolism. The technique displays high potential for tissue applications and serves as a tool to increase specificity in breast cancer detection from thermal images.

Abdel-Nasser et al. developed methods (learning-to-rank (LTR) and texture analysis) to learn representation and analyse texture for breast cancer detection in dynamic thermal images [2]. It solves issues by evaluating six texture analysis methods’ effectiveness to explain breast temperature changes in thermograms. It provides the best precision, area under curve (AUC), and an accuracy of 0.963, 0.983 and 0.961 respectively using oriented gradient histogram using backward LTR representation. From the result, it performed better by comparing their results with related studies. But the AUC is lower due to the larger samples used. The future work should concentrate on utilizing sparse dictionary learning for better powerful descriptions in thermograms. Prabha and Sujatha enhanced extraction of local information from infrared images clustering Anisotropic Diffusion with Fuzzy-C-Means (ADFCM) to improve the signal-to-noise ratio, contrast and make edges clearer in detecting abnormalities in the region of interest [25]. They provide a solution by using ADFCM which has improved the hottest region segmentation. This solution performed the study by multiplying ground truth masks with raw thermograms to extract non-breast regions delineating the two breasts for filtering and integrating an output of thresholding edge map with FCM clustering. They efficiently classify the breast tissue achieving 100% when compared to ground truth, error in the number of clusters has been considered in this work. The future work can be further enhanced by considering samples in larger numbers.

Gonçalves et al. compared classification techniques by using different methods to classify patients into three categories [10]. They present a solution by using two different classification approaches SVM and Artificial Neural Network (ANN)) which has compared the efficiency of the two. The solution carried out a search by applying median and Gaussian filters to remove input image noise. Also, training of automatic classifiers with the set of features whereby some parts of the image are for training while others are for testing classifiers. For ANN, it provides accuracy, a normal specificity, and a benign specificity valued 76.19%, 57.1%, and 83.3% respectively while that of SVM is 80.95% accuracy. Normal, benign, and malignant specificities are 83%, 85.71%, and 75% respectively. The accuracy can be further improved and a database with known classification information for each breast can be used. Magalhaes et al. utilized many machines learning classifiers with different kernels on static and dynamic melanocytic nevi lesions and melanoma thermograms to enhance the characterization of skin tumors to improve the accuracy and sensitivity of the system. They were able to classify the two different skin tumors [21]. They offer a solution to the problem by using static parameters implementing learner-based over support vector machines. This solution conducted a study by acquiring thermograms statically and dynamically for melanoma tumor and melanocytic nevi differentiation. It provides a sensitivity of 91.3% and an accuracy of 84.2% in existing systems. The classification is achievable with the result, but the accuracy and sensitivity need to be improved to characterize skin lesions.

Sathish et al. compared the classification accuracy between images that are normalized and those that are not with the normalization algorithm to show the usefulness of normalizing the temperature matrix of breast thermal images [28]. They provide a solution by using Random Subset Feature Selection (RSFS) and SVM Gaussian classifier. Their solution was conducted by using automatic segmentation and extracting wavelength sub-bands energy features. Genetic Algorithm Random Subset Feature Selection and Sequential Floating Forward Feature Selection are applied to features to obtain an appropriate feature set. It achieved an accuracy of 91% and 75% with normalized and non-normalized images respectively. The accuracy of the normalized image is accepted but the non-normalized image displays poor performance and gives us the importance of normalization. Future work can be enhanced by using a large dataset to verify classification accuracy for different malignancy levels [26].

Saxena et al. improved the risk prediction of post-operative necrosis with quantitative parameters of novel active and passive to enhance the accuracy, specificity, and sensitivity [22]. They provide a solution by using resultant quantitative parameters and cut-off value-based representation which yielded higher accuracy, specificity, and sensitivity. This solution performed research by integrating both the derived and passive qualitative parameters to predict flap necrosis risk and distinguish between diseased and normal patients. It provides high accuracy, sensitivity, and specificity of 88%, 89%, and 87% respectively while predicting the risk of post-operative necrosis within 24 h. In conclusion, the accuracy is moderate but can be improved taking the lower PPV indicating many false-positive which also affects the prediction accuracy.

3 State of the art solution discusion

Figure 1 depicts the selected state-of-the-art system features (blue broken line represents the features we still use in our system and limitations in red broken line) [20]. The proposed integration of feature vectors from multi-view breast thermal images which are classified by Least Square Support Vector Machine (LSSVM) to enhance breast cancer screening method performance. Fusing features from different sensors with a concatenated feature vector that contains rich information provides better classification results. They carried out the research by pre-processing thermograms using anisotropic diffusion to preserve region edges, and segmentation is carried out by a level-set algorithm. Local and regional features are extracted, and significant features are fused to get Composite Feature Vector (CFV) which undergo LSSVM classifier [20]. It presents sensitivity, accuracy, and specificity of 100%, 96%, and 92% respectively. This system consists of six steps (as in Fig. 1): thermogram acquisition, pre-processing, segmentation, feature extraction, feature reduction, and classification (Fig. 2).

Fig. 1
figure 1

State-of-the-art system, [20] (The blue borders display state of art solution good features while the red border gives its limitation)

Fig. 2
figure 2

Flowchart of texture features fusion algorithm

Thermogram acquisition

Breast thermograms from 63 subjects are considered for the work. The thermograms acquired by FLIR thermal camera are obtained from Mastology Research which is a free online database [20]. The images are of 640 × 480 resolution [29] consisting of healthy and unhealthy conditions and of varying sizes.

Pre-processing

The images are pre-processed to enhance the contrast, low signal-to-noise ratio and differentiate the boundaries. The RGB images are converted to greyscale and enhanced through anisotropic diffusion. The diffusion can smoothen intra-regions and protect inter-region edges. However, the anisotropic model is limited by blurring or staircase due to the problem of choosing a threshold parameter that determines the level of smoothness [23]. AD models only consider information on the gradient of a diffused pixel and do not preserve enough features of a pixel with a low gradient [32]. A large threshold parameter can cause an over-smoothed outcome while a small value leads to pixels being unfiltered thereby leading to false edges.

ROI Segmentation

Level set (LS) segmentation has been used to extract complex shapes segmenting the region of the Interest (ROI) from the rest part of pre-processed thermograms. Value of time step for segmentation taken to be less than 0.25 to get a steady curve evolution. T, v, λ, and iterations numbers are carefully selected to smooth the boundary of the segmented region of the breast [20]. The level set method offers a huge benefit in solving issues of producing corner points, breaking and combining curve, etc., because of its stability and topology irrelevancy [30]. However, objects with an edge not defined by gradient are not segmented by level-set. Also, the curve may get beyond the boundary of the object. The function of edge-stopping depends on the gradient of an image. This means gradient determines which object to segment. Also, the function of an edge-stopping can never be completely equal to zero at edges, making the curve likely pass-through boundaries. Therefore, this reduces the segmentation accuracy if an image is not defined by gradient.

Texture Feature Extraction

Twenty-one grey-level co-occurrence matrix (GCLM) features are extracted from the ROI. Average value from four angles are computed to acquire highly local information. Grey-level run-length matrix (GLRLM) is computed showing pixels total runs possessing level I and length of run j in a certain direction. Texture features of eleven GLRLM are computed as well as their average values to reveal pixels number of certain grey value which exist in a given direction sequence. Thirteen features are extracted from the Grey-level size zone matrix (GLSZM) to characterize regional texture features. The difference of grey-level between a pixel and its adjacent pixels average grey-level is calculated. Five texture features of NGTDM are extracted for computation of neighbourhood grey tone difference matrix (NGTDM).

Feature Reduction

Features are initially reduced by subjecting them to a t-test which compares the means of the sample population in order to reveal the difference between them. Resulted t-value from the test determines p-value utilizing t-table which is used for acceptance or rejection of the null hypothesis. According to the state of the art solution, Kernel Principal Component Analysis (KPCA) with non-linear kernel function latter used on the reduced feature to get significant features [20]. Kernel matrix built using training data and principal constituents are computed in large feature space linked by nonlinear mapping to input space.

Classification

LSSVM is used to analyse and recognize data patterns. It determines the trade-off between minimizing training error and smoothness. Hyperparameters are optimized employing tenfold validation on training data. [20] used a classification model achieved by LSSVM training with optimized hyperparameters which are later used to categorize and test subjects as healthy and unhealthy. The model of [20] offers accuracy, sensitivity, and specificity of 96%, 100%, and 92% respectively.

The Anisotropic Diffusion algorithm implemented in the pre-processing stage to smoothen intra-regions and protect inter-region edges as in Eq. (1) [20]. However, accuracy can still be increased by applying the Gaussian filtering technique before diffusion iteration.

$$(\mathrm{Anisotropic}\;\mathrm{Diffusion}){\partial_t{f}=div\{c\mathit\nabla f(x,y)\}}$$
(1)
\(f(x,y)\):

is a function of the image div shows divergence operator

\(\mathit\nabla\):

represents gradient operators.

C:

is a conduction coefficient represented by Eq. 2

 

$$C=1/[1+\left(\frac{\left|\left|\nabla f\right|\right|}{K}\right){ }^{2}]$$
(2)
K:

gradient threshold constant.

Diffusivities at locations of the larger gradient are reduced making edges to be preserved.

Discretised form of Eq. 1 is below:

$${f}_{i,j }^{t+1}={f}_{i,j }^{t}+\lambda {{{\left[{C}_{N}.{\nabla }_{N}f+{C}_{s}.{\nabla }_{s}f+{C}_{E}.{\nabla }_{E}f+{c}_{w}.{\nabla }_{w}f\right]}^{t}}_{i,j}}$$
\(\nabla\):

representing nearest neighbour  difference

Level-set segmentation used at step 3 of the system identifies and tracks boundaries and shapes. It follows changes in thermogram shapes and topologies to avoid segmentation error. [20] carefully chosen parameters and iterations number to ensure smoothness in segmented region boundary in order to have an accurate segmented ROI Nevertheless, it doesn’t stop at the right boundary and sometimes extends to cavity region (Table 1) .

Table 1 Texture features fusion algorithm

Energy of Level-set segmentation:

$$\xi \left(\varphi \right)= \mu .P\left(\varphi \right)+ {\xi }_{g}{,}_{\lambda }{,}_{v} (\varphi )$$
(3)
\(\mu .P\left(\varphi \right)\):

is the component of internal energy

$${\xi }_{g}{,}_{\lambda }{,}_{v}\left(\varphi \right)= \lambda {L}_{g}\left(\varphi \right)+v{A}_{g}\left(\varphi \right)$$
(4)
\({\xi }_{g}{,}_{\lambda }{,}_{v} \left(\varphi \right)\):

is the external energy

4 Proposed system

Following the review of different methods for Breast thermogram classification, we evaluate the limitations and benefits of every method. Accuracy, sensitivity, specificity, miss classification rate, and Area Under Curve (AUC) were the main concerns for consideration. From the list of models in review, we choose the best among them, [20]; ((State-of-the-Art), as the foundation for our Enhanced Filtering and Edge Detection (EFED) model. The major factor for the choice is that [20] has utilised Least Square Support Vector Machine (LSSVM) which estimates more accurately than many different methods like neural networks [17]. Another reason for selection is due to its best accuracy, sensitivity and specificity resulting from fusing features of multi-views thermograms. Fusing significant texture features from multi-views thermal images provide a sensitivity of 100% and higher accuracy than other methods compared. Significant texture features fusion discriminates between healthy and unhealthy thermal images. The features derived from multiple views of thermograms aids in obtaining a more robust compound feature vector that contains rich information and helps to obtain better performance measures. The composite feature vector captures all the advantages of different types of features. [18] noted that various types of local and holistic features possess their own strengths and may have weaknesses as well. Since they have different properties, they complement each other. However, Anisotropic Diffusion used in the enhancement stage is affected by blurring or staircase due to the problem of choosing a threshold parameter that determines the level of smoothness [23]. [4] informed that the diffusion coefficient is hard to choose for the iterations since the iterations are not stable and issues like blocky effects are likely to happen. AD is not capable to remove noise in a high noisy image since it depends on a gradient to diffuse and the gradient is not reliable due to the influence of noise on it. Also, level-set used for segmentation does not segment an image not defined by gradient and curve may extend beyond a boundary. Moreover, different enhancement and segmentation techniques were reviewed and evaluated. In addition to the proposed system with a different solution, [6] discusses about the analysis of thermogram by an asymmetry in Infra-mammary curves. This helps to pre-process thermograms using Gaussian filter before anisotropic diffusion iteration which makes it easier to eliminate noise. Also, adaptable thresholding of canny edge detector applied to avoid level-set segmentation passing beyond the boundary thereby overcoming problems of level set ensuring accurate segmentation. The adapted features from second-best solution are totally different and new to state-of-the- art. These features improve the accuracy, sensitivity, and specificity of breast thermogram classification.

The proposed model comprises of six main stages (Fig. 3): Acquisition, pre-processing, segmentation, feature extraction, feature reduction, and classification.

Fig. 3
figure 3

Proposed enhanced filtering and edge detection

Acquisition

Here, greyscale thermal images are obtained from free online Database of Mastology research. The thermograms consist of healthy and unhealthy images with a resolution of 640 × 480 were acquired by FLIR SC-620 thermal camera [6, 20]. The patients under consideration are of age range 32 to 85 years of age.

Pre-processing

the images are enhanced to remove noise in order to improve the classification accuracy. Images are first converted to greyscale and distinguish corrupted and noise-free pixel by grey-level variance and Gaussian filter is applied for filtering corrupted pixels. We pre-denoise with Gaussian filter before applying improved Anisotropic diffusion (AD) to remove remaining noise and to correct blurring edges. This solves the issue of choosing a diffusion coefficient in AD which is hard to choose for the iterations since the iterations are not stable. Also, AD models only consider information on the gradient of a diffused pixel and do not preserve enough features of a pixel with low gradient [32]. Gaussian filter helps us to increase the gradient while filtering out noise. [14] successfully magnified breast vessels’ borders by Gaussian filtering. The smoothening process of AD is controlled through adaptive gradient threshold K in coefficient function. The local region gradient value gives information about the location of the pixel (boundary or flat) [18]. To keep detail information as well as boundaries edges during noise removal, the large diffusion coefficient is set in flat location while the reverse is set for edge region for less diffusion [18]. We used a gradient to automatically control threshold parameter K, and iteration numbers are selected in a way that edges are preserved properly. Small variations in noisy and texture regions are kept in order to less smooth preserving the edges while large variation is set in flat regions for more smoothening to effectively remove the noise. The resulting product from AD iterations is fed to the level-set stage for segmentation (Fig. 3).

Segmentation

Level-Set (LS) segmentation method is employed to segment breast from the pre-processed thermal images, see Fig. 3 as in state of the art. It is used to identify and track boundaries and shapes and known for its efficiency in monitoring shapes and topologies changes [34]. However, LS finds it hard to stop at the correct boundaries and not leaking beyond the boundary. This has led to the reason for enhancing the LS method. [34] achieved enhancement of level-set algorithm output by pre-processing a trophectoderm image using Canny edge detector and realized edges of breast segment boundaries. Adaptive thresholding of Canny edge detector is used in our recommended solution to identify segments boundaries identified by level-set. It resulted to a set of edges corresponding to segment and boundaries of another region [34]. Better morphological segmentation is achieved by employing edge dilation using 3 × 3 structuring element. The segmented ROI for frontal, right, and left thermogram are from axilla to lower boundary of the breast, axilla to right end breast boundary, and axilla to left end breast boundary, respectively. Timestep T,, v and iterations number are carefully selected to achieve smoothness in the boundary of ROI [20]. We filter noise with a standard deviation of value 1.4.

The Enhanced Filtering and Edge Detection (EFED) is implemented in image enhancement and segmentation stages. The reason for using EFED is that limitations of anisotropic diffusion and level set segmentation are eliminated. It replaces the image with a filtered one to increase gradient and change range as diffusion models only consider information on a gradient of a diffused pixel and does not preserve enough features of a pixel with low gradient [32]. It uses enhanced image as the foundation to further improve the gradient. The enhanced image is expressed as Eq. 5 [14]. Furthermore, it combines the energy of level set segmentation with an edge stopping function to stop diffusion at the right boundary. More importantly, it is composed of Gaussian convolution that smooths images by noise reduction [5]. The EFED originated from a combination of modified anisotropic diffusion and level set segmentation and expressed below in Eq. (5):

$$\mathrm{EC}={M'\partial}_tf\;+\;M\xi\left(\varphi\right)$$
(5)

where,

\({M'\partial}_tf\):

Modified anisotropic diffusion

\(M\xi \left(\varphi \right)\):

Modified level set segmentation energy

[14] showed that modified anisotropic diffusion uses enhanced image adapted from a second-best solution to obtain an input to apply rest part of the equation. This is combined with the Gaussian filtering and anisotropic diffusion to achieve new equation. This modified anisotropic diffusion is expressed in Eq. (6) below:

$${M'\partial}_tf=div\left\{C_2\mathit\nabla(G{}_\sigma Mf(x,y)(Enh)\right\}$$
(6)

where,

$${M\partial }_{t}f:modified \;AD$$
\(\nabla f(x.y)(Enh)\):

enhanced gradient of image

div:

divergence operator

\({C}_{2}\):

conduction coefficient

\(G{}_{\sigma }\):

Gaussian filter of value σ

The modified level set segmentation is derived from level set segmentation energy and an edge stopping function after modification and changing the iteration value obtaining new equation to solve the issue. The modified level set segmentation is shown as Eq. (7):

$$M\xi\left(\varphi\right)=\mu.P\left(\varphi\right)+\xi_g,_\lambda,_v\left(\varphi\right)+g(\vert\mathit\nabla I\vert)$$
(7)

Where,

\(\xi_{g,\lambda,v\;}(\varphi)\):

external energy

\(\mu .P\left(\varphi \right)\):

component of internal energy

\(g(|\nabla I|)\):

edge stopping function

5 Area of improvement

Two equations are proposed for Enhanced Filtering and Edge Detection. The accuracy and other performance metrics of state of the art are low because of the dependency on the image gradient and the problem of choosing a threshold parameter. The proposed Eq. (6) lets diffusion to stop at the boundaries by having diffusion values to be zero at boundaries. It also denoise the image of higher noise efficiently by multiplying Gaussian filter with an image before finding the gradient. This solves the limitations of anisotropic diffusion and level set. Furthermore, it preserves ROI features prior to features extraction despite the image transformation. In the work of [20], it shows that the major problem of state of the art is the utilization of AD in the image enhancement stage and LS during ROI segmentation. It causes blurring or staircase when a threshold parameter that determines the level of smoothness is not chosen properly. Furthermore, it does not preserve enough features of a pixel with a low gradient due to dependency on the gradient and also segments ROI beyond the boundary. The Enhanced Filtering and Edge Detection solves the limitation, utilizing modified anisotropic diffusion and modified level set segmentation. It combines the Gaussian filter [14] and AD [20] to enhance the process and provides improved conduction coefficient. Furthermore, it forms a segmentation technique joining edge detection with level set segmentation to detect boundary edges. Moreover, Canny edge detection makes it easy for additional computations on the image to be performed. Additionally, it prevents feature extraction outside ROI to enhance the model accuracy.

Why Enhanced Filtering and Edge Detection? When EFED is used in the image enhancement and segmentation stages, problems of similar images producing varying solutions that are known to Anisotropic Diffusion are eliminated. The Enhanced Filtering and Edge Detection can calculate image gradient from the image isotopically-smoothed version. The Gaussian filter and anisotropic diffusion are both incorporated in the EFED. With the Gaussian filtering technique, an image is firstly smoothed by convoluting with the filter, then the gradient is computed. This efficiently denoises images with higher noise. The Canny edge detection identifies the image in a line-form across an object in the image. It identifies the segment boundaries detected by the level-set segmentation technique. The state-of-the-art model has not considered the differing output of denoising similar objects which affects the input of region of interest segmentation. Also, segment boundaries noticed by level-set are not identified which is meant for cleaning up and better representation of the level-set output. Our EFED solves this and maintains the features contained in the ROI. The model accuracy is increased by solving these issues. Improving the classification accuracy as well as sensitivity and specificity of the system is necessary for better output. With enhanced filtering, minimizing the parameter error while filtering an image reconstructs a noise-corrupted image to enhance the degraded quality of the image for preferable data extraction and analysis. With canny edge detection, the amount of data is reduced, and useless information is filtered while useful image structural properties are preserved. It describes the identification and location of image sharp discontinuities.

We can deduct from the literature above that the present solutions in thermal image classification have used linear and nonlinear diffusion as a denoiser and edge detector. All these solutions have not considered an error in the choice of parameters while denoising an image and verifying segmented boundaries by their selected segmentation technique. All these solutions have not considered error due to varying image gradient. Our EFED reduces the error by firstly gaussian filtering followed by gradient computation. It also offers a simplified approximate implementation whereby edges marked at the highest gradient magnitude of a smoothed image. See Fig. 3 and Table 2 below (Fig. 4):

Table 2 Novel enhanced filtering and edge detection
Fig. 4
figure 4

Flowchart of novel enhanced filtering and edge detection

6 Results and discussion

Python 3.1.0 and Matlab R2014a are used in our implementation utilizing 2015 multi-view thermal images including 1370 healthy and 645 sick images from 24 sick and 59 healthy subjects respectively for model simulation. The sample thermogram dataset is obtained from the Mastology research database (DMR) which is opensource and freely available to the public. It can be downloaded from the Visual Lab DMR website. The available thermograms are captured with FLIR SC-620 infrared camera and of 640 X 480 pixels spatial resolution. We reduced the image size to reduce the computational cost of features learning. 80% of the whole dataset fetched from the database is used for training while 20% is used only for validation. The Least Square Support Vector machine is used as a classifier during the execution. For the test, we utilised Intel Core i3 2.4 GHz processor computer with 4.00 GB RAM memory. The sample image data are in two groups and are images from healthy subjects and images from sick patients. All the datasets containing the sick and healthy groups are used for the test and result displayed as in Tables 3, 4 and 5 below.

Table 3 Specificity, accuracy, and sensitivity results for thermal breast images (Sample image group)
Table 4 Performance result table

Images are enhanced with Gaussian Filter and Anisotropic Diffusion as shown in Fig. 5 and Segmented using a Level-set segmentation technique while Canny edge is applied in our proposed method to the output of the segmentation and displayed as shown in Fig. 6c. The gradient of an image in Fig. 6b is calculated and serves as part of the input to the level-set segmentation. For the extraction stage, segmented images are fed into the LSSVM classifiers while it learns the features itself.

Fig. 5
figure 5

Conversion of RGB image to grey scale image

Fig. 6
figure 6

Implementation sample of the novel enhanced filtering and edge detection. a Filtered image b Image gradient c Edge detected image

During the enhancement stage, the image needs to be converted from the original RGB form into a greyscale format in order to have it processed by Matlab. The original image which is polychromatic is changed to a two-dimensional thermogram by changing three-dimensional matrix into two (white and black). See Fig. 5.

Figure 6a, b and c define the output of the enhancement and edge detection of the ROI. Figure 6a is produced after converting the original RGB to greyscale and went through anisotropic diffusion and Gaussian filtering for enhancement. Computed gradient after pre-processing the image as shown in Fig. 6b is produced in order to produce edge information that supports the segmentation. Canny edge detection detects the image edge which is of 96 × 72 in dimension as shown in 6c to find the boundaries of ROI aids features extraction in our NEFED.

We compared the same image samples between state of the art and NEFED solution using tables and graphs. The outcomes obtained from classifying the breast thermal images of the two groups are analyzed below in Tables 3 and 4. These results are grouped according to the subject class type which is healthy or sick. The results are expressed in terms of sensitivity, specificity, and accuracy. The labelled classification report is automatically generated by LSSVM after the classification based on the features supplied. The report listed the metrics for the two kernels, linear and Radial Basis Function (RBF) used showing the accuracy, precision, recall, whereby precision and recall depicts the specificity and sensitivity respectively. The test is conducted with sample image data from two different subjects. Each image is classified as healthy or sick. The average accuracy, specificity, and sensitivity are calculated for each group of classification. We calculated the average of the two categories of test data to obtain the general average accuracy, specificity, and sensitivity of the system.

The findings are compared during the system classification stage. We utilized Least Square Support Vector Machine for image classification. The suggested solution has increased the classification accuracy of breast thermography by filtering image in the enhancement stage while application of Canny-edge on level-set segmentation has also improved the sensitivity as well as specificity. This will enhance the use of thermal imaging in predicting breast early. We are using confusion matrix elements to evaluate the system performance where

$$\begin{aligned}{c}\mathrm{Accuracy }= (\mathrm{TP}+\mathrm{TN})/(\mathrm{TP}+\mathrm{FP}+\mathrm{FN}+\mathrm{TN})\\ \mathrm{Specificity }=\mathrm{ TN}/(\mathrm{TN}+\mathrm{FP})\\ \mathrm{Sensitivity}=\mathrm{ TN}/(\mathrm{TN}+\mathrm{FP})\end{aligned}$$

where TP True Positive, TN True Negative, FP Fales Positive, TN True Negative

The results of EFED, our proposed solution, show that there is an entire enhancement in classification accuracy, sensitivity and specificity as against the state of art regarding image classification. EFED improved the sensitivity from 79.5% to 85.25% while specificity increased from 88.50% to 95.75% through significant features fusion which is classified by LSSVM. Similarly, there is an improvement of classification accuracy as we achieved an average accuracy of 98% which exceeds the state of art value. True positive and negative, and false positive and negative are computed from the known class labels which aid the calculation of accuracy, sensitivity, and specificity automatically by the LSSVM classifier. Accuracy, specificity, and sensitivity are all measured in decimals which are easily converted to a percentage.

A filter is applied before Anisotropic during the image enhancement stage and enhanced Level-set during segmentation of the breast region improve the performance of our proposed system. The proposed model uses Python language to implement the improvement which has increased the sensitivity, specificity and classification accuracy of the system. The use of Gaussian filter before applying AD means we smooth the image before computing the gradient. This integrates the benefits of the two filtering methods reducing noise efficiently in the image by filtering corrupted pixel which in turns improves the proposed system. Image gradient is not reliable in denoising as it is impacted by noise. The edge stopping function adapted into enhanced AD has its diffusion decreasing more quickly towards zero and this makes it to protects edges from extreme blurring and smoothening. Canny edge detector modified from second-best solution applied to level-set segmentation stops the ROI passing beyond the boundary as it re-detects the edges already detected by level set thereby ensuring accurate segmentation. These yields increased accuracy, specificity, and sensitivity of the proposed method. Also, the usage of LSSVM, a supervised learning method which is an efficient classification technique for general models and powerful like SVM has reduced the processing time due to its less computational cost. Conclusively, the enhanced image smoothening coupled with adaptive thresholding Canning edge detection and the supervised learning machine has improved the thermogram classification with 9% accuracy, 6% specificity, and 7% sensitivity (Figs. 7, 8 and 9).

Fig. 7
figure 7

Average Classification Accuracy of State of Art and the proposed method in percentage for the two subject groups measured over different samples. Blue colour shows the present solution accuracy while brown colour depicts the proposed accuracy a First two bar graphs represent average accuracy of breast cancer patient. b Second duo bar graphs indicate the average accuracy healthy patients with no cancerous tissue

Fig. 8
figure 8

Average specificity of state of art and the proposed method in percentage for the two subject groups measured over different samples. Blue colour shows the present solution specificity while brown colour depicts the proposed method specificity a First two bar graphs represent the average specificity of breast cancer patient. b Second duo bar graphs also indicate the average specificity of healthy patients with no cancerous tissue

Fig. 9
figure 9

Average sensitivity of state of the art and the proposed solution in percentage for the two subject groups measured over different samples. Blue colour shows the present solution sensitivity while brown colour depicts the proposed system sensitivity a First two bar graphs represent average sensitivity of breast cancer patient. b Second duo bar graphs show the average sensitivity of healthy patients with no cancerous tissue

Many methods and algorithms have been implemented by researchers to classify thermogram images. Although the techniques have continuously improved to enhance the accuracy and other performance metrics, this work has been able to solve the deficiencies in state of the art with an increased classification accuracy of 98% against 89% of state of the art. It also increases sensitivity and specificity to 85.25% and 95.75% compared to 79.5% and 88.5% of state of the art respectively. This enhancement is achieved as a result of Enhanced Filtering and Edge Detection which utilized the enhancement and segmentation stage to increase the signal to noise ration and detect discontinuities respectively. The Canny edge detection used outperforms most detection algorithms without altering the features in the image [15]. The EFED system has better performance in the two sample image groups tested. See Table 4.

7 Conclusion and future work

Precise classification of breast thermal images is vital to accurately predict the presence of tumour in breast tissue. Several machine learning algorithms have been used to successfully classify and detect early breast cancer. Nevertheless, the are drawbacks that influence the accuracy, sensitivity, and specificity of the technique. The aim of this research is to strengthen the accuracy while increasing the sensitivity and specificity by reducing the false negative and false positive in Breast thermograms classification using machine learning techniques. The Novel Enhanced Filter and Edge Detection originated from combination of modified anisotropic diffusion and level set segmentation. Both are modified using Gaussian filter and Canny edge detection realized in second-best solution [6]. It first smoothens the image by Guassian-filter convolution which reduces the noise for anisotropic to handle efficiently as the latter is limited to handling higher noisy image. Also, with edge detection, it identifies the image with lines spread across the ROI making it easy to carryout computations on it and maintaining the significant features to be selected for classification. It detects the boundaries identified by level set technique thereby making the boundaries not leaking into the cavity zone. Therefore, it improves the average classification accuracy by 9% while sensitivity and specificity get increased by 5.75% and 7.25%. These can be improved in the future by testing the model on a larger dataset of thermograms and tunning the parameters to notice optimum parameter values that provide best result. For future research, some improvements need to be recommended to improve the result. The Canny edge detector used is liable to react poorly to threshold parameter. A parameter that performs well with a certain image may turn out to work poorly for another. The pre-processing steps of Canny consume much computation power. An edge detection that works based on deep neural network which is an end-to-end that takes in RGB image and provides its output as an edge map should be considered to avoid limitation in Canny.