Automatic surface defect quantification in 3D