Geometric Calibration of Low-Cost Flatbed Scanners for Large Scale Mapping Applications

Scanning hardcopy non-metric images is one of the most important sources in digital mapping. Low-cost scanners are still widely used in many applications as they can produce digital images of comparable precisions to those produced by expensive professional scanners. Yet, inexpensive scanners introduce geometrical distortions in the measured image coordinates that must be assessed and compensated before using their products for further analysis. In this article, several 2D-to-2D transformation models were investigated to calibrate flatbed scanners with different resolutions and sizes. We evaluated the potential of each model using two gridded-crosses plotted on high-quality transparent sheets. Control coordinates were provided through a photogrammetric analytical plotter. After scanning the sheets, least squares matching was applied to determine the precise locations of the crosses. By comparing the control coordinates and those estimated from digitized images, it was found that the mathematical model based on the projective transformation gives the best results for standardizing the geometric properties of flatbed scanners. The results show that scanning resolution of 2400 dpi achieves the requirements for large-scale mapping applications.


Introduction
Scanners are an essential part of softcopy mapping systems.Despite the rapid dependence on digital cameras, scanners have been used for several years as a source of digital images.Several developing countries are still using analog cam-eras for their mapping activities, [1] [2] [3] [4].Additionally, converting historical films to digital format is still needed to incorporate them into (Geographic Information Systems) GIS databases for change detection, erosion, sediment transportation, and other tasks [5]- [11].
There are several aspects and requirements for scanners to be employed in digital mapping.Their illumination must be adequate to reach the best radiometric quality and Signal-to-Noise-Ratio (SNR).They should have an extended dynamic range to discriminate between neighboring pixels.Their pixel size, geometric resolution, should be fine enough for interpretation of fine details and measurement of small signalized objects.Since the late 1980s, high-end photogrammetric scanners have been employed in scanning analog photos and hardcopy maps, [12].In recent years, low-cost digital mapping systems have been heavily employed in surveying and mapping applications, [13] .These systems rely mainly on desktop scanners, particularly flatbed scanners that are of less quality than photogrammetric scanners.Flatbed scanners typically employ one or more linear CCDs, and move in a direction perpendicular to the CCD.The imaging architectures and properties of flatbed scanners are outlined in [14].
The possibility of losing the full radiometric spectrum or the fine spatial details during scanning process is an inherent drawback of converting photographs into digital formats, [15].Hence, it is vital to study the effects of this process on the geometric accuracy and visual quality of the original image.Several studies have looked into the radiometric characteristics of flatbed scanners, ( [16] [17] [18] ).The radiometric performance of scanners could be affected by noise level, linearity, dynamic range, effect of illumination variation, and presence of artifacts or blemished pixels [19].The geometric characteristics of the photogrammetric scanners were studied in [20].He concluded that there is critical need to find the best approach for the geometric calibration of the flatbed scanners.
The digitizing analog aerial images with low-cost scanners was studied in [21] .
Results were compared with those captured by high-end photogrammetric scanners.It was found that small-format scanners could achieve the accuracy requirements for topographic mapping at a scale of 1:5000.The suitability of nonprofessional scanners for aerial photogrammetric mapping was addressed in [22].He revealed that these scanners could worsen the horizontal and vertical accuracies by about 40% from the Leica BC2 analytical plotter.Yet, he concluded that the achieved precision is suitable for planimetric maps of 1:5000 scale and to produce contours of one-meter interval.A procedure was outlined in [23] to convert flatbed scanners to traceable table to measure 2D coordinates.For calibrating the scanner, a calibration parameter was added to the transformation model and estimated through the measure of a line scale.After calibration, it was shown that measured elements expanded at the order of the resolution of the flatbed scanner.
In [24], it was shown that the position of the scanned object relative to the scanner and the scanning direction cause major variations in the dimensions of A. F. Elaksher, T. Ali DOI: 10.4236/mi.2018.72002 13 Modern Instrumentation the images of scanned objects.Insignificant periodic errors were found in [25] parallel to the linear detector in the scanner.However, they revealed errors in the range of 0.03 mm to 0.05 mm in the direction perpendicular to the detector for a 0.01 mm resolution scanner.A procedure to estimate uncertainties in scanned elliptical shapes was unveiled in [26].The relative uncertainty in dimensional measurements with a flatbed scanner at the 95% confidence level is under 0.1% was presented in [27].An algorithm to correct for the parabola effect in flatbed scanners for dosimetry applications was outlined in [28].
Besides these studies, other researchers addressed the geometric properties of digitized documents through different approaches.A content independent approach to compensate for the geometric distortions in document-images captured by digital cameras, which is very useful for scanned documents was proposed in [29].Firstly, they recover two spatial curves representing the 3D page surface.A 3D developable surface is then used to fit the curves.Finally, through a system of ordinary differential equations, the developable surface is flattened onto a plane.Stereo measurement procedures were applied in [30] to correct for geometric distortion in document images.The geometric and photometric distortions in 3D shapes of book surfaces from the shading information in their scanned image were compensated in [31].A book de-warping system to remove the perspective and geometric distortions automatically from single images by boundary-based 3D surface reconstruction was presented in [32].

