Self-recalibration of a colour-encoded light system for automated three-dimensional measurements