1. A method of profiling a surface, comprising: projecting slit pattern light toward a target object in at least two directions in sequence by at least one pattern image projecting part to obtain pattern images reflected on the target object; obtaining heights by using the pattern images according to the directions by a computing part; obtaining vector fields showing a direction of maximum variation of height by the computing part; obtaining confidence indexes of the heights corresponding to the at least two directions by the computing part; obtaining integrated vector fields by using the confidence indexes and the vector fields by the computing part; and calculating height of each position of the target object by using the integrated vector fields by the computing part.