Coordinate Transformation
The scanner is a device that converts hardcopy images to digital form stored by the computer.This is done by dividing the image into pixels.The sensor of the scanner scans the image from one side to the other, converting the gray levels of pixels to numerical values.The positions of the pixels are referenced to a coordinate system that has its origin at the upper left corner of the image; the (R) axis aims downward, while the (C) axis aims towards the right direction Figure 1.
The resolution of the scanner is the ratio between the numbers of pixels to the corresponding area of the hardcopy image.A typical scanner has a resolution that ranges from 300 dpi up to 4800 dpi.This indicates that each pixel has an approximate dimension of 84 μm to 5 μm.This is very comparable with most photogrammetric scanners, [33].Yet low-cost scanners are subject to additional geometric errors.Different sources for these errors such as radial and tangential lens distortions, CCD misalignment, and uniformity of geometric resolution were highlighted in [34].Therefore, the positions of the points could be corrupted causing the distances between these points to change.
During the scanning process, photo coordinates, in the hardcopy photos, are transferred into the scanner coordinates, in the digital images.Several mathematical models have been utilized for such coordinate transformation.They vary from simple changes of position (without changing in shape or size), to a uniform change in scale (without changing in shape), to a change in the shape and the size.In the following sections, a brief description for those applied in this research is presented.

Conformal Transformation (Model 1)
The conformal transformation is a linear transformation that relates the photo and scanner systems through a rotation (θ), a uniform scale change (S), and a translation (X o , and Y o ).The mathematical form of the model from system (1) to system (2) is:

Affine Transformation (Model 2)
The affine transformation is a linear transformation similar to the conformal transformation but with two scale factors, a scale factor in the x-direction (S x ) and a scale factor in the y-direction (S y ).This represents non-constant shrinkage or elongation in the two directions.The mathematical form of the model from system (1) to system (2) is:

Projective Transformation (Model 3)
The projective model represents a projection between two planes.The transformation between these two planes is expressed by two fractional linear equations that contain eight parameters.A relationship is established by which coordinates of points in plane (1) will be transformed to corresponding points in plane (2), Figure 2. The projective transformation is:

Second Order Transformation (Model 4)
This model is a polynomial of second order of the X and Y coordinates.The mathematical model is: A least squares adjustment model, Equation ( 1), is then built to relate the coordinates in both systems.The transformation parameters are then found through Equation ( 2).Least squares optimization is guaranteed to converge after few iterations.
( ) ( ) where v is the residual vector, B is the coefficient matrix of the unknowns in the observation equations, Δ is the correction vector for the unknown parameters, i.e. the transformation parameters, f is the coefficient vector of the observation equations.

Reference Datasets
We tested two precise hardcopy grids preparing by AutoCAD, Figure 3.The two  were estimated.The RMSEs in the X and Y directions were about 3 μm.Therefore, the coordinates measured by the analytical plotter serve as the reference corrected coordinates for the hardcopy image.

