{'fraction_non_alphanumeric': 0.04103231648650178, 'fraction_numerical': 0.012875657931971249, 'mean_word_length': 4.86539419087137, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Automated Detection of Uninformative Frames in Pulmonary Optical Endomicroscopy

Significance: Optical endomicroscopy (OEM) is a novel real-time imaging technology that provides endoscopic images at a microscopic level. The nature of OEM data, as acquired in clinical use, gives rise to the presence of uninformative frames (i.e., pure-noise and motion-artefacts). Uninformative frames can comprise a considerable proportion (up to > 25%) of a dataset, increasing the resources required for analyzing the data (both manually and automatically), as well as diluting the results of any automated quantification analysis. Objective: There is, therefore, a need to automatically detect and remove as many of these uninformative frames as possible while keeping frames with structural information intact. Methods: This paper employs Gray Level Cooccurrence Matrix texture measures and detection theory to identify and remove such frames. The detection of pure-noise and motion-artefacts frames is treated as two independent problems. Results: Pulmonary OEM frame sequences of the distal lung are employed for the development and assessment of the approach. The proposed approach identifies and removes uninformative frames with a sensitivity of 93% and a specificity of 92.6%. Conclusion: The detection algorithm is accurate and robust in pulmonary OEM frame sequences. Conditional to appropriate model refinement, the algorithms can become applicable in other organs.

most widely used platform and the only fiber-based endomicroscopic methodology approved for clinical use. The technology employs a proximal laser scanning unit linked to an interface with a flexible multi-core fibre. This fibre is passed through the working channel of endoscopes enabling microscopic imaging at the distal end of the fibre. In pulmonary OEM, the abundance of elastin and collagen enables structural imaging through the generation of autofluorescence with a 488nm laser excitation. The lateral diameter of the fibre used in lung applications is 1.4 mm. This miniaturization enables the exploration of the distal pulmonary tract [2] as well as the assessment of the respiratory bronchioles and alveolar gas exchanging units of the distal lung [3]. OEM has been used clinically in the lung for the detection of lung cancer [4,5] and has been used to assess the distal lung [6,7] including the imaging of parenchymal lung diseases [8]. Furthermore, OEM has been used in other organs such as the urological tract [9]. The largest OEM application remains in imaging of possible cancerous lesions in the gastrointestinal tract [10,11]. The commercially available FCFM platform images at 12 frames per second and clinical and preclinical OEM procedures often last minutes, generating thousands of frames, hence making their manual (post-vivo) analysis a very labour intensive process.
The nature of OEM data acquisition results in image sequences that form a long continuous scene. Within these sequences there are frames that contain only pure-noise ( Fig.  1.a), mostly due to the lack of contact of the fibre with a fluorescent target or due to bio fouling of the tip of the fibre. Similarly, there are frame sequences where the spatial movement is very large when compared to the temporal rate of acquisition. This results in motion artefacts, expressed as either deformed anatomical structures ( Fig. 2.a-c), or spatial discontinuity for temporally adjacent frames (Fig. 2.d-f). Such frames contain little information of value and are therefore referred to as "uninformative frames". Indeed, uninformative frames comprise a substantial proportion of the dataset, depending on the motion of the imaging target as well as also the operator manipulating the fibre. In pulmonary OEM, significant movement artefacts occur due to the movement of the fibre in the distal lung from both the respiratory effort of the patient and also of the fibre traversing bronchopulmonary segments of the lung. In our experience with lung OEM data, uninformative frames may comprise in excess of 25% of the acquired frames. The presence of uninformative frames: (i) prolongs the off-line manual assessment of the data, (ii) increases computational resources, and (iii) dilutes the results of any post-processing algorithm intended to analyse and quantify the images. There is therefore a need for an automated approach to accurately and robustly detect and remove such uninformative frames as the first line of any automated or manual image analysis step.
There has been considerable research in the suppression of noise [12] as well as for the detection of motion artefacts for a range of imaging modalities, including, but not limited to, aerial images [13], microscopy [14], medical images [15], as well as other digital photography images [16][17][18]. However, most such studies focus on the detection of motion-blurred regions within a frame with the intention to compensate for it through some image enhancement algorithm. Such techniques, while potentially very effective for their specific application, cannot be easily employed to detect uninformative frames in OEM data. Analysing the spatio-temporal characteristics of the sequences is required. A large number of studies performing such analysis of the spatio-temporal characteristics of video sequences concentrate on detecting shot transitions and grouping frames into scenes [19][20][21][22]. Once again, this is not applicable in OEM data due to the continuous acquisition resulting in a continuous imaging sequence with uninformative frames embedded within it. Other endoscopic imaging techniques can generate analogous frame sequences to OEM when navigating along the bronchus, or the gastrointestinal tract. There is therefore considerable interest in the spatio-temporal analysis of endoscopic data, including, but not limited to, laparoscopy [23], colonoscopy [24], wireless capsule endoscopy [25][26][27][28] and larynx endoscopy [29]. The main focus of all these studies was the identification of one or more key frames within the main frame sequence to aid the diagnostic process or some further post processing technique. A recent study [30] has developed a fully automated approach for the selection of a representative frame from a short endo-microscopy frame sequence, enabling a real time quantitative image analysis at the point-of-care. The approach generated very promising results for short oral and esophageal image sequences. However, none of the aforementioned studies address the problem of identifying and uninformative frames from OEM frame sequences. This paper presents a novel approach for detecting and "removing" uninformative frames from OEM frames sequences. The algorithm was developed and assessed on frame sequences from the distal lung of patients with suspected lung cancer. However, with the appropriate adjustments, the algorithm can potentially be effective in removing uninformative frames from sequences acquired on (i) other organ systems, such as the gastrointestinal tract and the urinary tract, as well as (ii) any other fibre based imaging platform. The rest of the paper is organized as follows: Section II describes the material (data) utilised in the study. Section III describes the detection algorithms for pure-noise and motionartefacts independently. Section IV describes the data analysis used to train and test the detection algorithm and Section V displays the relevant results. Finally, the proposed methods and corresponding results are discussed in Section VI.
II. DATA 83 OEM image sequences of the distal lung were used during the development and testing of the proposed algorithm. All data were obtained as part of a database (of 126 subjects) during the routine care of patients undergoing investigation for an indeterminate pulmonary nodule (< 30 ) at the Columbus Lung Institute, Indiana, USA. The study was approved by the Western Institutional Review Board. All procedures were undertaken by a single expert operator using standard bronchoscopy, with the aid of superDimension TM Navigation System (Covidien Inc., MN, USA) and imaging with 488nm Cellvizio TM using a 1.4mm lateral diameter Alveoflex TM fibre (Mauna Kea Technologies, Paris, France). All image sequences were stored in the proprietary .mkt format and read as 16-bit binary files for processing in Matlab TM (MathWorks Inc., MA, USA). Some subjects ( = 43) were rejected due to (i) short duration of sequences (i.e. video<10 frames), (ii) corrupted data (i.e. file not readable, misaligned fibre or out of focus images), or (iii) lack of distal lung images (i.e. solely imaging the bronchus). No other subjective criteria (such as image quality) that could potentially bias the proposed algorithm were used during the video selection process.

III. METHODOLOGY
This section describes the methodology used to detect purenoise frames and motion artefacts. These were handled as two independent problems, both utilising image-derived texture metrics.
Let I(x, y, t) be a greyscale image sequence, with x ∈ [1, N], y ∈ [1, M] and t ∈ [1, K] indicating the pixel location (xcolumn and y -row) and the frame number respectively. The Gray-Level Co-occurrence Matrix (GLCM) [31] G t for frame I t = I(x, y, t) (x,y)∈[1,N]× [1,N] was defined as an L × L matrix where, L was the number of grey-levels within the image (16 bit), i and j were intensity levels, p and q were the spatial positions in the image I t , and Δx and Δy were the spatial offsets (in number of pixels) utilised to estimate the GLCM G t . In order to achieve rotational invariance of the relevant texture measures, G t was estimated as the mean GLCM for four different offset pairs {(1,0), (1,1), (0,1), (−1,1)}, corresponding to a single pixel offset at directions (0°, 45°, 90° and 135°). G t was then normalised to denote the probability of each pixel-pair being present in frame I t , where, n was sum of all the elements of the matrix G t . Related texture metrics were derived as [31]: (3) (4) where, t was the frame number and p ij = G t norm (i, j). In addition to the aforementioned GLCM properties, global image characteristics, such as frame intensity mean (V 6 (t)), and standard deviation (V 7 (t)), were also employed. All texture metrics were estimated in a way such that frames containing noise (or very faint features) demonstrated low (nearly zero) values ( Fig. 1.a-b), while more pronounced features, such as elastin strands and blood vessels ( Fig. 1.c-f) within the alveoli space, demonstrated higher (closer to 1) values. Since the GLCMs need to be estimated in rectangular regions only, the largest square region within the circular field of view (FOV) of the OEM frame sequences was used as I(x, y, t) throughout this study. The remaining 4 segments (each 9% of the overall circular FOV) were not included in I(x, y, t) and consequently in the GLCM estimation and the subsequent frame detection. This decision was based in the assumption that, if the central square region of a frame was identified as pure-noise or a motion-artefact, a small structure in any of the 4 excluded subsections is not enough to reinstate the frame as an informative frame. Each texture vector was normalised to the [0, 1] range using where, i ∈ [1,7] and t ∈ [1, K] represented the frame number. Finally, a 7-dimensional feature space was therefore defined as A. Detection of pure noise frames 1) Reducing dimensionality Principal Component Analysis (PCA) was employed to reduce the dimensionality of the 7-dimensional feature space. The K × 7 matrix Y = (PC1, PC2, … , PC7) was defined as, Y = A(X − (λ * m X )) (10) incorporating the projection of the 7 feature vectors (X) in the relevant principal component space. The vector m X = 1 K ∑ X(t, i) K t=1 , i ∈ [1,7] contained the mean value of each of the 7 parameters and the vector λ was an 1 × K unit vector, while the rows of A were the eigenvectors (i.e. the direction of the Principal Components) of C X , the 7x7 sample covariance matrix of X (normalised to unit length) Although the whole matrix Y could be used for the detection of pure-noise frames, the first principal component (PC1) was found to contain sufficient information for the detection of pure-noise frames. As a consequence, only PC1 (i.e., a single parameter per frame) has been considered for pure-noise frame detection.

