Simple Optical Coordinate Measuring System, Based on Fiducial Markers Detection, and its Accuracy Assessment

The area of application of contactless measuring systems has been rapidly growing over the past two decades. Development of contactless measuring methods can also be observed in Coordinate Metrology. Due to the growing number of contactless systems found in industry, there is also a growing interest in the issue of their accuracy among research centres. The interesting new solution which can be applied in contactless measurements is the usage of fiducial markers in dimensional metrology. In this paper, the authors present a simple and cheap optical system and try to assess its accuracy. A calibration process of a reference plate is described as well. Research was conducted for basic measuring tasks met in Coordinate Measuring Technique. Markers are attached to the z-axis ram of Coordinate Measuring Machine which is used as a reference system. The article presents the results obtained for basic measuring tasks, which can be a basis for further research aimed at improving the accuracy of measurements performed using fiducial markers.


INTRODUCTION
Optical Measuring Systems have been successfully used in many areas of life, including automotive industry, geodesy, architecture, shipbuilding and aviation [1,2]. The undoubted advantages of such systems include the ability of measurement of a significant number of points in short time, a large measurement range and sometimes (for example in photogrammetry) relatively low costs of its implementation. The development of optical methods fits in with the currently observed trends in measurement techniques such as an acceleration of measurement process and so called Industry 4.0 which is aimed at tightening the connection between the subsequent steps of the manufacturing process. In the case of Coordinate Measuring Technique, it is worth mentioning that classic coordinate systems operating in contact mode are currently being increasingly replaced with the systems that utilize different optical phenomena. It can be assumed that this trend will not change in the near future.
Currently, the functioning of many Optical Measuring Systems is based on the analysis of digital images that are a representation of the controlled object or area on the CCD matrix. This method is also applied in the metrology of geometric quantities. One of the known applications of optical contactless methods in Coordinate Metrology is the GOM Tritop system. The system uses a high-class camera and a set of markers that should be placed on and around the measuring element. On the basis of series of images taken with camera from different positions, it is possible to prepare the 3D model of the object. Another example of using contactless methods in the measurement of geometric quantities is so-called T-Probe, a device enhancing the measuring capabilities of Laser Tracking System [3]. In this solution, the photogrammetry is used to determine the orientation of the probe tip in the measuring volume of the device. This is done with the use of an additional camera cooperating with the Laser Tracker, which registers the location of markers emitting infrared light that are placed on the T-Probe surface. Similar solutions are found in the case of structural light scanners in which digital images analysis is used in contact probes cooperating with the scanner. It enables measurement of the dimensions that are difficult to measure using the scanner itself. One of the new trends in the field of Optical Metrology is a development of multisensor machines that efficiently combine the advantages of classical coordinate machines and optical machines [4÷6]. As a relatively new solution, such systems require intensive research, especially on the accuracy of measurements [7,8]. Regardless of the solution, the most important factors determining the accuracy and capabilities of the optical measuring systems are: the parameters of the camera being used and the algorithms utilized for the image processing.
An interesting solution that can be applied for the optical metrology is the fiducial markers detection. Such methodology is already successfully used in different fields of science and life, including: augmented and virtual reality [9÷11], medical applications [12] or navigation systems for micro air vehicles [13] or humans [14]. Although some papers examine the accuracy of optical tracking with usage of fiducial markers [15,16], a possibility of using them for measuring geometric quantities has not been studied yet. This article describes an attempt of adapting the fiducial markers detection process for the Coordinate Metrology applications.
One of the most popular solutions used for real-time image processing is OpenCV library. The library, originally developed by Intel, now functions as an open-source environment under BSD license. The area of OpenCV applications include: stereophotogrammetry, faces recognition, tracking the movements of both objects and camera as well as removing red eyes from photography or finding similar images in a database. Another potential application is detection and pose determination of fiducial markers, implemented by the ArUco module [17]. The markers used in this solution have the form of black squares with inner binary information coded using smaller white squares. Library allows a user to change the size of marker, which is used to link the indications obtained using the library with the meter unit. It is also possible to change the number of bits included in marker. After defining the mentioned parameters, the marker images can be generated and individual id is designated for each marker. Detection of markers is performed in two steps. In the first step, an image is analysed for the occurrence of square shapes that can be the markers. Next, the position of each corner of the marker is calculated. In the second step, the marker id is determined on the basis of binary information that it stores. As a result of detection process the list with positions of four corners of marker is given (starting with the top left in a clockwise direction) as well as information about a detected marker id. It is also possible to obtain the coordinates of central point of the marker given in a camera coordinate system. This property was used during the experiments described in this article. The exemplary generated ArUco Markers are presented in Figure 1.

