# RMS Error and Degrees of Freedom (DOFs)

Both the N-point calibration and N-point fixturing tools report the root mean squared (RMS) error for the respective calculation of calibrated or fixtured space. The RMS error measures the variation between two sets of N points after calculating the best-fit transformation. It is computed by taking the square root of the mean of the squares of the individual errors, as in the following equation:

Where n is the total number of points, i represents the index of a specific point, and e is the error for a single point. The error is measured in uncalibrated space. It is computed by mapping the raw calibrated position of the point through the calibration transform and then subtracting the mapped result from the found, uncalibrated position of the same point.

You should normally check the RMS error value after computing a 2D transformation that defines calibrated or fixtured space. A large RMS error value may indicate that

- Points may be out of their correct position and therefore measured incorrectly by the tool.
- You do not have the appropriate degrees of freedom (DOFs) enabled.

To reduce the RMS error, you should either modify the points or enable additional degrees of freedom (DOFs). DOFs specify which transformation components the tool can include in its calculation of the best-fit transformation. For example, if the points in one set are scaled, but you have not included scaling in the DOFs, the tool attempts to calculate the best mapping of points that does not vary scaling. If you receive an unacceptable RMS error value as a result, you may be able to reduce it by allowing the tool to consider the scaling degree of freedom in calculations.

In addition, you should be cautious of reporting distances in some fixtured spaces. Although most fixturing operations involve rigid transforms (rotation and translation only) from either calibrated or pixel space, you cannot use a fixture that contains nonidentity scale or skew from a calibrated space to measure distances. In this case, you must first map the fixture points back to calibrated space. You can avoid this problem by only measuring distances and other quantities in calibrated or pixel space; by restricting the degrees of freedom in your fixture space to just allow translation and rotation when computing the best-fit transform between points; or by using only the translation and rotation components of another tool's result transform as input to your fixturing tool.