An Improved Bovine Iris Segmentation Method

In order to improve the performance of bovine iris image segmentation, an improved iris image segmentation algorithm is proposed according to the characteristics of bovine iris image. Firstly, based on mathematical morphology and noise suppression template, the inner and outer edges of bovine iris are detected by dynamic contour tracking and least squares fitting ellipse respectively. Then, the annular iris region is normalized. Finally, the normalized iris image is enhanced with adaptive image enhancement method. The experimental results show that the algorithm can effectively segment iris region, it has good performance of speed and accuracy for iris segmentation, and can eliminate the effects of uneven illumination, iris shrinkage and rotation, it promotes iris feature extraction and matching, which has certain reference significance for iris recognition research and meat food safety management of large livestock.


Introduction
In order to ensure health of livestock and their quality and safety of meat products, developed countries and regions such as Europe and the United States must trace meat products that are exported to local area, such as beef and mutton [1][2][3][4][5][6]. Meat foods traceability of large livestock as an important means of quality and safety management has been attached great importance by government departments. Realizing the whole process of all aspects of meat food supervision, improving accuracy of traceability, accurate identification of large livestock individuals is the key step of meat food quality and safety monitoring.
Traditional individual identification methods of large livestock are easy to loss or forgery, and will cause harm to livestock. There are great hidden dangers in safety and reliability [4][5][6][7]. Biometrics technology is safer and more convenient than the traditional identity authentication methods. Among them, iris has characteristics of uniqueness, stability, non-invasiveness, natural anticounterfeiting, etc. Iris recognition technology has become the safest and most accurate method among many biometric identification technologies. It has potential application value for meat food safety control and has incomparable advantages compared with traditional methods. In traceability of beef food safety, using RFID tags to correspond with individual livestock to be identified by a certain technical way, can quickly and effectively query meat food information, trace the individual sources of beef cattle, which is helpful to ensure quality of meat products, improves government's regulatory capacity and international competitiveness of meat products [4].
About individual identification of animals, foreign countries are earlier than our country. Individual identification system of animals are successively developed by the developed countries such as Britain, Japan and the United States [2][3][4]. In 2001, Massahiko Suzaki and others established a horse racing identity authentication system based on iris recognition to achieve horse racing management [8], A. Allen and M. Taylor used biometric recognition of cattle retina images to identify individual identity [9], D.W. Sheng [10], C. Li [11] and other researchers have studied iris location of bovine eye respectively. There are some differences in iris structure between large livestock and human iris, as is shown in Fig. 1. During the process of iris detection, the algorithm for human eye iris recognition cannot be copied. Using method of concentric circle fitting inner and outer edges of bovine iris and approximating pupil to ellipse to divide the bovine iris usually can not get ideal iris edge, and some iris information will be lost, which directly affects the subsequent recognition effect. Aiming at structural characteristics of bovine eye image, the optimal method is used to detect inner and outer edges of bovine iris by combining of dynamic contour tracking and least squares fitting. In order to reduce influence of illumination and pupil contraction, the segmented annular iris region is normalized, and adaptive local histogram equalization method is used to enhance contrast of the normalized image, which is convenient for subsequent iris feature extraction and matching.

Bovine iris edge detection
Bovine iris edge detection takes more than half of the whole recognition process. The inner and outer edge detection is to segment annular iris region from eye image. The effect of iris edge detection directly affects the subsequent work. The human eye iris detection algorithm mainly regards pupil and iris as circles, and uses geometrical characteristics of circle to detect them. Most of them adopt Wildes' two-step method of Hough transform [12] and Daugman's calculus operator circular edge detection method [13] and their improved algorithm [14]. However, pupil of bovine has an elliptical structure, so it is necessary to optimize the detection algorithm to detect inner edge of bovine eye iris more accurately. Therefore, it is a difficult problem to find an improved detection algorithm with both accuracy and speed.

