## 2 Methods
### Image entropy  
In physics, the entropy \(S\) of an isolated system in some macroscopic state is the logarithm of the number of microscopically distinct configurations, say \(W\), that all are consistent with the observed macroscopic one ([PERSON]'s principle):  
\[S=k_{B}\log W \tag{17}\]  
where \(k_{B}\) stands for [PERSON]'s constant. It was first perceived by [PERSON], yet he never wrote it in the above form but [PERSON] did in 1906. It should be stressed that \(W\) denotes here the number of microstates of a single isolated system. Though \(W\) can only change by an integer, it is nevertheless very large and its property of being discrete can not be normally detected on a macroscopic scale. In statistics, [PERSON] [23] defined the entropy of a system as a measure of uncertainty of its structure. [PERSON]'s function is based on the concept that the information gain from an event is inversely related to its probability of occurrence. Accordingly, the entropy associated to a discrete random variable \(X\) with \(N\) possible outcomes \(\{x_{1},x_{2},...,x_{N}\}\) is defined as:  
\[S\left(\{p_{n}\}\right)=-\sum_{n=1}^{N}p_{n}\,\log p_{n} \tag{18}\]  
where \(\{p_{n}\}=P\left(X=x\right)\) is the probability distribution of \(X\). The base of the logarithm is irrelevant since the logarithmic function is selected on the basis of some positive argument and satisfying the property of additivity. Several authors have used [PERSON]'s concept in image processing and pattern recognition problems. More definitions of entropy exist along with some justifications, such as considering the functional of exponential nature rather than logarithmic [24]. If a digital image made out of \(N\) pixels is represented as a sequence of positive numbers \(f_{n},\,n=1,2...,N\) with the corresponding proportions:  
\[p_{n}=\frac{f_{n}}{\sum_{i=1}^{N}f_{n}},\,n=1,2,...,N \tag{19}\]  
then the following axioms are satisfied :  
\[p_{n}\geq 0,\,n=1,2,...,N\quad\text{ (positivity)} \tag{20}\]  
\[p_{n\cup m\cup...}=p_{n}+p_{m}+...\,,\,n\
eq m\quad\text{ (additivity)} \tag{21}\]  
\[\sum_{n=1}^{N}p_{n}=1\quad\text{ (normalization)} \tag{22}\]  
Whether it might be for spectral analysis of time series, radio or optical astronomy, X-ray medical imaging, and generally for any restoration/reconstruction of positive, additive images, the ME principle assigns a prior probability to any given image \(\mathbf{f}\). Suppose that the luminance in each pixel is quantified (in some units) to an integer value. Denote by \(U\) the total number of quanta in the whole image. The conservation of the number of quanta equates to the following equality:  
\[U=\sum_{m=1}^{M}g_{m}=\sum_{n=1}^{N}f_{n} \tag{23}\]  
A prior can be formulated based on the fair reason that each quanta has an equal a priori chance of being in any pixel [25]. The number of ways for getting a particular image configuration \(\mathbf{f}=\{f_{1},f_{2},...,f_{N}\}\) out of \(U\) quanta is:  
\[\frac{U!}{f_{1}!f_{2}!\cdots f_{N}!}\cong\exp\left[-\sum_{n=1}^{N}f_{n}\ln \left(\frac{f_{n}}{U}\right)+\frac{1}{2}\left(\ln U-\sum_{n=1}^{N}\ln f_{n} \right)\right] \tag{24}\]  
where the symbol \"!\" denotes the factorial operator. Here, the left side represents the number of distinct orderings of all luminance quanta, divided by the numbers of equivalent reorderings within each pixel (the total number of permutations of \(U\) elements in which there are \(f_{1}\) alike, \(f_{1}\) alike,..., \(f_{N}\) alike). The right side is [PERSON]'s approximation of the factorial function for large \(U\)[26]. By neglecting terms of order \(\ln\,U\) in the presence of terms of order \(U\), the argument of the exponential becomes:  
\[S(\mathbf{f})=-\sum_{n=1}^{N}f_{n}\ln\left(\frac{f_{n}}{U}\right) \tag{25}\]  
This expression stands for the _configurational entropy_ of an image, which differs from the _thermodynamic entropy_ of a beam of photons or the _informational entropy_ in statistics!