In phase shifting in photoelasticity, phase unwrapping is one of the crucial steps in the processing of determining the total fringe orders. This task is tedious, particularly when ambiguity exists in an irregular phase map. Currently the phase-unwrapping process is usually performed line by line with prior knowledge of the total fringe order for at least one point after eliminating the isoclinic ambiguity. In this paper, a novel method is proposed, which can automatically perform the phaseunwrapping process directly based on the result of phase-shifting independent of the status of ambiguity and no prior knowledge is needed of the total fringe order for at least one point. The basic idea of this method is to exploit the relationships between phase retardations caused by three different loads applied on a specimen to find directly the total fringe order at each point. Experiments on a 'C' shape specimen under compression are provided as demonstrations.