1. A method of tracking an object in a scene, the method comprising detecting at least three points of an object in a scene and using a projector to project structured light pattern on the scene, the structured light pattern including intersecting monochromatic lines, wherein at least six of the lines are different colors, and thereafter using an imaging device to capture an image of the scene including the object and the structured light pattern and calculating the positions, relative to the imaging device, of at least the three points by detecting the intersections of the lines in the image, traversing through the detected intersections to identify neighboring nodes, determining the identity of each detected intersection based on its color and the color of its neighboring nodes, and triangulating the position of intersections corresponding to the at least the three points to track the object in the scene.