The inner edge detection
The gray value of pupil is the highest in bovine eyes, followed by the sclera and the lowest in iris, and the left and right sides of pupil have higher gray values than the center. According to gray distribution of bovine eye image, mathematical morphology knowledge is used to remove part of interference after image binarization, and clear pupil curve is obtained. The pupil center is roughly detected to segment pupil image, so that pupil boundary can be detected by dynamic contour tracking, and reducing detection time.
The scaling of pupil tends to cause changes in iris area. The pupil boundary is an irregular curve. Taking pupil as a circle or ellipse is not exactly true boundary of pupil. Therefore, it is necessary to accurately detect true boundary of pupil to overcome the distortion effect of standard circle or elliptical pupil on normalized iris image. In order to detect inner edge of iris image accurately, dynamic contour tracking method is used to detect pupil boundary in pupil image.
Kass, Witkin and Terzopoulos proposed a Snake model which is widely used in edge detection, moving object tracking and other fields [15]. However, Snake model is easily affected by texture characteristics of iris image and fall into local minima. Subsequently, Kichenassamy and Caselles broadened the application field of snakes model [16]. Level set method was applied to active contour description and model solving to make curve change topologically during evolution. Li proposed a non-reinitialized variational level set method [16].The penalty term was introduced into energy function to ensure that level set function remained as a symbolic distance function throughout evolution process, and improves the shortcomings of traditional variational level set method which needed to be reinitialized continuously. According to characteristics of bovine iris image , dynamic contour tracking method based on the nonreinitialized variation level set was used to detect inner edge of bovine iris.
The image energy function can be expressed by the following formula (1) [5,17] is penalty term, ensuring that level set function is the symbol distance function, μ is penalty weight, λ and v is a constant, λ>0, δ(▪) is a Dirac function, g is a stop function, and H(▪)is a Heaviside function.
When internal energy μ·P(φ) is accompanied with evolution of symbol distance function φ, external energy Eg(φ) points to zero level set.
The upper gradient flow is evolution equation of level set function. The second and third terms on the right side of formula (4) reflect the zero-level curve approaching the stepwise target edge. In the first internal energy μ·P(φ), gradient flow is During algorithm implementation, parameters of time step τ, spatial step dx and dy, and the parameters μ, λ, v, ε, σ in energy function need to be reasonably selected [16]. The time step τ is often much larger than traditional level set method. In general, 1 < τ ≤ 100. The magnitude of τ directly affects speed of iteration and convergence, but if τ is too large, it will lead to error in edge detection, so it is necessary to select appropriate τ to compromise iteration speed and calculation accuracy, often taking τ ≤ 10. When the relationship between time step τ and penalty term weight coefficient μ satisfies τ.μ ≤ 1/4, it tends to converge easily.

Bovine iris outer edge detection
In outer edge detection, the size of noise suppression template is designed according to pupil sub-image. The noise point interference is minimized through knowledge of template and digital morphology, and the relatively clean outer edge points and curves are obtained, thereby utilizing the least squares method to fit ellipse as outer edge of bovine iris.
The ellipse in the Cartesian coordinate system can be uniquely determined by five independent geometric parameters, center of ellipse (xo, yo), long half-axis a, short half-axis b, and inclination angle θ. The elliptic equation can be expressed as follows [18]: Among, the conversion relationship between algebraic parameters and geometric parameters as is shown in equation (8): The least squares method seeks to find a set of parameters to minimize the sum of distances between sampling points and curves determined by set of parameters. The principle is used to determine parameters (xo, yo)、a、b and θ.
The process of fitting an ellipse by least squares can be described as follows [18]: 1)Using outer edge of formula (7), assuming that there are M points on outer edge of iris edge,which are(x1, y1)、 (x2, y2)、…、(xM, yM), and (xM, yM)is the coordinates of exterior points of the Cartesian coordinate system.
2) The objective function of formula (9) is established by formula (7) using the principle of least squares ) , , , , ( 3) According to the extreme value theorem, when f takes the minimum, there must be a formula (10).
6) By using formula (8), we get parameters of ellipse(xo, yo), a, b and θ respectively, and get a fitted elliptic curve.

