The disclosure is related to a method and apparatus of scanning a target object in three dimensions (3D). The method may include projecting a color dashed line pattern onto a target object, scanning the target object with the color dashed line pattern projected thereto, and producing a 3D data of the target object by processing the scanning result. The color dashed line pattern may include multiple dashed line patterns each of which is individually used to calculate the 3D data of the target object.