1. A three-dimensional measurement apparatus comprising: a first camera arranged to capture a workpiece to acquire a first image; a second camera arranged to capture the workpiece from a view point different from that of the first camera to acquire a second image; and a control unit configured to extract a plurality of edge lines of the workpiece respectively from the first image and the second image, calculate each of line-of-sight errors with respect to provisional three-dimensional coordinates, wherein the line-of-sight errors are calculated from an endpoint of a first edge line selected from the plurality of edge lines of the first image and an endpoint of a second edge line extracted from the plurality of edge lines of the second image so as to correspond to the first edge line, set an evaluation function from the respective line-of-sight errors and a three-dimensional constraint condition set based on a three-dimensional shape of the workpiece, and make an optimization calculation based on the evaluation function to determine three-dimensional coordinates of the workpiece.