EXPERIMENT METHODOLOGY
The experiments presented in this paper are aimed at assessing the possibilities of using fiducial markers for Coordinate Measuring Technique. It was assumed that an experiment setup prepared for research should be as simple as possible in order to find a basic accuracy of used methodology. The experiment setup should also minimize the influence of an operator on measurements; however, in future works it is planned to place marker on probe operated manually by an operator.
The main component of the setup is a standard DSLR camera which was installed on the table of the Coordinate Measuring Machine (CMM) (Fig.  2). The marker used during the experiment had a side length of 60 mm.
During experiment, the CMM is used as a reference system which guarantees high positioning accuracy and repeatability. The chosen Zeiss WMM850S machine is the CMM with a moving bridge with a measuring volume of 800\1200\700 mm in X, Y and Z directions respectively. The machine is located in an air-conditioned room, and the temperature during measurements is constantly monitored. The accuracy of the machine given in a form of Maximum Permissible Errors (MPE) equation (1) can be expressed as: (1) where: L is the measured length given in mm.
Before the main part of the experiment, the CMM was inspected for its positional accuracy and repeatability. As the machine uses the geometrical correction system, the analysis may be focused on determination of a distribution of residual errors which are the errors that retain uncompensated after the application of the correction matrix. Residual errors are determined in chosen points in a measuring volume of the machine using a laser tracking device characterized by a very high length measurement accuracy expressed in the form of equation (2): (2) where: L is the measured value given in mm.
The Laser Tracking Device follows the movements of a retroreflector which is mounted in place of a probing system. Next, the machine moves to the assumed points, performing several approaches for each point with different directions defined in relation to the machine's base coordinate system (with positive and negative directions along main axes as well as along spatial diagonals). The measurement procedure is repeated for at least four different positions of laser tracking device in a measuring volume of the CMM in order to use a multilateration technique. On the basis of the obtained results it is possible to calculate the mean X, Y and Z values for each point included in the measurement procedure, and then to compare them with assumed values. The standard deviations of each coordinate reproduction can also be determined which gives the information about the machine repeatability. The maximum values obtained for Zeiss WMM machine do not exceed: 1 μm for mean error, and 2 μm for standard deviation of point reproduction.
Considering an expected accuracy of a system based on the ArUco markers detection, the authors decided that both MPEE equation and the obtained residual errors distributions justify the usage of Zeiss WMM during a main part of the experiment.
After installation of a camera on the machine table and the ArUco marker on a machine quill, the camera needed to be calibrated first. One of following objects can be used during the calibration: a black-white chessboard, a symmetrical circle pattern or an asymmetrical circle pattern. The chosen object is photographed in several different positions and orientations set relatively to the camera. Next, the ArUco library [18] uses 'calibrate' function to find the camera matrix which includes the information about camera focal lengths and optical centers (3) and five distortion coefficients (4). (3) where: f x , f y -focal lengths; c x , c y -optical centers. (4) where: k 1 , k 2 , k 3 -radial distortion coefficients; p 1 , p 2 -tangential distortion coefficients. The calibration process has a great impact on the system accuracy, so the object used during the calibration should be prepared carefully and inspected separately.
Before the calibration, the chosen reference object was measured using the optical CMM in order to check if the printed pattern complies with the assumed dimensions. The measurements were  (Fig. 3). The machine is located in an airconditioned room and the temperature during the measurements was monitored. The accuracy of the machine is described by the equation of maximum permissible errors (5): (5) where: L is the measured length given in mm.
The largest available magnification -6.3x and the illumination of outside 8-segment ring light (according to [19]) were used for all measurements included in experiments.
The results obtained during measurements can be then used during the calibration of the camera by implementing the actual dimensions of the pattern into the script responsible of the camera calibration.
As the result of the camera calibration process, the following values of distortion parameters were obtained, according to equation (3) and (4):

RESULTS
The first parameter that was checked was the basic repeatability of the tested system. It was done by taking the series of 40 digital images for the same position of ArUco marker which was placed in a center of the CMMs measuring volume. All digital images during this and next parts of experiments were triggered using an external device in order to minimize the possible influences of an operator on the measurement process. The analysis of the obtained results involved determination of the standard deviation and the range for each coordinate. The obtained values are presented in Table 1.
As can be seen, the smallest values were obtained for X axis and the largest for Z axis. In general, the system is characterized by a large dispersion, which is related to the differences in the directions of the coordinate system axes associated with the marker which are determined by the OpenCV library.
Next step of the experiment involved measurements of the marker position in 13 points which were distributed in the measuring volume of the machine in such a way that they define a sphere of 24,997 mm diameter. The obtained size error equaled E d = 0.235 mm and form error equaled E f = 0.627 mm.
The last part of the experiment was performed in order to check the accuracy of the system for a length measurement. During this part, the CMM was programmed to move along its X axis and one of its spatial diagonals. The axes which were used during this part of experiment are schematically shown in Figure 5. For each case the five In order to assess the possibilities of fiducial markers utilization in Coordinate Measuring Technique, basic metrological properties of the developed experimental setup, which include: repeatability, length measurement error and form reproduction error, should be checked. The procedure for they estimation can be based for example on ISO 10360-2 [20] and ISO 10360-5 [21] standards known from verification and reverification tests for CMMs, but which may also be applied for other Coordinate Measuring Systems [22]. As can be seen, excluding the single peak value which again can be associated with the system's low repeatability, all errors values were smaller than 0.8 mm which should be treated as an interesting result for a system of such a simple configuration.

CONCLUSIONS
The experiments described in the paper were aimed at assessing the possibilities of fiducial markers usage for Coordinate Measuring Technique. For this reason, the experimental setup was prepared in a simplest possible way. Therefore, the obtained results should represent basic measuring capability of used methodology. It also constitutes an area for further development and improvement. The greatest problem of the setup that consists of one camera and only one marker is poor measurement repeatability. However, this issue could be probably solved by the introduction of additional markers and using fitting algorithms. It is a direction for future experiments. Another problem of the considered methodology which is typical to all optical methods that are based on digital images processing is a strong influence of calibration process on ystem accuracy. It is also a field for additional research.
In conclusion, it should be noted that the Coordinate Measuring System based on the use Fig. 6. The deviations obtained for the length measurement. The CMM moves along its X axis. All values given in mm Fig. 7. The deviations obtained for the length measurement. The CMM moves along its spatial diagonal. All values given in mm of fiducial markers may be an interesting solution, especially due to the simplicity and low cost of its application. If future experiments will help limit the influence of the aforementioned disadvantages on the system accuracy, it would be possible to use it, for example, for teaching purposes to present the basic problems that can be encountered while working on the development of optical measuring systems. Such low cost solution may also increase the availability of coordinate systems for teaching institutions. It may also be used in all tasks related to the positioning of objects which do not require very high positioning accuracy.