AN EARLY VALIDATION OF IMAGE PROCESSING TECHNIQUE FOR FLATNESS MEASUREMENT

An experimental validation of flatness measurement based on image processing technique has been performed. The purpose of this study is to know the performance of the image processing technique in the flatness measurement. In addition, this technique will be used as development of current measurement technique that is performed manually. The advantage of using this method is that in the future the measurement system will run semi-automatically, so it can increase the capacity. This study is used 3 samples of optical flat with different in diameter (i.e. 25 mm, 45 mm, and 75 mm). The validation has been performed by comparing measurement results of the image processing technique and the manual technique through degree of equivalence evaluation. The error numbers based on the degree of equivalence criteria between the image processing technique and the manual technique for the flatness measurement of 25 mm, 45 mm, and 75 mm are 0.02, 0.09, and 0.11 respectively. According to those error numbers, the image processing technique measurement results is in agreement with the manual technique. Moreover, those results have validated that the image processing technique has good performance and can potentially be implemented to the flatness measurement.


INTRODUCTION
A simplest method for measuring flatness is direct comparison with an optical reference. The comparison can be performed using combination of several optical flats to minimize the uncertainty measurement (Xu, Chen & Yin, 2009). Optical interferometry has been known as a precise method to measure optical flat (De Groot, Biegen, Clark, de Lega & Grigg, 2002). However, flatness measurement system established in Standardisation Agency of Indonesia (SNSU-BSN) is based on interference phenomena in a thin film. The interference produces dark light pattern called fringe. The curvature of the fringes pattern indicates the optical flatness. The reading of fringe pattern form is observed manually by naked eyes. It causes human error factor on subjectivity for determining the edge of fringe.
Flatness measurement system by image processing technique is presented to development the current measurement technique that is performed manually. Edge detection capability is fundamental in image processing technique since the edge detection is the initial step in object recognition. There are several edge detection methods available such as Prewitt, Sobel, and Kircsh (Rashmi, Kumar & Saxena, 2013). It is necessary to select a fit edge detection method. Those edge detection methods have some disadvantages such as sensitive to noise and malfunction at the curves. Canny method has advantage for giving better detection especially in noise conditions and using probability for finding error rate. The program is developed using MATLAB (Gonzalez, Woods & Eddins, 2009). Image area and which desired fringe in the image is still selected manually. Before applying the edge detection by Canny method, the threshold value is carry out by using Otsu calculation. Then, in this experiment, the computation of flatness measurement value in the fringe image is based on ratio between fringe deviation width and fringe spacing width that has been performed using the Canny methods. The measurement is taken in 10 points along the selected fringe.
The purpose of this study is to know the performance of the image processing technique in the flatness measurement. An early validation to prove image processing technique is needed to ensure that this method is applicable for measuring flatness of the optical flat. The validation is performed by comparing measurement results of the image processing technique and the manual technique through degree of equivalence evaluation. If the image processing technique measurement results have the measuring value agreement with the manual technique measurement results, it means those results have verified that the image processing technique has good performance and can be implemented to the flatness measurement. This study used 3 samples of optical flats with different in diameter (i.e. 25 mm, 45 mm, and 75 mm).

