## 3 Materials and Methods
### Proposed Approach
#### 3.1.1 The Evaluation of the Target Histogram  
Let \(\mathcal{X}=\{X_{k}\}_{k=1}^{N_{T}}\) be a set composed of \(N_{T}\) target images (i.e., belonging to normal or CP diagnostics). Since both CT and CXR scans are grayscale images, the \(k\)-th input data \(X_{k}\) is modeled as a matrix of dimension \(M\times N\), representing the number of rows and columns, respectively. The pixels' intensity values have been normalized into the range \([0,\,1]\). For each of the \(N_{T}\) images, the related histogram \(h_{k}\), with \(k=1,\ldots,N_{T}\), is computed for \(N_{bin}\) bins. In this paper, we choose the (normalized) histogram as a statistical representation of the target, principally due to its simplicity and efficiency in computation. A histogram is an estimate of the probability distribution obtained by partitioning the range of values into a sequence of \(N_{bin}\) equally-spaced intervals (called _bins_) and counting how many values fall into each interval. The histogram is then normalized so that its sum total equates to one. The \(N_{bin}\) bins, used to build up the histogram, should be chosen by a trade-off between numerical stability of the distance measurements and its discriminating capability. Although this number turned out not to be critical for the performance of the proposed approach, we found that an optimized setting to guarantee non-empty bins is to use 50 bins, i.e., \(N_{bin}=50\). The _target histogram_ is, hence, evaluated as the average of \(h_{k}\), computed for each image, over \(N_{T}\) histograms:  
\[\overline{h}=\frac{1}{N_{T}}\sum_{k=1}^{N_{T}}h_{k}. \tag{1}\]  
Alternatively, since the histogram evaluation is a nonlinear operation, we have also tested the average of all the \(N_{T}\) target images followed by the evaluation of the histogram. However, we expect that this procedure gives a rise to inadequate results, as detailed in Section 4.5. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Family** & **Approach** & **Work** & **Image Type** \\ \hline \multirow{8}{*}{Unsupervised} & Classification & [70] & CT \\  & & [69] & CT \\  & & [85] & CT \\  & & [86] & CT \\  & & [87] & CXR \\  & & [20] & CXR \\  & & [88] & CXR \\  & & [89] & Histopathological \\  & & [90] & CT \\  & & [91] & CT \\  & & [92] & CXR \\ \hline Histogram & Histogram + DL & [93] & CXR \\  & & [94] & CXR \\  & & [95] & Skin \\  & & [96] & CT \\  & & [97] & MRI \\  & & [98] & Skin \\  & & [99] & Skin \\  & & [101] & MRI \\  & & [102] & MRI \\  & & [103] & CT \\ \hline \hline \end{tabular}
\end{table} 
Table 1: \(Cont.\)In this phase, we also evaluate the distance between the just computed target histogram \(\overline{h}\) and the histogram \(h_{k}\) of every single \(k\)-th reference scan, by using suitable probability dissimilarity measurements (introduced in the next subsection). Among these distances, we compute the mean \(d_{m}\) and standard deviation \(\sigma_{d}\) values, in order to set conveniently a suitable threshold \(TH\) used during the test phase to discriminate a reference scan from an anomaly. The idea is that the statistical distance from an anomalous scan should be greater than a reference one. Therefore, the threshold \(TH\) would be set equal to the mean distance \(d_{m}\) plus a term depending on its standard deviation. Mathematically, we set the threshold \(TH\) as follows:  
\[TH=d_{m}+\eta\sigma_{d}, \tag{2}\]  
where \(\eta\) is a suitable constant. In the case of CT scans, we set \(\eta=2\), while, for CXRs, \(\eta=1.4\) provides good results. During the inference phase, the test histogram of an unknown image is evaluated. This test histogram will be then compared to the target one, according to the same distance measurement used previously. If the distance between the test and target histograms rises beyond the threshold \(TH\), the underlying image will be marked as COVID (anomaly); otherwise, it will be marked as the reference one.