The diameter of an object can be established in different ways. If the centre of the object is known, a single sensor is sufficient for the measurement whose result is evaluated with the position of the centre point or the axis. If the position of the centre point is not known, the diameter is measured directly using two sensors. The distance information here is also evaluated together. In particular cases, if the opaqueness of the object allows this, the determination of the diameter can also be made directly using a confocal sensor.