1. A method for detecting a three-dimensional (3D) geometric boundary from a set of two or more input images of a scene illuminated by a set of two or more light sources, wherein pixels at an identical location in all of the input images correspond to the same point in the scene, wherein in each input image the scene is illuminated by a combination of the light sources, and wherein at least two images in the set of input images are illuminated by different combinations of the light sources, comprising the steps of: obtaining, for each location, a set of patches, wherein each patch in the set is extracted from an identical region of a different input image from the set, wherein each patch contains a pixel at the location; and determining, for each location, a confidence value that the location is on the 3D geometric boundary, wherein the steps are performed in a processor.