Detection and restoration of occlusions for 3D face recognition