Scaling a point cloud to meters I have a point cloud with several thousands of points that were generated using a 3D scanner. The scale, rotation and translation of the clouds as a whole are arbitrary.
I'm looking for a way to scale the point cloud to meters units. For that I have as input the meters distance between certain pairs of points that appear at random in the cloud. I can have as much as few hundreds of such measurements.
Is there a standard way to calculate the scaling factor from this input?
 A: If the individual points are affected by a normally distributed error $r$, then the distance $d$ between two points has an error $\approx r\sqrt 2$, provided $r\ll d$. The precise dependency is a bit more complicated, especially if $d$ is not much larger than $r$; additionally there are dependancies between distances using partly the same points. Thus I suppose it is good enough to determine the average of true distance in meters divided by measured distance in scanner-units for all sufficiently long true distances (or the weighted by length average including smaller distances).
As improvement, with hundreds of measurements, you might detect outliers and even an estimate for $r$
A: You can determine the scaling factor by least squares, minimizing
$$\sum_{k=1}^n w_k(\lambda d_k-D_k)^2$$ where the $w_k$ are weighting factors that express the confidence you have in the measurements.
The minimum is achieved by
$$\lambda=\frac{\sum_{k=1}^n w_kd_kD_k}{\sum_{k=1}^n w_kd_k^2}.$$
In case there are outliers, you can resort to a trimmed mean, i.e. discard a fraction of the large and small ratios before computing the least-squares estimate.
