## 1 Introduction  
Additive manufacturing (AM) allows for the creation of objects by building them layer by layer. This original approach has generated an entirely new category of manufacturing processes distinct from traditional methods based on material solidification (such as metal casting or plastic injection molding), metal forming (such as rolling or sheet metal bending), or material removal (such as turning or electrical discharge machining) [1; 2; 3]. The fundamental aspects of AM processes are currently being standardized by the ASTM International and the International Organization for Standardization (ISO) [4]. Material extrusion of polymers (MEX/P) stands as one of the most widely utilized AM processes, mainly because of its user-friendly nature and the economical feedstock costs [5]. Nevertheless, the quality of MEX/P parts still fall short when compared to other conventional alternative processes, especially when it comes to serial manufacturing [6]. Particularly, issues regarding the dimensional and geometric quality of parts hamper the widespread industrial adoption of MEX/P [5, 6, 7]. The dimensional quality of MEX/P parts has been extensively studied [8, 9, 10, 11, 12, 13]. Efforts to enhance the quality of manufactured parts have been focused on two fronts: adjusting process parameters [8, 9, 10] and refining the input geometry [11, 12, 13]. In both cases, retrieving accurate and dependable information regarding the actual geometries of manufactured parts is imperative. Moreover, checking the effectiveness of corrective measures also demands the capability of quantifying the deviations between actual (manufactured) geometries and the theoretical expectations. In MEX/P, dimensional and geometric verification is typically conducted similarly to conventional manufacturing processes. This involves using measurement and scanning methods, either contact or non-contact, after a part has been manufactured [14, 15, 16]. However, the layer-by-layer nature of AM manufacturing opens the possibility of verifying the deposited geometry shortly after each layer has been fabricated without having to wait for the part to be completely manufactured [17]. This capability, which relies on the integration of in-machine geometry characterization systems, allows for the acquisition of layer-wise information, enabling the early adjustment of process parameters or even the application of geometry compensation strategies [18]. Layer-wise monitoring has been applied in MEX/P by means of three main sensing technologies: thermal sensing [19], 2D vision [20], and 3D vision [21]. Each technology has its own advantages and disadvantages. For instance, temperature-field sensors lack sufficient spatial resolution to be used in dimensional or geometric verification of a part, while integrating sensors for 3D scanning can be a complex task due to their size and weight. On the other hand, 2D vision systems tend to be more compact and lighter, making their integration into commercial MEX/P machines relatively simpler [20, 22]. However, the distortion introduced by the optics, along with insufficient spatial resolution, makes these methods more commonly used for defect localization and characterization [22] rather than for the precise measurement of dimensional or geometric deviations. Flatbed scanners based on contact image sensors (CISs) have certain characteristics that make them a viable option for integrating 2D vision systems for layer-wise inspection tasks in MEX/P machines. Although these types of devices are commonly used for scanning documents and photographs, they have also been employed for contour detection in nearly flat [23] and three-dimensional objects [24]. Flatbed scanners have been used in AM to characterize irregularities in the deposition of metal powders in PBF/M [25], to characterize distortion of parts in MEX/P [26], and even to compensate for machine errors [27]. Our team has worked on two crucial aspects of the use of CISs in MEX/P applications.