An Analysis of Uncertainty and Robustness of Waterjet Machine Positioning Vision System

The paper presents a new Automatic Waterjet Positioning Vision System (AWPVS) and investigates components of workpiece positioning accuracy. The main purpose of AWPVS is to precisely identify the position and rotation of a workpiece placed on a waterjet machine table. Two webcams form a basis for the system, and constitute its characteristics. The proposed algorithm comprises various image processing techniques to assure a required identification precision. To validate the PVS identification quality, synthetic images were applied under various conditions. The analysis ascertains dependence of an object detection rate and accuracy on a size of cropping frame. Experimental results of the proposed PVS prototype prove that a combination of the vision algorithm and webcams is an alternative to dedicated expensive industrial vision systems. The two main components of AWPVS uncertainty, a machine component and PSV component are discerned and estimated.


I. INTRODUCTION
Nowadays, most cutting techniques require an operator who manually determines the starting point of the cutting process.The procedure is time consuming and imprecise, and causes unnecessary material loss [1].A solution to this problem is automation by applying a vision system which shortens the positioning time and improves the cutting process accuracy.An application of vision system in Waterjet (WJ) technology has not yet been investigated extensively.
This paper is related to a previous work [1], where a new Automatic Waterjet Positioning Vision System (AWPVS) was presented.Here the uncertainty of the Positioning Vision System (PVS) is examined and factors of the uncertainty are analyzed.The focus of the paper is on workpiece corner detection and its accuracy analysis under various experimental conditions.The article demonstrates how cropping frame size affects the accuracy of corner localization and the manner of adjusting it to improve the PVS performance.
The presented results show a relationship between two components of AWPVS accuracy, mainly waterjet machine Manuscript received February 8, 2013; accepted May 18, 2013 precision and the accuracy of PVS.

II. SURVEY OF RELATED WORKS
Attempts to utilize vision systems in WJ technology refer mainly to control of a cutting process [2].Using a set of line scan cameras, a vision system is used to monitor the cutting process of planar objects placed randomly on a cutting table.
To assure an appropriate lightening level, this system is equipped with an extra illumination unit; additional halogens were installed on the ceiling.Such mounting causes machine shadows on the workspace, which introduces an additional uncertainty in some areas.Uncertainties in edge detection caused by material height variations are corrected by a laser measuring device mounted on the machine.The calibration procedure uses a reference bar manufactured with high accuracy.
Another attempt to automate a WJ cutting process by means of a vision system requires equipping the main camera with servo-controlled lens located perpendicularly to the WJ workspace [3].A system combining an inspection camera, central processing unit and a vision algorithm is used for quality inspection and optimization.
In case of AWPVS, the accuracy of workpiece corner detection constitutes a crucial issue.An image gradient analysis forms a basis for novel corner detection methods, such as MIC, SUSAN, Harris [4], [5].However, the methods do not extract directly a corner position with subpixel accuracy.In order to obtain sub-pixel precision, the method based on Hough transform is proposed [6].
Cropping is a technique used to reduce an amount of irrelevant information in image processing, thereby to decrease computational complexity.This approach is widely used as an image enhancement tool as well as it may be adopted in optimization problems.Using a combination of artificial intelligence techniques with auto cropping methods, it is possible to simultaneously solve an optimization problem by maximizing an objective function and extract characteristic features [7].

III. PROBLEM STATEMENT AND MAIN CONTRIBUTION
From the review of related works one can observe that the WJ cutting process, which is a modern technique of separation and cutting of many types of materials, has not yet been fully automated.Among other issues, there is a An Analysis of Uncertainty and Robustness of Waterjet Machine Positioning Vision System D. M. Dziak 1 , B. S. Jachimczyk 1 , W. J. Kulesza 2 need to automate the identification of a workpiece position in a workspace.Furthermore, a camera calibration and the ability to accurately specify the initial coordinates of the machine is a critical problem for any Computer Numerically Controlled (CNC) cutting technology [8].On the basis of study of the vision algorithm, a problem related to system accuracy and its verification has arisen.The applied verification process relied on distance measurement between the estimated corner position of an element and the real one.It validated the whole AWPVS process.To determine the algorithm performance, further experiments are required.
Considering a verification problem of corner identification accuracy, the two main inquiries can be stated.The first one concerns the optimal cropping frame.The second issue refers to the relationship among the main uncertainty components of AWPVS.
Considering the first inquiry it was also hypothesized that the optimized size of a cropping frame leads to better PVS accuracy, however, it depends on image quality.Regarding the second query, it was assumed that it is possible to distinguish two main additive uncertainty components of AWPVS: a machine component and a vision system component.A machine uncertainty component can be computed from an estimated accuracy of the whole AWPVS and from a vision system accuracy component, which can be found from simulations.
The main contribution of this paper is the AWPVS accuracy analysis, verification and the procedure implementation in Matlab.To determine the relationship between the AWPVS components, estimation of the workpiece corner position was performed, using sets of synthetic images.Additionally, the influence of cropping frame size was tested for different noise levels.