Iris segmentation and normalization
After inner and outer edges of bovine iris are detected, annular iris region needs to be segmented from bovine eye image. The effects of illumination intensity, acquisition distance and acquisition angle on iris image acquisition will cause iris area to be inconsistent in scale, position and orientation. Iris normalization is needed to eliminate these influence of iris contraction, translation and rotation on iris recognition.
The iris image normalization is to adjust iris image of different sizes to a fixed rectangular area by a certain mapping relationship for subsequent processing. Normalization refers to the algorithm of reference [12], the approximate annular iris image obtained by segmentation is expanded into a rectangle of size 50×256, which is convenient for subsequent iris feature extraction and matching. The normalized iris image usually has low contrast and texture is not obvious enough, which is not helpful to extract iris texture features. In order to reduce influence of uneven illumination on recognition performance and improve image contrast, adaptive local histogram equalization enhancement processing method was applied to the normalized iris image [19]. The method firstly performs normal histogram equalization on image, and then maps gray scale of image formed by normal histogram equalization in a large gray scale to ensure that the transformed image has a larger gray dynamic range. Finally, results are corrected to ensure the overall contrast of transformed image is higher, iris image texture is more clear.

Experimental results and discussion
In order to verify the effectiveness of algorithm, The bovine iris image used in the experiment was derived from the Institute of Systems Engineering of Southeast University. 30 piece of bovine iris images were selected and tested. The size of bovine iris image was 320×240. In the paper, the inner and outer edge detection methods of bovine iris image was compared with commonly used Hough transform-based ellipse fitting method and the least squares fitting ellipse method to ensure the comparability of algorithm.In this experiment, main frequency of PC is 3.2 G and memory is 4G, the experiment is completed under Mablab 2012a program environment. The performance of algorithm is measured with two indicators, detection time and accuracy. The test results are shown in Figure 3 to Figure 5 and Table 1.   The two detection methods using Hough transform and least squares fitting ellipse, inner and outer edges of bovine iris are regarded as two non-concentric ellipse with different long and short axes. Relatively speaking, the binary pupil edge is clearer, noise is less affected, iris inner edge is detected more accurately, and detection time is less than outer edge. However, ellipse fitting method using Hough transform, noise points around inner and outer edges after binarization have a great influence on Hough transform, fitting time increases with the number of edge points, and fitting effect of outer edges is relatively poor. Compared with (a), (b) and (c) in Figure. 3 and 4, it can be seen that inner edge detected by dynamic contour tracking method is more accurate. The simulation results show that the proposed algorithm has better fitting accuracy and faster speed. Especially, inner edge fitting effect is better than the two comparison methods, which has better robustness and less interference from impurities. Due to number of test samples is not enough, overall detection accuracy is not very high. The comparison of average fitting accuracy and running time of inner and outer edges of three methods is shown in Table 1.   Figure 5 is a normalized image of segment iris, and it was enhanced by an adaptively enhancing algorithm. It can be seen from enhanced image that bovine iris image contrast is improved, and texture is obvious, which is helpful for texture feature extraction and encoding.

Conclusion
The detection of inner and outer edges of bovine iris is a key step in iris recognition. According to characteristics of iris image of bovine eye, inner and outer edges of bovine iris are detected based on dynamic contour tracking and least squares fitting ellipse optimization method, and detection speed is fast and accurate. The simulation results show that compared with other two detection methods, especially inner edge detection, dynamic contour tracking method is superior to the comparison methods in terms of fitting effect and detection speed. By normalizing and enhancing the segmented annular iris image, image contrast is improved and iris texture is clear, which is beneficial to the subsequent processing of iris recognition and has high reference value. However, due to the influence of spots and eyelashes in some bovine eye images, it failed to detect of inner and outer edges of iris, and the detection accuracy needs to be further improved.