Development of A Three-Dimensional Shape Measurement System Using A Phase-Shift Method

Accurate measurement of the distance between any two points under endoscopic examination of the gastrointestinal tract is dicult due to the sheye lens currently used on endoscopes. To overcome this issue, we developed a three-dimensional visual inspection system that incorporates a phase-shift method for direct measurement of a three-dimensional shape. Projection of a striped pattern is used to enable three-dimensional renderings of a surface using an industrial camera. We evaluated the accuracy of measurement relative to that of reference measurements obtained using a measurement microscope, for three-dimensional shapes on a plane and curved surface. For 60 regions of interests, with various congurations of the reference locations relative to the camera, the measurement error for our system was <0.1 mm on the plane grid and <0.5 mm on the curved surface. The accuracy of our novel three-dimensional visual inspection system could improve determination of the size of lesions with different shapes, at or depressed, regardless of the curved surface of the gastrointestinal tract.


Introduction
Accurate measurement of the size of a lesion, determined as the length between two points, is important during endoscopic examination to inform the clinical management for gastrointestinal neoplasms. As an example, a differentiation of 20-30 mm can alter the indication for endoscopic treatment of early gastric cancer. [1] Similarly, the distance between the cardia of the stomach and the oral side of a tumor determines the possibility of proceeding with a distal gastrectomy. [2] As treatment selection in uences patients' quality of life after surgery, measurement accuracy is crucial to inform appropriate treatment for gastrointestinal neoplasms. Radiological examination, such as gastric computed tomography colonography or uoroscopy, can provide an accurate measure of at lesions. However, at and depressed lesions can only be detected as a color difference during endoscopic examination. Measurement of the length of these lesions will be in uenced by the curvature of the gastric surface, which can lead to subjective errors and poor oncological treatment selection. [3][4][5] Therefore, an objective measurement would be desirable to inform a standardized management of gastrointestinal neoplasms. To address this limitation, we developed a three-dimensional (3D) visual inspection system using a phase-shift method to improve the measurement accuracy of irregular surfaces, such as depressed or at lesions, which are di cult to predict on two dimensional images. We report on the measurement accuracy of our novel system.

Methods
Development of the three-dimensional visual inspection system Our system includes a miniature projector, developed for this research by NTT Corporation, an industrial camera (DFK33UX264), and lens (MVL50TM23). The distance from the camera to a target standard height is set to 470 mm, and the eld of vision at the standard position is approximately 79(W) × 66(H) mm. The projector can produce a striped red pattern for scanning (red was used in this study) with 15 stripes for the eld of vision. The horizontal length between the camera and the projector, which is the baseline length, is 60 mm. The measurement range of the height direction in terms of the distance from the camera to the subject is 450-490 mm ( Figure 1). The projector and camera are integrated into a desktop system. Displacement of the projected stripe pattern by the surface relative to the con guration of the projector and camera allows for a high-de nition derivation of the 3D geometric shape of the object. [6] Accuracy of the measured distance between two points We rst evaluated the accuracy of our three-dimensional system for measuring the distance between two points on a plane grid placed at ve Z-distances from the camera: 452 mm, 460 mm, 470 mm, 480 mm, and 488 mm.
Measurements were obtained for six locations on the grid ( Figure 2) and two different lengths between points (10 mm and 50 mm), for a total of 60 measurements.
We then prepared a curved plaster (3D) model that imitates the shape of the stomach and has one large virtual and one small lesion on the curved surface. The model has three alignment marks to adjust its position around the lesion ( Figure 3). We compared data obtained using our visual inspection system (IS-data) to those obtained using measurement microscope (MM) as a reference (MM-data), which included 147 XYZ-position data measured at a 0.5 mm pitch. For this comparison, rst the XYZ-position of MM-data ( Figure 3) was adjusted to IS-data by the matching alignment marks of MM-data to those of IS-data. The Z position data of IS-data was extracted at the same XY positions of MM-data, and the cross-section data were created. Then, the Z-distance was compared with cross-section measurements between the microscope and our system.

