An official website of the United States government
Here's how you know
Official websites use .gov
A
.gov website belongs to an official
government organization in the United States.
Secure .gov websites use HTTPS
A lock (
) or https:// means you've safely
connected to the .gov website. Share sensitive
information only on official, secure websites.
As a library, NLM provides access to scientific literature. Inclusion in an NLM database does not imply endorsement of, or agreement with,
the contents by NLM or the National Institutes of Health.
Learn more:
PMC Disclaimer
|
PMC Copyright Notice
1National Institute of Standards and Technology,Gaithersburg, MD 20899-0001
Accepted 2010 May 7; Issue date 2010 Nov-Dec.
The Journal of Research of the National Institute of Standards and Technology is a publication of the U.S. Government. The papers are in the public domain and are not subject to copyright in the United States. Articles from J Res may contain photographs or illustrations copyrighted by other commercial organizations or individuals that may not be used without obtaining prior approval from the holder of the copyright.
Formulas for variances of plane parameters fitted with Nonlinear Least Squares to point clouds acquired by 3D imaging systems (e.g., LADAR) are derived. Two different error objective functions used in minimization are discussed: the orthogonal and the directional functions. Comparisons of corresponding formulas suggest the two functions can yield different results when applied to the same dataset.
Keywords: LADAR, nonlinear least squares, variances of fitted parameters
1. Introduction
3D imaging systems are line-of-sight instruments that provide range images of objects in a given region of interest, I(ϑ,φ), where I denotes the distance from an instrument to a point on a surface of the object and ϑ and φ are the elevation and the azimuth angles to that point. Usually a point cloud in a Cartesian coordinate system associated with the instrument is derived from the range image. Current 3D imaging systems may collect point clouds containing hundreds of thousands of points within a few seconds [1]. Frequently, these data points are used to model the objects by geometrical primitives that are characterized by attributes such as location, pose, width, height, etc. Numerical values of these attributes may be obtained by fitting a model to the segmented dataset. Here, we discuss the Nonlinear Least Squares (NLS) fitting procedure applied to range data obtained by scanning a plane. Specifically, we address the following problem: how do the uncertainties of range measurements by an instrument propagate to uncertainties of the fitted plane parameters [2]?
Usually, variances of fitted parameters (which are useful for uncertainty analysis) are derived from the Jacobian matrix of a model function used in a given fitting problem. This common approach is based on a linearization of the nonlinear error function near its minimum [3–7]. In this paper we do not follow this path but estimate the variances directly from the sensitivities for which we provide analytical formulas.
2. Variances of Fitted Plane Parameters
A plane in a three-dimensional Cartesian coordinate system is defined as a set of points P(x, y, z) satisfying the following equation
(1)
where w(ϑ,φ) is a unit vector perpendicular to a plane, parameterized by two angles: the elevation ϑ (a zero elevation being horizontal) and the azimuth φ, and where • stands for the dot product of two vectors. The Cartesian coordinates of w(ϑ,φ) may be written as
(2)
The absolute value of parameter D is the distance from the plane to the origin of the coordinate system, and D may be expressed as
(3)
where P0 is any point on a plane. A plane can be fit to the experimental dataset P{N} = {Pj, j = 1,…, N}, where N denotes the number of points; the goal being to calculate the numerical values of the three parameters defining the plane: ϑ, φ and D. Within the framework of the Least Squares method, the fit parameters are obtained by minimizing the error function
(4)
where Ej is the distance between the experimental point Pj and its corresponding “theoretical point.” Different definitions of the theoretical point yield different error functions. In this paper we study two error functions: the orthogonal error function EO and the directional error function ED, as explained in Fig. 1 and in the next two sections.
Due to instrument error in measurement of range r, experimental points P do not lie exactly on a plane (thick line). Points O are perpendicular projections of experimental points on a plane. Points D are intersections with the plane of rays originating from the instrument and passing through the experimental points. Distances PO are used in the orthogonal error function EO while PD are used in the directional error function ED. The difference between both functions depends on the Angle of Incidence (AOI).
It is not surprising that due to nonlinear dependence of the normal vector w on both angles ϑ and φ, plane fitting requires nonlinear minimization. However, as is shown in the next two sections, for both error functions EO and ED the distance Ej depends linearly on the third parameter D. Therefore, D may be explicitly expressed as a function of both angles (ϑ, φ) and P{N} from the condition
(5)
For any error function E defined by Eq. (4) with Ej depending linearly on D, the linear parameter can be expressed as a function of the remaining non-linear parameters and dataset P{N}
(6)
When the error function E reaches its minimum at [ϑ*, φ*, D*], a gradient of the function has to be zero. This implies that the original 3D search space may be reduced to a 2D space and the error function may be re-written as
(7)
the minimum of E being located at
(8)
The variances of the fitted plane parameters var(ϑ*) and var(φ*) may be calculated following the same general approach developed for fitting a sphere to range data [8], [9]. In the current study, the same assumption is made as in the previous studies: for the 3D imaging systems relevant to this study, the uncertainty in the range measurement is typically much larger than the uncertainty in the angular measurements. Thus, an acquired point Pj can be expressed as
(9a)
where rj is a range measured at bearings (ϑj, φj) and ||Pj|| = rj. In this approximation the bearings are treated as noise-free control variables and a unit vector pj is defined as
(9b)
Note that for other types of instruments, for example Coordinate Measuring Machines (CMM), the above assumption may not be valid and the formulas for variances of fitted plane parameters developed in this paper may not be applicable. In addition, it is assumed that the correlation in the measured ranges rj and rk is negligible for any j ≠ k. When both assumptions are valid, the variances of the fitted plane parameters may be estimated by applying to Eq. (8) the uncertainty propagation formula [2]
(10a)
(10b)
and the covariance may be estimated as
(10c)
The variance of the third parameter D* may be calculated from the uncertainty propagation formula [2] applied to a general function D(ϑ,φ,P{N}) defined in Eq. (6),
(11)
where the derivatives of D are calculated at (ϑ*, φ*, P{N}).
The individual sensitivities
used in Eqs. (10) and (11) may be calculated as in [8] by solving for each j the following 2 × 2 system of linear equations
(12)
where the vectors Sj and Vj are defined as
(13a)
(13b)
The matrix H is the Hessian of the error function E(ϑ, φ, P{N})
(14)
These general formulas are now applied to two specific error functions: the orthogonal error function EO and the directional error function ED.
3. Orthogonal Fitting
For the orthogonal plane fitting (see Fig. 1) the theoretical point Oj corresponding to the experimental point Pj is defined as the orthogonal projection of Pj on a plane. Thus, Eq. (4) takes the form
where P0 here is the centroid of all experimental points P{N}. This condition states that the plane fitted with the orthogonal error function has to contain the centroid, P0. Defining a scalar product dj of two vectors w and pj given by Eqs. (2) and (9b)
where rj is a measured range. In this notation, Eq. (7) describing the error function in the reduced 2D search space of angles (ϑ, φ) can be written as
(19a)
where
(19b)
Then, the elements of the gradient of the error function ∇EO defined in Eq. (19a) can be calculated as
(20a)
(20b)
while the elements of the Hessian matrix H defined in Eq. (14) are
(21a)
(21b)
(21c)
Finally, the elements of vector Vj defined in Eq. (13b) can be obtained by differentiating with respect to rj the elements of the gradient ∇EO given by Eqs. (20a) and (20b). Taking into account the definition of vector Uj given by Eq. (19b) and the definition of centroid P0 of all points Pj as well the dependence of Pj on rj given by Eq. (9a), the elements of vector Vj can be evaluated as
(22a)
(22b)
where
(22c)
δj,k is the Kronecker delta, and pk is the unit vector defined in Eq. (9b). First and second order derivates of the vector w(ϑ,φ), defined in Eq. (2), are provided in Appendix A, Eqs. (A1–A5). Once the matrix H and vectors Vj are known, the sensitivity vectors Sj can be calculated for every j by solving the 2 × 2 system of linear Eq. (12). The variances of the fitted angles var(ϑ*) and var(φ*) and the covariance cov(ϑ*,φ*) can then be determined from Eqs. (10a, b, c). The variance of the third parameter D*, defined in Eqs. (16–18), can be now evaluated from Eq. (11) using the following equations:
(23a)
(23b)
(23c)
where the derivatives of D are calculated at [ϑ*,φ*, P{N}].
4. Directional Fitting
For the directional plane fitting (see Fig. 1) the theoretical point Dj corresponding to the experimental point Pj is defined as an intersection of a ray originating from the instrument through Pj with the plane
(24a)
where a parameter tj has its value close to 1, and the theoretical points satisfy Eq. (1) of the plane
(24b)
The distance Ej in Eq. (4) is the Euclidian norm and the directional error function ED can thus be written as
(25)
where the parameter tj can be calculated from Eq. (24) using the dj defined in Eq. (17)
(26)
if dj is different from zero, i.e., if the vector pj is not orthogonal to w. Two vectors pj and w are orthogonal only if the corresponding AOI = ± 90°, which causes the theoretical point Dj to be undefined. For all other AOIs, tj can be calculated and substituted into Eq. (24a). Then, using Eq. (9a) and the fact that rj = ||Pj||, Eq. (25) yields the following expression for the directional error function
where the derivative
is calculated in Appendix B, Eq. (B22),
and
in Eqs. (C4, C5), and δj,k is the Kronecker delta. Once the matrix H and vectors Vj are known, the sensitivity vectors Sj can be calculated for every j by solving a 2 × 2 system of linear equations (12). The variances of fitted angles var(ϑ*) and var(φ*) and the covariance cov(ϑ*,φ*) can then be determined from Eqs. (10a, b, c). The variance of the third parameter D*, defined in Eq. (28), can now be evaluated by substituting in Eq. (11) the Eqs. (B17, B18, B22), for the derivatives
,
and
calculated at [ϑ*,φ*, P{N}].
5. Discussion
Figure 1 shows that the orthogonal plane fitting behaves differently from the directional fitting. The difference between orthogonal and directional fitting depends on the Angle of Incidence (AOI) of the laser beam. For AOI approaching 90°, the optimal value of the orthogonal error function EO(ϑ*,φ*, P{N}) is decreasing, even when the uncertainty of the measured ranges rj is large. The optimal value of the error function is usually interpreted as a gauge of noise level in experimental data (assuming that a right model is fitted to the data). For 3D imaging systems, due to a divergence of a laser beam, range measurements collected for large AOI have large uncertainty. Thus, the behavior of EO is in a sharp contrast with the common experimental observation. The directional fitting is free of this flaw and a residual value of the directional error function ED(ϑ*,φ*, P{N}) correctly estimates a level of noise in the acquired experimental dataset P{N} for any AOI. When EO is minimized, the sensitivities of the fitted angles
and
may be underestimated for large AOI. The flawed sensitivities entered in the Eqs. (10) and (11) will cause an underestimation of the variances of the plane parameters fitted with the orthogonal function for large AOI. For small AOI, the difference between EO and ED is diminishing and both error functions are expected to provide correct estimates for the variances of fitted parameters.
Individual sensitivities Sj of fitted angles are calculated from Eq. (12). The vector Vj on the right hand side of this equation behaves differently for the orthogonal and the directional error function, see Eqs. (D1, 2) and (D7, 8) in the Appendix D. This may cause a much larger variability of Sj calculated for the orthogonal fitting and a poorer estimate of variances of fitted parameters than for the directional fitting.
As was already pointed out, a plane fitted by minimizing the orthogonal error function has to contain the centroid P0 of the acquired points P{N}, see Eq. (16). Directional fitting does not have this constraint. Thus, a minimization of two error functions discussed in this paper may lead to different results.
6. Conclusions
In this paper we derived formulas for the variances (which are useful for uncertainty analysis) of plane parameters fitted to a dataset acquired with 3D imaging systems. Two error functions were investigated: the orthogonal and the directional error function. Comparison of corresponding formulas suggests the two functions may yield different results when applied to the same range data. However, in order to quantify the anticipated difference, laboratory experiments and computer simulations are needed.
Biography
About the author: Marek Franaszek is a physicist with the Engineering Laboratory of NIST. The National Institute of Standards and Technology is an agency of the U.S. Department of Commerce.
7. Appendix A
From the definition of w (ϑ,φ) in Eq. (2), the following derivates can be calculated
(A1)
(A2)
(A3)
(A4)
(A5)
Then, the corresponding derivatives of dj(ϑ,φ) defined in Eq. (17) can be expressed as
(A6)
(A7)
(A8)
(A9)
(A10)
8. Appendix B
Auxiliary functions defined for calculation of derivatives of D(ϑ,φ, P{N}) defined in Eq. (28) for the directional fitting are given by:
(B1)
(B2)
(B3)
(B4)
(B5)
(B6)
Their respective derivatives are:
(B7)
(B8)
(B9)
(B10)
(B11)
(B12)
(B13)
(B14)
(B15)
(B16)
where the derivatives of dj are defined in (A6-A10). Using the above functions, the derivatives of D(ϑ,φ, P{N}) can be expressed as
(B17)
(B18)
(B19)
(B20)
(B21)
For the calculation of variances of fitted plane parameters, the following derivatives of D(ϑ,φ, P{N}) are also needed
(B22)
(B23)
(B24)
9. Appendix C
The derivatives of the functions Aϑ,j and Aϕ,j defined in Eqs. (30a,b) and used in the gradient and Hessian calculations can be expressed as
(C1)
(C2)
(C3)
where the derivatives of D(ϑ, ϕ, P{N}) and dj are calculated in Appendices A and B. For the evaluation of sensitivities of fitted plane parameters, the following derivatives are also required
(C4)
(C5)
where the derivatives of D are given by Eqs. (B22–B24).
From the Eqs. (C4), (C5), and (B22) it follows that none of the derivatives
,
, or
depends on rj. In fact, a measured range rj enters the right hand side of Eqs. (D7) and (D8) only indirectly in the formula for D and its angle derivatives; see Eqs. (28), (30a,b), (B17) and (B18). Thus, the influence of a particular j-th range measurement on the components of the vector Vj in Eq. (13b) applied to ED is negligible for typical datasets with large N.
[9].Franaszek M, Cheok GS, Saidi KS. Gauging the Repeatability of 3D Imaging Systems by Sphere Fitting. IEEE Trans Instrum Meas. 2010 in print. [Google Scholar]