BASIC THEORY
When an optical flat test is placed on optical flat standard, thin air gap will be formed between the two surface due to imperfection form of the two surfaces. If it is illuminated by a monochromatic light source, a series of dark light pattern called fringe will be formed. This fringe pattern is based on the interference phenomena in thin film. The interference occurs due to phase difference between two or more waves with the same wavelength. Phase difference caused by different path length and phase reversal. The illustration of the interference phenomena in thin film is presented in Figure 1 (Air Wedge Interference Picture, n.d.).  d is the air gap or thin film between two surfaces. The incident light will be directly reflected as the light beam 1, and refracted first as light beam 2. There will be path length difference between light beam 1 and 2. Both light beam passing through different medium that caused phase reversal. Illustration of fringe pattern generated from the interference phenomena is shown in Figure 2   Digital single-lens reflex camera or DSLR camera is widely used for photography purposes. It is equipped with CMOS sensor that has excellent feature to be alternative instrument for scientific purpose (Firmansyah, Priyatikanto & Aria, 2015). Recognition of an image can be obtained by applied edge detection methods. General edge detection methods that widely used are Roberts, Prewitt, Sobel, and Canny method. Among the mentioned method, Canny method give the better edge detection results of an image because using probability for finding error rate. It will improve the signal to noise ration (SNR), then in the noisy condition, the better detection is achieved. This result is proved by (Abo-Zahhad, Gharieb, Ahmed & Donkol, 2014). Before applying an edge detection to an image, it is necessary to get the right images first. There are some factors need to be adjusted in DSLR camera in order to get expected image as stated in the previous research (Amdani, Pratiwi, Rahman & Purwowibowo, 2016). The three main camera settings are aperture, shutter time, and ISO. Aperture is opening of the lens where the light comes in. The wider its opening, the smaller its sequence number (e.g. form wide to small open f/1, f/2, f/4, etc.). Shutter time is duration of the camera sensor to absorb the light. It varies from 1/4000s to 30s. ISO is proportion of sensor sensitivity to the light. Smaller number means less sensitive. The term ISO stands for "International Organisation for Standardisation". However, camera ISO does not directly refer to the organisation that creates various technology and product standards. Two film standards called ASA and DIN were referred to as one word "ISO" from that point on.
One of an easiest way to automatically segment an image by computer is thresholding. By selecting certain intensity value as threshold, images can be segmented. The intensity which is above threshold is categorized as white pixel and the other is black pixel (Carabia & Martín, 2012).
Segmentation in the Otsu method is based on the intensity value of the image pixels that is plotted into histogram (Vala & Baxi, 2013). The optimum intensity value in the histogram is the threshold value. The sequence formula to calculate the threshold is presented in formula (2) to (6) based on (Sezgin, 2014) When 2 is maximum, then the value of k is determined as the threshold Where : Pi : Probability each pixel in grey level i ni : Pixel sum in each intensity N : Total pixel from nL to nL-1 K : Threshold value in a grey level image which has range value from 1 to L (L is the maximum luminance value in the image, the value for 8-bit quantization is typically 255) P1(k) : Sum of Pi from grey level i to threshold k 2 : Variance difference between foreground (object) and background m(k), mG : Sum of foreground and background mean as function of the thresholding value k, foreground and background refer to the degree of which the gray level i belong to object and background respectively Validation of the measurement results is analyzed through degree equivalence equation (7) which is described by (Filipe, 2010). In order to have calculation of the degree equivalence, the uncertainty budget of the measurement is required (Wimmer & Witkovský, 2013).
Where : X1 : value of reference X2 : value of test 1 : uncertainty of reference value 2 : uncertainty of test value

METHODS
Optical samples were measured using manual technique and image processing technique. Both techniques were carry out by comparison with an optical flat standard and illuminated using green monochromatic lamp. The optical flat samples are made from fused silica which have diameter 25 mm, 45 mm, and 75 mm. The samples are selected according to the requirement of the customer which mostly on those sizes. The thickness of the optical flat depend on the diameter and it has been standardised. So, for the same diameter would have the same thickness despite the manufacturer. Mainly the material of the commercial optical flat are fused silica, then varying the refractive index due to different material of the optical flat are not necessary. he light source is green monochromatic lamp. The fringe is seen through 3 mm window glass screen. It is measured at room temperature (20±1) °C and under 65%RH. The measurement was performed by 3 people to know the reproducibility of the measurement.
In the existing manual system, the measurement is performed using ruler with resolution 0.5 mm. Illustration of the system is described in Figure 4 (Amdani, Rahman, Pratiwi & Purwowibowo, 2017). When the fringe pattern is formed in the Figure 4, the fringe deviation width (b) and the fringe spacing width (a) is observed by naked eyes and measured manually with 0.5 mm ruler. The measurements are repeated 10 times. Finally, the flatness value is calculated based on equation (1).

