1 Introduction

AD is a progressive brain disease causing dementia gradually over several years [12]. AD is a type of neurodegenerative disease that leads to a brain volume shrink due to the death of its nerve cells. Figure 1 shows a difference between a healthy and AD brain (obtained from the OASIS dataset [11]). Eventually, it has no current cure; however, early diagnostics of such disease provides the individual an opportunity to participate in clinical trials. According to the literature [14], in 2050 one out of 85 people will be infected by AD. According to the World Alzheimer’s disease 2019 report [2], the number of dementia persons all over the world is around 50 million and this subjected to be 152 million by the near 2050. However, AD accounts for 60–80% of the total number of dementia persons. Accordingly, diagnosis of AD disease in its early stage is crucial to understand the disease behavior and its development stage in preparation for finding a medical solution.

Fig. 1
figure 1

Difference between a healthy, and b AD brain [11]

Recently, the diagnosis of AD disease through the CAD system has been widely taking researchers’ attention due to its powerfulness in early AD detection [26]. However, despite the importance of the CAD system as a powerful tool that provides a reliable diagnosis of different diseases using magnetic resonance imaging (MRI) brain images, segmentation accuracy of the endometrial areas of the brain still the most challenging task. Therefore, the fundamental obstacle in advancing computer vision in the role of AD detection is through developing precise segmentation techniques to provide an accurate clinical diagnosis to extract accurate features of the Alzheimer’s region.

Minimum Cross Entropy Thresholding (MCET) is one of the commonly used segmentation techniques due to its simplicity and ease of implementation. However, MCET has the disadvantages of its computational complexity that increase significantly with thresholding levels [23]. Moreover, using hybrid distributions shall lead to high time complexity. To tackle these problems, in this paper a multithreading image segmentation technique is proposed to achieve rapid execution.

In particular, a new approach based on accurate segmentation of MRI brain images is proposed. The proposed model depends on using the derived Minimum Cross Entropy Thresholding (MCET) technique with a hybrid combination of Gamma and Gaussian distributions (DMGG) to undertake accurate and precise segmentation.

The main contributions of this paper are as follows:

  • Modeling a sequential accurate segmentation model based on the MCET technique using a hybrid derivation of Gaussian and Gamma distributions.

  • Modeling the DMGG segmentation technique for early detection of AD diseases as a form of an optimization problem.

  • Designing and implementing a parallel segmentation algorithm based on parallel programming to improve and boost the performance of the proposed DMGG derivative model.

  • Extensive simulation using benchmark AD datasets (ADNI, OASIS, MIRIAD) to investigate the effectiveness and performance of the proposed DMGG model.

The rest of the paper is organized as follows. Section 2 studies the related works. Section 3 presents the image segmentation and thresholding techniques. Section 4 illustrates the derivative of the proposed image segmentation technique using hybrid distributions. Section 5 presents the used performance measures. Section 6 models the segmentation problem as an optimization problem. Section 7 solves the optimization problem and proposes the DMGG new algorithm. Section 8 proposes the DMGG performance boosting mechanism. Section 9 presents the evaluation results and the simulation setup. Section 10 concludes this paper and proposes future work.

2 Related work

In the domain of CAD systems, accurate image segmentation is essential not only in AD diagnosis but also for medical clinical imaging and the public health care sector in general. Recently, different techniques have been introduced in the field of image segmentation for medical or other features detection, which performs more accurately than manual systems [5, 8].

Mukherjee et al. [19] proposed a fusion technique to detect AD by extracting the important features from MRI images using the fuzzy clustering technique. Lella et al. [15] developed a machine learning framework to detect the most relevant AD brain region. Priyanka et al. [21] studied the difference between AD and Mild Cognitive Impairment (MCI) through analyzing the tissue variations of MRI brain images using multilevel minimum cross-entropy based Bacteria Foraging Algorithm (BFO) and Crow Search Algorithm (CSA). A novel segmentation model developed by El-Zaart et al. [4] for brain cancer detection sing Gaussian and gamma distributions. In his paper, the author applied Gaussian distribution for symmetric MRI image histograms and Gamma distribution for non-symmetric histograms. Khairuzzaman et al. [13] developed a multilevel thresholding segmentation method based on particle swarm optimization (PSO) for MRI brain images. Forouzannezhad et al. [6] classify different stages of AD using a combination of random forest feature selection models with a Gaussian-based algorithm. Hao et al. [9] developed a multi-modal neuroimaging feature selection method with consistent metric constraints for AD analysis.

Image segmentation is computationally expensive especially when run on large medical datasets; for that reason, different contributions have been made to boost its performance. Satpute et al. [25] developed a parallel segmentation method based on cross-modality using the GPU acceleration platform. While Roels et al. [24] studied the importance of coarse-grained parallelism to benefit from GPU parallelization in boosting microscopy image segmentation algorithms.

In view of the literature, most of the proposed MCET thresholding techniques follow a single distribution method and ignore the computational effort which results in. In this paper, our contribution is folded in the following two areas. 1- Constructing an accurate MCET based segmentation model for AD detection using a hybrid combination of two benchmark segmentation derivation methods (i.e. Gaussian and gamma distributions). 2- Optimizing the performance of the proposed DMGG segmentation model by applying the multithreading technique using a single node parallel processor to boost its performance. To the best of our knowledge, this paper is the first research that develops and implements a hybrid combination derivation of two benchmark distributions to extract the optimum thresholds.

3 Image segmentation and thresholding techniques

The main actor in the CAD systems is the process of image segmentation, which plays a crucial role in image analysis [22]. According to the literature, many techniques have been proposed, however, histogram-based approaches still one of the most widely applied and accurate techniques [17]. The key concept of the histogram-based thresholding technique is through finding the optimal threshold that divides the object from its background [22]. Although numerous thresholding techniques have been proposed over the year, however, entropy-based thresholding technique is still the most popular one [17].

3.1 Cross entropy thresholding of the MRI brain image

Let F = {f1, f2, …, fn} and G = {g1, g2, …, gn} be two probability distributions on the same set, such that fi and gi come from the same location in the image space. The cross-entropy between F and G, that proposed by Kullback in 1968, is an information theoretic distance between the distributions defined as follows [22]:

$$ D\left(F,G\right)=\sum \limits_{i=1}^n{f}_i\ast \log \left(\frac{f_i}{g_i}\right) $$
(1)

