The phase unwrapping is a very difficult problem for profilometry of object containing depth discontinuities. The problem can be resolved with dual-frequency measurement technique. Two measurements with dual different frequencies cannot be contented with real-time demand. A novel profilometry is based on compound grating, generated by computer software, projected by liquid crystal projector, so that the grating with different precision is easily created, conveniently changed. The same purpose is attained as successively capturing two deforming gratings with different frequency. Two phase maps are estimated simultaneously, whose sensitivity to height variation is correlated with the pattern grating frequency. The phase uncertainty of the fine grating can be revised by the phase information coming from the coarse one. Finally, satisfactory experimental results are demonstrated. Meanwhile, it is verified that the new method has such advantages as high speed, accurate unwrapping and extensive measure range.