2) Gaussian mixture model
An experienced investigator performed a thorough visual inspection on a subset of the available OEM data, aiming to identify any image texture sub-groups that can justly represent the underlying anatomical information. The inspection of the OEM data highlighted four different texture categories ( Fig.  1): (i) pure-noise frames ( Fig. 1.a), mostly containing no anatomical information, (ii) subtle feature frames ( Fig. 1.b), mostly containing linear bronchus strands or very low contrast elastin strands, (iii) normal frames ( Fig. 1.c-d), containing both pathological ( Fig. 1.c) and healthy ( Fig. 1.d) elastin strands, and (iv) vibrant frames ( Fig. 1.e-f), containing very well defined features, such as larger elastin strands and blood vessels. The boundaries of these four categories were not distinct. Fig. 3.a provides a representative histogram example H1 derived from the PC1 of a lung OEM image sequence. A Gaussian Mixture (GM) model was employed to represent the underlying texture information contained in PC1. More precisely, following the 4 texture categories identified through the aforementioned manual visual inspection of the OEM data, the following Gaussian Mixture model composed of 4 Gaussian distributions was considered where, parameters P i provided the weight (also referred to as proportion or probability - with mean μ i (μ 1 < μ 2 < μ 3 < μ 4 ) and standard deviation σ i . The Gaussian Mixture model likelihood (Log Likelyhood) was optimised using the iterative Expectation-Maximization (EM) algorithm [32], as performed by Matlab TM 's fitgmdist command. Fig. 3.a overlays the mixture of 4 Gaussian distributions to the underlying histogram, with 1 corresponding to pure noise and 2 to 4 corresponding to frames including anatomical features, from subtle to vibrant.

3) Model simplification using Metropolis-Hastings method
It is difficult to derive the distribution of classical test statistics (and thus predict the detection performance) in the general case of mixtures of more than two distributions. This section presents a statistical method to split a set of random variables, identically distributed according to a known mixture of Gaussians ( 1 to 4 ), into two subsets, each containing variables distributed according to a mixture of a subset of the original Gaussians (e.g., 1 and 2 ). Such a split reduces the detection problem to a classical binary hypothesis test to decide between 1 and 2 (as will be shown in Section III.A.4). The proposed approach can be seen as a Metropolis-Hastings (MH) algorithm [33], which is a Markov chain Monte Carlo method typically used to generate random variables according to an arbitrary target distribution, i.e. distributions not handled by classical random number generators. The MH consists of generating random candidates according to a "proposal distribution" and accepting each candidate with a particular probability (the rejected candidates are either discarded or set apart). In our case, this accept/reject process ensured that the accepted samples were distributed according to the "target distribution" defined as the following mixture of 1 and 2 GM_t = ∑ (P i ( as the intention was to discriminate ( 1 , 2 ) from ( 3 , 4 ).
Let u ∈ PC1, the projection of an image feature vector (X) onto the first principal component, being distributed according to (12). By considering (12) as proposal distribution, the variables in PC1 as independent candidates and (14) as target distribution, the probability of accepting u was estimated by the ratio where }.
(16) Note that if the variables u ∈ PC1 were actually independent, identically distributed (i.i.d.) variables following (12), the selected variables in PC1 sub would be distributed according to (14). However, since the Gaussian mixture (12) was an approximation of the actual distribution of u ∈ PC1, the distribution (14) was therefore also an approximation of the distribution of u ∈ PC1 sub . Nevertheless, as suggested by the results in Section V, in practice this approximation was accurate enough, leading to satisfactory results in terms of uninformative frame detection. Fig. 3 depicts a representative example of histograms of the variables in PC1, before and after the model simplification, along with the associated mixtures of 4 and 2 Gaussian distributions.
The receiver operating characteristic (ROC) curve of the two-Gaussian model was estimated as the false positive rate (FPR) against the true positive rate (TPR) with, v ∈ PC1. A weighted version of Youden's Index [34,35] J was employed to derive the cut-point on the ROC that provides optimal trade-off between TPR and FPR. Youden's index is often used in conjunction with ROC analysis as a measure of overall diagnostic effectiveness. Youden's index represents the point along the ROC curve with maximum vertical distance from the first bisector [34]. Unlike the Area Under the Curve (AUC), Youden's index can be used as an optimal cut-off point (threshold), being the point in the ROC curve furthest away from the chance line. In order to avoid threshold bias towards the largest population (negative frames in this case) a weighted Youden's index J was defined as [35]: with, true negative rate (specificity) TNR = 1 − FPR and weighting factor r = (1 − π)/απ. Moreover, α denoted the relative loss (cost) of a false negative classification, while π represented the proportion of positive (pure-noise) frames within the frame sequence. For the proposed application, since no critical decision was being made by the proposed detection algorithm, relative cost α was set to 1.
The optimal cut-point v J was then employed to derive the desired (optimal) false positive rate FPR J = FPR(v J ). Finally, the quantile function Φ −1 (p) was used to estimate the threshold T f = μ 2 − Φ −1 (p) σ 2 differentiating noise to normal frames. More precisely Φ −1 (p) = √2erf −1 (2p − 1) (21) where, erf −1 was the inverse error function and p representing TNR J = 1 − FPR J . Hence, the set of pure noise frames were

B. Detection of motion artefacts
Instead of the direct texture values, the frame-by-frame texture variability X' = X(t) − X(t − 1), t ∈ [1, K] indicating the frame number, was used to detect motion artefacts. PCA, as described in (10) was then employed to reduce the dimensionality of the feature space. The first two principal components, PC1′ and PC2 ′ , were found to contain the information relevant for the distinction of motion artefacts.
Visual inspection of the data highlighted 4 different types of frame-by-frame motions (Fig. 2) namely, (i) motion artefact frames, where a large movement resulted in tissue deformation and spatially discontinuous frame sequences (Fig. 2.a-c and  2.d-f), (ii) large movement frames, in which while movements were large, they still resulted in spatially continuous frame sequences (Fig. 2.g-i), (iii) normal frames with moderate movement (Fig. 2.j-l), and (iv) nearly static frames, with negligible movements. In a fashion similar to that adopted for the pure-noise frames, the boundaries of these cases were not well-defined. To represent this underlying texture-difference information contained in PC1′ and PC2′, and taking into consideration the 4 frame-by-frame motions identified through the aforementioned manual visual inspection of the OEM data, two 4-Gaussian mixture models (GM′ = ∑ P′ i ′ i (μ′ i , σ′ i ) ) were employed. In both cases (PC1′ and PC2′), the Gaussian distributions demonstrated zero mean and decreasing standard deviation (σ 1 > σ 2 > σ 3 > σ 4 ). PC2′ of a lung OEM image sequence along with the corresponding 4-Gaussians models, with ′ 1 corresponding to motion artefacts and ′ 2 to ′ 4 corresponding to frames with large to negligible movements. In a similar fashion to the noise case, the detection problem was simplified (Fig. 4) by removing the two distributions with smallest standard deviations (normal and nearly static frames) as described in (14) to (16).

IV. DATA ANALYSIS
Of the available 83 OEM frames sequences, 11 datasets were selected as a testing set. Selection criteria included type of diagnosis, video duration and quality of acquired images (i.e. noise, contrast and artefacts levels). The remaining datasets were used as training set. In order to minimise a potential selection bias, it was ensured that representative frame sequences were included in both training and testing sets. Tables I and II summarise the key characteristics of the training and testing sets. The training set was employed (i) to create a statistical model (i.e GM model) that describes well the underlying texture information, and (ii) to extract a detection threshold that achieves an optimal trade-off between TPR and FPR (employing Youden's index). The relevant noise and motion artefact thresholds were therefore estimated using the training set employing no prior knowledge about the testing set. The testing set was then projected in the training set's principal component space and the threshold was employed on the relevant projection. If the assumptions used to make the statistical model were correct and the resulting GM model is representative of the underlying data, when the threshold is applied on the previously unseen testing set, it will produce results (sensitivity and specificity) that match the expected theoretical values (TPR and FPR derived from the training set). A. Manual data analysis One investigator, with substantial prior experience in OEM image sequences of the distal lung, annotated each individual frame in the testing set as normal or pure-noise. Furthermore, due to the more subjective nature of what is considered as motion artefact, two investigators independently annotated each individual frame in the testing set as normal or motionartefact. The instructions on which the annotation was based stated that, a frame was considered a noise frame, if no anatomical information was present within the frame. A frame was considered a motion artefact if there was (i) spatial deformation of the imaged structures due to the high motion levels compared to the acquisition speed, and/or (ii) no spatial continuity between temporally adjacent frames. Characteristic examples of normal, noise and motion-artefact frames are provided in Fig. 1 Table III lists the number of frames annotated by each operator as motion artefacts, the Union and Intersection of the two sets, as well as the corresponding Jaccard Index [37]. Jaccard Index provides a statistic for comparing the agreement between the two finite sample sets, and is defined as the size of the intersection divided by the size of the union of the ). In order to reduce the interobserver variability (bias of the manual data annotation), a frame was assigned the uninformative label if both investigators had annotated it as such. Otherwise, if one of the investigators considered that there was valuable information within the frame in question and labelled it as normal, the > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 8 frame was considered normal. The resulting binary annotations (summarised in Table IV) were utilised as the gold standard for the subsequent evaluation of the proposed detection algorithms.  [38,39] was employed to assess the goodness-of-fit of the actual data on the proposed Gaussian mixture model. More precisely, the KS statistic was estimated D K,K′ * = max ψ |F 1,K (ψ) − F 2,K′ (ψ)| (30) where, F 1,K (ψ) and F 2,K′ (ψ) were the Empirical Distribution Functions (EDFs) of the actual data and mixture model respectively (i.e. F 1,K (ψ) was the proportion of actual data ≤ ψ and F 2,K′ (ψ) was the proportion of the mixture model ≤ ψ). Furthermore, K and K' were their respective sizes (in number of frames). Under null hypotheses, both the actual data and the relevant mixture model came from the same distribution. For a given significance level α = 0.05, the null hypotheses was rejected if where, c(α) = 1.36 for significance level α = 0.05 as provided in the relevant critical value table in [39].

C. Training-set size selection
The overall training set S consisted of 72 datasets and >48000 frames containing a representative selection of frames. An optimal training set size would provide robust detection thresholds for uninformative frames while keeping computational requirements (relative to the size) to a minimum.
A line-plot of set size against threshold robustness was employed to identify such a sufficient training set size. More precisely, set size(δ) = δ × step (32) where δϵ{1,2, … ,8} and step = 6000, testing set sizes of up to 48000 frames. Furthermore, threshold robustness(δ) = (mean(A δ ), rsd(A δ )) (33) where, rsd(A δ ) estimated the Relative Standard Deviation of the set A δ , and A δ = {Thr 1 (S(J δ )), … , Thr 10 (S(J δ ))} was a set of 10 replicated estimates of the required threshold (Thr i ) for a given subset S(J δ ) of the training set S. J δ~U [1, L] δ×step provided the uniformly distributed random indices of the subset of S (length of S = L).

D. Assessing the performance of detection
The effectiveness of the proposed approaches in detecting uninformative frames was assessed quantitatively by estimating their relevant sensitivity and specificity against the manual detection results (gold standard). The sensitivity and specificity levels were also compared against the relevant model-based ROC curves, assessing how representative the employed model and the associated assumptions were in detecting pure-noise frames and motion artefacts within previously unseen OEM frame sequences.

A. Assessing proposed model fit
Numerous mixture models with increasing number of Gaussian distributions were fitted to the original EDFs in order to verify that the proposed model provided an optimal representation of the underlying data. Table V summarises the corresponding KS goodness-of-fit results. Table VI

B. Training-set size selection
Line-plots were derived (as described in Section IV.C) illustrating the effect of increasing the size of the training set on the robustness (expressed as RSD) of the relevant threshold estimation. The process was repeated for PC1 in the detection of pure-noise frames, as well as PC1 and PC2 in the detection of motion artefacts. Fig. 6 contains the relevant plots.

C. Sensitivity vs Specificity
ROC curves were derived from the proposed Gaussian Mixture models for pure-noise and motion artefact detections. Fig. 7 illustrates the relevant plots with their corresponding Area Under the Curve (AUC) provided in the title. If the models provided an accurate representation of the underlying data, the estimated specificity and sensitivity results from the previously unseen testing set should match the corresponding values at the optimal ROC cut-off point as calculated using the Youden's index (Section III.A.4). Table VII lists the sensitivity and specificity in pure-noise detection for each individual dataset as well as for the whole testing set as a whole. Similarly, Table VIII lists the sensitivity and specificity in motion artefact detection using PC1 and PC2 individually. The model based sensitivity and specificity estimates are provided in the relevant table titles. Due to the independent modelling and analysis of PC1 and PC2, no model based estimates of sensitivity and specificity are provided for PC1 ∪ PC2. Finally, Table IX summarises the sensitivity and specificity of the detection of uninformative frames (both pure-noise and motion artefacts) collectively. To emulate the decision process of a manual detection, sporadic (1 consecutive) good frames amongst a sequence of uninformative frames were removed.

VI. DISCUSSION
Thorough visual inspection of the available OEM data by an experienced investigator highlighted four different texture categories (Fig. 1, 3) and an equal number of frame-by-frame movement types (Fig. 2, 4), to be used for the detection of pure-noise and motion artefacts frames respectively. As illustrated by Figs. 3, 4 and 5 and verified by the corresponding KS goodness-of-fit results in Table V, in both cases, the 4-Gaussian mixture models provide an optimal representation to the underlying information. Reducing the number of Gaussian distributions in the proposed model has a direct and substantial detrimental effect in the corresponding goodness-of-fit to the underlying data. On the other hand, increasing the number of Gaussians in the model to 5 (or more) does not necessarily improve the relevant goodness-offit. Further visual inspection of the available data indicates that, in the case of pure-noise frames, the challenge lies in the accurate and robust distinction between pure-noise ( Fig. 1.a) and subtle feature frames ( Fig. 1.b). Similarly, in the case of motion artefacts, the challenge lies in the distinction between them (Fig. 2.d-f) and large (but continuous) movements ( Fig.  2.g-i). The relevant distribution overlaps in Figs. 2 and 4 verify this observation (largest overlaps between 1 and 2 ). By refining the Gaussian Mixture model as described in Section III.A.3 the detection problem is reduced to a classical binary hypothesis test deciding between 1 and 2 . The close proximity of the refined model to the corresponding histograms ( Fig. 5 and Table VI) along with the subsequent promising detection results suggest that the refined models provided a fair approximation of the distribution of the relevant PCA coefficients.
A large and diverse set of OEM images was employed to train the proposed algorithms for the detection of uninformative frames. As illustrated by Fig. 6, a training-set of >30000 frames is sufficiently large for a robust threshold estimation (RSD<6% -small drop for larger training sets) in both the pure-noise and motion artefact cases. Section III.A.4 employed a simple approach based on the model-based ROC curve and the corresponding weighted Youden's Index to detect pure-noise frames. The ROC curve in Fig. 7.a along with the corresponding AUC and predicted detection sensitivity of 98.8% and specificity of 97.7% support the decision of employing such a simple model. The decision is further backed by the encouraging detection results on the previously unseen testing set, yielding an overall sensitivity of 93% and specificity of 98.8%. Not taking into consideration the outlying dataset "Benign 1" can further increase the overall sensitivity to 96.5% and specificity to 98.6%. The very promising detection results, along with their close agreement to the results predicted by the proposed Gaussian-Mixture model, highlight the reliability of the proposed detection approach and the limited scope for a more mathematically advanced solution.
The detection of motion artefacts was a more challenging and subjective task, hence the decision to manually annotate the relevant frames by two operators. The very modest agreement (Jaccard index: 0.58 - Table III) was mostly due to inter-observer variation in the start and end frames of an uninformative frame sequence. Rarely there was a disagreement over a full motion-blur artefact. Nevertheless, the limited agreement between the two manual annotations confirms the more challenging and subjective nature of the problem. The observation is further supported by the corresponding ROC curves (Fig. 7.b and 7.c) with the optimal cut-off points (Youden's Indices) yielding sensitivity of less than 76%. Due to the more challenging and subjective nature of the problem, the Neyman-Pearson Lemma was employed for the estimation of the detection threshold providing the most powerful test at significance level α for a threshold k. PC1 yields better detection results achieving a sensitivity of 74.9% and specificity of 94.3%, as opposed to PC2's sensitivity of 65.8% and specificity 93.8%. As illustrated in Table VIII, the detection results for both PC1 and PC2 were in close agreement with the ones estimated by the proposed Gaussian mixture models. Combining the binary masks derived from each principal component can substantially increase the detection sensitivity to a promising 83.3% (from 74.9%), with a minimal effect in corresponding detection specificity (dropping from 94.3% to 91.8%). When combined Fig. 6. Line-plots of detection threshold variability (robustness expressed as Relative Standard Deviation) for increasing size of training set for (a) PC1 in purenoise detection, (b & c) PC1 and PC2 in motion artefact detection. In all cases a set size of 30000 enables a robust (<6% RSD) threshold estimation. with the pure-noise detection the proposed approaches reliably detect uninformative frames with sensitivity of 93.0% and specificity of 92.6% (Table IX). Part of the disagreement (good frames identified as uninformative) between manual and automatic detection can potentially be attributed in the restricted region used in the estimation of the GLCMs and the assumption that no additional information, enough to effect the decision process, is imaged in the excluded regions.
Having developed a reliable method for detecting and removing uninformative frames from OEM imaging sequences of the distal lung, the next step is to further classify the remaining, useful, frames into sub-categories based on the underlying image textures. This further classification would differentiate between frames imaging the bronchus and ones imaging the alveolar space. Subsequently, alveolar space frames can potentially be further classified amongst, healthy elastin, pathological elastin and cell-flooded frames. Such classification would enable pulmonologists to target analysis to regions of interest, reducing the subjectivity and timeefforts of the analysis. With the advent and development of optical molecular imaging and exogenous contrast agents [1,3], such frame classification will be an essential requirement to expedite quantifiable optical data analysis.

VII. CONCLUSIONS
Uninformative frames comprise a considerable proportion (up to >25%) of clinical pulmonary OEM frame sequences. Texture descriptors derived from the Gray-Level Cooccurrence Matrices, such as Contrast, Energy, Homogeneity, etc., provide valuable information for the detection of frames containing either pure-noise or motion artefacts. PCA (as a mean of dimensionality reduction) combined with the proposed Gaussian Mixture models provide a fair representation of the underlying texture information, enabling an accurate (sensitivity: 93.0%) and robust (specificity: 92.6%) detection of uninformative frames in human lung OEM frame sequences. A similar approach can be employed to further classify any informative frames based on their underlying texture assisting any manual and automatic postanalysis. Finally, conditional to appropriate model refinement, the proposed algorithms can become widely applicable in OEM frame sequences acquired on (i) other organ systems (e.g. the gastrointestinal tract), and (ii) other OEM imaging platforms.