1. An apparatus measuring a distance using structured light, in which a light source emitting light from a predetermined light source and a camera module capturing an image formed when the light from the predetermined light source is reflected by an obstacle, are disposed and the distance is measured using the captured image, the apparatus comprising: a binarization unit binarizing the image; an image identification unit identifying an image having connected pixels in the binarized image; a length ratio calculation unit obtaining a length ratio of a major axis of the image having the connected pixels to a minor axis perpendicular to the major axis; a pixel mean calculation unit obtaining the mean of pixel values of the image having the connected pixels; and an image extraction unit extracting an image formed by the light emitted from the light source, from the image having the connected pixels using the length ratio and the mean of the pixel values.