Roundness is the measure of how closely the shape of an object approaches that of a mathematically perfect circle. Roundness applies in two dimensions, such as the cross sectional circles along a cylindrical object such as a shaft or a cylindrical roller for a bearing. In geometric dimensioning and tolerancing, control of a cylinder can also include its fidelity to the longitudinal axis, yielding cylindricity. The analogue of roundness in three dimensions (that is, for spheres) is sphericity. 

Roundness is dominated by the shape's gross features rather than the definition of its edges and corners, or the surface roughness of a manufactured object. A smooth ellipse can have low roundness, if its eccentricity is large. Regular polygons increase their roundness with increasing numbers of sides, even though they are still sharp-edged.

In geology and the study of sediments (where three-dimensional particles are most important), roundness is considered to be the measurement of surface roughness and the overall shape is described by sphericity.

Simple definitions 

The ISO definition of roundness is the ratio of the radii of inscribed and circumscribed circles, i.e. the maximum and minimum sizes for circles that are just sufficient to fit inside and to enclose the shape.

Diameter 
Having a constant diameter, measured at varying angles around the shape, is often considered to be a simple measurement of roundness. This is misleading.

Although constant diameter is a necessary condition for roundness, it is not a sufficient condition for roundness: shapes exist that have constant diameter but are far from round. Mathematical shapes such as the Reuleaux triangle and, an everyday example, the British 50p coin demonstrate this.

Radial displacements 
Roundness does not describe radial displacements of a shape from some notional centre point, merely the overall shape.

This is important in manufacturing, such as for crankshafts and similar objects, where not only the roundness of a number of bearing journals must be measured, but also their alignment on an axis. A bent crankshaft may have perfectly round bearings, yet if one is displaced sideways, the shaft is useless. Such measurements are often performed by the same techniques as for roundness, but also considering the centre position and its relative position along an additional axial direction.

Calculation in two dimensions 
A single trace covering the full rotation is made and at each equally spaced angle, , a measurement, , of the radius or distance between the center of rotation and the surface point. A least-squares fit to the data gives the following estimators of the parameters of the circle:

The deviation is then measured as:

Roundness measurements

Roundness measurement is very important in metrology. It includes measurement of a collection of points.

Methods
For this two fundamental methods are followed:

Intrinsic datum method
The round object is placed over a flat plate and the point of contact is taken as the datum point. Again a dial gauge is placed over the round object and the object is rotated keeping the datum at constant position. Thus the error in roundness can be directly known by comparing the peak height as measured by the dial gauge.
Alternatively a V shaped base can be used instead of a flat plate. Two datum points will exist instead of one since the base is V-shaped. The error in roundness can be measured similar to the previous method.
Also a cylindrical body can be clamped between two axle centres. Here also the dial gauge is mounted over the cylindrical body and thus the roundness is measured by similar procedure as above.

Extrinsic datum method
The intrinsic method is limited to small deformations only. For large deformations extrinsic method has to be followed. In this case the datum is not a point or set of points on the object, but is a separate precision bearing usually on the measuring instrument. The axis of the object or part of the object to be measured is aligned with the axis of the bearing. Then a stylus from the instrument is just made to touch the part to be measured. A touch sensor connected to the tip of the stylus makes sure that the stylus just touches the object. A minimum of three readings are taken and an amplified polar plot is drawn to get the required error.

Roundness error definitions
Least square circle (LSC): It is a circle which separates the roundness profile of an object by separating the sum of total areas of the inside and outside it in equal amounts. The roundness error then can be estimated as the difference between the maximum and minimum distance from this reference circle
Minimum Zone circle (MZC): Here two circles are used as reference for measuring the roundness error. One circle is drawn outside the roundness profile just as to enclose the whole of it and the other circle is drawn inside the roundness profile so that it just inscribes the profile. Both circles, however, have the same center point. The roundness error here is the difference between the radius of the two circles.
Minimum circumscribed circle (MCC): It is defined as the smallest circle which encloses whole of the roundness profile. Here the error is the largest deviation from this circle
Maximum inscribed circle (MIC): It is defined as the largest circle that can be inscribed inside the roundness profile. The roundness error here again is the maximum deviation of the profile from this inscribed circle.
A common definition used in digital image processing (image analysis) for characterizing 2-D shapes is: Roundness = . This ratio will be 1 for a circle and greater than 1 for non-circular shapes. Another definition is the inverse of that: Roundness = , which is 1 for a perfect circle and goes down as far as 0 for highly non-circular shapes.

See also 
Compactness measure of a shape
Eccentricity (mathematics), how much a conic section (e.g., ellipse) deviates from being circular
Flattening
Geometric dimensioning and tolerancing
Surface roughness
Sphericity

Notes

References 

Metrology
Circles