Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

sensors

Article
Layer Contour Verification in Additive Manufacturing
by Means of Commercial Flatbed Scanners
David Blanco *, Pedro Fernandez , Alvaro Noriega , Braulio J. Alvarez and Gonzalo Valiño
Department of Construction and Manufacturing Engineering, University of Oviedo, c/Pedro Puig Adam,
E.D.O.5, 33203 Gijon, Asturias, Spain; pedrofa@uniovi.es (P.F.); noriegaalvaro@uniovi.es (A.N.);
braulio@uniovi.es (B.J.A.); gvr@uniovi.es (G.V.)
* Correspondence: dbf@uniovi.es

Received: 22 November 2019; Accepted: 16 December 2019; Published: 18 December 2019 

Abstract: Industrial adoption of additive manufacturing (AM) processes demands improvement


in the geometrical accuracy of manufactured parts. One key achievement would be to ensure that
manufactured layer contours match the correspondent theoretical profiles, which would require
integration of on-machine measurement devices capable of digitizing individual layers. Flatbed
scanners should be considered as serious candidates, since they can achieve high scanning speeds at
low prices. Nevertheless, image deformation phenomena reduce their suitability as two-dimensional
verification devices. In this work, the possibilities of using flatbed scanners for AM contour verification
are investigated. Image distortion errors are characterized and discussed and special attention is paid
to the plication effect caused by contact imaging sensor (CIS) scanners. To compensate this phenomena,
a new local distortion adjustment (LDA) method is proposed and its distortion correction capabilities
are evaluated upon actual layer contours manufactured on a fused filament fabrication (FFF) machine.
This proposed method is also compared to conventional global distortion adjustment (GDA). Results
reveal quasi-systematic deformations of the images which could be minimized by means of distortion
correction. Nevertheless, the irregular nature of such a distortion and the superposition of different
errors penalize the use of GDA, to the point that it should not be used with CIS scanners. Conclusions
indicate that LDA-based correction would enable the use of flatbed scanners in AM for on-machine
verification tasks.

Keywords: additive manufacturing; flatbed scanner; layer contour verification

1. Introduction
Additive manufacturing (AM) encompasses a wide range of processes whose common
characteristic is that three-dimensional parts are built from two-dimensional layers deposited on top
of each another. During the last decades, AM has experienced a continuous development, evolving
from merely part prototyping to full-functional part manufacturing. Nevertheless, although industrial
development of AM is not expected to reach the plateau of productivity until the next decade [1],
current figures indicate that industrial AM systems have experienced a great impulse during last few
years, whereas sales of desktop 3D printing systems (under $500) are clearly declining [2].
Generalized industrial adoption of AM has to face several challenges, like broadening the range
of available materials, increasing production batch size or improving part quality [3]. Although
part quality is a broad concept that encompasses aspects such as physical properties or durability,
dimensional and geometrical accuracy of AM parts have always stood out among researchers’ main
concerns during the last decade [4–8]. These works analyzed the lack of dimensional or geometric
quality in three-dimensional features in final parts, which enabled optimization of process configuration,
or even for the modification of part design, so that an improvement in quality could be achieved in the

Sensors 2020, 20, 1; doi:10.3390/s20010001 www.mdpi.com/journal/sensors


Sensors 2020, 20, 1 2 of 24

following parts. Although this is the usual approach for quality assurance in AM it does not permit
adoption of close-loop in-process improvements, and implies that optimization could not be done
without previously manufacturing test specimens.
Nevertheless, regarding the dimensional quality of manufactured parts, one key achievement
would be to build layer contours that accurately follow theoretical profiles. This possibility would
require on-machine integration of measurement devices to evaluate in-layer quality. The use of
sensors capable of verifying each individual layer and checking the accuracy in contour tracing would
allow for correction of the next layers. They would also make unnecessary previous testing of each
particular geometry. Therefore, real-time, in-line metrology is commonly reported to be among the main
challenges for AM development [9]. Contour verification could be carried out by means of different
technologies, like structured light [7], conoscopic holography [10], coordinate measuring machine
(CMM) optical probes [11] or ad hoc Charge-Couple Device (CCD) based instrumentation [12,13].
Nevertheless, computer vision based on flatbed scanner images should be considered as a serious
candidate, since it can meet high scanning speeds at low prices.
Flatbed scanners are optical devices commonly used to capture digital images of flat elements, such
as sheets of paper or photographs. Nevertheless, image-processing techniques allow flatbed scanners to
be used in complex tasks, like surface topography characterization of nearly flat objects [14] or contour
delineation of three-dimensional objects [15,16]. These devices have several advantages over alternative
imaging methods (microscopy, photography . . . ), like a broader field of view or an outstanding
relationship between resolution and cost, which make them suitable for a wide variety of enforcements.
Examples of the use of flatbed scanners can be found in the field of biomedical imaging [17], materials
science [18], astronomy [19] or agriculture [15]. Also in the field of AM, recent works had explored the
possibilities of characterizing power defects in power bed fusion processes analyzing digital images
captured with a flatbed scanner [20]. In the aforementioned research, attention was paid to the presence
of unevenness on the powder surface revealed by out-of-focus regions in the acquired image. This
work strengthens the hypothesis that this type of on-machine verification could provide the basis to
develop closed-loop manufacturing strategies that minimize the presence of defects on AM parts.
Nevertheless, it is also known that flatbed scanners introduce deformation errors in the digital
images that could reduce their suitability as two-dimensional verification devices. This disadvantage
has been analyzed by several researchers. Some of these works are focused on the assessment of
geometry resolution, defined as the capability of reproducing fine details from the scanned object in
the digital image [21]. Although this aspect would be especially relevant if verification of very small
features is required, in a first stage of analysis the main efforts should be focused on the reliability of
macro-feature digitizing and error correction [22]. Deformation in scanned images has been reported
to be caused by mechanical errors in the device [23]. High-precision measuring scale rulers could be
used for characterization of defects like non-linearity and deflection of the guide in the vertical plane,
non-linearity of the guide in the horizontal plane, eccentricity of the driven guide-roller, bushing skews
and positioning error. Moreover, this research also accounts for the additional effect of hindrance
sources: scratches, nap, dust particles and particles generated during the wearing out of the scanner
parts. Although the overall effect is that of a complex distortion pattern, the authors proposed the
simultaneous scanning of the object to be digitized and two standard scales located along the edges
in both X and Y directions. Deformation of the digital image of these scales would later be used to
compensate the whole image according to a global distortion criterion. Other works [24] revealed
that errors along both axes could be non-linear, with a slight s-shaped distortion along the direction
of the sensor and a periodic sinusoidal-like distortion in the direction of the scanning movement. In
the aforementioned work, the authors proposed the use of a calibration table, composed by a series
of calibrated sub-zones where the error curve has been approximated following a linear behavior.
An uncertainty analysis according to the Guide to the Expression of Uncertainty in Measurement
(GUM) is also provided for the calibrated scanner. Differences regarding measuring direction has
also been reported [25]. In this work, the variation in the measured dimensions of a glass scale with
Sensors 2020, 20, 1 3 of 24

photo-etched graduations, calculated from flatbed scanned digital images, has been reported to be
related to scale orientation within the scanning area. A 0.5% gradual increase in the measured distance
for 1 mm spaced marks between both ends of the 100 glass is registered when the scale is placed parallel
to the scan head. Conversely, a 1% periodic variation of the same parameter is registered every 20 mm
when the glass scale is placed orthogonal to the scan head. The consequences of image deformation
cannot be considered negligible for verification purposes, since other works also reported the existence
of periodic errors that could reach 50 µm along the scanning movement direction [26], whereas less
relevant errors showing no periodic behavior would be found in the direction parallel to the scan head.
Since image deformation issues had been proved to be inherent to flatbed scanning, a research
effort has been paid to deformation modelling and sensor adjustment. De Vicente [27] proposed a
model that allows a flatbed scanner to be used as a bi-dimensional coordinate measurement machine.
They divided their procedure in two stages: in the initial one they performed an adjustment based
on self-calibration [28] of the measuring system where the geometrical errors of the equipment are
eliminated; in the final stage a calibration procedure is performed, so that a calibration parameter Ck is
calculated. This method has been used to measure dimensional features of a flat part with good results.
A variation of this method has also been used to compensate flat 3D printed part contours in order to
improve the quality of parts manufactured thereafter [29]. Although this method contemplates linear
deformations, other authors provided calibration models based on higher order polynomials [30].
A literature review shows that, although commercial flatbed scanners could be a suitable option
for two-dimensional verification, they provide digitized images with significant distortion issues.
Consequently, distortion would reduce the accuracy of measures taken after processing the images.
Reported errors could be minimized by means of scanner adjustment models, which could take the
accuracy of measurements towards industrial-degree standards. This approach has been previously
used to deal with dimensional errors of 3D parts, but it could be easily adapted to verify two-dimensional
geometries. Accordingly, the possibilities of achieving an accurate contour verification of individual
two-dimensional layers should be tested in order to lay the groundwork for the future development of
closed-loop correction strategies.
Accordingly, the present work explores the suitability of flatbed scanners for two-dimensional
verification of AM layer contours. Firstly, scanning distortion and abnormalities concerning commercial
contact imaging sensor (CIS)-type flatbed scanners are evaluated and discussed. Then, two different
scanner adjustment models are considered and tested by means of a distortion target: one based on
compensation of global image deformation and the other based on compensation of local distortions.
Finally, the performance of both methods regarding actual AM contours is evaluated by means of the
geometrical characterization of circular fused-filament fabricated profiles. For this purpose, results of
conventional CMM digitizing of such contours have been used as reference. Scanning operations of
AM profiles reflected in this work had been performed off-line.

2. Distortion Effects in Commercial Flatbed Scanners

2.1. Materials and Equipment


Distortion issues affecting digital images obtained with a Perfection V39 EPSON flatbed scanner
have been analyzed. This model is a low-cost device, with a working area of 216 mm × 297 mm and
optical scanning resolution up to 4800 dots-per-inch (dpi) along both axis: sensor axis (parallel to
the linear array of photo-detectors) and scanning axis (along the sensor’s movement direction and
perpendicular to sensor axis). The theoretical dimensions of the area to be scanned and the desired
resolution affect both the size of the resultant image file and the time required for scanning. This effect
could be better understood through the graphs in Figure 1, where comparisons between 8-bit greyscale
file sizes and scanning times of a 110 mm × 110 mm area at different resolutions are provided.
Sensors 2020,20,
Sensors2020, 20,11 44 of
of 24
24

450 350

Scanning Time [s]


Filesize [MB]

400 412
300 294
350
250
300
200 207
250

200 150
183
150
100
100 103
9.27 11.4 19 19 57
50
50 1010
6.44
2.86 25.7 19
0 0
0 1000 2000 3000 4000 5000 6000 0 1000 2000 3000 4000 5000 6000
Resolution [dpi] Resolution [dpi]

(a) (b)