Figure 4 The existing manual system.
In the image processing technique, the camera type to capture fringe image is Nikon D3200. Interpretation of the system is shown in Figure 5. The execution is started by reading the image to be analysed. Fringe image area is still manually determined by entering pixel coordinate of x1, x2, x3, x4. Before turning the images to be black and white, a global computation based on Otsu method is used to determine the images threshold. This method allows to get automatic threshold value without manually input from the user. The threshold is computed using sequences of formula (2) to (6). However, it simply can be performed by command prompt "graythresh" from MATLAB in the Image Processing Toolbox which is implemented with this Otsu method. This threshold then creates binary images by turning all pixels below the threshold value to zero and all pixels about that threshold to one. Zero refers to black, whilst one is on the contrary, it refers to white. The program then can be able to perform edge detection by Canny method.
The desired fringe is also still manually selected. After the determined fringe has been successfully detected by Canny method, the fringe deviation width and fringe spacing width is calculated using computer. The flatness calculation program is also based equation (1). The measurements are also still manually determined in 10 point of the selected fringe. Illustration of the program execution steps to process the images are presented in Figure 6.After the measurements are performed with both techniques, measurement results of the image processing technique and the manual technique are compared through degree equivalence evaluation of equation (7). The degree equivalence value is analysed whether the image processing technique measurement results have the measuring value agreement with the manual technique measurement results.

RESULT AND DISCUSSION
Flatness measurement results of each observer in each sample diameter are presented in the Table 1. Initial letters of the observers are given by R, T, and N. The manual and image processing measurements are given by initial letter M and I. From the manufacture specification, it is only known that the sample has 0,1 flatness and the grade category is not stated. The table result shows that the flatness value of both manual and images technique are still in 0.1 range. Generally, it means that the result has no big difference compared to its specification. As mentioned in the JIS B74307431: 1977, the permissible value of flatness for grade 2 and 3 are 0.1 µm and 0.2 µm respectively. From the measurement result, it is possible to have some value that out of the requirement if it is categorised in grade 2. By this comparison, it means that the result still needs an improvement for both manual and images technique to fill the requirement. However, the result is not in step to be validated yet with the interferometry measurement result to get the exact value should be. This research is still focused on the comparison of the manual and images technique result to know whether the performance of image processing technique is well enough to replace the manual technique for future improvement. The given table 1 shows that the standard deviation of image processing technique is obtained from single image and taken from 10 points measurement of the selected fringe. Compared to the manual result, the image processing technique has bigger standard deviation. It has varying value along the 10 points measurement on the selected fringe. It is caused by the simple written program that could not segment the images well. The points measurement is also still manually selected. The segmentation will affect the edge detection of the images which has to represent the original images as well. If it is not get well detection, then it can form imperfect fringe curve that cause varying value obtained along the fringe. However, the final result of all observers give the same value for each diameter samples. The summary of all observer measurement result and validation are presented in the table 2   Table 2 Summary result and validation. The expanded uncertainty for both manual and image processing technique with coverage factor k=2 are given 0.11 µm and 0.10 µm.. It is detailed further in table 3 and 4.

CONCLUSION
Based on the degree equivalence evaluation, it can be concluded that the measurement results of image processing technique have been verified to the manual technique through degree equivalence evaluation. The image processing technique has good performance and can be implemented to the flatness measurement. However, it needs to develop the analysed program to remove the manually determined selection that can cause varying value measurement for future improvement.

ACKNOWLEDGEMENT
The authors thanks to all of member length laboratory and Indonesian Institute of Sciences agency for financial support to this research and providing facilities that make this work possible at those time.