Phase retrieval by Euclidean distance in self-calibrating generalized phase-shifting interferometry of three steps