# Earth Mover's Distance-Based Tool for Rapid Screening of Cervical Cancer Using Cervigrams
## 2 Materials and Methods  
In the present study, the digitized cervigrams as well as socio-demographic data (Table 1) of 398 subjects were acquired from the outpatient department (OPD) of BHMRC and DSCI after obtaining prior institutional ethical clearance and informed patient consent. R (version 2021.09.0 Build 351), an open source software tool equipped with highly advanced image analysis tools and techniques, has been used as the programming language. We used R-studio (Integrated Development Environment for R programming language)to automatically demarcate the morphological features, color intensity, sensitivity, lesion detection, contour formation, enhanced visual inspection, and other clinical parameters, as shown in Figure 1. The whole process from conceptualized to its demonstration has been depicted in Data Flow Diagram (DFD) (Figure 1), with an emphasis on the unhindered acquisition of certifgrams (coloscope-derived images) along with its processing and result generation in almost real time using the optimal amount of computational resources. Earth Mover's Distance (EMD) was used to detect initial variances between the cerviograms of normal subjects to set a threshold value for the cervigrams of the normal cerviograms. The regions of interest of the cropped regions were color-coded using a green channel to enhance the sensitivity of visual inspection and lesion detection because it is the closest channel to luminance. Subsequently, the values obtained from the comparison of both normal and abnormal cervigrams were plotted on a scale virtually stacking the cervigrams based upon the EMD value. This lead to the creation of \"OM--The Oncometer\", a scale used to rank the cervigrams in order of the disease severity. This will significantly improve rapid screening and early diagnosis in a non-invasive manner. MySQL Version 14.14 Distrib 5.5.60 has been used for the development of the image/video repository for further processing of digitized cervigrams while LINUX (Ubuntu) version 20.04 has been used as the base computational platform. Digitized Cervigrams acquired using Digital Colposcope (Mobile ODT, Tel Aviv-Yafo, Israel) from anonymized subjects presenting at the OPD of BHMRC and DSCI were subjected to preprocessing algorithms [12] for noise removal before being analyzed for cervical cancer lesion detection using image processing algorithms, as shown in Figure 2a,b. Apart from a conventional statistical pedagogy, R has numerous dedicated features and capabilities in the area of advanced medical grade image analysis that helped ground the development process of OM--The OncoMeter (Figure 4). The salient features of the EMD (Earth Mover's Distance) algorithm which allowed for utilization of rigorous quantitative approaches for the colposcopic image comparison and classification are as follows and shown in Figure 4[13; 14; 15]:  
* The first and foremost key feature of the algorithm, being free;
* Image similarity-based detection;
* Open source implementation in R;
* Robust application to noisy images;
* Cloud-based storage accessibility and ubiquitous provisioning of services from a collected repository at the local, regional, and global levels;
* This cloud-based information provisioning facilitates automated closed-loop-resource allocation, which in turn provides affordable and accessible healthcare technology platforms for effective management of disease burden. Training of the algorithm used 81 normal (control) cervigrams of females of Indian origin obtained from the OPD of BHMRC as input (Figure 2). This contributed to the  
Figure 1: **Diagrammatic representation of steps involved in pre-processing and processing of digitized cervigrams for detection of abnormality:** our present study depicts a diagrammatic representation of the processing the digitized cervigrams obtained from the patients evaluated at the outpatient department of Batra Hospital and Medical Research Centre.