1. A three-dimensional visual sensor comprising: a means for detecting the three-dimensional position at which the reference light constituted of a selected one of a spot of light and a slit of light hits the surface of an object to be measured, based on the incident position and the direction of radiation of the reference light on the image, acquired by a first image pickup means, of the reference light radiated on the surface of the object; a means for detecting a plurality of three-dimensional positions on a intersection line between a selected one of the plane formed at the time of scanning the spot of light and a reference light plane containing the slit of light on the one hand and the surface of the object to be measured on the other hand, the plurality of the three-dimensional positions being required to specify the shape of the intersection line, and determining the intersection line on a three-dimensional orthogonal coordinate system set in such a manner that the plane formed by two of the three coordinate axes is coincident or parallel with the reference light plane; a means for detecting the position on an image plane of a feature line of the object from the image of the object acquired by a second image pickup means; a means for projecting the feature line of the image plane on the reference light plane by projection transform and determining the projected feature line on the three-dimensional orthogonal coordinate system; a means for determining the intersection point between the intersection line and the projected feature line on the three-dimensional orthogonal coordinate system; and a means for transforming the coordinate value of the determined intersection point into a three-dimensional coordinate value on at least one of the coordinate system set in the robot and the coordinate system set in the three-dimensional visual sensor.