A three-dimensional measurement apparatus of a slit light (or pseudo slit light) projection type that is adapted to prevent deterioration of measurement accuracy and to be easily miniaturized. When there is a disturbance in a region A in a distribution of pixels whose detected luminances exceed a threshold, a detected position C3 determined from a weighted average of luminances of pixels selected under a threshold condition along a scanning line traversing a bright portion image and liable to be deviated from a correct detected
position line B-B is excluded from data to be used for the three-dimensional measurement, whereas detected positions C1, C2 are adopted that are determined so as to correspond to scanning lines on each of which pixels whose number falls within an allowable range are detected. The allowable range varies from Nav×αmin to Nav×αmax or from Nav−β to Nav+γ, where Nav is an average of the numbers of pixels detected on scanning lines for each of which at least one pixel is determined, and αmin, αmax, β, and γ are minimum proper ratio, maximum proper ratio, subtract number of pixels, and add number of pixels, respectively, which are set in advance as parameters.