IV. POSITIONING VISION SYSTEM
The main purpose of the PVS design was to identify with the required accuracy, the position and rotation of a white workpiece placed on the machine table [1].The required identification accuracy of position was defined by the user as 0.5 mm.The required accuracy of rotation was defined in accordance with the workpiece size, and for instance, for a workpiece of 1 m the required angular deflection uncertainty should not exceed 1˚ [1].To follow another design constraint, which was a system price, the system had to be made up of webcams.
A. Structure of the PVS algorithm [1] According to the requirements, two webcams form a basis for the PVS where the first global camera (GC) is used to roughly detect a workpiece; the second local camera (LC) finds a workpiece corner with required precision.
The proposed PVS algorithm, consists of various image processing techniques (Fig. 1).The object recognition process extracting the edges and corners of the workpiece, applies a background removal technique, an edge detection algorithm and the Hough transform.Auxiliary algorithms and functions, such as the metric rectification method, are used to obtain a top view of the workspace from laterally installed cameras, and to merge an image with waterjet machine coordinate systems.To complete the automation process, the in situ calibration procedures for both webcams are applied.

B. Implementation [1]
The PVS algorithm was implemented in MATLAB ver.R2012a and interacts with the machine control unit Simens Smnumeric 840d SL.The main program recalls all the vision application functions.The precise coordinates of the initial workpiece corner and angular deflection are the algorithm outputs.
The vision system consists of two web cameras equipped with high definition 5 megapixel sensors with 24-bits true color depth.The sensor has a resolution of 2592 px×1944 px.
The used calibration markers are cut out of a stainless steel plate and painted in a color contrasting with the background.The markers have a rectangular shape and are fixed to ribs of the machine table.The corners of the markers, which are closest to the workspace center, indicate workspace corners.

V. UNCERTAINTY OF CORNER DETECTION USING POSITIONING VISION SYSTEM
To examine the PVS accuracy, a set of synthetic images resembling the real operation conditions of the WJ was generated.The synthetic images show a part of workpiece with one visible corner.The image resolution of 2592 px×1944 px matches the resolution of images captured by the LC.Fig. 2 presents two images, a real image obtained by the LC, and a synthetic image.
To analyze robustness of the PVS corner detection algorithm the test images were contaminated with two different types of noise: a white Gaussian noise with mean value equal to 0 and varying standard deviation levels; and salt and pepper noise of various noise density.
To investigate an influence of image size on the detection uncertainty, the simulations for the whole image and for different sizes of cropping frame were run.
For each test, the PVS algorithm was run 100 times in order to identify the corner coordinates.The precision of the corner detection was measured as a distance between the defined corner coordinates of the synthetic image and the corner coordinates estimated by the PVS algorithm.If the distance was greater than required accuracy, the PVS algorithm result was classified as unsuccessful.Cropping frame optimization.Cropping, a widely used image processing technique, enhances an image subject matter by removing outer areas from an image.As the size of an image affects the length of detected edges, the influence of the size of cropping frame on the PVS performance has to be investigated.The cropping frame is defined as a square with a specified length of side and intersection of diagonals indicating the identified workpiece corner.
To investigate how the cropping frame size affects the corner detection accuracy for different image qualities, simulations were performed for:  Four different frame sizes: the whole image, 1500 px, 1000 px and 500 px;  Two different types of noise: Gaussian and salt and pepper noise;  Four different levels of noise.Results within the required accuracy range for 100 simulations are presented in Fig. 3 and Fig. 4.Each bar group shows a mean value of uncertainty of corner identification for a given noise level.Each bar in the group corresponds to a different frame size.The uncertainty standard deviation for each case is depicted as a thin dashed line.Above each bar, the correct detection rate is presented, which is calculated using the following equation [4] 100%, where DR is a detection rate, CD refers to a number of correctly detected corners and CN refers to a number of failures.
Tests showed that differences in precision for distortion level below 0.02 are negligible; therefore results for not disturbed images are omitted.
The results prove that to optimize the performance of PVS, it is recommended to adjust a cropping frame size and the best results are achieved for 1000 px and 1500 px, depending on the noise level.Figure 5 shows the results for the two optimal cropping frame sizes.For low and medium noise levels the use of frame size 1000 px brings better results.The average uncertainty is about 0.03 mm, and standard deviation up to 0.015 mm.In these cases, the corner detection rate is higher than 96 %.However, for a relatively higher noise level, the recommended size of a cropping frame is 1500 px with the efficiency of more than 90 %, although the corner precision accuracy is the worst, it still fulfills the system requirements.The simulation results show the robustness of the algorithm on Gaussian noise of standard deviation level up to 0.2 and also on salt and pepper noise of density up to 0.2.However, the algorithm is more robust for the salt and paper noise, because it was designed to filter out the kind of noise which remains after the primary filtering and background subtraction.
As for the smallest examined cropping frame of 500 px in all cases, the detection accuracy and corner localization rate are considerably worse than for bigger cropping frames.For the bigger cropping frame, a greater noise influence is compensated by longer edges used for corner detection [1].