Results
The measurements for the 10 mm and 50 mm target lengths on the plane grid for the ve different camera distances are reported in Table 1. Overall, the error of measurement was <0.2 mm. A comparison of measurements on the 3D model between the MM and our visual inspection system is shown in Figure 4A, with the MM measurements set as the reference and the lines developed using our system. The standard deviation of the height difference between MM and our developed system was 0.21 mm for 147-point data. Figure 4B shows the line of our system using a low-pass lter, which serves as a frequency lter. In this case, the cut-off frequency (fc) was set to 2 mm -1 , and the standard deviation of the height difference was 0.17 mm.
Low-pass ltering can reduce differences with reference to height; it removes shape components that exceed the set frequency and appropriate settings are required according to the shape and size that need to be extracted. The length data obtained using the MM and our system were compared for the two sections (A, B) identi ed on the graph. The results are shown in Table 2. Using the MM, the lengths of sections A and B were 14.26 mm and 9.93 mm, respectively. The differences from reference data were 0.55 mm and 0.37 mm for our system, and 0.0 mm and 0.03 mm for the low-pass processing data of our system (fc=2 mm -1 ), respectively.
Finally, we discuss the measurement reproducibility of our developed system. A standard deviation of 0.25 mm for the height difference was obtained in comparison with measurements of the MM reference. The evaluation conditions were as follows: 30 measurement times using the curved plaster (3D) model sample and 257 measurement points in a matrix in the 60 square region were used.

Discussion
Indications for endoscopic resection of gastrointestinal tumors are largely based on the estimated size of the tumor and depth of invasion, which is indicative of the oncological grade. Yet, predicting the size of the lesion based on images obtained using only the camera mounted on the endoscope can lead to subjective variability due to the barrel distortion characteristic of the sheye lens of endoscopic cameras. [3][4][5] This variability will be further in uenced by the curvature of the gastric surface, local deformation of the tissue, such as stretching, and the presence of air with insu ation during endoscopy. Our novel measurement system addresses this issue by providing a point-to-point length measurement on curved surfaces. Our system further provides 3D length parameters to measure the area and volume of a region of interest. Previous studies report correlations between some distinctive endoscopic features and invasion depth in super cial gastric cancer. [7,8] Therefore, our system could be useful for also determining the depth of invasion of early gastrointestinal cancer, which is a determinant parameter for oncological treatment selection. This will require further comparison of 3D measures obtained with histological information.
A distinctive advantage of our system is that it provides an accurate measure of length regardless of the curvature of the underlying surface. This is an important consideration particularly for at or depressed lesions, where the length increases as a function of the height of the lesion. Our program addresses this issue by smoothing irregular shapes and creating a at model of the lesion, enabling accurate measurement of the size of the lesion. We do note the di culty in con rming the error between the actual lesion size and its measured size. However, as we demonstrated, the magnitude of error in length measures on a virtual curved surface was small for our system, compared to the MM measures. Therefore, we anticipate that the error for in vivo lesions on curved surfaces would be similarly small.
We plan future research using a porcine model to con rm the preliminary ndings obtained on our curved virtual model. For in situ use during endoscopy in humans, motion correction and time required for measurement will also need to be addressed. With regard to the time requirement, currently, measures are calculated within a few tens of seconds. We are also aiming to improve the general versatility of our system to eliminate the need for a dedicated endoscope and to ensure accuracy for different approaches to the target lesion. Our ultimate goal is to implement the measuring feature on an endoscope system.
In conclusion, we have implemented a 3D visual inspection system that can improve determination of the size of lesions of different shapes, at or depressed, regardless of the curved surface of the gastrointestinal tract. Although the safety and accuracy in vivo were not addressed, these issues will, theoretically, not be di cult to overcome.  1)-5) and a)-e) in the table correspond to the same number or word in target distances on the grid.