Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Research on Circular Target Center Detection Algorithm Based on Morphological Algorithm and Subpixel Method Yu Lei1, Ma HuiZhu1, and Yang Weizhou1 College of Information and Communication Engineering, Harbin Engineering University, Harbin 150001, China 1 Abstract - To satisfy the measuring precision requirement of circular target center in the system of high precision measuring and aiming tracing, a new algorithm, which is used in mobile laser aiming system to detect the edge of the circular target and orientate the center, was put forward. First of all, the mathematics morphological algorithm of variable structure which combines radial basis function (RBF) neural network was used to orientate the edge position and eliminate the noise, then employ the Zernike moments algorithm to get the subpixel location of the object contour. At last the least squares fitting method was employed to orientate the circular target center. The results showed that this algorithm not only could orientate the figure of the circular target, but also has good anti-noise performance and high precision as well as excellent stability. recognition processing instead of pure matrix calculation), and it can detect the edges rapidly and can effectively suppress image noise at the same time, but when selecting the inappropriate structure element, the testing is less effective. The paper presents the method which combines the mathematical morphology and the neural network is not only change the traditional single structural element into multistructuring elements but also use the neural network trains the element of the structure to complete the edge detection. Then, the paper employs the Zernike moments to locate the circle contour to subpixel level. At last, the least square fitting method is used to locate the target circle center. 2 Circular target edge detection and center location algorithm Keywords: mobile laser-aiming system; mathematical morphology; RBF neural network; subpixel location 2.1 1 Mathematical morphology is a mathematical tool which is a shape-based image treatment. Morphological changes can be divided into two kinds of transformation, the binary and the gray-scale. Basic morphological transformations include erosion, dilation, opening operation and closing operation. The traditional morphological approach is to use fixedstructure elements to process the image with opening and closing an image operation, and then remove the noise. However, the shortcoming of this approach is lack of adaptability; different image processing effects are quite diverse. The morphological processing method, which based on RBF, is using the morphological neural network to train on the structural elements to achieve the variable structuring element. Realization processes are as follows: 1. Initializing structural elements, such as using 3 * 3 flat square structuring element; 2. Select some sample points in the image (256 pixel value of the main diagonal) as input of neural network and calculate the corresponding neural network output; 3. Compare the output with the target output, and we can use the method of sum of squares and subtractions as the objective function, the aim of neural network training is to make the objective function close to 0; Introduction The edge of the image can express the basic shape of the image, including the main features information of the image. The main task of edge detection is to identify and extract the edge information for the preparation of image analysis, target recognition and image coding. In general, to the detected edges there are following requirements: (1) the accuracy of edge location must be high, the edge shift does not occur; (2) the edge of different scales should be have good response, and to minimize missed inspections; (3) should be insensitive to the noise, will not cause a false detection due to the noise; (4) the detection sensitivity should be little impact on the edge direction[1-4]. Image processing at the receiving antenna, the edge detection directly affects the follow-up edges and center location accuracy, according to the relevant information, the traditional gradient detection operator[5] uses the differential expression between the image pixel to extract the image edge, although it is effective in extracting the edge, but it is sensitive to the image noise and the calculation is slow. Currently, the mathematical morphology[6] edge detection which based on Characteristics of the image geometry has been widely used because of it has little calculation (mode of Edge detection algorithm which combines mathematical morphology and RBF neural network 4. Use some principles (generally, neural network uses the gradient descent) according to the error function to modifies the structural elements; 5. If it reaches maximum number of iterations or the error is less than pre-set value, end the training and output the current structure element as the optimal morphological processing element of the image; otherwise go to Step 2, continue to train the network. RBF network is divided into three layers, the first layer is input layer, the middle of it is a hidden layer, and finally a layer to output layer, In the network, the mapping from input to output is m f ( x) wi ( x, ci ) (1) i 1 In this formula, x ( x1 , x2 , , xn ) R is the input T vector, W ( w1 , w2 , , wm ) R T m n is the output weight matrix, f (x) is the output vector, is the radial basis function, ci is the radial basis function for the number i-th clustering centers. The radial basis function uses Common Gaussian function, that is, x ci ( x, ci ) exp 2 2 (2) The issue of RBF network designation is to determine the number of hidden layer nodes and the corresponding position and width of the central nodes. When the number of hidden layer nodes and the position and width of the central nodes in the RBF network is confirmed, RBF network will form a linear equation which from input to output , and then the output weighting vector can be get by using least squares method . As the noise which is varied can be superimposed on the image, so the single structure element for the morphological filter have poor adaptability, good filtering effect can not be played on all kinds of noise, so it is necessary to use different structure elements to different types of noise adaptively. In this paper, we use the structural elements which are trained by RBF neural network to filter the image which is contaminated by the noise, and hope for the best filter effect. The original image with noise is set to F, and target expected is set to images D, and the structure element is set to B. We take the sub-matrix Fij (i 1, 2,, m; j 1, 2,, n) which has the same size with the structure element B from F as input sample, take the target image D corresponds to the center elements of sub-matrix d as the network desired output with structural elements as a template, then the network training samples are (Fij, d). Among them, fij fi 1, j Fij fi r 1, j fi , j s 1 fi 1, j 1 fi 1, j s 1 , fi r 1, j 1 fi r 1, j s 1 fi , j 1 (i 1, 2, , m; j 1, 2, , n) (3) In short, the process of morphological filtering algorithm based on RBF neural network is as follows: (1) Initialize the structure elements B = [0,0, ... ..., 0], and error limit is given; (2) Input P samples in turn to calculate yk { f k1 b1 , f k 2 b2 , , f kM bM } ; (3) Calculate error E 1 P ( yk d k ) 2 2 P k 1 otherwise, continue; (4) Adjust the structure bi (t 1) bi (t ) bi bi (t ) i ; , if E< ; element (5) Return (2), repeat until to all the training samples mode, the network output can meet the requirements. 2.2 Zernike Moments The results of edge detection are smoothened by the morphology method. The noises in the images could be removed. However, the accuracy of edge could not approach to the subpixel extent. Here, we just employ the existing Zernike moments operator. The reason of using Zernike moments is the special property of circular polynomials of Zernike moments. Only three masks are used to calculate four parameters of every edge point, as shown in Fig. 1. k is the step height, h is the background gray level, l is the perpendicular distance from the center of the circular kernel and the edge makes an angle off with respect to the x -axis. 2.2.1 Fig.1 subpixel step edge model Theory about Zernike moments Zernike moments for an image f ( x, y ) is defined as [5], ANzMz Nz 1 x 2 y 2 1 f ( x, y )VNzMz ( , )dxdy (4) where Nz 1 / is a normalization factor and it is ignored in future discussion. In discrete form, ANzMz can be expressed as So ANzMz f ( x, y )VNzMz ( , ), x 2 y 2 1 x tan 1 ( y (5) It can be seen from (5) that in a discrete image, the neighborhood of that point should be mapped onto the interior Solving (10) and (11), the edge parameter where RNzMz ( ) l RNzMz ( ) (1) ( Nz s)! Nz Mz Nz Mz ( ( s! s )! s )! 2 2 (15) That means, the three Zernike moments A00 , A11 , A20 [6] could locate the edge to subpixel accuracy. Nz 2 s (7) If an image is rotated by an angle , the Zernike moments 2.3 2.2.2 jv (8) The least square fitting center algorithm In general, the circular equation can be expressed as of the original image Anm and the Zernike moments of the rotated image has the following relationship: ANzMz ( )e ANzMz ( x x0 ) 2 ( y y0 ) 2 r 2 n For calculating edge parameters l and , three masks A00 , A11 , A20 , should be deduced. According to (6), the orthogonal complex polynomials can be written as: 2 2 V00 1 , V11 x jy , V20 2 x 2 y 1 . In this work we the unit circle is divided into 7×7 homogeneous grids, masks are calculated when making integral for V00 , V11 , V20 on the dashed area of every grid. Herein, assuming f ( x, y ) to be constant over every pixel, convolving these masks with the image points can get Zernike moments[5]. According to (8), the relationship between Zernike moments of original image A00 , A11 , A20 and rotated image A11e j , A20 A20 . , A11 , A20 can be given as A00 A00 , A11 A00 Furthermore, the following equations can be deduc-ed based on theory of Zernike moments, k k sin 1 l kl 1 l 2 2 A11 2k (10) 1 l 2 3 3 (11) When the edge is rotated an angle , it will be aligned parallel to y-axis so that x 2 y 2 1 C ( ( x x0 )2 ( y y0 )2 r )2 i 1 (17) Where: ( xi yi ) is the coordinate of feature points for the arc; n is the number of the feature points which involved in the fitting calculation. Least square fitting is used to achieve the minimum objective function to solve some unknown parameter value within the certain region. When the circle radius involve in fitting as a constraint, according to the Lagrange multiplier method, the least squares objective function can be written as n C ( ( x x0 ) 2 ( y y0 ) 2 r ) 2 (r r ) (18) i 1 It will be turning constrained least squares method into the unconstrained least square method. Using the Gauss Newton or Levenberg-Marquardt method can solve the relevant parameters. 3 Experimental results 2 3 3 A11 (9) 1 l 2kl (16) For nonlinear least-squares circle fitting, the optimization objective function is[9] Zernike moments operator edge detection h A00 (14) xs x cos y y l sin s (6) s A20 A11 The subpixel location of image edge is jMz is a radial polynomial defined as (13) l can be given as: of the unit circle for evaluating Zernike moments ANzMz of an image point. The complex polynomials VNzMz ( , ) can be expressed in polar coordinates as VNzMz ( , ) RNzMz ( )e Im[ A11 ] ) Re[ A11 ] f '( x, y ) ydxdy 0 (12) Experiment 1. Based on RBF neural network morphological filtering method, in order to maximize the elimination of noise, we should make a edge detection on the 256 × 256 lena image with Salt and pepper noise density 0.2. The threshold variance is 1.2. The error curve of RBF is shown as FIG 2. The simulation result shows that the algorithm converge to the predictive error when iteration times go to 487. 160 140 120 均方误差 100 80 60 40 20 0 0 50 100 150 200 250 300 350 400 450 500 迭代次数 Fig.2 Error curve Experiment 2 Fig.3 and Fig.4 show the images processed morphological edge detection methods based on fixedstructure element and RBF neural network respectively. Image noise was significantly inhibited by neural network morphological filter which based on RBF neural network, and the goals are clearer, only some partial edge burr. (a) lena image (b) noisy lena image (c) fixed-structure element morphological method Fig.3 Edge detection of noisy image with fixed-structure element morphological method Experiment 4 Table1 describes circle center coordinates, which is located after edge detection by Morphological method based on RBF, subpixel location by Zernike moments and fitting by least square method, continuesly。Based on 10 photos taken, this algorithm reduced the average error and increases the measurement accuracy. Table 1: The comparison of circular target center coordinate orientated by fixed structural element mathmatics morphology and the arithmetic proposed in this paper True value (x,y) Detected value (x,y) 95 (b) noisy lena image (c) Morphological method on RBF Fig 4 Edge detection of noisy image with morphological method based on RBF Experiment 3 Figure 5 is the circle target image which collected by CCD in the experiment and detected the edge of the image by the proposed method. 95.3607 106.6744 95 109 95.1533 109.1312 95.5 103.5 95.3637 103.5568 95.5 99.5 95.3456 99.5903 94.5 90.5 94.5624 90.5265 94 106 93.6302 105.6657 94.5 107.5 94.4348 107.6682 95.5 110.5 95.4272 110.5469 95.5 107.5 95.5017 107.6032 94.5 100.5 94.3976 100.5594 Average error 0.1479 0.1342 4 (a) lena image 107 Conclusion For the circular target centre and edge detection algorithm for a mobile laser aiming system, this paper proposes an algorithm which is the combination of RBF neural network and variable structure element of mathematical morphology, Zernike moments and least squares fitting algorithm, then get the target center sub-pixel location. Experimental results show that method is very effective to the edge detection, the center positioning accuracy is high. The method improves the mobile measurement accuracy of laser targeting system effectively, and expands the mobile application field of laser aiming system. It can effectively meet the needs of the mobile laser tracking system in the areas of precision edge measurement. 5 References [1] Serra J. Introduction to mathematical morphology[M]. New York: Academic Press, 1982. [2] Plaza A. Dimensionality reduction and classification of (a) experiment taken to the circular target (b) obtained using the proposed circular target edge image Fig 5 the circle target image hyperspectral image data using sequences of extended morphological transformations[J]. IEEE Transactions on Geoscience and Remote Sensing, 2005, 43(3): 466-479. [3] Benediktsson J A, Palmason J A. Classification of hyperspectral data from urban areas based on extended morphological profiles[J]. IEEE Transactions on Geoscience and Remote Sensing, 2005, 43(3): 480-491. [4] Rao Haitao, Wong Guirong. The image edge-detection [5] [6] [7] [8] [9] based on mathematics morphology [J]. Journal of Suzhou University(Natural Science),, 2004, 20(2): 42-45. Chen T, Wu Q H, Rahmani-Torkaman R, et al. Apseudo top-hat mathematical morphological approach to edge detection in dark regions[J]. Pattern Recognition, 2002, 35(1): 199-210. Jiang Mingyan, Yuan Dongfeng. A multi-grade mean morphologic edge detection[A]. 2002 6th International Conference on Signal Processing,Beijing, China, 2002. F. Zernike, Physical (1934) 689. QU Ying-dong. A Fast Subpixel edge measurement method based on Sobel-Zernike moment operator. OptoElectronic Engineering, 30(5):59-61,Oct. 2003 Craig M Shakarji. Least-squares fitting algorithms of the NIST algorithm testing system[J]. Journal of Research of the National Institute of Standards and Technology, 1998, 103(6): 633-641.