Accurate measurement of the size of lesions or distances between any two points during endoscopic examination of the gastrointestinal tract is difficult owing to the fisheye lens used in endoscopy. To overcome this issue, we developed a phase‐shift method to measure three‐dimensional (3D) data on a curved surface, which we present herein. Our system allows the creation of 3D shapes on a curved surface by the phase‐shift method using a stripe pattern projected from a small projecting device to an object. For evaluation, 88 measurement points were inserted in porcine stomach tissue, attached to a half‐pipe jig, with an inner radius of 21 mm. The accuracy and precision of the measurement data for our shape measurement system were compared with the data obtained using an Olympus STM6 measurement microscope. The accuracy of the path length of a simulated protruded lesion was evaluated using a plaster model of the curved stomach and graph paper. The difference in height measures between the measurement microscope and measurement system data was 0.24 mm for the 88 measurement points on the curved surface of the porcine stomach. The error in the path length measurement for a lesion on an underlying curved surface was <1% for a 10‐mm lesion. The software was developed for the automated calculation of the major and minor diameters of each lesion. The accuracy of our measurement system could improve the accuracy of determining the size of lesions, whether protruded or depressed, regardless of the curvature of the underlying surface.