VI. VERIFICATION OF PVS ACCURACY ANALYSIS
In order to verify the accuracy of PVS one can find the relationship between the accuracy components of the AWPVS.The verification process was performed in two stages.Firstly, the PVS algorithm was tested using a set of synthetic images shown in Fig. 2(b).As the result of the test, the PVS accuracy has been estimated.The second stage required experimental discovery of the corner detection precision of the AWPVS and its comparison with the machine uncertainty.The corner detection accuracy of the whole AWPVS, ∆AWPVS can be defined using where ∆PVS represents the PVS accuracy, ∆M depicts the machine accuracy component.
From the waterjet machine specification it is known that the machine uncertainty during common operation mode is below 0.1 mm.
The experimentally proved accuracy of the AWPVS for cropping frame 500 px was also below 0.1 mm [1].The used cropping frame of 500 px was chosen due to its best computational complexity within acceptable accuracy range.The result was proved using two independent methods.
The PVS accuracy estimated using a synthetic image for the cropping frame of 500 px is represented by white bars in Fig. 3 and Fig. 4. It demonstrates that for the cropping frame, the accuracy of corner localization using the PVS is about 0.065 mm with a standard deviation 0.01 mm.
Applying experimental data to (2), one can notice that the real accuracy of AWPVS is higher than an algebraic sum of its components.Thus it can be concluded that the assumed worst case accuracy of the machine was too pessimistic and its real value is about 0.035 mm.It matches operators' opinions about the Waterjet machine precision.
From the results for optimized cropping frame sizes and the estimated precision of Waterjet machine, one can see that a possible precision of whole AWPVS can be at the level of 0.063 mm with standard deviation 0.015 mm.

VII. CONCLUSIONS
The aim of this paper was to present the positioning vision system, intended for accurate positioning of waterjet machine, based on two webcams.Furthermore, the paper aimed to show a relationship between main uncertainty components of corner detection and investigate whether a size of cropping frame influences the accuracy of workpiece corner localization.
The experimental results summarized in Table I show that the PVS algorithm provides good results of corner detection estimation for different types of noise, without compromising detection efficiency.
Test results prove that due to its structure, the detection algorithm is characterized by a high resistance especially to high level of salt and pepper noise.
The results of the PVS accuracy verification confirmed that a determined machine accuracy component is 0.035 mm which confirms the waterjet machine operators' experiences.The influence of square cropping frame size on the PVS performance was examined using synthetic images.From results, it can be stated that selecting the optimal cropping square size increases the PVS accuracy of corner localization.
For image distorted by Gaussian noise, the optimized accuracy is 0.3 mm with 100 % detection efficiency.In case of salt and pepper distortion, the estimated accuracy of corner localization was about 0.04 mm with the same 100 % detection rate.
For a low and medium noise level it is better to use cropping frame size 1000 px.In case of images distorted with high level noise, the cropping frame of 1500 px is preferable.
Further development of the presented PVS may concern a survey of uncertainty and robustness of angular deflection estimation of an element.PVS can be adapted to industrial environment by being equipped with cameras with protective covers.The PVS algorithm can be developed to detect elements other than white or made of transparent materials.Moreover, the system may be developed for cutting optimization or workpiece material identification purposes.

Fig. 2 .
Fig. 2. Images used for verification; a) image captured by the LC; b) synthetic picture.

Fig. 3 .
Fig. 3. Precision of corner localization and detection rate for synthetic image distorted with Gaussian noise.

Fig. 4 .
Fig. 4. Precision of corner localization and detection rate for synthetic image distorted with salt and pepper noise.

Fig. 5 .
Fig. 5. Optimial cropping frames for both Gaussian and salt and pepper noises.

TABLE I .
AVERAGE PVS ACCURACY FOR THREE DIFFERENT LEVELS OF NOISE.