Let I(x, y) and It(x, y) be the original MRI image and the thresholded MRI brain image respectively that defined as:

$$ {I}_t\left(x,y\right)=\left\{\begin{array}{c}{\mu}_1\left(1,t\right)={\mu}_a(t),\kern0.5em I\left(x,y\right)<t\\ {}{\mu}_2\left(t,L+1\right)={\mu}_b(t),\kern0.5em I\left(x,y\right)\ge t\end{array}\right. $$
(2)

such that t is the threshold value; μa(t) is the mean value of dark region A, i.e. Alzheimer region; and μb(t) is the mean value of bright region B, i.e. other brain tissues as shown in Fig. 2.

Fig. 2
figure 2

MRI brain Bi-modal image histogram

Then, the cross-entropy between I(x, y) and It(x, y) is defined by:

$$ D\left(I,{I}_t\right)=\sum \limits_{i=0}^{t-1}i\ast h(i)\ast \log \left(\frac{i}{\mu_a(t)}\right)+\sum \limits_{i=t}^Li\ast h(i)\ast \log \left(\frac{i}{\mu_b(t)}\right) $$
(3)

such that h(i) is the original MRI image histogram defined on the grey level range [1, L], where i = 1,2,…, L, and L = 255 being the number of grey levels.

3.2 Minimum cross entropy thresholding (MCET) of MRI brain image

Li et al. [16], proposed the MCET technique that is based on determining the optimum threshold t* through minimizing the cross entropy of the image and the thresholded region. Therefore, the optimal threshold t* using MCET will be as follows:

$$ {t}^{\ast }=\arg {\mathit{\min}}_t\left(D\left(I,{I}_t\right)\right)=\arg {\mathit{\min}}_{\mathrm{t}}\left(D(t)\right) $$
(4)

where D(I, It) that can be written as an objective function D(t) determined as follows:

$$ D(t)=\sum \limits_{i=1}^Li\ast h(i)\ast \log (i)-\sum \limits_{i=1}^{t-1}i\ast h(i)\ast \log \left({\mu}_a(t)\right)-\sum \limits_{i=t}^Li\ast h(i)\ast \log \left({\mu}_b(t)\right) $$
(5)

Since \( \sum \limits_{i=1}^Li\ast h(i)\ast \log (i) \)is constant for a given image, the objective function can be redefined using the following equation:

$$ n(t)=-\sum \limits_{i=1}^{t-1}i\ast h(i)\ast \log \left({\mu}_a(t)\right)-\sum \limits_{i=t}^Li\ast h(i)\ast \log \left({\mu}_b(t)\right) $$
(6)

Let \( A(t)=-\sum \limits_{i=1}^{t-1}i\ast h(i) \) and\( B(t)=-\sum \limits_{i=t}^Li\ast h(i) \), hence, the objective can be defined as follows:

$$ n(t)=A(t)\ast \log \left({\mu}_a(t)\right)+B(t)\ast \log \left({\mu}_b(t)\right) $$
(7)

3.3 Probabilistic distributions

Each image can be modeled using statistical distribution. It could be a combination of symmetric and non-symmetric distributions [23]. Thus, finding the best distribution forming pixels of an image segment is the best method to approach optimum thresholding. In this paper, we propose a solution for this problem by predicting that the histogram of the MRI AD images is a combination of Gaussian (symmetric) and Gamma (non-symmetric) distributions.

Gaussian Distribution: In probability theory, Gaussian distribution that known as normal distribution is often described as a bell-shaped curve [22]. Moreover, the image histogram is assumed to be Gaussian distribution if it has symmetric gray level distribution. Thus, we can see that image I(x, y) is composed of two Gaussian distributions. Therefore, μa(t) and μb(t) can be estimated from two Gaussian distributions as follows [28]:

$$ {\mu}_a(t)=\frac{\sum \limits_{i=0}^{t-1}i\ast h(i)}{\sum \limits_{i=0}^{t-1}h(i)} $$
(8)
$$ {\mu}_b(t)=\frac{\sum \limits_{i=t}^Li\ast h(i)}{\sum \limits_{i=t}^Lh(i)} $$
(9)

Gamma Distribution: In probability theory, Gamma distribution is a general type of statistical distribution [17]. Thus, if the non-symmetric data in the image is assumed to be modeled by Gamma distribution, we can see that image I(x, y) is composed of two Gamma distributions. Thus, and to find the mean of the regions μa(t) and μb(t) we can follow El-Zaart et al. derivation as follows [1]:

$$ {\mu}_a(t)=\sqrt{\frac{\sum \limits_{i=0}^{t-1}h(i)\ast {i}^2\ast {q}^2}{\sum \limits_{i=0}^{t-1}h(i)}} $$
(10)
$$ {\mu}_b(t)=\sqrt{\frac{\sum \limits_{i=t}^Lh(i)\ast {i}^2\ast {q}^2}{\sum \limits_{i=t}^Lh(i)}} $$
(11)

where

$$ q=\frac{\mu \left(N+0.5\right)}{\sqrt{N\ast}\mu (N)} $$

such that N is the shape of the distribution.

4 MRI brain image segmentation using hybrid distributions

Based on the above section, obtaining the mean value of the dark (Alzheimer’s region) and bright (other grey brain tissue region) regions play a crucial role in finding the optimal threshold. However, and according to the literature [22], there is no clear formula to estimate such function. In this paper, a hybrid model is suggested using Gaussian and Gamma distributions combination. Thus, and to provide high accuracy and reliable diagnosis of AD, the DMGG hybrid model for image segmentation is proposed based on the following derivations.

4.1 MRI brain image histogram with homogenous Gaussian distributions

If the data in the MRI Brain image is assumed to be modeled using only Gaussian distribution in both regions (as shown in Fig. 2), then μa(t) and μb(t) values will be as shown in Eqs. 8 and 9 respectively. Hence, the optimum threshold t* could be obtained using the following derivation.

let\( {\mu}_a(t)=\frac{\sum \limits_{i=0}^{t-1}i\ast h(i)}{\sum \limits_{i=0}^{t-1}h(i)}=\frac{m_1a(t)}{m_0a(t)}\kern0.5em \)and \( {\mu}_b(t)=\frac{\sum \limits_{i=t}^Li\ast h(i)}{\sum \limits_{i=t}^Lh(i)}=\frac{m_1b(t)}{m_0b(t)} \); consequently, the optimal threshold t* is given by minimizing n(t) as shown in Eq. 7 through setting its first derivative to zero as follow:

$$ {n}^{\prime }(t)={A}^{\prime }(t)\ast \log \left({\mu}_a(t)\right)+{B}^{\prime }(t)\ast \log \left({\mu}_b(t)\right)+A(t)\left[\frac{m_1^{\prime }a(t)}{m_1a(t)}-\frac{m_0^{\prime }a(t)}{m_0a(t)}\right]+B(t)\left[\frac{m_1^{\prime }b(t)}{m_1b(t)}-\frac{m_0^{\prime }b(t)}{m_0b(t)}\right]=0 $$
(12)

where A(t) = − th(t), B(t) = th(t), \( {m}_1^{\prime }a(t)=t\ast h(t) \), \( {m}_1^{\prime }b(t)=-t\ast h(t) \), \( {m}_0^{\prime }a(t)=h(t) \), and \( {m}_0^{\prime }b(t)=-h(t) \).

Through replacing each derivative term with its expression in Eq. 12, the following equation will be obtained:

$$ {n}^{\prime }(t)=-t\ast h(t)\ast \log \left({\mu}_a(t)\right)+t\ast h(t)\ast \log \left({\mu}_b(t)\right)+A(t)\left[\frac{t\ast h(t)}{m_1a(t)}-\frac{h(t)}{m_0a(t)}\right]+B(t)\left[\frac{-t\ast h(t)}{m_1b(t)}+\frac{h(t)}{m_0b(t)}\right]=0 $$

The above equation can be simplified using h(t) ≠ 0;

$$ {n}^{\prime }(t)=-t\ast \log \left({\mu}_a(t)\right)+t\ast \log \left({\mu}_b(t)\right)+A(t)\left[\frac{t}{m_1a(t)}-\frac{1}{m_0a(t)}\right]+B(t)\left[\frac{-t}{m_1b(t)}+\frac{1}{m_0b(t)}\right]=0 $$
$$ {n}^{\prime }(t)=t\ast \left(\log \left({\mu}_b(t)\right)-\log \left({\mu}_a(t)\right)+\left[\frac{A(t)}{m_1a(t)}-\frac{B(t)}{m_1b(t)}\right]\right)+\left[\frac{B(t)}{m_0b(t)}-\frac{A(t)}{m_0a(t)}\right]=0 $$

Therefore,

$$ {t}^{\ast }=\frac{x}{y} $$
(13)

where \( x=\log \left({\mu}_b(t)\right)-\log \left({\mu}_a(t)\right)+\frac{A(t)}{m_1a(t)}-\frac{B(t)}{m_1b(t)} \), and \( y=\frac{B(t)}{m_0b(t)}-\frac{A(t)}{m_0a(t)} \).

4.2 MRI brain image histogram with homogenous gamma distributions

If the data in the MRI Brain image is assumed to be modeled using Gamma distribution in both regions (i.e. dark and the bright region as shown in Fig. 2), then μa(t) and μb(t) values will be as shown in Eqs. 10 and 11 respectively. Therefore, the optimum threshold t* could be obtained using the following derivation.

$$ \mathrm{Let}\ {\mu}_a(t)=\sqrt{\frac{\sum \limits_{i=0}^{t-1}h(i)\ast {i}^2\ast {q}^2}{\sum \limits_{i=0}^{t-1}h(i)}}=\frac{\sqrt{\sum \limits_{i=0}^{t-1}h(i)\ast {i}^2\ast {q}^2}}{\sqrt{\sum \limits_{i=0}^{t-1}h(i)}}=\frac{m_1a(t)}{m_0a(t)} $$
(1)

thus, \( {m}_1a(t)={\left(\sum \limits_{i=0}^{t-1}h(i)\ast {i}^2\ast {q}^2\right)}^{1/2} \), and \( {m}_0a(t)={\left(\sum \limits_{i=0}^{t-1}h(i)\right)}^{1/2.} \)

The same derivation for the bright region B lead to the following:

$$ {m}_1b(t)={\left(\sum \limits_{i=t}^Lh(i)\ast {i}^2\ast {q}^2\right)}^{1/2},\kern0.5em \mathrm{and}\ {m}_0b(t)={\left(\sum \limits_{i=t}^Lh(i)\right)}^{1/2} $$

Since the optimal threshold t* is obtained by minimizing n(t) as shown in Eq. 7 through setting its first derivative to zero as shown

$$ {n}^{\prime }(t)={A}^{\prime }(t)\ast \log \left({\mu}_a(t)\right)+A(t)\ast \frac{\mu_a^{\prime }(t)}{\mu_a(t)}+{B}^{\prime }(t)\ast \log \left({\mu}_b(t)\right)+B(t)\ast \frac{\mu_b^{\prime }(t)}{\mu_b(t)}=0 $$
(14)

where \( {\mu}_a^{\prime }(t)=\frac{m_{1a}^{\prime }(t)\ast {m}_0a(t)-{m}_1a(t)\ast {m}_{0a}^{\prime }(t)}{m_{0a}^2(t)} \), and \( {\mu}_b^{\prime }(t)=\frac{m_{1b}^{\prime }(t)\ast {m}_0b(t)-{m}_1b(t)\ast {m}_{0b}^{\prime }(t)}{m_{0b}^2(t)} \)

Through replacing each derivative term with its expression in Eq. 14, the following equation will be obtained:

$$ {n}^{\prime }(t)={A}^{\prime }(t)\ast \log \left({\mu}_a(t)\right)+A(t)\ast \frac{m_0a(t)}{m_1a(t)}\ast \frac{m_{1a}^{\prime }(t)\ast {m}_0a(t)-{m}_1a(t)\ast {m}_{0a}^{\prime }(t)}{m_{0a}^2(t)}+{B}^{\prime }(t)\ast \log \left({\mu}_b(t)\right)+B(t)\ast \frac{m_0b(t)}{m_1b(t)}\ast \frac{m_{1b}^{\prime }(t)\ast {m}_0b(t)-{m}_1b(t)\ast {m}_{0b}^{\prime }(t)}{m_{0b}^2(t)}=0 $$
$$ {n}^{\prime }(t)={A}^{\prime }(t)\ast \log \left({\mu}_a(t)\right)+{B}^{\prime }(t)\ast \mathit{\log}\left({\mu}_b(t)\right)+A(t)\ast \left[\frac{m_{1a}^{\prime }(t)}{m_{1a}(t)}-\frac{m_{0a}^{\prime }(t)}{m_{0a}(t)}\right]+B(t)\ast \left[\frac{m_{1b}^{\prime }(t)}{m_{1b}(t)}-\frac{m_{0b}^{\prime }(t)}{m_{0b}(t)}\right]=0 $$

where A(t) = − th(t), B(t) = th(t), \( {m}_1^{\prime }a(t)=\frac{h(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1a}(t)} \), \( {m}_0^{\prime }a(t)=\frac{h(t)}{2\ast {m}_{0a}(t)} \), \( {m}_1^{\prime }b(t)=\frac{-h(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1b}(t)} \), and \( {m}_0^{\prime }b(t)=\frac{-h(t)}{2\ast {m}_{0b}(t)} \).

Through replacing each derivative term with its expression in Eq. 14, the following equation will be obtained:

$$ {n}^{\prime }(t)=-t\ast h(t)\ast \log \left({\mu}_a(t)\right)+t\ast h(t)\ast \mathit{\log}\left({\mu}_b(t)\right)+A(t)\ast \left[\frac{h(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1a}^2(t)}-\frac{h(t)}{2\ast {m}_{0a}^2(t)}\right]+B(t)\ast \left[\frac{-h(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1b}^2(t)}+\frac{h(t)}{2\ast {m}_{0b}^2(t)}\right]=0 $$

The above equation can be simplified using h(t) ≠ 0;

$$ {n}^{\prime }(t)=-t\ast \log \left({\mu}_a(t)\right)+t\ast \mathit{\log}\left({\mu}_b(t)\right)+\frac{A(t)}{2}\ast \left[\frac{t^2\ast {q}^2}{m_{1a}^2(t)}-\frac{1}{m_{0a}^2(t)}\right]+\frac{B(t)}{2}\ast \left[\frac{-\ast {t}^2\ast {q}^2}{m_{1b}^2(t)}+\frac{1}{m_{0b}^2(t)}\right]=0 $$
$$ {n}^{\prime }(t)=\left(\frac{A(t)}{m_{1a}^2(t)}-\frac{B(t)}{m_{0a}^2(t)}\right){t}^2{q}^2+2t\left(\log \left({\mu}_b(t)-\log \right({\mu}_a(t)\right)+\left(\frac{B(t)}{m_{0b}^2(t)}-\frac{A(t)}{m_{0a}^2(t)}\right)=0 $$

Therefore, the optimal threshold shall be obtained through solving the following quadratic equation:

$$ {Mt}^2+2 Nt+P=0 $$
(15)

where \( M=\left(\frac{A(t)}{m_{1a}^2(t)}-\frac{B(t)}{m_{0a}^2(t)}\right) \), N = log(μb(t) − log(μa(t), and \( P=\left(\frac{B(t)}{m_{0b}^2(t)}-\frac{A(t)}{m_{0a}^2(t)}\right) \)

taking into consideration that if we get two optimum threshold \( {t}_1^{\ast } \)and \( {t}_2^{\ast } \), we select the value that satisfies the following condition

$$ {\mu}_a(t)<{t}^{\ast }<{\mu}_b(t) $$

4.3 MRI brain image histogram with heterogeneous distributions (Gaussian-gamma)

If the data in the image is assumed to be modeled using Gaussian distribution in its dark region and Gamma distribution in its bright region, then μa(t) and μb(t) values will be as shown in Eqs. (8) and (11) respectively. As a result, the optimum threshold t* could be obtained using the following derivation.

$$ \mathrm{let}\kern0.5em {\mu}_a(t)=\frac{\sum \limits_{i=0}^{t-1}i\ast h(i)}{\sum \limits_{i=0}^{t-1}h(i)}=\frac{m_1a(t)}{m_0a(t)}\kern0.5em \mathrm{and}\kern0.5em \mathrm{let}\ {\mu}_b(t)=\sqrt{\frac{\sum \limits_{i=t}^{255}h(i)\ast {i}^2\ast {q}^2}{\sum \limits_{i=t}^{255}h(i)}}=\frac{m_{1b}(t)}{m_{0b}(t)} $$

The optimal threshold t* is obtained by minimizing n(t) as shown in Eq. 7 through setting its first derivative to zero as follow (Eq. 12).

$$ {n}^{\prime }(t)={A}^{\prime }(t)\ast \log \left({\mu}_a(t)\right)+{B}^{\prime }(t)\ast \log \left({\mu}_b(t)\right)+A(t)\left[\frac{m_1^{\prime }a(t)}{m_1a(t)}-\frac{m_0^{\prime }a(t)}{m_0a(t)}\right]+B(t)\left[\frac{m_1^{\prime }b(t)}{m_1b(t)}-\frac{m_0^{\prime }b(t)}{m_0b(t)}\right]=0 $$

where A(t) = − th(t), B(t) = th(t), \( {m}_1^{\prime }a(t)=t\ast h(t) \), \( {m}_0^{\prime }a(t)=h(t) \)\( {m}_1^{\prime }b(t)=\frac{-h(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1b}(t)} \), and \( {m}_0^{\prime }b(t)=\frac{-h(t)}{2\ast {m}_{0b}(t)} \).

replacing the above derivative term by its expression in Eq. 12, the following equation will be obtained:

$$ {n}^{\prime }(t)=-t\ast h(t)\ast \log \left({\mu}_a(t)\right)+t\ast h(t)\ast \log \left({\mu}_b(t)\right)+A(t)\left[\frac{t\ast h(t)}{m_1a(t)}-\frac{h(t)}{m_0a(t)}\right]+B(t)\left[\frac{-h(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1b}^2(t)}+\frac{h(t)}{2\ast {m}_0b(t)}\right]=0 $$

Simplifying the above equation using h(t) ≠ 0;

$$ {n}^{\prime }(t)=-t\ast \log \left({\mu}_a(t)\right)+t\ast \log \left({\mu}_b(t)\right)+A(t)\left[\frac{t}{m_1a(t)}-\frac{1}{m_0a(t)}\right]+B(t)\left[\frac{-{t}^2\ast {q}^2}{2\ast {m}_{1b}^2(t)}+\frac{1}{2\ast {m}_0b(t)}\right]=0 $$
$$ {n}^{\prime }(t)=\frac{-B(t)\ast {q}^2}{2\ast {m}_{1b}^2(t)}\ast \left({t}^2\right)+\left(\log \left({\mu}_b(t)\right)+\log \left({\mu}_a(t)\right)+\frac{A(t)}{m_1a(t)}\right)\ast (t)+\left(\frac{B(t)}{2\ast {m}_{0b}(t)}-\frac{A(t)}{m_{0a}(t)}\right)=0 $$

Therefore, the optimal threshold shall be obtained through solving the following quadratic equation:

$$ {Mt}^2+ Nt+P=0 $$
(16)

where \( M=\frac{-B(t)\ast {q}^2}{2\ast {m}_{1b}^2(t)} \), \( N=\log \left({\mu}_b(t)\right)+\log \left({\mu}_a(t)\right)+\frac{A(t)}{m_1a(t)} \), and \( P=\frac{B(t)}{2\ast {m}_{0b}(t)}-\frac{A(t)}{m_{0a}(t)} \)

taking into consideration that if we get two optimum threshold \( {t}_1^{\ast } \)and \( {t}_2^{\ast } \), we select the value that satisfies the following condition

$$ {\mu}_a(t)<{t}^{\ast }<{\mu}_b(t) $$

4.4 MRI brain image histogram with heterogeneous distributions (gamma-Gaussian)

If the data in the image is assumed to be modeled using Gamma distribution in its dark region and Gaussian distribution in its bright region, then μa(t) and μb(t) values will be as shown in Eqs. (10) and (9) respectively. So, the optimum threshold t* could be obtained using the following derivation.

Let\( {\mu}_a(t)=\sqrt{\frac{\sum \limits_{i=0}^{t-1}h(i)\ast {i}^2\ast {q}^2}{\sum \limits_{i=0}^{t-1}h(i)}}=\frac{\sqrt{\sum \limits_{i=0}^{t-1}h(i)\ast {i}^2\ast {q}^2}}{\sqrt{\sum \limits_{i=0}^{t-1}h(i)}}=\frac{m_1a(t)}{m_0a(t)}\kern0.5em \) and \( {\mu}_b(t)=\frac{\sum \limits_{i=t}^Li\ast h(i)}{\sum \limits_{i=t}^Lh(i)}=\frac{m_1b(t)}{m_0b(t)} \);

The optimal threshold t* is obtained by minimizing n(t) as shown in Eq. 7 through setting its first derivative to zero as follow (Eq. 12).

$$ {n}^{\prime }(t)={A}^{\prime }(t)\ast \log \left({\mu}_a(t)\right)+{B}^{\prime }(t)\ast \log \left({\mu}_b(t)\right)+A(t)\left[\frac{m_1^{\prime }a(t)}{m_1a(t)}-\frac{m_0^{\prime }a(t)}{m_0a(t)}\right]+B(t)\left[\frac{m_1^{\prime }b(t)}{m_1b(t)}-\frac{m_0^{\prime }b(t)}{m_0b(t)}\right]=0 $$

where A(t) = − th(t), B(t) = th(t),\( {m}_1^{\prime }a(t)=\frac{h(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1a}(t)} \), \( {m}_0^{\prime }a(t)=\frac{h(t)}{2\ast {m}_{0a}(t)} \), \( {m}_1^{\prime }b(t)=-t\ast h(t) \), and \( {m}_0^{\prime }b(t)=-h(t) \).

replacing the above derivative term by its expression in Eq. 12, the following equation will be obtained:

$$ {n}^{\prime }(t)=-t\ast h(t)\ast \log \left({\mu}_a(t)\right)+t\ast h(t)\ast \mathit{\log}\left({\mu}_b(t)\right)+A(t)\ast \left[\frac{h(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1a}^2(t)}-\frac{h(t)}{2\ast {m}_{0a}^2(t)}\right]+B(t)\left[\frac{-t\ast h(t)}{m_1b(t)}+\frac{h(t)}{m_0b(t)}\right]=0 $$

Simplifying the above equation using h(t) ≠ 0;

$$ {n}^{\prime }(t)=-t\ast \log \left({\mu}_a(t)\right)+t\ast \mathit{\log}\left({\mu}_b(t)\right)+A(t)\ast \left[\frac{t^2\ast {q}^2}{2\ast {m}_{1a}^2(t)}-\frac{1}{2\ast {m}_{0a}^2(t)}\right]+B(t)\left[\frac{-t}{m_1b(t)}+\frac{1}{m_0b(t)}\right]=0 $$
$$ {n}^{\prime }(t)=t\ast \left[\log \left({\mu}_b(t)\right)-\mathit{\log}\left({\mu}_a(t)\right)\right]+\frac{A(t)\ast {t}^2\ast {q}^2}{2\ast {m}_{1a}^2(t)}-\frac{A(t)}{2\ast {m}_{0a}^2(t)}-\frac{-t\ast B(t)}{m_1b(t)}+\frac{B(t)}{m_0b(t)}=0 $$
$$ {n}^{\prime }(t)=\frac{A(t)\ast {q}^2}{2\ast {m}_{1a}^2(t)}\ast \left({t}^2\right)+\left[\log \left({\mu}_b(t)\right)-\mathit{\log}\left({\mu}_a(t)\right)-\frac{B(t)}{m_1b(t)}\right]\ast (t)+\left[\frac{B(t)}{m_0b(t)}-\frac{A(t)}{2\ast {m}_{0a}^2(t)}\right]=0 $$

as a result, the optimal threshold shall be obtained through solving the following quadratic equation:

$$ {Mt}^2+ Nt+P=0 $$
(17)

Where \( M=\frac{A(t)\ast {q}^2}{2\ast {m}_{1a}^2(t)} \), \( \mathrm{N}=\log \left({\mu}_b(t)\right)-\mathit{\log}\left({\mu}_a(t)\right)-\frac{B(t)}{m_1b(t)} \), and \( P=\frac{B(t)}{m_0b(t)}-\frac{A(t)}{2\ast {m}_{0a}^2(t)} \)

taking into consideration that if we get two optimum threshold \( {t}_1^{\ast } \)and \( {t}_2^{\ast } \), we select the value that satisfies the following condition

$$ {\mu}_a(t)<{t}^{\ast }<{\mu}_b(t) $$

5 DMGG performance measure

Image segmentation is an important stage in the CAD system that plays an important role in AD diagnosis. Although the literature reveals various image segmentation techniques [2, 26], however, determining the quality and accuracy of the segmented MRI images is an important role to obtain consistency in the CAD system. Literature reveals that there are no benchmark evaluation metrics for image segmentation techniques [3, 18]. Moreover, each segmentation technique may have its advantages and disadvantages according to the used application. This paper combines two well-known image segmentation metrics to evaluate the proposed DMGG model objectively.

  • Image uniformity (IU): IU, which is a distance metric, has been investigated as an effective evaluation metric for entropy-based segmentation methods [3]. It measures quantitatively the inter and intra-region uniformity difference between the original and segmented image. IU value ranges between [0, 1], such that 1 and 0 indicate perfect and bad segmentation output respectively. Consequently, for a given threshold t, the image uniformity IU(t) is defined as:

$$ IU(t)=1-\frac{\sigma_1^2(t)+{\sigma}_2^2(t)}{C} $$
(18)

where\( {\sigma}_1^2(t)\ and\ {\sigma}_2^2(t) \) represents the class variance of the object and its background respectively such that:

$$ {\sigma}_1^2(t)=\frac{\sum \limits_{i=0}^{t-1}{\left(i-{\mu}_1(t)\right)}^2\ast h(i)}{\sum \limits_{i=0}^{t-1}h(i)} $$
$$ {\sigma}_2^2(t)=\frac{\sum \limits_{i=t}^L{\left(i-{\mu}_2(t)\right)}^2\ast h(i)}{\sum \limits_{i=t}^Lh(i)} $$

such that h represents the image histogram, μ1(tand μ2(t), is the mean value of dark and bright regions respectively (as shown in Fig. 2) calculated using Gaussian distribution as indicated in Eqs. (8–9), and L indicates the different image gray level L [0, 255]. Where C represents half of the squared difference between the maximum and minimum original grey-level value and calculated as follows:

$$ C=\frac{{\left({g}_{max}-{g}_{min}\right)}^2}{2} $$

such that gmax and gmin ∈ [0…. L], are the maximum and minimum grey-level values of the original image respectively:

$$ {g}_{max}={\mathit{\max}}_{\left(x,y\ \right)}\left\{\ f\left(x,y\right)\ \right\} $$
$$ {g}_{min}={\mathit{\min}}_{\left(x,y\ \right)}\left\{\ f\left(x,y\right)\ \right\} $$
  • Region Contrast (RC): The RC metric is defined as the inter-region disparity. RC calculated using the absolute difference of the object mean value of dark and bright regions respectively divided by the sum of their average mean [3], as shown in Eq. 21:

$$ RC(t)=\frac{\left|{\mu}_1(t)-{\mu}_2(t)\right|}{\mu_1(t)+{\mu}_2(t)} $$
(19)

for a given value of threshold t, RC(t) value ranges between [0, 1], such that 0 and 1 indicate bad and perfect segmentation performance respectively.

6 DMGG model formulation

In this research, a DMGG segmentation model is proposed for the early detection of AD. The proposed model aims to detect the AD by approaching an optimum segmentation threshold t* using MCET. This section model the AD segmentation problem as an optimization problem, such that the main objective is to find the optimum distribution forming the segmented image histogram.

6.1 Modeling the image segmentation problem

The MCET technique has been used to determine the optimal threshold t* by minimizing the cross entropy as shown in Eq. 4. However, the histogram’s distribution type plays an important role in minimizing MCET and finding the optimum threshold t*. The proposed DMGG segmentation model turns the segmentation problem into an NP-hard optimization. Therefore, the DMGG entropy-based problem can be modeled using the following equation:

$$ \mathit{\operatorname{Minimize}}\ \left({t}^{\ast}\right) $$
(20)

subject to optimize the accuracy of the thresholded output by maximizing the DMGG model quality constraints (DMGGQC).

$$ {\displaystyle \begin{array}{c}\mathit{\operatorname{Maximize}}\ \left({\mathrm{DMGG}}_{\mathrm{QC}}\left({t}^{\ast}\right)\right)\\ {}{t}^{\ast}\in \left[0,255\right]\end{array}} $$
(21)

where DMGGQC defined as a vector of the two image segmentation performance measure using Eqs. (18–19) as follow:

$$ {\displaystyle \begin{array}{c}{\mathrm{DMGG}}_{\mathrm{QC}}\ \left({t}^{\ast}\right)=\left(\begin{array}{c} IU\left({t}^{\ast}\right)\\ {} RC\left({t}^{\ast}\right)\end{array}\right)\\ {} IU\left({t}^{\ast}\right), RC\left({t}^{\ast}\right)\in \left[0,1\right]\end{array}} $$

6.2 DMGG methodology

In this paper, a DMGG entropy-based model associated with the derived MCET technique with a hybrid combination of Gamma and Gaussian distributions has been proposed. The DMGG model proposes that the image I(x, y) histogram is made up of hybrid distributions. Consequently, we can see that image I(x, y) is composed of two different distributions (i.e. Gamma/Gaussian and Gaussian/Gamma). Accordingly, and through applying the derived hybrid distributions (as shown in Section 4), the image histogram is modeled using the following function:

$$ h(x)={P}_a\ast {dist}_a\left(x,{\mu}_a(t)\right)+{P}_b\ast {dist}_b\left(x,{\mu}_b(t)\right) $$

such that; 1) dista(x, μa(t)) is the first distribution and can be Gaussian/Gamma; 2) distb(x, μb(t)) is the 2nd distribution type and can be Gamma/Gaussian. Noting that Pa, Pb are 2 prior probabilities such that Pa + Pb = 1.

7 Solving the optimization problem

This section proposes an improved MCET algorithm based on the proposed DMGG segmentation model. The main aim of the developed DMGG algorithm is to find an optimal solution to the proposed segmentation NP-hard optimization problem.

7.1 Gaussian/gamma/Gaussian-gamma/gamma-Gaussian thresholding using DMGG

Algorithm 1 shows a high-level pseudo code of image thresholding based on DMGG. It reads a number as input such that the 1 = Gu-Gu = Gaussian-Gaussian, 2 = Ga-Ga = Gamma-Gamma, 3 = Gu-Ga = Gaussian-Gamma, and 4 = Ga-Gu = Gamma-Gaussian (lines 1–9). It returns the optimum thresholding value (t*) (line 10) based on the derived equations as shown in Section 4.

figure a

7.2 Performance measure algorithms

Algorithms 2 and 3 calculate the IU and RC performance measures metrics used for the DMGG model using Eqs. 18 and 19 respectively (as shown in Section 5). Each algorithm takes the original image and estimated threshold using the above DMGG model as inputs then it returns the IU and RC value that range between [0, 1] as indicated in Section 5.

figure b
figure c

7.3 DMGG thresholding algorithm using MCET

The high-level pseudo code shown in Algorithm 4 designed the proposed DMGG segmentation algorithm based on the derived MCET technique with a hybrid combination of Gamma and Gaussian distributions. The proposed DMGG segmentation algorithm started with histogram computation (line 2) after the original image reading (line 1). DMGG segmentation algorithm works iteratively (line 4–11) on each derived equation (as shown in section 4) to find the threshold t* using the four derived Eqs. 13, 15, 16, and 17 respectively. It searches the optimal t* using Eq. 21 (line 8–10). Finally, the algorithm returns the best t* threshold (line 12) that solves the segmentation optimization problem proposed in Eq. 20 on the best accuracy threshold condition using Eq. 21.

figure d

The iterative method discussed in Algorithm 4 to obtain an optimum threshold using the DMGG model will lead to a computational complexity equal to O(L2) using a homogenous distribution environment [23]. As a result, the DMGG algorithm could lead to O(Ln + 1) computational complexity for the n-thresholding problem. Moreover, the model could lead to an exhaustive and time-consuming problem if it is applied to hybrid distribution scenarios. Therefore, in this paper, we propose to apply parallel processing technology to boost the performance of the proposed DMGG algorithm, such that the used computational resources could be used efficiently to achieve minimum processing time.

8 DMGG performance boosting

Image processing plays a vital role in the health area especially for the early diagnosis of diseases that needs to participate in clinical trials such as AD. Despite the wide range of methodologies invented by the researchers to provide optimum segmentation [5, 8], which is the main actor of the CAD system, the performance that carries out the process gaining momentum in today’s technological era.

Entropy-based thresholding is recognized as a reliable segmentation technique that provides excellent results. Nevertheless, MCET computation is a complex task due to an exhaustive search to locate the optimum threshold [20]. For this reason, recursive programming had been used widely to optimize MCET computation complexity. However, this will not be effective using the DMGG model that requires simultaneous computation. To achieve an efficient and practical evaluation, in this paper, we divide the problem into smaller ones, which are then solved concurrently. This technique takes advantage of multithreading technology and saves computing resources which leads to DMGG performance boosting.

Modern processors provide parallel processing capabilities that include multiple computing cores in one processor. Each core can concurrently execute multiple independent streams of instructions called threads [29]. Therefore, we propose to boost the DDMG segmentation solution model without the need to require special hardware and using low cost machines that are commercially available.

Parallel implementation depends on dividing the computing process into different threads sharing the same data area in memory. In particular, the multithreaded architecture of modern CPUs can reduce the latency delay and avoid repeated sequential processing in the proposed DMGG algorithm. However, one of the main constraints that should be applicable to undergo the parallelization process using a multiprocessor computing architecture is data independence.

Independency

The development of high performance parallel algorithm requires achieving the independencey condition of the parallelized problem [29]. Given a concurrent system S, and let Segi and Segj be two program segments in S, such that each segment has an input set (read values) and an output set (written values). Therefore, to execute Segi and Segj concurrently, the following should be satisfied:

$$ {Input}_i\cap {Output}_j=\varnothing $$
$$ {Input}_j\cap {Output}_i=\varnothing $$
$$ {Output}_i\cap {Ouput}_j=\varnothing $$

DMGG performance boosting methodology

The applied parallelization process to the proposed DMGG algorithm is generic and can be adapted to any application that satisfies the independence constraint. In particular, the DMGG algorithm follows the subsequent two-stage methodology to take up the parallelization process.

  1. 1-

    DMGG hybrid thresholds computation: compute the different thresholds t*‘s using DMGG hybrid distribution based on different hybrid derivations as shown in Eqs. 13, 15, 16, and 17. In this stage the concurrent computation is divided into k parts (k = different types of hybrid derivations, where k = 4), such as each part is treated as a separate task.

  2. 2-

    DMGGQC evaluation: using parallel computing processors, evaluate the obtained DMGG thresholds (4-t*s) via the average mean of DMGGQC performance measure proposed combination model (Eq. 21).

Following the above 2-stage methodology the proposed DMGG algorithm up to p times using p parallel processors in one computing machine. Figure 3 illustrates the outline of the workflow architecture of the DMGG algorithm parallelization process. However, the high-level pseudo code for the parallelized DMGG algorithm is shown in Algorithm 5

figure e
Fig. 3
figure 3

Parallelized DMGG algorithm workflow architecture

9 Performance evaluation

In this section, experiments are conducted to test the validity of the proposed DMGG model. All experiments are conducted on a 3.4 GHz Intel(R) Core(TM) i7–4770 machine of 8 GB RAM using MATLAB R2019b toolbox. Via MATLAB parallel computing toolbox, we develop the multithreaded implementation through the parpool function that provides the parallelization technology on a multicore computing platform [30]. Besides, it’s worthy to note that, the used Core i7 desktop processors feature 4 cores with 8 concurrent threads.

9.1 Datasets

To test objectively and evaluate the model performance and accuracy, three different benchmark AD datasets have been used as follows.

  • ADNI. The Alzheimer’s Disease Neuroimaging Initiative (ADNI), consisting of 3-phases datasets (ADNI-1, ADNI-2, and ADNI-GO) for the early detection and tracking of AD [31]. The dataset contains more than 5000 MRI scans of adults aged between 55 and 90, consisting of individuals diagnosed with mild cognitive impairment (MCI), early AD, and normal older persons. For more information, see www.adni-info.org.

  • OASIS. The Open Access Series of Imaging Studies (OASIS) dataset was created by the Washington University Knight Alzheimer’s Disease Research Centre [11]. It consists of 3-phases datasets (OASIS-1, OASIS-2, and OASIS-3). OASIS is a collection of cross-sectional and longitudinal sections from MRI types of demented and non-demented subjects. It contains more than 2800 MRI scans of adults aged between 18 and 96, consisting of individuals who have been clinically diagnosed with very mild to moderate AD. For more information, see www.oasis-brains.org/

  • MIRIAD. The Minimal Interval Resonance Imaging in Alzheimer’s Disease (MIRIAD) dataset is made available through the support of the UK Alzheimer’s Society [32]. MIRIAD database consists of more than 700 MRI scans of Alzheimer’s sufferers and healthy elderly people. The main of the MIRIAD study was to investigate the possibility of using MRI scans as an outcome measure for clinical trials of Alzheimer’s treatments. For more information, see www.miriad.drc.ion.ucl.ac.uk/

Table 1 summarizes the used benchmark AD datasets’ specifications

Table 1 AD datasets’ Specifications

9.2 Region of interest extraction

One of the significant difficulties to do accurate image segmentation is the process of identifying the area of interest [12]. Accurate segmenting of brain tissues from MRI images is not an easy task since we have to extract the skull from the brain for an accurate diagnosis of brain AD disease. Skull striping is the way to ease the process of image segmentation accuracy through different methods available in the literature [10]. In this paper, the contour based brain segmentation CBBS method is used and the region of interest (ROI) are detected [27]. Figure 4 presents the flow chart of the steps involved in the applied methodology. Algorithm 5 illustrates the summary of the steps applied by the DMGG model.

Fig. 4
figure 4

Flowchart of DMGG applied methodology

figure f

9.3 Experimental results

The DMGG algorithm is compared against two benchmark and classic MCET based segmentation algorithms that support Gaussian, and Gamma distributions. To objectively quantify the importance of the proposed model, the IU and RC performance measure metrics have been used (as considered in Section 5). Moreover, the sequential DMGG processing time is compared to the multithreaded performance boosting methodology (discussed in Section 8) to display the usefulness of parallel implementation. Noting that all experiments employ 500 brain MRI scans from each benchmark AD used datasets (i.e., ADNI, OASIS, and MIRIAD). Moreover, the images are selected randomly from random subjects.

Accuracy

The accuracy of the proposed DMGG model demonstrated using the output comparison in Table 2. Table 2 contains the detailed comparison of various DMGG model hybrid combinations (as mentioned in Section 4) using three different benchmark AD datasets. As shown in Table 2, the proposed DMGG model achieves an average of more than 90% accuracy compared to other benchmark segmentation methods. The recorded output may lead come to an interesting outcome and draw a new conclusion that image histogram is a combination of different distribution types. Moreover, MCET classical methods that are based on single distribution, such as Gaussian and gamma, may face great difficulties in finding the optimum threshold value that could lead to an accurate and precise AD diagnosis.

Table 2 Hybrid distribution combinations results of DMGG model using AD benchmark datasets

Figure 5 shows the precision of the generated segmented images using the DMGG segmentation model from the tested three different AD datasets as follow: (a) the original image, (b) the skull stripping image, (c) the DMGG segmentation model output, and (d) the image histogram including the threshold. The promising output results demonstrate the high-performance output of the DMGG model over the benchmark segmentation models as shown in Table 2.

Fig. 5
figure 5

Segmentation result of DMGG model. a Original image, b Skull stripping, c Segmented image, and d image histogram including the threshold

The quality of the proposed DMGG segmentation model is analyzed by comparing it with DMGGQC performance measure metrics (i.e. IU and RC). The DMGG algorithm obtains different optimal values over benchmark segmentation algorithms (i.e. Gaussian and Gamma) as shown in Fig. 6. This figure reflects the DMGGQC average output of randomly selected various images using different datasets, noting that higher values indicate a more precise segmentation model which emphasises the accuracy of the proposed DMGG model.

Fig. 6
figure 6

Performance metric measurement comparing the DMGGQC segmentation model accuracy with benchmark Gaussian and Gamma segmentation methods

Multithreading Efficiency

The second goal of this study was to investigate the usefulness of the multithreading technique in boosting the performance of the proposed DMGG model. This will support our main goal to attain maximum accuracy with optimum efficiency that could be achieved through minimizing the total processing time taken by the CPU to complete the segmentation process. Taking into account that our implementation takes place on Core i7 desktop processors feature 4 cores with 8 concurrent threads, Table 3 reflects the effectiveness and the speed up achieved through applying the proposed DMGG boosting methodology (as illustrated in Section 8). As shown in Table 3, the computation time performance under multithreading is superior to the sequential method with an average of 67%. It is worthy to consider the importance of the proposed DMGG model design that able to be executed on parallel cores due to model data-dependent properties. This reflects the conventional wisdom in academics and industry through workload distribution rather than scaling up systems.

Table 3 Performance gain using DMGG multithreading computing model implementation

Although the visualized efficiency recorded in Table 3 validates the efficacy of the DMGG multithreading technique, though, the Wilcoxon statistical test [7] has been conducted to shed the light on the importance of the proposed parallel processing segmentation model. The difference in performance gain achieved using DMGG parallel model and sequential one recorded a p value of 0.005 validating the significance of multithreading improvement.

Based on the aforementioned experimental results, it can be observed that the proposed DMGG segmentation model is a robust, accurate, and highly consistent method with high-performance ability. In particular, the DMGG segmentation model advances the medical field of clinical imaging and provides a highly accurate segmentation model for early detection of AD disease using MCET based on hybrid distributions for optimum thresholding.

10 Conclusion and future work

This paper addressed the problem of brain MRI image segmentation for the early detection of AD disease. A novel MCET based image segmentation model has been proposed using hybrid distributions derivations, Gaussian, and gamma, for accurate thresholding to keep the proximity of accuracy in AD detection. To boost the performance of the DMGG model, we proposed and implemented a parallel and multithreading methodology to minimize the proposed segmentation model processing time. The accuracy of the proposed model was tested objectively using several benchmark datasets: ADNI, OASIS, and MIRIAD. The experimental results produced an excellent improvement using our proposed DMGG model for AD detection as compared to benchmark well-known methods.

One of the important goals that should be studied carefully in the future is to extend the applied performance metric that measures the accuracy of the proposed DMGG segmentation model to improve the quality and precision of AD detection.