## 2 Materials and Methods  
Detecting cells within a general microscopic field is challenging because Pap smear tests do not always present adequate samples with correct staining or a broad cellular sample where multiple cells can be distinguished. As mentioned earlier, cervical cytology is primarily a screening test for squamous cell carcinoma of the cervix and its precursors. Due to the wide spectrum of reactive cytomorphological changes, criteria need to be better defined, and reproducibility may be lacking [21; 22; 23; 24; 25]. It is essential for those analyzing cervical samples to understand both nuclear morphology and the sizes of cellular components. Early pioneers in cervical cytology gained fundamental knowledge of benign and neoplastic processes through careful measurements of conventional cytology [26]. Although there is no contemporary literature on such measurements in liquid-based preparations, size relationships remain crucial for defining diagnostic entities and functional states. Although well-established datasets exist in the scientific literature, the variability and parameters of these samples are preprocessed, considerably differing from those found in real cervical cytology samples. This highlights the need to adapt and validate diagnostic methods in real clinical contexts. Consequently, within the framework of cervical cytology analysis using the Pap smear test, this work aims to increase adaptability to non-ideal smears and image-capture devices with varied resolutions. The detection process must effectively adjust to variations in staining and sample quality in cytological screening, such as the ones presented in Figure 1.  
Figure 1: The State Public Health Laboratory of Michoacán (SPHLM) provided smear samples with varied staining levels and diverse diagnoses. This adaptability is essential because, even in poorly obtained cytological samples, it is possible to detect cells that indicate the presence of cancer or precancerous conditions. Therefore, the proposed methodology considers some important steps, presented in Figure 2, to perform a robust and flexible detection of cancerous cells. In this work, the images are obtained from smear samples provided by the State Public Health Laboratory of Michoacan (SPHLM). In the first step, the images are preprocessed. For the classification step, some specific types of cervical cells are considered: koilocytes, normal cells, and actinomyces. The SIFT algorithm is applied to obtain the cell descriptors, and the location of the cells is also obtained. To validate the results, the precision, recall, and F-measure values are used. Additionally, the speed at which specialists examine samples under the microscope to detect cancer-related cells has been considered, leading to the implementation of the proposed methodology using real-time video to improve the efficiency of the evaluation process. Figure 2: Proposed methodology to process and classify cervical cell images. To facilitate detailed data analysis, a microscope adapter, produced using three-dimensional (3D) printing techniques, was implemented to acquire microscopic sample images. This adapter significantly enhanced the functionality of cameras in mobile devices, optimizing image and video collection during the investigation, as illustrated in Figure 3.  
Using this tool, more than 15,000 photos and 20 h of videos of cytological specimens were acquired, thoroughly documenting the microscopic fields. It is crucial to recognize that the focal distance and magnification level of the microscopic field are not constant across all observations. Consequently, the quality of cervical cytology images is affected by multiple factors, including the type of mobile device, focal distance, lens, objective, lighting, and filter used in the microscope. However, the applied methodology adequately detects individual cells as long as they are distinguishable within the microscopic field. Figure 4 shows cervical cytology images captured at different focal distances and levels of zoom.