Figure 1. Influence of resolution on file size and scanning time for a 110 mm × 110 mm area: (a) Bitmap
Figure 1. Influence of resolution on file size and scanning time for a 110 mm × 110 mm area: (a) Bitmap
(BMP) file sizes vs. resolution; (b) scanning time vs. resolution.
(BMP) file sizes vs. resolution; (b) scanning time vs. resolution.
As can be observed in Figure 1b, scanning time abruptly increases for resolutions over 2400 dpi,
As can be observed in Figure 1b, scanning time abruptly increases for resolutions over 2400 dpi,
lasting 5 min approximately for 4800 dpi resolution scan. A similar trend can be observed for
lasting 5 min approximately for 4800 dpi resolution scan. A similar trend can be observed for
correspondent files size. Nevertheless, whereas high scanning time could be assumed within the scope
correspondent files size. Nevertheless, whereas high scanning time could be assumed within the
of this research, files size of several hundred MB turned out to be a major problem for subsequent image
scope of this research, files size of several hundred MB turned out to be a major problem for
processing. Some researchers avoid this problem by reducing image resolution and/or narrowing
subsequent image processing. Some researchers avoid this problem by reducing image resolution
scanning area [27,31]. In the present work, since considering the whole range of available resolutions
and/or narrowing scanning area [27,31]. In the present work, since considering the whole range of
was among the initial research purposes, a restriction of maximum allowable scanning area was
available resolutions was among the initial research purposes, a restriction of maximum allowable
imposed. Consequently, image size was limited to a 300 × 300 square area (approximately 76.2 mm ×
scanning area was imposed. Consequently, image size was limited to a 3′′ × 3′′ square area
76.2 mm), which means that maximum scanning time would not exceed 2.5 min and maximum file
(approximately 76.2 mm × 76.2 mm), which means that maximum scanning time would not exceed
size should stand under 200 MB.
2.5 min and maximum file size should stand under 200 MB.
Image distortion could be evaluated using calibrated grid distortion targets [22,29]. These targets
Image distortion could be evaluated using calibrated grid distortion targets [22,29]. These targets
usually consist of equally spaced dots grid, although some target designs could consist of concentric
usually consist of equally spaced dots grid, although some target designs could consist of concentric
squares or even crossed lines. A diffuse reflectance grid distortion target model 62-952 manufactured
squares or even crossed lines. A diffuse reflectance grid distortion target model 62-952 manufactured
by Edmund Optics has been selected for this work. This model provides 40,401 dots arranged in
by Edmund Optics has been selected for this work. This model provides 40,401 dots arranged in 201
201 rows and 201 columns that cover a 50 mm × 50 mm area. Thus, the distance between contiguous
rows and 201 columns that cover a 50 mm × 50 mm area. Thus, the distance between contiguous dots
dots (either in rows or columns) is within 0.25 mm ± 0.001 mm. Each dot has a diameter of 0.125 mm
(either in rows or columns) is within 0.25 mm ± 0.001 mm. Each dot has a diameter of 0.125 mm with
with a tolerance of ±0.003 mm, and has been built with low reflective chrome deposited upon a 300 ×
a tolerance of ±0.003 mm, and has been built with low reflective chrome deposited upon a 3′′ × 3′′
300 rectangular float glass substrate. This surface diffusely reflects the light back, so no glare should
rectangular float glass substrate. This surface diffusely reflects the light back, so no glare should
appear on the scanned image.
appear on the scanned image.
2.2. Target Scanning and Image Processing
2.2. Target Scanning and Image Processing
Image distortion can be characterized by means of the analysis of differences between dot-to-dot
Image
measured distortion
distances (ascan be characterized
calculated by means
from the scanned of the
target) analysis
and of differences“true”
their correspondent between dot-to-
values (as
certified by the target supplier). Nevertheless, calculation of dot-to-dot distances is not a directvalues
dot measured distances (as calculated from the scanned target) and their correspondent “true” task,
(as requires
but certified four
by the target supplier).
consecutive Nevertheless,
steps: target scanning,calculation of dot-to-dot
image binarization, distances
calculation is not a direct
of centroids and
task, but requires four
calculation of distances. consecutive steps: target scanning, image binarization, calculation of centroids
and Firstly,
calculation of distances.
the distortion target should be placed upside-down on the scanner, so that it lies in contact
Firstly, the distortion
with the reference sides of the target should
scanner bed. be placed
Notice thatupside-down on thethat
this does not imply scanner, so that
dot rows it lies in
and columns
contact with the reference sides of the scanner bed. Notice that this does not imply that
would be perfectly aligned with scanner axes P and Q. In fact, it has to be assumed that the target willdot rows and
columns would be perfectly aligned with scanner axes P and Q. In fact, it has to be assumed
be slightly tilted. This is not relevant for the adjustment procedures, since they calculate distances that the
target will
between be slightly
points (whichtilted. This isinvariants
are actually not relevant for the
as they doadjustment
not dependprocedures, since they calculate
on target orientation), and not
their projections with regard to the scanning axes (which depend on target tilting).target orientation),
distances between points (which are actually invariants as they do not depend on
and not their projections with regard to the scanning axes (which depend on target tilting).
The desired resolution should be adjusted before each scanning operation using the software
provided by the manufacturer. In this work, all scans are 8-bit greyscale bitmaps (.bmp).
Sensors 2020, 20, 1 5 of 24

Sensors 2020, 20, 1 5 of 24


The desired resolution should be adjusted before each scanning operation using the software
provided
Onceby scanning
the manufacturer.
has beenIncompleted,
this work, all
thescans
imagesare 8-bit
mustgreyscale bitmaps
be processed. In (.bmp).
order to do this an
Once scanning
application has beenhas been completed,
developed on C# thatthe images
employs themust be processed.library
image-processing In order
EmgutoCV do[32].
thisFirst,
an
application has been developed on C# that employs the image-processing library Emgu
the 256 levels of grey, ranging from 0 (pure black) to 255 (pure white), of the 8-bit image should be CV [32]. First,
the 256 levels of
transformed grey,
into ranging black/white
a two-level from 0 (pureimage.
black) This
to 255 (pure is
process white),
known of as
thebinary
8-bit image should be
thresholding, and
transformed into a two-level
involves categorizing black/white
greyscale pixels intoimage. This process
two classes: is known
black (values as binary
below a giventhresholding, andor
threshold level)
involves categorizing
white (values greyscale pixels
over mentioned intolevel).
threshold two classes:
It shouldblack
be (values
noted thatbelow
the avalue
givenofthreshold level)level
the threshold or
white (valueswhich
determines over mentioned threshold
pixels would level). It should
be transformed be noted
into pure black that the value
or pure white.ofFigure
the threshold levelan
2 provides
determines
example ofwhich
how an pixels
8-bitwould be transformed
individual dot image from into 4800
puredpiblack orispure
scan white. Figure
transformed 2 provides
into different an
binary
example of how an 8-bit individual dot image
images depending on the selected threshold level. from 4800 dpi scan is transformed into different binary
images depending on the selected threshold level.

(a) (b) (c)


(d)

Figure 2. Binary threshold: (a) original 256 greyscale levels scan of a dot; (b) 2-level image (threshold
Figure 2. Binary threshold: (a) original 256 greyscale levels scan of a dot; (b) 2-level image (threshold
level = 80); (c) 2-level image (threshold level = 165); (d) 2-level image (threshold level = 213).
level = 80); (c) 2-level image (threshold level = 165); (d) 2-level image (threshold level = 213).

Although there are different methods available for calculating the threshold level, Otsu´s
Although there are different methods available for calculating the threshold level, Otsu´s
method [33] has been adopted in the present research. Otsu calculates the optimal grey level
method [33] has been adopted in the present research. Otsu calculates the optimal grey level
threshold by minimizing the intra-class original greyscale values variance. This method is widely
threshold by minimizing the intra-class original greyscale values variance. This method is widely
considered as the most appropriate option when image histograms show bimodal distributions. Hence,
considered as the most appropriate option when image histograms show bimodal distributions.
threshold level does not adopt a single fixed value, but should be calculated according to every
Hence, threshold level does not adopt a single fixed value, but should be calculated according to
variation of scanning conditions (e.g., resolution).
every variation of scanning conditions (e.g., resolution).
Once binarization is completed and the image transformed into a collection of black spots on
Once binarization is completed and the image transformed into a collection of black spots on a
a white background, the next step implies identifying accurately isolated dots. This is necessary
white background, the next step implies identifying accurately isolated dots. This is necessary
because the binarization of noisy images could lead the algorithm to split a particular dot into several
because the binarization of noisy images could lead the algorithm to split a particular dot into several
nearby spots. The connected-component labelling algorithm included on Emgu CV [32] has been
nearby spots. The connected-component labelling algorithm included on Emgu CV [32] has been
used here to evaluate if several spots should be considered part of the same dot and, consequently,
used here to evaluate if several spots should be considered part of the same dot and, consequently, if
if they should be labelled as one unique entity. The algorithm directly provides several descriptive
they should be labelled as one unique entity. The algorithm directly provides several descriptive
statistics related to each dot. This information includes the location of its centroid with respect to
statistics related to each dot. This information includes the location of its centroid with respect to the
the coordinate system expressed in pixels. Figure 3 contains an image of the original 8-bit scanned
coordinate system expressed in pixels. Figure 3 contains an image of the original 8-bit scanned image
image of eight dots (arranged in a two row/four column array) with the superimposed results of
of eight dots (arranged in a two row/four column array) with the superimposed results of binarization
binarization and connected-component labelling: red frames surrounding the dots and yellow points
and connected-component labelling: red frames surrounding the dots and yellow points at the
at the correspondent centroids.
correspondent centroids.
Accordingly, the connected-component labelling generates a collection of isolated dots that are
characterized by the location of their respective centroids. This collection is organized according to a
regular grid, so that each single dot is also labelled according to its correspondent row and column.
This procedure must be performed before distances between dots can be calculated. An incremental
model, which assigns the value of row and column for a given dot with respect to the previous one has
been used.
Sensors 2020,20,
Sensors2020, 20,1 1 66 of
of2424

Figure3.3.Results
Figure Resultsfrom
fromconnected-components
connected-componentslabelling:
labelling:original
originalgreyscale
greyscaleimage,
image,calculated
calculatedcentroid
centroid
(yellow points) and boundary frames (red lines).
(yellow points) and boundary frames (red lines).

Once the assignment of the collection of dots to a regular grid has been completed, absolute
Accordingly, the connected-component labelling generates a collection of isolated dots that are
distances between each single centroid and the first one in the corresponding row or column, are
characterized by the location of their respective centroids. This collection is organized according to a
calculated independently along rows and columns. This procedure provides two independent arrays.
regular grid, so that each single dot is also labelled according to its correspondent row and column.
The first array contains the absolute distance dCij measured between a given dot Dij in a given column
This procedure must be performed before distances between dots can be calculated. An incremental
(j) with respect to the reference one in the same column D0 j , by means of the scanner coordinates
model, which assigns the value of row and column for a given dot with respect to the previous one
in axes P and Q. Therefore, the pixel coordinates of Dij are (pij , qij ) and the coordinates of D0 j are
has been used.
(p0 j , qoj ) (Equation (1)). It should be noted that a scale factor based on the selected resolution (RS ) has
Once the assignment of the collection of dots to a regular grid has been completed, absolute
been applied to obtain distances in mm from pixel coordinates. The second one contains the absolute
distances between each single centroid and the first one in the corresponding row or column, are
distance dRij measured between a particular dot Dij pij , qij in a given row (i) with respect to the
calculated independently along rows and columns. This procedure provides two independent arrays.
reference one Di0 (p0 j , qoj ) (Equation (2)). Rows and columns have been labelled from 0 to 200.
The first array contains the absolute distance 𝑑𝐶 measured between a given dot 𝐷 in a given
column (𝑗) with respect to the reference r
25.4
one
 in the same
2  column 𝐷2
, by means of the scanner
coordinates in axes 𝑃 and 𝑄. dCTherefore,
ij = ·the pixel p0 j + qijof−𝐷q0 jare (𝑝 , 𝑞 ) and the coordinates
pij −coordinates (1)
R
of 𝐷 are (𝑝 , 𝑞 ) (Equation (1)). ItS should be noted that a scale factor based on the selected
resolution (𝑅 ) has been applied to obtain distances in2mmfrom pixel
2 coordinates. The second one
r
25.4 
contains the absolute distance dRij𝑑𝑅
= measured· pijbetween qij − qi0dot 𝐷 𝑝 , 𝑞 in a given row
− pi0 a+particular (2)
RS
(𝑖) with respect to the reference one 𝐷 (𝑝 , 𝑞 ) (Equation (2)). Rows and columns have been labelled
In order to clarify distortion effects, measured distances have been substituted by deviations. This
from 0 to 200.
way, the deviation value ∆Cij for the absolute distance between a particular dot (Dij ) in a given column
(j) with respect to the reference one 25.4 in the same column (D0 j ) would be calculated as the difference
𝑑𝐶 = · 𝑝 − 𝑝 + 𝑞 − 𝑞 (1)
between the distance measured on the 𝑅 image (dCij ) and its correspondent theoretical distance (DCij )
(Equation (3)). The same procedure has been used in (Equation (4)) for deviations along rows ∆Rij .
25.4
𝑑𝑅 = · 𝑝 − 𝑝 + 𝑞 − 𝑞 (2)
𝑅 ∆Cij = dCij − DCij (3)
In order to clarify distortion effects, measured distances have been substituted by deviations.
∆R = dR − DRij (4)
This way, the deviation value 𝛥𝐶 for theijabsoluteij distance between a particular dot (𝐷 ) in a given
column
2.3. (𝑗) with respect
Characterization to Distortion
of Image the reference one in the same column (𝐷 ) would be calculated as the
difference between the distance measured on the image (𝑑𝐶 ) and its correspondent theoretical
Image(𝐷𝐶
distance distortion analysis
) (Equation hasThe
(3)). been splitprocedure
same into two: distortion
has beeneffects
used affecting the image
in (Equation along
(4)) for sensor
deviations
axis direction
along rows 𝛥𝑅 .(evaluated by means of the distance between points in the same row) and distortion
effects affecting the image along the scanning axis direction (evaluated by means of the distance
between points in the same column). 𝛥𝐶 = 𝑑𝐶 − 𝐷𝐶 (3)

𝛥𝑅 = 𝑑𝑅 − 𝐷𝑅 (4)
2.3. Characterization of Image Distortion
Image distortion analysis has been split into two: distortion effects affecting the image along
sensor axis direction (evaluated by means of the distance between points in the same row) and
Sensors 2020, 20, 1 7 of 24
distortion effects affecting the image along the scanning axis direction (evaluated by means of the
distance between points in the same column).
Firstthe
First thedeviations
deviationsobserved
observedalong
alongdots
dotsininthe
thesame
samerow
roware
areanalyzed.
analyzed.The
Thegraph
graphininFigure
Figure44
illustratesthe
illustrates thedeviations
deviations
forfor points
points in rows
in rows 000,000, 100 and
100 and 200 across
200 across the whole
the whole set of columns
set of columns that
that cover
cover 50 mm along the
50 mm along the sensor axis. sensor axis.

Figure 4. Deviations with respect to the theoretical 0 position calculated for points along rows 000 (blue
Figure 4. Deviations with respect to the theoretical 0 position calculated for points along rows 000
line), 100 (orange line), and 200 (grey line).
(blue line), 100 (orange line), and 200 (grey line).
Two abrupt changes in the overall tendency stand out from the less-pronounced fluctuation effects
that canTwoalsoabrupt changes
be observed in in
thisthe overall
graph. tendency
Sudden dropsstand out from
of nearly −50 µm thehave
less-pronounced
been recordedfluctuation
between
effects
the 57th that can deviation
column also be observed
and the 58thin this andgraph. Sudden drops
59th columns’ of nearly
deviation. −50 µm have
An equivalent been recorded
phenomenon has
between the 57th column deviation and the 58th and 59th columns’
been recorded between the 167th column deviation and the 168th one. The accumulative effect drifts deviation. An equivalent
phenomenon
the has been
absolute deviation recorded
of the last point between
in eachtherow167th
to a −84column deviation and
µm approximate theThis
value. 168th one.that
implies The
accumulative
the digitized imageeffectisdrifts the absolute
contracted deviation
with respect to of
thethe last point
physical in each
target, butrowalsotothat
a −84
thisµm approximate
contraction is
value. This implies that the digitized image is contracted with respect to
not regular along the whole length, but the result of a combination of small fluctuations and abrupt the physical target, but also
that thisSince
changes. contraction is not
this effect hasregular along the
not previously whole
been length,
reported but the result
in available of a combination
literature, and this wasof small
not an
fluctuations and abrupt changes. Since this effect has not previously
expected phenomenon, a more detailed examination of the image was carried out in order to elaborate been reported in available
aliterature, and this was not an expected phenomenon, a more detailed examination of the image was
feasible explanation.
carried out5incontains
Figure order toan elaborate
augmented a feasible
view explanation.
of points from the first and second rows in the window
Figure 5 contains an augmented
between the 165th column and the 171th column view of points from 5a)
(Figure the and
first that
and between
second rows in theand
the 55th window
61th
between the 165th column and the 171th column (Figure 5a) and that
columns (Figure 5b). Dots of that figure are presented plainly in the original 8-bit greyscale, as theybetween the 55th and 61th
columns
were (Figure
actually 5b). Dots
digitized, and of thatsuperimposed
show figure are presented plainly in therectangles,
their correspondent original 8-bit greyscale,
as they as they
are provided
were actually digitized, and show superimposed their correspondent
by the connected-components labelling algorithm. The actual measured positions are represented byrectangles, as they are provided
by the connected-components
continuous red lines, whereas the labelling
expected algorithm.
positionsThe areactual measured
represented positions
by dashed arelines.
blue represented by
continuous red lines,
An abnormal whereas
point shapethe is expected positions are
clearly identifiable represented
regarding by dashed
points in columnblue58th
lines.(Figure 5b),
which results in a discontinuity in the overall trend of deviation values. The effect is similar to
that observed after surgical plication, where folding results in shortening a tissue while keeping an
apparent continuity. Following this similitude, this effect shall be referred to as image plication from
now on. The most probable cause for scan plication seems to be the particular architecture of the
CIS-type scanner used in this research. There are two possible arrangements for CIS sensors: in-line
structure and staggered structure [34]. The former disposes independent sensors lined-up following
a straight line, which implies that, due to the fact that the chip is larger than the outer border of the
photo-detectors, an unavoidable physical gap should appear between the last pixel of one sensor
and the first of the next one. This circumstance is ignored during the processing of the image file,
so that pixels are arranged consecutively, even when they were captured by adjacent sensors with an
intermediate gap. This source of error can be presumably avoided using staggered sensor structures
that allow an overlapping of the image (overlapped area being captured by two staggered sensors at a
time) that is processed in order to avoid gaps.
Sensors 2020,
Sensors 20,20,
2020, 1 1 8 of824
of 24

(a)

(b)

Figure 5. 5.Examples
Figure Examplesof ofimage
image plication
plication in
in the contact imaging
the contact imagingsensor
sensor(CIS)-type
(CIS)-typescanner
scannerusedusedin in
present work. Blue dashed lines represent the expected position of each centroid, according
present work. Blue dashed lines represent the expected position of each centroid, according to target to target
characteristics,
characteristics,whereas
whereas red continuouslines
red continuous lines represent
represent the the actual
actual position
position of centroids:
of centroids: (a) space(a) space
inter-
inter-dots affected
dots affected by plication;
by plication; (b) affected
(b) dot dot affected by plication.
by plication.

TwoAnsituations
abnormalcould pointbe distinguished
shape regarding plications
is clearly identifiable regardingcausedpointsbyingaps
columnbetween sensors:5b),
58th (Figure if the
plication lays in in
which results thea intermediate
discontinuityspace in thebetween dots (like
overall trend the casevalues.
of deviation of the one
Thelocated
effect isbetween
similar to columns
that
167th and 168th),
observed after its effect will
surgical be an evident
plication, drop inresults
where folding the expected value fora the
in shortening distance
tissue whiletokeeping
the origin an of
theapparent
dot in the 168th column
continuity. Followingwiththisrespect to thethis
similitude, equivalent
effect shall value calculated
be referred to asfor the plication
image dot in thefrom 167th
now on.
column The most
(Figure 5a). probable
The samecause for scan plication
will happen to dots inseems to becolumn
the 169th the particular architecture
and above. On theofother
the CIS-hand,
type scanner used in this research. There are two possible arrangements for
if the plication lies directly upon a dot (like the case of the one on the 58th column) the drop will affect CIS sensors: in-line
structure and
completely to the staggered
distancestructure
calculation [34].of
Thetheformer
dot indisposes
the 59thindependent
column, butsensors lined-up
also will affect following
partially to
a straight
distance line, which
calculation implies
of the dot in that,
thedue58thtocolumn
the fact (Figure
that the 5b).
chip is larger than the outer border of the
photo-detectors,
Nevertheless, an unavoidable
these gaps can be physical
found gap
at theshould
sameappear
location between the last
in different rows pixel
and,of having
one sensor and
a physical
the first of the next one. This circumstance is ignored during the processing
source that is not subjected to variations, their effect could be measured easily and compensated for of the image file, so that
pixels are arranged consecutively, even when they were captured by adjacent sensors with an
during the adjustment procedure. To illustrate this, Figure 6 provides a different version of absolute
intermediate gap. This source of error can be presumably avoided using staggered sensor structures
deviations in rows 001, 100 and 200, where abnormal changes related to gaps between sensors have
that allow an overlapping of the image (overlapped area being captured by two staggered sensors at
been removed, by substituting dots deviation corresponding to columns 58th, 59th and 168th by their
a time) that is processed in order to avoid gaps.
respective expected distances, taking into account the overall tendency.
Two situations could be distinguished regarding plications caused by gaps between sensors: if
Once the effect of gaps has been removed, the image appears to be enlarged with respect to the
the plication lays in the intermediate space between dots (like the case of the one located between
target along167th
columns the sensor axis in
and 168th), itsan approximate
effect will be an linear
evident ratio
dropofin0.4the
µm per millimeter,
expected value forwhich meansto
the distance that
a 50themm object
origin would
of the dot inappear
the 168thin the imagewith
column as approximately 18 µm wider.
respect to the equivalent valueNevertheless,
calculated for the the graph
dot
also shows that this effect is not completely linear: e.g., a linear regression
in the 167th column (Figure 5a). The same will happen to dots in the 169th column and above. On of the deviations fortherow
200other
provides a R 2 value of 0.793. Additionally, when deviations along the sensor axis direction are
hand, if the plication lies directly upon a dot (like the case of the one on the 58th column) the
compared
drop willbetween different to
affect completely rows, a mere 1calculation
the distance µm average of thedifference
dot in theis 59th
obtained.
column, This
but means
also will that
deformation effects
affect partially along sensor
to distance axis areofnearly
calculation the dotconstant for column
in the 58th different(Figure
positions5b).along the scanning axis.
Nevertheless, these gaps can be found at the same location in different rows and, having a
physical source that is not subjected to variations, their effect could be measured easily and
along the sensor axis in an approximate linear ratio of 0.4 µm per millimeter, which means that a 50 mm
object would appear in the image as approximately 18 µm wider. Nevertheless, the graph also shows that
this effect is not completely linear: e.g., a linear regression of the deviations for row 200 provides a R2 value
of 0.793. Additionally, when deviations along the sensor axis direction are compared between different
rows,2020,
Sensors a mere
20, 11 µm average difference is obtained. This means that deformation effects along sensor 9 ofaxis
24
are nearly constant for different positions along the scanning axis.

Figure 6. Deviations with respect to the theoretical 0 position calculated for points along rows 000 (blue
Figure
line), 1006.(orange
Deviations
line),with
and respect toline)
200 (grey the theoretical 0 position
after removing calculated for points along rows 000
gap effect.
(blue line), 100 (orange line), and 200 (grey line) after removing gap effect.
On the other hand, deviations within columns have been also analyzed. The graph in Figure 7
On such
includes the other hand,for
deviations deviations
columns within
001, 100columns
and 200 have
acrossbeen also analyzed.
the whole set of rows The
that graph
coverin50Figure
mm in7
includes
the scanning such deviations
direction for columns
(orthogonal 001,
to the 100 andof200
direction theacross
sensor). theThe
wholefirstset of rows that
conclusion cover
is that the 50 mm
image
in the scanning direction (orthogonal to the direction of the sensor). The first
of the target is enlarged along the scanning axis with respect to the target itself, and this elongation conclusion is that the
image of the target is enlarged along the scanning axis with respect to
is progressive and could be considered quasi-linear, even when a combination of slight fluctuations the target itself, and this
elongation
at is progressive
different frequencies canandalsocould be considered
be observed. quasi-linear,
The overall effect iseven
that when a combination
the absolute deviation ofofslight
the
fluctuations at different frequencies can also be observed. The overall
last point in the first column reaches a +179 µm approximate value, almost doubling the negative effect is that the absolute
deviation along
distortion of the last
the point
sensorinaxis.
the first column
Another reaches aissue
important +179 raises
µm approximate value, almost
from the appreciable doubling
differences
the negative distortion along the sensor axis. Another important issue
regarding deviation drift between columns. Image enlargement is greater along the first column raises from the appreciable
differences
than regarding
it is along the last deviation
one, whiledrift between columns.
the intermediate column Image
showsenlargement
an intermediateis greater
valuealong
for thethedrift.
first
column than itthe
Consequently, is along thebetween
distance last one, the
while
firstthe intermediate
and the last points column
in theshows an intermediate
first column is 179 µmvalue greaterfor
the drift. Consequently, the distance between the first and the last points
than the theoretical value, whereas this value drops to 153 µm in the case of the 100th column and in the first column is 179
µm
to 115greater
µm forthan the theoretical
the 200th column. Thisvalue, whereasisthis
tendency value
almost drops
linear andto resembles
153 µm inthe theshape
case ofof the 100th
an open
column and
Sensors 2020,
foldable fan.20,to
1 115 µm for the 200th column. This tendency is almost linear and resembles the10 shape
of 24
of an open foldable fan.

Figure 7. Absolute deviations with respect to the theoretical position of points along columns 000 (blue
Figure
line), 1007.(orange
Absolute deviations
line), with line).
and 200 (grey respect to the theoretical position of points along columns 000
(blue line), 100 (orange line), and 200 (grey line).
To evaluate if the described distortion effects are repeatable or not, a specific test has been carried
To evaluate
out. Firstly, if the described
ten consecutive distortion
scans effects
of the dot are repeatable
target have been or not, a specific
executed. Thosetest has been
scans havecarried
been
out. Firstly,without
performed ten consecutive
removing scans of thefrom
the target dot the
target have glass
scanner been or
executed.
modifying Those
its scans haveThen,
position. been
performed
distances without
between removing
each thethe
point and target from one
reference the have
scanner
beenglass or modifying
calculated its position.
individually for rowsThen,
and
distancesAfter
columns. between
that,each point
average and the
values andreference
standardone have been
deviations calculated
for each singleindividually
distance were forcalculated.
rows and
columns.
Results After
show that,
that theaverage values
arithmetic meanandofstandard deviations
the standard for each
deviations single distance
calculated were calculated.
for distances along the
Results show that the arithmetic mean of the standard deviations calculated for distances along the
sensor axis was 1.7 µm, whereas the correspondent standard deviation is 0.9 µm. On the other hand,
the arithmetic mean of the standard deviation value in the case of distances along the scanning axis
was 1.2 µm, whereas the correspondent standard deviation is 0.7 µm.
This means that the deformation described in previous paragraphs is consistent and the related
Sensors 2020, 20, 1 10 of 24

sensor axis was 1.7 µm, whereas the correspondent standard deviation is 0.9 µm. On the other hand,
the arithmetic mean of the standard deviation value in the case of distances along the scanning axis
was 1.2 µm, whereas the correspondent standard deviation is 0.7 µm.
This means that the deformation described in previous paragraphs is consistent and the related
effects could be considered systematic. A similar result was obtained when the test was repeated
removing the target after each scan. This result implies that distortion description could be decoupled
between effects along the sensor axis and the scanning axis.
Finally, the influence of scanning resolution upon image distortion has also been analyzed by
means of consecutive scans of the test target under 600 dpi, 1200 dpi, 2400 dpi and 4800 dpi resolutions.
Results indicate that scanning resolution has different effects upon image distortion between sensor
axis and scanning axis. In sensor axis, slight differences can be appreciated, since the overall trend
is similar with independence of the resolution, and local differences are related to how the shape of
each point is processed during the binarization and connected components steps. In fact, two sources
of discrepancy take place simultaneously: differences in dot shape will cause differences on centroid
location and coarser resolution will increase the uncertainty of location assessment. Figure 8a shows
how resolutions of 4800 dpi, 2400 dpi and 1200 dpi provide quite similar values for deviations along
row 200, whereas slight differences can be observed regarding 600 dpi resolution, probably related to
how graphical information extracted from dot target is processed. The average difference between
deviations for a given column (e.g., number 200) does not exceed 5 µm in the worst case (differences
between 600 dpi and 1200 dpi) and are reduced to just 1 µm in the best case (differences between
4800 dpi and 2400 dpi). These differences are consistent along the rows, with standard deviations
Sensors 2020, 20, 1 11 of 24
ranging below 3 µm.

(a)

(b)

Effect 8.ofEffect
Figure 8. Figure resolution on deviation
of resolution on deviationvalues: (a)deviations
values: (a) deviations
withwith respect
respect to the theoretical
to the theoretical position position
of dots
of dots along rowalong row
200; (b)200; (b) deviations
deviations withrespect
with respect to
tothe
thetheoretical position
theoretical of dotsof
position along column
dots along 200.
column 200.

As a result, it can be concluded that deformation adjustment must be performed individually


for each scanning resolution, so that a particular adjustment should be used to compensate image
deformation obtained under different resolutions.

3. Sensor Adjustment
A process of adjustment and calibration must be performed before the scanner would be used
as a contour digitizing device for dimensional and/or geometrical verification of AM parts. In this
work, two alternative procedures have been considered.
Sensors 2020, 20, 1 11 of 24

On the other side, results are not so consistent along the scanning direction, since average
differences of 9 µm with a standard deviation of 6 µm are found between the 4800 dpi and the 600 dpi
resolutions (Figure 8b). Even more, a trend has been observed indicating that discrepancies between
resolutions increased with distance to the origin along the columns. In fact, the difference of position
for the farthest point (row 200, column 200) reaches 16 µm when 4800 dpi and the 600 dpi resolutions
are compared. This effect seems to be derived from a certain discrepancy related to the scanning speed,
so that slower scanning speeds (higher resolutions) tend to reflect a higher enlargement of the image in
the scanning direction than that observed for faster scanning speeds (lower resolutions).
As a result, it can be concluded that deformation adjustment must be performed individually
for each scanning resolution, so that a particular adjustment should be used to compensate image
deformation obtained under different resolutions.

3. Sensor Adjustment
A process of adjustment and calibration must be performed before the scanner would be used as
a contour digitizing device for dimensional and/or geometrical verification of AM parts. In this work,
two alternative procedures have been considered.
The first method is based on the one proposed by De Vicente [27], as it was thereafter implemented
by Majarena [29]. This method assumes that the coordinate system of the flatbed scanner (PQ, see
Figure 9) is not a Cartesian one (XY), but in fact formed by a tilted, non-orthogonal axis with dissimilar
scales
Sensors (due to 1slight differences in pixels size).
2020, 20, 12 of 24

Q
Y Y

P
X X

Figure 9.
Figure 9. Reference
Reference system
system distortion
distortion according
accordingto
toDe
DeVicente
Vicenteand
andMajarena.
Majarena.

Therefore,
Therefore, DeDe Vicente
Vicente proposed
proposed that the geometrical
geometrical error
error could
couldbe
besuppressed
suppressedby bymeasuring
measuringa
alinear-array
linear-arraydot
dotartefact
artefactlocated
locatedatat multiple
multiple positions
positions and
and using
using the invariance principle
principle of of the
the
measurand
measurand (distances
(distances between
between dots
dots are
are dimensionally
dimensionally stable
stable with
with independence
independence of
of the
the location
location or
or
orientation
orientation of
of the
the artefact)
artefact) to
to define
define aa function
function that
that transforms
transforms non-Cartesian
non-Cartesian coordinates
coordinates (p,q)
(𝑝,𝑞)into
into
Cartesian
Cartesianones
ones(x,y).
(𝑥,𝑦).This
Thisfunction
functioncan
canbe bedefined
definedas
asin inEquation
Equation(5).
(5).
11 #" #
Θ
" # " # "
x
𝑥=
p
𝑝 + 1 22 𝐴 A 𝛩
𝑝·
p
(5)
y 𝑦 = q𝑞 + 1 2 Θ −A∙ 𝑞 q (5)
𝛩 −𝐴
where A is a coefficient that represents the relative differences2 between pixel dimensions, according to
where
the 𝐴Q
P and is axes, and Θ represents
a coefficient that represents theofrelative
the lack differencesbetween
perpendicularity betweenthese
pixeltwo
dimensions, according
axes. Solving by an
to the 𝑃 least
ordinary 𝑄 axes,problem
and squares and 𝛩 represents
this equation theforlack
all of
theperpendicularity
measurements done between
on thethese twoestimators
artefact, axes. Solving
for
by an ordinary least squares problem this equation for all the measurements done
both parameters “A” and “Θ” are calculated. Then, using a calibrated line-scale standard, a calibration on the artefact,
estimatorsCfor
parameter k is both parameters
also calculated “𝐴” and
(Equation “𝛩providing
(6)), ” are calculated.
the desiredThen, using a calibrated
metrological line-scale
traceability.
standard, a calibration parameter 𝐶 is also calculated (Equation (6)), providing the desired
1
Θ
" # " # " #" #
metrological traceability. x p C k + A 2 p
= + · (6)
y q 1
2 Θ C
1 − A
k q
𝑥 𝑝 𝐶 + 𝐴 𝛩 𝑝
In the formulation followed𝑦by=Majarena, + both the 2
adjustment ∙ 𝑞 and calibration steps have been (6)
𝑞 1
unified using a single grid-target calibrated standard, 𝛩 which𝐶 allows
− 𝐴 for using known distances between
2
In the formulation followed by Majarena, both the adjustment and calibration steps have been
unified using a single grid-target calibrated standard, which allows for using known distances
between points in different directions (including diagonals) from a single scanning operation. In such
a way, the parameter A includes both the effect of dissimilarities between pixel dimensions
Sensors 2020, 20, 1 12 of 24

points in different directions (including diagonals) from a single scanning operation. In such a way, the
parameter A includes both the effect of dissimilarities between pixel dimensions (geometrical error)
and that of the scale (dimensional error). Since this method aims at adjusting the overall geometrical
error of the scanned image, it will be referred to as the global distortion adjustment (GDA).
The second method explores an alternative approach: instead of using a global parametric model
in which optimal values for each parameter are obtained by adjusting experimental data, those data are
used to build a local interpolative model. This model would no longer be based on the relationships
between both systems taken as a whole, but to the individual correspondence between the coordinates
of the same point expressed with respect to both systems. Therefore, the objective is to define a
collection of discrete functions capable of accurately computing the distortion of the image without
Sensors 2020, 20, 1 13 of 24
neglecting local effects.
Instead of using a single model for the overall distortion, the problem has been split into two
approach here should be to consider a model that allows for interpolation of scattered data at the
independent ones: distortion along X and distortion along Y. Therefore, two independent maps of
local level.
distortion were built. The first one reflects the real position of points with respect to the X direction, as
In the present work, a linear interpolation triangle-based model has been used. Firstly, a
a function of the coordinates p and q (expressed with respect to the flatbed scanner reference system).
Delaunay triangulation is performed. This process generates a collection of non-intersected triangles
In a similar way, the second one reflects the real position of those points with respect to the Y direction.
that cover the whole interpolation area. In order to obtain the position of a point A (𝑝 ,𝑞 ) from a
It has to be considered here that the positions of each dot centroid, referred to the flatbed system,
scanned image expressed along the 𝑋 coordinate of a 𝑋𝑌 Cartesian system, the algorithm firstly
would not be arranged in a regular grid because of the distortion of the image, even when the physical
identifies the triangle where the point is located, defined by three vertex (𝑈, 𝑉, 𝑊), in the map of
target could be considered as nearly-regular grid. Consequently, the most logical approach here should
distortion for the 𝑋 direction (Figure 10a). Then using the corresponding 𝑥 coordinates for these
be to consider a model that allows for interpolation of scattered data at the local level.
three points obtained from the interpolation model (𝑥 ,𝑥 ,𝑥 ), the system formed by Equations (7)–
In the present work, a linear interpolation triangle-based model has been used. Firstly, a Delaunay
(9) is obtained:
triangulation is performed. This process generates a collection of non-intersected triangles that cover
the whole interpolation area. In order 𝑥 to=obtain
𝑎 + the
𝑎 position
· 𝑝 + 𝑎of a· point
𝑞 A (pA ,qA ) from a scanned image(7)
expressed along the X coordinate of a XY Cartesian system, the algorithm firstly identifies the triangle
where the point is located, defined by𝑥 three
= 𝑎vertex
+ 𝑎(U,· V,
𝑝 W),
+ 𝑎in the
· 𝑞 map of distortion for the X direction
(8)
(Figure 10a). Then using the corresponding x coordinates for these three points obtained from the
interpolation model (xU ,xV ,xW ), the𝑥 system
= 𝑎 formed
+ 𝑎 · by 𝑝 Equations
+ 𝑎 · 𝑞 (7)–(9) is obtained: (9)
Thus, coefficients 𝑎 , 𝑎 and 𝑎 are calculated and Equation (10) is obtained.
xU = a0 + a1 · pU + a2 · qU (7)
𝑥 = 𝑎 + 𝑎 · 𝑝 + 𝑎 · 𝑞 (10)
xV =values
This plane represents the expected a0 + for
a1 ·the
pV 𝑋+ coordinate
a2 · qV of every point located inside (8)
the
triangular region defined by pointsxW𝑈,=𝑉a0and+ a𝑊, considering that deformation can be assumed(9)
1 · p W + a 2 · qW
as
approximately linear within its limits (Figure 10a).

x y yU
yV YA
xV xU
xA
yW
xW Q Q

qW qW
qA W qA W
qV qV
qU qU
V A V A
pV p pV p
W p U W p U
A A
pU P pU P

(a) (b)

Figure10.
Figure 10.Decoupled
Decoupledinterpolation
interpolationmodel:
model:(a)
(a)xxcoordinates;
coordinates;(b)
(b)yycoordinates.
coordinates.

A similar system would thereafter be constructed for the 𝑌 coordinate (Figure 10b).
Accordingly, the position of every point 𝐴 with respect to the Cartesian system (𝑥 ,𝑦 ) calculated
with Equations (11) and (12).
𝑥 = 𝑎 + 𝑎 · 𝑝 + 𝑎 · 𝑞 (11)

𝑦 = 𝑏 + 𝑏 · 𝑝 + 𝑏 · 𝑞 (12)
Sensors 2020, 20, 1 13 of 24

Thus, coefficients a0 , a1 and a2 are calculated and Equation (10) is obtained.

x = a0 + a1 · p + a2 · q (10)

This plane represents the expected values for the X coordinate of every point located inside the
triangular region defined by points U, V and W, considering that deformation can be assumed as
approximately linear within its limits (Figure 10a).
A similar system would thereafter be constructed for the Y coordinate (Figure 10b). Accordingly,
the position of every point A with respect to the Cartesian system (xA ,yA ) calculated with
Equations (11) and (12).
xA = a0 + a1 · pA + a2 · qA (11)

yA = b0 + b1 · pA + b2 · qA (12)

Similar functions would be constructed in order to cover the whole area defined by the dot target.
The result is a series of functions that show continuity along the edges of the triangular areas, but
do not contemplate second or higher order adjustments. Since this method aims at adjusting local
geometric errors upon the scan, it will be referred to as the local distortion adjustment (LDA).
Both GDA and LDA methods were implemented, and the parameters (a0 , a1 and a2 ; b0 , b1 and b2 )
of each necessary function calculated by means of a reduced set of points and columns. In order to
reduce computational cost, target resolution was artificially reduced to 1 mm × 1 mm by selecting only
one of each four rows or columns. This decision reduced from 40,401 to 2601 the number of points used
for adjustment. Once the alternative adjustment models were computed, they were applied to a new
scanning of the grid standard. Although both alternatives provided a reduction in geometric distortion,
there were clear differences regarding how this goal was achieved. Firstly, Figure 11 provides two
graphs reflecting how absolute deviations with respect to the theoretical position of points along
different rows have been modified by each adjustment model.
The GDA compensates the overall drift observed in Figure 6, reducing the average deviation value
from to −35 µm to 10 µm, and the accumulated drift at the end of the rows from (approximately) −84 µm
to 4 µm. Nevertheless, these values do not properly reflect the behavior observed in Figure 11a, since the
adjusted distances present an overall upward trend that suffers two clear downward corrections at the
sensor gaps. On the other side, LDA reduces the average deviation to −0.06 µm and the accumulated
drift at the end of the rows to −1 µm. Unlike GDA, this correction is almost uniform along the rows,
but it is not capable of properly compensate the location of points in the influence area of the gap effect.
Accordingly, a maximum deviation of +44 µm is observed as a peak in the vicinity of the second gap,
and a fluctuation of +13 µm to −14 µm is observed in the vicinity of the first one.
A similar analysis has been performed for absolute deviations with respect to the theoretical
position of points along different columns (Figure 12).
Adjustment via GDA almost suppresses the enlargement trend in absolute deviations along
columns, as the absolute deviation observed for the last point of the first column is reduced from
+179 µm to +54 µm, and this effect could also by observed in the other columns in the graph.
Nevertheless, it can be also noticed that the open foldable fan effect observed in Figure 7 could not
be corrected properly. In fact, deviations of points in the first column show a slight increase of,
approximately +25 µm along the 50 mm length. At the same time, the average value for deviations
along the 100th column is only +5 µm, showing no significant trend. Finally, deviations of points in
column 0 show a slight decrease of, approximately −25 µm along the 50 mm length. On the other side,
LDA reduces the average deviation of points in those columns to −1.6 µm, while showing no significant
trend, with independence of the analyzed column. Consequently, LDA does not only suppresses the
elongation trend, but also the open foldable fan effect.
number of points used for adjustment. Once the alternative adjustment models were computed, they
were applied to a new scanning of the grid standard. Although both alternatives provided a
reduction in geometric distortion, there were clear differences regarding how this goal was achieved.
Firstly, Figure 11 provides two graphs reflecting how absolute deviations with respect to the theoretical
position
Sensors of 20,
2020, points
1 along different rows have been modified by each adjustment model. 14 of 24

(a)

(b)

Figure 11.
Figure Deviations with
11. Deviations with respect
respect to
to the
the theoretical
theoretical 00 position
position calculated for points
calculated for points along
along rows
rows 000
000
(blue line), 100 (orange line), and 200 (grey line): (a) after adjustment with global distortion adjustment
(blue line), 100 (orange line), and 200 (grey line): (a) after adjustment with global distortion adjustment
(GDA);
(GDA); (b)
(b) after
after adjustment
adjustment with
with local
local distortion
distortion adjustment
adjustment (LDA).
(LDA).

Comparing both models, it seems clear that the LDA provides better results. Although the gap
The GDA compensates the overall drift observed in Figure 6, reducing the average deviation value
effect has a negative impact on the capacity of GDA to compensate geometric deformation accurately it
from to −35 µm to 10 µm, and the accumulated drift at the end of the rows from (approximately) −84
has been also observed that even in the other direction (where there are no gaps affecting the results),
µm to 4 µm. Nevertheless, these values do not properly reflect the behavior observed in Figure 11a,
the particular geometric deformations introduced by the scanner characteristics can be also better
since the adjusted distances present an overall upward trend that suffers two clear downward
compensated for by using a local deformation approach. These results are particularly relevant when
corrections at the sensor gaps. On the other side, LDA reduces the average deviation to −0.06 µm and
the goal is to accurately verify the contour of the part and not just the overall dimension. However,
the accumulated drift at the end of the rows to −1 µm. Unlike GDA, this correction is almost uniform
this assertion should be checked upon a real case.
along the rows, but it is not capable of properly compensate the location of points in the influence
area of the gap effect. Accordingly, a maximum deviation of +44 µm is observed as a peak in the
Sensors 2020, 20, 1 15 of 24

vicinity of the second gap, and a fluctuation of +13 µm to −14 µm is observed in the vicinity of the
first one.
A similar analysis has been performed for absolute deviations with respect to the theoretical
Sensors 2020, 20, 1 15 of 24
position of points along different columns (Figure 12).

(a)

(b)

Figure
Figure 12. Deviations with
with respect
respecttotothe
thetheoretical
theoretical0 position
0 position calculated
calculated forfor points
points along
along columns
columns 000
000
(blue(blue
line),line), 100 (orange
100 (orange line),
line), and 200and 200line):
(grey (grey(a)line): (a) after adjustment
after adjustment with GDA;with GDA;
(b) after (b) after
adjustment
adjustment
with LDA. with LDA.

4. Case Study via GDA almost suppresses the enlargement trend in absolute deviations along
Adjustment
columns, as the
A series of absolute deviation
test specimens haveobserved for the last
been designed, point of theand
manufactured firstmeasured
column isin reduced
order tofrom +179
properly
µm to +54 µm, and this effect could also by observed in the other columns in
evaluate the actual differences between GDA and LDA and their relative influence upon the quality the graph. Nevertheless,
it
ofcan be also noticed
dimensional that the open
and geometric foldable of
verification fana effect
real AMobserved
part. Ain circle
Figurehas7 could not be corrected
been selected as a test
properly. In fact, deviations of points in the first column show a slight increase
profile whereas the three-dimensional geometry of test specimen is that of the inverted frustum of of, approximately +25a
µm along the 50 mm length. At the same time, the average value for deviations
right-circular cone, where the upper base (the biggest circular section) is contained in the top layer along the 100th
column
(the last is
oneonly +5 manufactured).
to be µm, showing noThis significant
geometry trend. Finally,
prevents deviations of
visualization of underlying
points in column
layers 0contours.
show a
slight decrease of, approximately −25 µm along the 50 mm length. On
Additional features have been included in test specimens, as can be observed in Figure 13. the other side, LDA reduces
the average
Each testdeviation
specimen ofincludes
points inathose
square columns to −1.6
base of 76.2 mm µm, while
× 76.2 mm,showing
to matchnothe
significant
external trend, with
dimensions
independence
of the target used of the
foranalyzed column. Each
error modelling. Consequently, LDA does so
corner is chamfered notthat
onlythere
suppresses
would be theno
elongation
concerns
trend, but also the open foldable fan effect.
related to specimen location on the flatbed scanner surface. The inverted frustum that contains the test
Comparing
circular profile hasboth models,
been placed it seems clear that the
at the geometric LDA
center ofprovides better results.
each specimen. When theAlthough
part is the gap
located
effect has a negative impact on the capacity of GDA to compensate geometric
upside-down on the scanner glass, the digitized image contains the upper layer of the correspondingdeformation accurately
it has been
circle, also observed
surrounded by the topthatlayer
evenofinthethe other
base. direction
Three (where
specimen sizesthere
wereare no gaps affecting
considered the
in this study,
results),
designedthe as particular
S1, S2 andgeometric deformations
S3 with diameters (D) ofintroduced
20 mm, 30 by mmtheandscanner
40 mmcharacteristics
respectively. can be also
better compensated for by using a local deformation approach. These results are particularly relevant
of dimensional and geometric verification of a real AM part. A circle has been selected as a test profile
whereas the three-dimensional geometry of test specimen is that of the inverted frustum of a right-
circular cone, where the upper base (the biggest circular section) is contained in the top layer (the last
one to be manufactured). This geometry prevents visualization of underlying layers contours.
Sensors 2020, 20, 1
Additional features have been included in test specimens, as can be observed in Figure 13. 16 of 24

Figure 13. Basic geometry of test specimens.


Figure 13. Basic geometry of test specimens.
A BCN3D Sigma fused filament fabrication (FFF) machine has been used for manufacturing of
Each test specimen includes a square base of 76.2 mm × 76.2 mm, to match the external dimensions
test specimens (Figure 14a), while 2.85 mm thermoplastic filament made of polylactic acid (PLA) was
of the target used for error modelling. Each corner is chamfered so that there would be no concerns
selected as raw material. Layer resolution had been fixed to 0.1 mm, while a 0.4 mm nozzle was used.
related to specimen location on the flatbed scanner surface. The inverted frustum that contains the test
Once, the specimens were manufactured, the top layer of the base was painted black, to provide an
circular profile has been placed at the geometric center of each specimen. When the part is located
increased contrast with respect to the white PLA of the upper layer (Figure 14b). To obtain an accurate
upside-down on the scanner glass, the digitized image contains the upper layer of the corresponding
reference of each specimen top layer contour, as they were actually manufactured, all specimens were
circle,2020,
Sensors surrounded
20, 1 by the top layer of the base. Three specimen sizes were considered in this17study,
of 24
measured in a DEA Global Image 09-15-08 CMM (Figure 14c).
designed as 𝑆1, 𝑆2 and 𝑆3 with diameters (𝐷) of 20 mm, 30 mm and 40 mm respectively.
A BCN3D Sigma fused filament fabrication (FFF) machine has been used for manufacturing of
test specimens (Figure 14a), while 2.85 mm thermoplastic filament made of polylactic acid (PLA) was
selected as raw material. Layer resolution had been fixed to 0.1 mm, while a 0.4 mm nozzle was used.
Once, the specimens were manufactured, the top layer of the base was painted black, to provide an
increased contrast with respect to the white PLA of the upper layer (Figure 14b). To obtain an accurate
reference of each specimen top layer contour, as they were actually manufactured, all specimens were
measured in a DEA Global Image 09-15-08 CMM (Figure 14c).

(a) (b) (c)

Figure 14.
Figure Testsspecimens:
14. Tests specimens:(a)(a)manufacturing;
manufacturing; (b)(b) final
final aspect
aspect of specimen,
of specimen, once
once the the
top top layer
layer of
of the
the base
base hadhad been
been painted
painted in in black;
black; (c)(c) measuringthe
measuring thegeometry
geometryininaa coordinate
coordinate measuring
measuring machine
machine
(CMM) (right).
(CMM) (right).

This machine
This machine was
was calibrated
calibrated according
according to
to EN
EN 10360-2:2001
10360-2:2001 being
being the
the maximum
maximum permissible
permissible error
error
in length measurement as in Equation (13):
in length measurement as in Equation (13):
𝑀𝑃𝐸
MPEE= =2.22.2++3 3·L/1000
· 𝐿/1000(µm
µm) (L𝐿in𝑖𝑛mm
mm) (13)
and the maximum permissible error in probing repeatability as in Equation (14):
and the maximum permissible error in probing repeatability as in Equation (14):
𝑀𝑃𝐸 = 2.2 µm (14)
MPEP = 2.2 (µm) (14)
In order to properly digitize the contour of the last layer, a cylindrical shank probe (2 mm
diameter) was used. Since the end of the probe is semi-spherical, and it was demanding to assure that
the probe touched the contour of the top layer with the cylindrical section, a margin of 0.5 mm
between the expected location of that contour and the transition between cylindrical and spherical
sections of the probe was set in the verification program. A discrete-contact probing strategy was
defined so that 360 points (one every 1°) were digitized upon the contour, with the independence of
each test specimen size. PC-DMIS® metrology software was, thereafter, used to calculate diameter
Sensors 2020, 20, 1 17 of 24

In order to properly digitize the contour of the last layer, a cylindrical shank probe (2 mm diameter)
was used. Since the end of the probe is semi-spherical, and it was demanding to assure that the probe
touched the contour of the top layer with the cylindrical section, a margin of 0.5 mm between the
expected location of that contour and the transition between cylindrical and spherical sections of the
probe was set in the verification program. A discrete-contact probing strategy was defined so that
360 points (one every 1◦ ) were digitized upon the contour, with the independence of each test specimen
size. PC-DMIS® metrology software was, thereafter, used to calculate diameter and center location of
each specimen according to a least-squares fitting calculation. With this information and the relative
position of each digitized points, radial deviation with respect to the theoretical radius could also be
calculated. As mentioned, CMM measurements were used as reference to evaluate results provided by
the flatbed scanner under different adjustment methods.
The final step was to digitize test specimens with the flatbed scanner. Accordingly, they were
placed upside-down, so that the last manufactured layer lied directly upon the glass, and the border of
the specimen was in contact with the lateral edges of the scanner. Thereby, the central geometry of
each specimen was located approximately centered with respect to the 50 mm × 50 mm calibrated
area. Then, scanning was carried out at 2400 dpi resolution and three greyscale BMP files containing
the images of test geometries were obtained. Figure 15 illustrates the contour digitizing sequence,
particularized for a small area belonging the upper section of the S3 specimen. After the scanning,
a closing-type morphological filter was applied to the resultant greyscale image in order to remove
small abnormalities in objects expected to be uniform. These defects could be caused by material
behavior during printing, since small quantities of melted plastic could ooze from the nozzle and stick
to the contour. This effect is often referred to as stringing and leaves whisker-like structures. In the
present work, the closing filter has been found to be useful in order to remove these small isolated
clear areas within the dark foreground, allowing for a better detection of part contour. Regarding the
parameters of the closing filter, a rectangular Kernel (five-pixel sized) and one single iteration was
used. The resultant image was then processed by a canny edge-detection algorithm. Parameters used
in canny filtering include size 5 for the kernel of the Gaussian filter, a 150 value for the threshold edge,
a 50 value for the threshold link.
Once the application of Canny algorithm has provided a collection of contours, a routine that
finds out external contours and suppress small isolated lines was applied. After the contour has been
defined, a 15 × 15 pixel grid was overlaid on the image, and intersections between grid and contour
were calculated. As a result, a series of contour points were identified and characterized by their
coordinates (in pixels) with respect to the scanner origin reference. These points were finally exported
to a TXT file.
Once the collection of points and its respective pixel coordinates were obtained, coordinates
of every single point were processed under three alternative adjustment procedures. The first one
involved using the theoretical dimensions of pixels, which means that no deformation adjustment
was applied, but a simple theoretical scale adjustment (TSA). The second one used the GDA based
on works by De Vicente and Majarena. The third one applied the LDA proposed in this work as an
alternative method, according to the description given in the previous section.
To illustrate differences between these three methods, polar graphs showing the radial deviations
obtained from the application of the different adjustments, as well as the CMM results taken as
reference, are provided in Figure 16 for each test specimen. Colored lines in Figure 16 represent
deviation calculated for points digitized with the flatbed scanner after different adjustments: TSA
(light blue), GDA (green) and LDA (dark blue), whereas the red lines represent the radial deviation of
points captured with CMM with respect to the nominal diameter of the feature.
Sensors 2020, 20, 1 18 of 24

in canny
Sensors 2020,filtering
20, 1include size 5 for the kernel of the Gaussian filter, a 150 value for the threshold
18 of 24
edge, a 50 value for the threshold link.

Figure15.
Figure 15. Contour
Contour digitizing
digitizing sequence.
sequence.

Once the
Results application
revealed of Cannyprocessed
that contours algorithmwith
has provided a collection
LDA are clearly moreof contours,
similar a routine
to those that
digitized
finds
by theout
CMMexternal
than contours
contoursand suppress
processed small
with GDAisolated lines
or TSA. Inwasfact,applied.
GDA is After the contour
not capable has been
of accurately
defined, adeformation
removing 15 × 15 pixel effects
grid wasandoverlaid
thus theon the image,
green and
contours intersections
fluctuate insidebetween grid the
and outside andlimits
contourof
were calculated. As a result, a series of contour points were identified and characterized
the red reference contour obtained with the CMM. This means that radial deviation could be either by their
coordinates (in pixels)
underestimated with respectsince
or overestimated, to theGDA
scanner origin
does reference.
not reflect These points
accurately werecontour.
the actual finally exported
On the
to a TXT file.
other hand, radial deviations under LDA are quite similar to those used as reference, at least in the cases
of S2 Once
and S3.theNevertheless,
collection of points and its
in the case respective
of S1, there arepixel
somecoordinates werethat
abnormalities obtained,
shouldcoordinates
be discussed.of
every single
Actually, point located
S1 shows were processed
discrepanciesunder three alternative
between CMM reference adjustment procedures.
profile and adjusted The firstwith
profiles one
involved using the theoretical dimensions of pixels, which means that no deformation
independency of the considered adjustment. To illustrate this phenomenon, Figure 17 provides several adjustment
was applied,
detailed viewsbut a simple
of the theoretical scale adjustment (TSA). The second one used the GDA based
part contour.
on works by De Vicente and Majarena. The third one applied the LDA proposed in this work as an
alternative method, according to the description given in the previous section.
To illustrate differences between these three methods, polar graphs showing the radial
deviations obtained from the application of the different adjustments, as well as the CMM results
Sensors 2019, 19, x FOR PEER REVIEW 19 of 24

taken as reference, are provided in Figure 16 for each test specimen. Colored lines in Figure 16
represent deviation calculated for points digitized with the flatbed scanner after different
Sensors 2020, 20, 1TSA (light blue), GDA (green) and LDA (dark blue), whereas the red lines represent
adjustments: 19 ofthe
24

radial deviation of points captured with CMM with respect to the nominal diameter of the feature.

S1-TSA S1-GDA S1-LDA

S2-TSA S2-GDA S2-LDA

S3-TSA S3-GDA S3-LDA

CMM TSA GDA LDA

Figure 16. Comparative


Figure16. Comparative of
of radial
radial deviations
deviations with
withrespect
respectto
tothe
the nominal
nominalradius
radiusfor
forS1,
S1,S2
S2and
and S3
S3 under
under
different adjustment methods.
different adjustment methods.

The presence of a lateral seam along the vertical walls of FFF parts is a well-known phenomenon,
Results revealed that contours processed with LDA are clearly more similar to those digitized
related to the combined dynamics of material flowing from the nozzle and XY movement jerk
by the CMM than contours processed with GDA or TSA. In fact, GDA is not capable of accurately
when starting and ending external contour trajectories. An excess of material is poured out of the
removing deformation effects and thus the green contours fluctuate inside and outside the limits of
nozzle resulting in a small protuberance in each layer. When the start/end position of contours are
the red reference contour obtained with the CMM. This means that radial deviation could be either
approximately located at a similar XY for consecutive layers, a seam-like feature (similar to a welding
underestimated or overestimated, since GDA does not reflect accurately the actual contour. On the
seam) appears. As can be notice in Figure 17, the LDA contour matches the seam shape (feature I) with
other hand, radial deviations under LDA are quite similar to those used as reference, at least in the
an accuracy similar to that of the CMM. Moreover, small disturbances in the expected profile that can
cases of 2 and 3. Nevertheless, in the case of 1, there are some abnormalities that should be
also be observed in Figure 17 had been also accurately identified in the LDA profile (feature II), being
nearly equal in magnitude as their correspondent value from the CMM measurement.
Sensors 2020, 20, 1 20 of 24

discussed. Actually, 𝑆1 shows located discrepancies between CMM reference profile and adjusted
profiles
Sensors 2020,with
20, 1 independency of the considered adjustment. To illustrate this phenomenon, Figure20
17of 24
provides several detailed views of the part contour.

Figure17.
Figure 17.Relevant
Relevantcontour
contourdefective
defectivefeatures
featuresininS1:
S1:seam
seam(feature
(featureI),I),small
smalldisturbance
disturbance(feature
(featureII)
II)and
and “ghostly” contour (feature
“ghostly” contour (feature III). III).

The presence there


Nevertheless, of a lateral
are atseamleastalong
threethe vertical
features walls
that of FFF
could parts is a well-known
be identified easily uponphenomenon,
CMM data that
related to the combined dynamics of material flowing from the
do not appear in the scanned profiles, regardless of the method used for adjustment. The most nozzle and 𝑋𝑌 movement jerk when
relevant
ofstarting and ending
these “ghostly” externalhas
features contour
been trajectories.
labelled in An Figureexcess
17 of asmaterial
feature is III.poured out of
Since the the nozzlehas
adjustment
resulting
nothing to doin with
a smallthis protuberance
discrepancy (the in each layer. feature
mentioned When the can start/end positioninofFigure
also be observed contours areTSA
16 for
approximately located at a similar 𝑋𝑌 for consecutive layers,
and GDA contours), the source should necessarily be related to the contour tracing stage. A deepera seam-like feature (similar to a
welding seam) appears. As can be notice in Figure 17, the LDA contour
look at Figure 17 reveals that, in fact, a blurred lighter area can be identified on the digitized image at matches the seam shape
(feature I) with an accuracy similar to that of the CMM. Moreover, small disturbances in the expected
the expected position. Actually, a small protuberance can be noticed upon the 3D part at that position,
profile that can also be observed in Figure 17 had been also accurately identified in the LDA profile
but it is located slightly under the top contour; that is to say, this abnormality does not belong to the
(feature II), being nearly equal in magnitude as their correspondent value from the CMM
top layer, but to lower layers. Since the CMM touch probe has been programmed to follow the contour
measurement.
at a 1.5 mm below the top layer, this feature reflects an abnormality that is big enough to overpass
Nevertheless, there are at least three features that could be identified easily upon CMM data that
the projection of top contour and consequently being wrongly included in the profile, as digitized by
do not appear in the scanned profiles, regardless of the method used for adjustment. The most
touch-trigger
relevant of these technology.
“ghostly” This fact reinforces
features the robustness
has been labelled in Figure of17
theasflatbed
featurescanner
III. Sinceperformance,
the adjustment since
the final objective is to accurately digitize last layer contour and avoid,
has nothing to do with this discrepancy (the mentioned feature can also be observed in Figure 16 for as much as possible, noise
introduced
TSA and GDA by features
contours),in previous
the source layers.
should Since the smallbe
necessarily protuberance
related to the in contour
Figure 17 is clearly
tracing blurred
stage. A
and its greyscale
deeper intensity
look at Figure lower that,
17 reveals thaninthat ofathe
fact, points
blurred of thearea
lighter topcanprofile, further on
be identified filtering strategies
the digitized
could
image beatdeveloped.
the expected position. Actually, a small protuberance can be noticed upon the 3D part at
Figure
that position, 18 but
provides a partial
it is located viewunder
slightly of the theS3top
contour,
contour; inthat
the isvicinity
to say, ofthisone of the gapdoes
abnormality plications
not
described
belong tointhe Section 2.3. Plication
top layer, but to lower can be clearly
layers. observed
Since the CMM in the image,
touch probeand hasitsbeen
effectprogrammed
can also be noted
to
infollow the contour
the detailed view at of athe
1.5radial
mm below the top
deviation layer,that
graphs thisare
feature reflects anin
also provided abnormality
Figure 18. that is bigcan
Plication
beenough
noted as to overpass
an abruptthe projection
drop of top contour
in the contour obtained andwith
consequently
GDA, whereas being wrongly included
it resembles a peakin the
in the
profile, as digitized by touch-trigger technology. This fact reinforces
contour provided by LDA. A punctual abnormality is unavoidable under both approaches, but the the robustness of the flatbed
scanner performance,
relevance of the gap is since the finaldifferent,
completely objectivesince
is to accurately
LDA (working digitize last layer
locally) contourthe
restrains and avoid,
gap as
influence
much as possible, noise introduced by features in previous layers.
upon adjustment to a small section of the contour whereas, on the other hand, its effect influences Since the small protuberance in the
Figure 17 is clearly
whole compensation under GDA. blurred and its greyscale intensity lower than that of the points of the top profile,
further filtering
In order strategiesresults,
to compare could bethe developed.
accuracy of contour tracing can be analyzed by means of the
Figure 18 provides a partial view of the S3 contour, in the vicinity of one of the gap plications
average value of the radial deviations between points measured with the CMM and those measured
described in Section 2.3. Plication can be clearly observed in the image, and its effect can also be noted
with the flatbed scanner Accordingly, the circumference has been segmented into 360 angular sectors
in the detailed view of the radial deviation graphs that are also provided in Figure 18. Plication can
(1◦ each), and then the absolute value of the difference between the value of the radius calculated from
the scanned images and measured by the CMM has been calculated for each segment. Next, the mean
radial deviation RDM is calculated. Results are provided in Table 1.
be noted as an abrupt drop in the contour obtained with GDA, whereas it resembles a peak in the
contour provided by LDA. A punctual abnormality is unavoidable under both approaches, but the
relevance of the gap is completely different, since LDA (working locally) restrains the gap influence
upon adjustment
Sensors 2020, 20, 1 to a small section of the contour whereas, on the other hand, its effect influences
21 ofthe
24
whole compensation under GDA.

Figure 18.
Figure Detail of
18. Detail of the
the plication
plication effect
effect affecting
affecting the
the contour
contour of
of S3.
S3.
Table 1. Mean radial deviation (RDM ), calculated from CMM measurements, applying Theoretical
In order
Scale to compare
Adjustment (TSA),results, the accuracy
Global Distortion of contour
Adjustment (GDA),tracing can
and Local be analyzed
Distortion by means
Adjustment (LDA.)of the
average value of the radial deviations between points measured with the CMM and those measured
RDMAccordingly,
with the flatbed scanner [µm] CMM TSA
the circumference hasGDA LDA into 360 angular sectors
been segmented
(1° each), and then the absolute
S1 value
0 of the difference
17.6 between
18.1 the value
12.4 of the radius calculated
from the scanned imagesS2and measured 0 by the CMM
29.4 has been28.0calculated9.7
for each segment. Next, the
mean radial deviation RD S3M is calculated.
0 Results40.7 36.8in Table 1.9.2
are provided

Table 1.
Results inMean
Tableradial deviation
1 indicate that(𝑅𝐷
LDA),outperforms
calculated fromGDACMM measurements,
when the goal is toapplying Theoretical
accurately describe the
Scale Adjustment (TSA), Global Distortion Adjustment (GDA), and Local Distortion
contour of the layer. RDM value calculated after GDA is approximately 46% less accurate than that Adjustment
calculated after LDA in the case of S1, whereas (LDA.) the obtained results is 188.7% worse in the case of S2,
and 300% worse for S3. Surprisingly,
𝑹𝑫𝑴 [µm] CMMTSA
GDA and TSA provide LDA values for RDM , which means
GDAsimilar
that a global adjustment strategy is𝑆1 not an adequate
0 option 18.1
17.6 for an accurate
12.4 description of part contour.
Similarly, the consistency between 𝑆2 profile fluctuation
0 29.4 as 28.0
measured 9.7with the CMM and that obtained
with the scanner can be analyzed 𝑆3 by means 0of the40.7standard36.8deviation
9.2 of the 360 radial deviations
previously calculated (RDσ ). Results are provided in Table 2.
Results in Table 1 indicate that LDA outperforms GDA when the goal is to accurately describe the
contour of the layer. 𝑅𝐷 Table value calculated
2. Standard after GDA
deviation is approximately
of radial deviations (RDσ46%
). less accurate than that
calculated after LDA in the case of 𝑆1, whereas the obtained results is 188.7% worse in the case of 𝑆2,
RDσ [µm] CMM TSA GDA LDA
and 300% worse for 𝑆3. Surprisingly, GDA and TSA provide similar values for 𝑅𝐷 , which means that
a global adjustment strategyS1 is not an 0adequate option
16.1 for an14.6 17.3
accurate description of part contour.
S2 0 20.3 21.1 10.2
Similarly, the consistency between profile fluctuation as measured with the CMM and that
S3 0 23.7 24.7 10
obtained with the scanner can be analyzed by means of the standard deviation of the 360 radial
deviations previously calculated (𝑅𝐷 ). Results are provided in Table 2.
RDσ results are quite similar for S1, whereas S2 and S3 show better behavior in the case of LDA.
This implies that fluctuations of 2.
Table radial deviations
Standard with
deviation respect
of radial to the reference
deviations (𝑅𝐷𝜎 ). CMM-digitized contour
are less severe if a local adjustment strategy is used. These results can be explained by means of the
𝑹𝑫 [µm] CMM TSA GDA LDA
inaccuracy that the gap plication 𝝈effect introduces in GDA, whereas LDA is far less sensible to the
𝑆1 0 16.1 14.6 17.3
influence of such an abnormality. 𝑆2
0 20.3 21.1 10.2
𝑆3 0 23.7 24.7 10
5. Conclusions

𝑅𝐷 paper
This resultspresents
are quitean analysis
similar 𝑆1,the
for of use of 𝑆2
whereas flatbed 𝑆3 show for
and scanners AMbehavior
better layer contour verification.
in the case of LDA.
A distortion target has been used to describe how the image provided by the scanner is distorted
This implies that fluctuations of radial deviations with respect to the reference CMM-digitized contour with
respect
are less to the actual
severe shape.
if a local It has been
adjustment observed
strategy that
is used. distortion
These resultseffects
can becan be decoupled
explained by means between
of the
sensor axis and scanning axis directions. The overall tendency in both axes is to enlarge images,
but gap effects related to CIS in-line sensor architecture actually introduce image plications along
the sensor axis, resulting in a global contraction of the image in that direction. It has also been
observed that deformation along the sensor axis is similar for different positions of the sensor along the
scanning axis, whereas deformation differs along the scanning axis for different sensor axis positions.
Sensors 2020, 20, 1 22 of 24

Additionally, although a certain influence of scanning resolution has been observed, distortion effects
are consistent and repeatable when individual points are considered. Different sensor adjustments
have been analyzed, and it has been proved that the GDA approach has provided worse results than
the LDA approach regarding accurate tracing of contours. Results indicate that local distortions
severely affect contour-detection, but this effect could be reasonably avoided by applying a LDA
like the one proposed in this paper. As a consequence, the possibility of using flatbed scanners for
on-machine measurement of AM layers seems to be feasible, but GDA should not be used for CIS-type
flatbed scanner adjustment due to its sensitivity to gap plication effects. In future works, efforts
should be conducted in order to develop an on-machine verification procedure able to evaluate each
single layer before the next one is deposited and, consequently, providing capabilities for individual
layer verification that resemble those of computer tomography. This procedure will also allow for
implementing closed-loop strategies that will minimize dimensional and geometrical errors in AM
parts. Nevertheless, there are still several concerns that should be addressed. For example, it should
be necessary to investigate how distortion adjustment should be extended to the whole scanning area.
High-accuracy targets are only available for small areas, so efforts should be conducted to manufacture
bigger targets with similar accuracy or to develop a procedure for covering the whole scanning area
by means of placing the target at different positions. Nevertheless, this would require developing a
procedure to build a complete adjustment from different partial independent adjustments. Finally,
the influence of several sources of error (i.e., parameters in contour-detection algorithms or target
image processing for dot-to-dot distance calculation) should be analyzed in order to obtain robust
results under the expected variety of actual manufacturing conditions.

Author Contributions: Conceptualization, D.B.; methodology, D.B. and P.F.; software, P.F., B.J.A. and A.N.;
validation, B.J.A., P.F. and A.N.; formal analysis, D.B. and G.V.; investigation, G.V.; resources, D.B.; writing-original
draft preparation, D.B.; writing-review and editing, D.B., B.J.A., G.V., P.F. and A.N.; funding acquisition, G.V. All
authors have read and agreed to the published version of the manuscript.
Funding: This work was supported by the Spanish Ministry of Science, Innovation and Universities and by
FEDER (DPI2017-83068-P).
Acknowledgments: The authors wish to thank Juan José Aguilar, from the University of Zaragoza for his help,
and Cristina Fernández and José Carlos Rico for their support.
Conflicts of Interest: The authors declare no conflict of interest. The funders had no role in the design of the
study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to
publish the results.

References
1. Basiliere, P.; Shanler, M. Hype Cycle for 3D Printing; Technical Report (G00263487) for Gartner Inc.: Stamford,
CT, USA, July 2014.
2. Wohlers, T.T.; Campbell, I.; Diegel, O.; Huff, R.; Kowen, J. Wohlers Report 2019. 3D Printing and
Additive Manufacturing State of the Industry; Wohlers Associates Inc.: Fort Collins, CO, USA, 2019;
ISBN 978-0-9913332-5-7.
3. Thomas-Seale, L.E.J.; Kirkman-Brown, J.C.; Attallah, M.M.; Espino, D.M.; Shepherd, D.E.T. The barriers
to the progression of additive manufacture: Perspectives from UK industry. Int. J. Prod. Econ. 2018, 198,
104–118. [CrossRef]
4. Masood, S.H.; Rattanawong, W.; Iovenitti, P. Part build orientations based on volumetric error in fused
deposition modeling. Int. J. Adv. Manuf. Tech. 2000, 16, 162–168. [CrossRef]
5. Noriega, A.; Blanco, D.; Alvarez, B.J.; Garcia, A. Dimensional Accuracy Improvement of FDM Square
Cross-Section Parts Using Artificial Neural Networks and an Optimization Algorithm. Int. J. Adv. Manuf. Tech.
2013, 69, 2301–2313. [CrossRef]
6. Boschetto, A.; Bottini, L. Triangular mesh offset aiming to enhance Fused Deposition Modeling accuracy.
Int. J. Adv. Manuf. Tech. 2015, 80, 99–111. [CrossRef]
7. Armillotta, A.; Bellotti, M.; Cavallaro, M. Warpage of FDM parts: Experimental tests and analytic model.
Robot. Cim. Int. Manuf. 2018, 50, 140–152. [CrossRef]
Sensors 2020, 20, 1 23 of 24

8. Ikeuchi, D.; Vargas-Uscategui, A.; Wu, X.; King, P.C. Neural Network Modelling of Track Profile in Cold
Spray Additive Manufacturing. Materials 2019, 12, 2827. [CrossRef]
9. Tofail, S.A.M.; Koumoulos, E.P.; Bandyopadhyay, A.; Bose, S.; O’Donoghue, L.; Charitidis, C. Additive
manufacturing: Scientific and technological challenges, market uptake and opportunities. Mater. Today 2019,
21, 22–37. [CrossRef]
10. Valiño, G.; Rico, J.C.; Fernandez, P.; Alvarez, B.J.; Fernandez, Y. Capability of conoscopic holography
for digitizing and measuring of layer thickness on PLA parts built by FFF. In Proceedings of the 8th
Manufacturing Engineering Society International Conference (MESIC 2009), Madrid, Spain, 19–21 June 2019.
11. Chang, D.Y.; Huang, B.H. Studies on profile error and extruding aperture for the RP parts using the fused
deposition modelling process. Int. J. Adv. Manuf. Tech. 2011, 53, 1027–1037. [CrossRef]
12. Cooke, A.L.; Moylan, S.P. Process intermittent measurement for powder-bed based additive manufacturing.
In Proceedings of the 22nd International Solid Freeform Fabrication Symposium (SFF 2008), Austin, TX,
USA, 4–6 August 2008; pp. 8–10.
13. Pedersen, D.B. Additive Manufacturing: Multi Material Processing and Part Quality Control. Ph.D. Thesis,
The Technical University of Denmark, Lyngby, Denmark, November 2012.
14. Skala, V.; Pan, R.; Nedved, O. Making 3D Replicas Using a Flatbed Scanner and a 3D Printer. In Proceedings
of the International Conference on Computational Science and Its Applications (ICCSA 2014), Guimaraes,
Portugal, 30 June–3 July 2014; pp. 76–86.
15. van Dalen, G. Determination of the size distribution and percentage of broken kernels of rice using flatbed
scanning and image analysis. Food Res. Int. 2014, 37, 51–58. [CrossRef]
16. Kee, C.W.; Ratman, M.M. A simple approach to fine wire diameter measurement using a high-resolution
flatbed scanner. Int. J. Adv. Manuf. Tech. 2009, 40, 940–947. [CrossRef]
17. Göröcs, Z.; Ozcan, A. Biomedical imaging and sensing using flatbed scanners. Lab Chip 2014, 14, 3248–3257.
[CrossRef] [PubMed]
18. Zalocha, D.; Kasperkiewicz, J. Estimation of the structure of air entrained concrete using a flatbed scanner.
Cement Concrete Res. 2005, 35, 2041–2046. [CrossRef]
19. Simcoe, R.J. Evaluating commercial scanners for astronomical image digitization. In Preserving Astronomy’s
Photographic Legacy: Current State and the Future of North American Astronomical Plates; Astronomical Society of
the Pacific Conference Series; Osborn, W., Robbins, L., Eds.; Astronomical Society of the Pacific: San Francisco,
CA, USA, 2009; Volume 410, pp. 111–127.
20. Phuc, L.T.; Seita, M. A high-resolution and large field-of-view scanner for in-line characterization of powder
bed defects during additive manufacturing. Mater. Des. 2019, 164, 107562. [CrossRef]
21. Seywald, R. On the automated assessment of geometric scanner accuracy. Int. Arch. Photogramm. Remote
Sens. 1996, 31, 182–186.
22. Kim, M.; Bauer, P.; Wagner, J.K.; Allebach, J.P. MFP scanner motion characterization using self-printed
target. In Image Quality and System Performance XII, Proceedings of the SPIE/IS&T Electronic Imaging
Conference, San Francisco, CA, USA, 8 February 2015; SPIE: Bellingham, WA, USA, 2015; Volume 9396,
pp. 93960E:1–96960E:26.
23. Poliakow, E.V.; Poliakov, V.V.; Fedotova, L.A.; Tsvetkov, M.K. High-precision measuring scale rulers for
flatbed scanners. Bulg. J. Phys. 2007, 34, 356–368.
24. Kangasrääsiö, J.; Hemming, B. Calibration of a flatbed scanner for traceable paper area measurement.
Meas. Sci. Technol. 2009, 20, 107003:1–107003:4. [CrossRef]
25. Jones, M.P.; Callahan, R.N.; Bruce, R.D. Dimensional Measurement Variation of Scanned Objects Using
Flatbed Scanners. J. Technol. Manag. Appl. Eng. 2012, 28, 1–12.
26. Wyatt, M.; Nave, G. Evaluation of resolution and periodic errors of a flatbed scanner used for digitizing
spectroscopic photographic plates. Appl. Opt. 2017, 56, 3744–3749. [CrossRef]
27. De Vicente, J.; Sanchez-Perez, A.M.; Maresca, P.; Caja, J.; Gomez, E. A model to transform a commercial
flatbed scanner into a two-coordinates measuring machine. Measurement 2015, 73, 304–312. [CrossRef]
28. Evans, C.J.; Hocken, R.J.; Estler, W.T. Self-calibration: Reversal, redundancy, error separation, and ‘absolute
testing’. CIRP Ann. Manuf. Techn. 1996, 45, 617–634. [CrossRef]
29. Majarena, A.C.; Aguilar, J.J.; Santolaria, J. Development of an error compensation case study for 3D printers.
Procedia Manuf. 2017, 13, 864–871. [CrossRef]
Sensors 2020, 20, 1 24 of 24

30. Ogrizović, V.; Miljković, S.; Delčev, S.; Gučević, J. A Flatbed Scanner as a Platform for Calibrating Line
Scales. In Proceedings of the XXI IMEKO World Congress “Measurement in Research and Industry”, Prague,
Czech Republic, 30 August–4 September 2015.
31. Elaksher, A.F.; Ali, T. Geometric Calibration of Low-Cost Flatbed Scanners for Large Scale Mapping
Applications. Modern Instrumentation 2018, 7, 11–23. [CrossRef]
32. Emgu CV: Cross Platform. Net Wrapper to the OpenCV Image Processing Library. Available online:
http://www.emgu.com/wiki/index.php/Main_Page (accessed on 15 June 2019).
33. Otsu, N. A threshold selection method from gray-level histograms. IEEE T. Syst. Man. Cyb. 1979, 9, 62–66.
[CrossRef]
34. Philipp, R. Industrial Contact Image Sensor Operation Manual V 4.00. Tichawa Vision GmbH. Available
online: https://tichawa-vision.de/pdf/manual_en.pdf (accessed on 25 September 2019).

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).

You might also like