Scanning Experiments
To evaluate the scanning accuracy as well as to assess the most appropriate model that minimizes geometric distortions, several experiments were conducted with two scanners at different resolutions.The first scanner was a HP Scanjet G3110 scanner with a maximum scanning resolution of 4800 × 9600 dpi.
The second was a Mustek 2400S A3 large format (299 mm × 427 mm) scanner with a maximum scanning resolution of 2400 × 2400 dpi without software interpolation.Different scanning resolutions, numbers of control points, and positions were tested.
A Least Square Matching (LSM) algorithm swept the image to estimate the image coordinates of the grid points.The template was selected to be a cross of 51 × 51 pixels.For each pixel, the template was centered on the pixel and then convolved with the neighboring pixels and the correlation between the template and the image was computed.To achieve sub-pixel accuracy, the template was displaced with increments of 0.25 pixel.The template was shrinkage and en- larged by ratios of 25%, 50%, 150%, and 200%.Additionally, the template was rotated every 150 to account for changes in the orientations of the grid.The outputs after applying the LSM algorithm are score images, i.e. for each pixel a score is assigned based on the correlation between the template and the neighboring pixels.We then searched for peaks in the score images and detected the locations of the intersections of the grid points in the scanned images.These locations and their correspondences measured by the analytical plotter were employed to calculate the transformation parameters for the four mathematical models.Next, the transformation parameters were applied to convert the coordinates of the check points in the scanned images to the analytical plotter coordinate system.

Results and Analysis
The RMSEs for the discrepancies between the transferred coordinates and those measured by the analytical plotter were then computed.The RMSEs are analyzed to find the optimal mathematical model to be adopted to compensate for the geometric distortion of the scanners.Figure 4 summarizes the results for the HP scanner while those for the Mustek scanner are presented in Figure 5. Results in both figures are reported with 10 control points and 15 check points while the grid plate is placed at the upper left corner of the scanners.For both scanners, it is apparent that the precisions in the X direction, parallel to the linear CCD, is better than those in the Y direction, scanning direction.In addition, as the resolution increases, the RMSEs goes down.The projective transformation model for both scanners achieved the least RMSEs in both X and Y directions.Insignificant dpi.With 10 or more control points, results for both scanners were stable and no improvements were seen beyond those for the 10 control points.This was noticed in both the X and Y directions.To test the uncertainties over the entire scanning field, we placed the 100-point grid plate at over different locations over the scanning glass.For each grid point, the RMSEs in the X and Y directions were estimated.The averages of the RMSEs in both X and Y directions are reported in Table 1 with 2400 dpi.The table shows that the RMSEs are similar to those estimated for the confined areas.
To evaluate the reliability of the scanning process for GIS applications, a set of aerial photos were scanned with different resolutions.Distances between twenty well-defined points were measured on one scanned photo and compared with those measured on the ground, Figure 7.The discrepancies between these distances are summarized in Table 2.The table also shows the Ground Sample Distance (GSD), i.e. the size of the pixel on the ground.For the 600 dpi resolution, discrepancies for both scanners fulfill the American Society for Photogrammetry and Remote Sensing, [35], 1:2000 map scale requirement.For the   1200 dpi and the 2400 dpi resolutions, discrepancies for both scanners are within the requirements for the ASPRS 1:1000 and 1:2000.

Conclusion
It is still imperative to scan historical maps and photos to build comprehensive geospatial databases.Scanners introduce geometrical distortions in the digitized coordinates.These distortions must be compensated before utilizing the digital data in further analysis.Several mathematical models are investigated to calibrate the flatbed scanners and to minimize the errors generated during the process.Many factors affect the RMSEs introduced by the scanner such as: the scanning resolution, the number and distribution of control points, and the mathematical model used in the transformation process.It was found that the mathematical model based on the projective transformation gives the best results for transforming the flatbed scanners coordinates to the actual hardcopy coordinates.At least ten control points are needed to perform reliable coordinate transformation with the projective transformation model.The distortion in the scanning direction is higher than that in the direction parallel to the linear CCD.
As the resolution gets finer, less distortion is introduced.The ASPRS mapping standards could be readily achieved with a scanning resolution of 2400 dpi.

Figure 3 .
Figure 3. Grid plates for geometric tests and calibration.

Figure 6 .
Figure 6.Changes in RMSEs (Vertical axis) as a function of the number of control points (horizontal axis).

Figure 7 .
Figure 7. Ground points on a scanned image.

Table 2 .
Distances between distances measured on the scanned photo and those measured on the ground.