Flat specimen shape recognition based on full-field optical measurements and registration using mapping error minimization method