## Appendix A  
Initialization sequentially using EM Algorithm  
Consider F being the marginal distribution of gray level, EM algorithm [22; 32] is used to initially build an LCDG model that approximates F as explained in the following steps:  
A mixture \(P_{K}\) of dominant mode K positive discrete Gaussians (DG) is used to approximate F.  
Subordinate components of the LCDG alternatingly approximate the deviations between F and \(P_{K}\) as follows:  
Separating and scaling up the positive and the negative deviations to get the two probability distributions, DP and D\({}^{n}\). Iteratively finding subordinate mixtures of positive and negative DGs using the same EM algorithm. These mixtures should best approximate D\({}^{p}\) and D\({}^{n}\). The mixtures sizes, \(C_{p}-K\) and \(C_{n}\) are found by sequentially minimizing the error between each distribution (D\({}^{p}\) or D\({}^{n}\)) and its corresponding mixture model with the components number. Scaling down the positive and negative subordinate mixtures and adding them to the dominant mixture, which gives the initial LCDG model whose size is C = \(C_{p}+C_{n}\). The initial LCDG has K dominant weights \(w_{p,r}\), where \(r\) = 1,2,....K. The sum of these weights is equal to \(1\sum_{r=1}^{K}w_{p,r}\) = 1. In addition, there are several lower valued subordinate weights that fulfill \(\sum_{r=K+1}^{C_{p}}w_{p,r}-\sum_{l=1}^{C_{n}}w_{n,l}=0\). 2. Refining LCDGs using Modified EM Algorithm  
The initial LCDG was refined by estimating the local maximum of the log-likelihood in (3) using the DGs adapted EM algorithm in [18], which extends the conventional EM algorithm in [22; 32] to handle the alternating components. Consider \(p_{w,\Theta}^{[m]}(q)=\sum_{r-1}^{C_{p}}w_{p,r}^{[p]}(\mathrm{q}|\Theta_{p,r }^{[m]})-\sum_{l=1}^{C_{n}}w_{n,l}^{[m]}\psi\Big{(}\mathrm{q}|\Theta_{n,l}^{[ m]}\Big{)}\) to be the LCDG at the iteration m. Each signal \(\mathrm{q}\in\mathbb{Q}\) contribute relatively to each positive and negative DG at iteration m as specified by the corresponding conditional weights:  
\[\pi_{p}^{[m]}(r|q)=\frac{w_{p,r}^{[m]}\psi(\mathrm{q}\Big{|}\Theta_{\mathrm{p,r}}^{[m]})}{p_{w,\Theta}^{[m]}(q)}\ ;\ \pi_{n}^{[m]}(l|q)=\frac{w_{n,l}^{[m]}\psi( \mathrm{q}\Big{|}\Theta_{n,l}^{[m]})}{p_{w,\Theta}^{[m]}(q)}, \tag{1}\]  
taking into consideration that the following constraints apply:  
\[\sum_{r=1}^{C_{p}}\pi_{p}^{[m]}(r|q)-\sum_{l=1}^{C_{n}}\pi_{n}^{[m]}(l|q)=1;q= 0,\ldots,Q-1. \tag{2}\]  
Two main steps are repeated iteratively until the log-likelihood is maximized, the E-step\({}^{[m]}\) and the M-step\({}^{[m]}\) which are summarized as follows:  
E-step\({}^{[m]}\): fixing parameters \(w^{[m-1]}\), \(\Theta^{[m-1]}\), calculate the weights in (1) from the iteration \(m-1\). M-step\({}^{[m]}\): maximize L (\(w\), \(\Theta\)) fixing the weights of (1) to get the conditional maximum likelihood estimates (MLEs) \(w^{[m]}\), \(\Theta^{[m]}\). The described process was shown to be converging to a local log-likelihood maximum, using similar considerations as in [22; 32]. Moreover, it was demonstrated in [18] that this process is a block relaxation minimization-maximization. Considering unit factor constraints in (2), the log-likelihood in (3) can be equivalently given as:  
\[L\Big{(}w^{[m]},\Theta^{[m]}\Big{)} = \sum_{q=0}^{Q}f(q)\Big{[}\sum_{r=1}^{C_{p}}\pi_{p}^{[m]}(r|q) \log p^{[m]}(q)-\sum_{l=1}^{C_{n}}\pi_{n}^{[m]}(l|q)\log p^{[m]}(q)\Big{]}. \tag{3}\]  
Using (4), consider replacing \(\log\) p\({}^{[m]}(q)\) in the first summation with \(\log\mathrm{w}_{p,r}^{[m]}+\log\psi\Big{(}q\,|\Theta_{p,r}^{[m]}\Big{)}-\log \pi_{p}^{[m]}(r|q)\) and \(\log\) p\({}^{[m]}(q)\) in the second summation with \(\log w_{n,l}^{[m]}+\log\psi\Big{(}q\,|\Theta_{n,l}^{[m]}\Big{)}-\log\pi_{n}^{[ m]}(l|q)\). During the E-step, the conditional Lagrange maximization of the log-likelihood of (3) under the restrictions of (2) yields the weights \(\pi_{p}^{[m+1]}(r|q)\) and \(\pi_{n}^{[m+1]}(l|q)\) of (1) for all r = 1,..., \(C_{p}\); l = 1,..., \(C_{n}\) and \(\mathrm{q}\in\mathbb{Q}\).