A new spatial phase-unwrapping algorithm based on single-pixel binarized (SPB) line pattern is proposed. The conventional spatial phase-unwrapping method produces easily the accumulation and propagation of errors for the wrapped phase in the regions with isolated 2π jumps generated by shadow and sharp changing surfaces. In this paper, the SPB deformed line pattern extracted by the proposed small window retrieval method can determine accurately the corresponding fringe order; then the wrapped phase is unwrapped point-to-point, in which the small window is adaptive for each light line. The measuring accuracy of the proposed method is close to the quality-guided method with high precision, but it performs simultaneously at higher robustness to measure a multi-object image. Only one additional SPB line pattern is projected and the phase-unwrapping process does not involve a time-consuming point-by-point sorting, so the proposed method can be applied to the real-time 3D measurement. The experimental results verify the feasibility and effectiveness of the proposed method.