Classification of rotifers with machine vision by shape moment invariants

Classification of rotifers with machine vision by shape moment invariants

Aquacultural Engineering 24 (2000) 33 – 57 www.elsevier.nl/locate/aqua-online Classification of rotifers with machine vision by shape moment invarian...

405KB Sizes 5 Downloads 145 Views

Aquacultural Engineering 24 (2000) 33 – 57 www.elsevier.nl/locate/aqua-online

Classification of rotifers with machine vision by shape moment invariants Chan-Yun Yang, Jui-Jen Chou * Department of Agricultural Machinery Engineering, National Taiwan Uni6ersity, No. 136 Chou-Shan Road, Taipei, 106 Taiwan, ROC Received 3 April 2000; accepted 25 August 2000

Abstract An automated system for the identification of rotifers under a microscope with machine vision by shape analysis has been developed, which tends to be substituted for human appraisal. A suitable image recognition algorithm was proposed and the results were discussed in detail. In this study, rotifers were classified into the exact types despite the debris, which appeared from sludge in the degraded water or from rotifer carcasses. Two stages of a discrimination model based on shape analysis were built: one was to separate debris from rotifers, and the other was to classify rotifers into three groups. A set of shape descriptors, including geometry and moment features, was extracted from the images. The set of shape descriptors had to satisfy the RST (rotation, scaling, and translation) invariance. Shape analysis was proved to be an effective approach since the classification accuracy was approx. 92%. The results from different classification approaches were also compared. The machine vision system with shape analysis and the 2-stage discrimination model had a greater effect on the reduction of manpower requirement for the classification of rotifers. © 2000 Elsevier Science B.V. All rights reserved. Keywords: Rotifer; Classification; Pattern recognition; Shape analysis

1. Introduction Rotifer is an excellent first live feed for larval fish because of its small size, slow swimming speed, habit of staying suspended in water, high reproductive rate, and * Corresponding author. Tel.: +886-2-23635375; fax: +886-2-23627620. E-mail address: [email protected] (J.J. Chou). 0144-8609/00/$ - see front matter © 2000 Elsevier Science B.V. All rights reserved. PII: S 0 1 4 4 - 8 6 0 9 ( 0 0 ) 0 0 0 6 5 - 0

34

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

possibility for mass production. Rotifer is also valuable for larval fish because of its amino acid composition and high digestibility (Watanabe et al., 1983), it can be enriched with fatty acids and antibiotics, and can be used to transfer these substances into fish larvae (Lubzens et al., 1989). Estimating the density of rotifers is a general method for assessing and monitoring the physiological condition of rotifer cultures (Hoff and Snell, 1997). This assessment depends upon the computation of the number of rotifers and carried eggs. Since rotifers are small, a sample from the culture tank needs to be examined under a microscope, so that the number of rotifers as well as carried eggs can be counted one by one. Although this is important, the counting is time-consuming and labor-intensive (Fulks and Main, 1991). Further, errors might be introduced due to worker’s fatigue and carelessness. Hence, the development of an automatic system to substitute for human counters is required. Rotifers are similar in shape, except when bearing eggs. Rotifer size has been reported in the range of 123 – 292 mm in length and 114–199 mm in width (Snell and Carrillo, 1984). The body size of rotifers is primarily genetically determined which changes with environmental factors like temperature, salinity, or food type. Rotifers have a repeatedly parthenogenetic life cycle that contains both asexual and sexual phases. The eggs produced from the sexual phase are slightly bigger in size and are more spherical than those from the asexual phase with smooth oval appearance. Sexual eggs are covered with tough shells. The shells protect the eggs from extreme environments (Hoff and Snell, 1997). The major objective of this study was to develop a system for the rotifer identification using pattern recognition under a microscope. Following the conventional operation steps, a shape analysis technique is to be employed to characterize the difference between various types of rotifers and to be substituted for human inspection. A set of features was introduced to make the identification depend only on rotifer’s shape despite its orientation, dimensions, and location. This study concentrated on three types of rotifers: rotifers without egg, rotifers with one egg, and rotifers with two eggs. Functions on the developed system included identifying, counting and then recording the number of rotifers which carried the eggs automatically.

2. Materials and methods

2.1. Sample preparation The rotifer Brachionus rotundiformis was reared in the laboratory culture tanks at Taiwan Fisheries Research Institute, Tungkang, Taiwan. Different feeding conditions were investigated in this study (Table 1). About 100–200 ml well-cultured samples were collected below the water surface of the culture tank and 1 ml of sub-sample was taken from each of these samples using a 1-ml pipette and slightly stirred simultaneously. The 1 ml sub-sample was discharged into a clear 75× 25mm2 glass slide with a blockade built around to prevent water overflow. In order

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

35

to make the microscopic observation easier, the sub-sample was added with 0.05 ml of 1% iodine solution to kill and stain the rotifers. This procedure let the rotifers sprawl under water so that we could examine their eggs clearly. In order to avoid the objects from entanglement, the dense rotifer specimen was diluted repeatedly using 1:1 clean seawater until the objects became separated. The number of rotifers in dense specimens could also be estimated by inverted trace of the dilution operations.

2.2. System description Fig. 1 illustrates the automatic processing system for classifying and counting rotifers. The system consists chiefly of two units: a pattern recognition unit and a motion control unit. A microscope with 40 magnification was necessary for the clear observation of rotifers. The microscope was equipped with a CCD camera to grab the rotifer images. Before starting the automatic system, a slide containing certain sub-sample was carefully placed on a moving X-Y table. The X-Y table of the control unit was designed for moving the slide step by step like moving on certain virtual grids, i.e. it could hold during image processing and move to next grid when the process was finished. The function of the pattern recognition unit was to capture the image of grids and send it to the computer for image processing. After the image processing, the computer sends a signal to activate the motion controller for moving the X-Y table forward for next process. This paper focuses on the pattern recognition unit which was the most important kernel when the system was designed.

2.3. Image processing In image segmentation, a region is defined as a group of spatially connected pixels. A region, when properly defined, corresponds to an object. As shown in Fig. 2, proper regions disjointed from one another were screened for the discrimination model. Each region was a candidate for extracting corresponding features for pattern recognition. An essential issue for invariants with the properties of rotation,

Table 1 Samples for testing and verification Specimen No.

Date

Feeding

Density estimation (individuals/ml)

Debris

Rotifer with carried eggs 0

SP-1 SP-2 SP-3

09/02/99 10/02/99 10/02/99

Tetraselmis chui Chaetoceros affinis Nannochloropsis oculata

203 375 379

34 43 35

96 242 213

1

2 36 75 65

37 15 66

36

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

Fig. 1. Main units of the automatic processing system.

scaling, and translation invariance (RST invariance) was introduced as well in this study. The RST invariants indicate that the features of objects are invariant in terms of rotation, scaling, and translation. The extracted features should be RST invariants, because the concerned individuals were classified by their similarity regardless of their orientation, size, or position. The pilot image processing is drawn schematically in Fig. 3. Since the specimen was brown due to the iodine, the red channel component was more significant than the other two components, both green and blue channels, in the standard RGB color model. The image in the red channel component was acquired and was quantized into a 256-gray-level image. A proper image threshold is required for transforming the gray scale image into a binary image. Exact threshold value is difficult to determine since the image darkness depends on the concentration of iodine. Constant iodine concentration is not easy to control. However, moment-preserving thresholding algorithm proposed by Tsai (1985) is a robust approach for determining the threshold value. In this study, they changed within a gray scale range of 180–200 when the red channel image was used. The binary image after thresholding is shown in Fig. 2. An illustration of rotifers with varying number of eggs is also shown in Fig. 2. Three

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

37

Fig. 2. Rotifer images obtained from a microscopic observation: (a) without debris; (b) with debris, marked by a pointer. Where: 1-rotifer without eggs; 2-rotifer with one egg; 3-rotifer with two eggs; 4-debris.

types of rotifers were obtained from the microscopic observation: rotifers without egg, rotifers with single egg, and rotifers with two eggs. In this study, rotifers were classified into the exact types in spite of debris that came from the sludge in the degraded water or from spoiled rotifer carcasses. The requirement of the quality of images was important as they related to the image processing techniques. In degraded images, rotifers usually appear with many

Fig. 3. Flow chart of pilot image processing.

38

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

Fig. 4. Region modification for filling up rotifer’s interior: (a) original region in gray scale; (b) original region in binary; (c) region with morphological closing; (d) region refilling after closing.

trivial objects. The trivial objects are regions that can be separated easily before the discrimination model is applied. In order to maintain the images in a constant quality, we used size to exclude some trivial objects, which were unquestionably not rotifers. The exclusion also reduced the calculation time and misclassification rates. This study confined the objects of interest from 2,200 to 12,500 pixels for further identification. Interested regions were extracted separately by a technique of labeling eight-connected components in the binary image. The regions were originally extracted in the gray scale (Fig. 4(a)) and in the binary (Fig. 4(b)). They have rugged borders, especially in the area close to corona as marked in Fig. 4(b). Different processes were performed to produce smooth border on the smooth region. Fig. 4 also shows the results from two processes: morphological boundary closing (Fig. 4(c)) as well as region refilling after closing (Fig. 4(d)). The images with morphological boundary closing using a 3 ×3 structuring element of 1’s were used for further analysis.

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

39

2.4. Moment in6ariants The pattern recognition technique of moment invariants was appropriate to distinguish rotifers from debris because they were quite different in their shapes. Many techniques are available for shape description. If the situation in which the rotifer under observation appear in any position or orientation, or in different sizes is considered, a shape analysis technique with RST invariance is required. Moment invariants are really suitable for such requirements. They have frequently been used in several researches for shape recognition (Gupta and Srinath, 1987; Leu, 1991; Wen and Lozzi, 1993; Shen et al., 1994; Yang and Albregtsen, 1996). Moment invariants are important due to their special properties associated with their RST invariance (Hu, 1962; Gonzalez and Woods, 1992; Wood, 1996). Hu has introduced the theory of moments of inertia to establish a set of seven shape moments with RST invariance (derivation is shown in Appendix A). f1 = h2,0 +h0,2 f2 = (h2,0 −h0,2)2 +4h 21,1 f3 = (h3,0 −3h1,2)2 +(3h2,1 −h0,3)2 f4 = (h3,0 +h1,2)2 +(h2,1 +h0,3)2 f5 = (h3,0 −3h1,2)(h3,0 +h1,2)[(h3,0 + h1,2)2 − 3(h2,1 + h0,3)2] + (3h2,1 −h0,3)(h2,1 +h0,3)[3(h3,0 + h1,2)2 − (h2,1 + h0,3)2] f6 = (h2,0 −h0,2)[(h3,0 +h1,2)2 −(h2,1 + h0,3)2]+ 4h1,1(h3,0 + h1,2)(h2,1 + h0,3) f7 = (3h2,1 −h0,3)(h3,0 +h1,2)[(h3,0 + h1,2)2 − 3(h2,1 + h0,3)2] − (h3,0 −3h1,2)(h2,1 +h0,3)[3(h3,0 + h1,2)2 − (h2,1 + h0,3)2]

(1)

Reddi (1981) showed that Hu’s moments could be expressed in terms of radial and angular moments. Subsequently, Li (1992) used radial and angular moments in a general way to derive invariant functions (Appendix B). By applying binomial theorem to the radial and angular moments, generalized shape moment functions were obtained. The conceptual importance of Li’s research eliminated the phase angle effect by multiplying the generalized functions using the complex conjugates to derive invariant functions of arbitrary order. The invariant functions might reconstruct Hu’s moments. Moreover, they might derive higher-order moments. Since the order of Hu’s moments was not enough to classify the rotifers in our study, higher-order invariants were introduced. The higher-order invariants will result in higher sensitivity. Proper invariants, the order p+ q of hp,q is less than or equal to 4 in this paper, are adopted to construct a describing space for rotifers. In addition to Hu’s moments f1 – f7, invariants f8 –f12 were added adequately for further analysis. f8 = h4,0 +h2,2 +h0,4 f9 = (h4,0 −h0,4)2 +4(h3,1 +h1,3)2

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

40

f10 =(h4,0 −6h2,2 +h0,4)2 +16(h3,1 − h1,3)2 f11 =(h4,0 −6h2,2 +h0,4)((h4,0 −h0,4)2 − 4(h3,1 + h1,3)2) + 16(h4,0 −h0,4)(h3,1 +h1,3)(h3,1 − h1,3) f12 =(h4,0 −6h2,2 +h0,4)((h4,0 −h0,4)2 − 4(h3,1 + h1,3)2) − 16(h4,0 −h0,4)(h3,1 +h1,3)(h3,1 − h1,3)

(2)

The order of p + q for f1 – f12 is listed in Table 2. Notice that the order of f1 –f12 did not follow the sequence of their indices i.

2.5. Two-stage discrimination model A two-stage model was built to identify the input patterns. First, debris was dropped out of the class for interested regions. Secondly, the outcomes (rotifers) from the first stage were classified into three groups.

2.5.1. Separation of debris from rotifers Several ways have been evaluated in our study to separate the debris from rotifers. The debris might be the spoiled carcasses of rotifers or the sludge in degraded water. In general, debris do not have any regular form: some appear to have significant visible differences from rotifers and others are similar to rotifers in shape. It makes debris separation more difficult than rotifer classification. To solve this problem, two feasible ways are introduced in this paper, one is similarity measurement approach and the other is a degree of membership approach using the foregoing shape moment invariants. 2.5.1.1. Similarity measurement approach. The shape moment invariants f1 –f12 are features for discrimination which construct a multidimensional discrimination feature space V. Using the distance of moment invariants to measure the similarity between two objects in V, we could decide which class the objects belonged. Assuming the two feature vectors as: Fi =[fi1,fi2,...,fin ]T, Fj =[fj 1,fj 2,...,fjn ]T.

Table 2 Order p+q for f1–f12 Order p+q

2

4

6

8

12

Moment invariant

f1

f2 f8

f3 f4

f6 f9 f10

f5 f7 f11 f12

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

41

Fig. 5. Debris RD separated from rotifers in terms of R0, R1, and R2. Here: V is the whole feature space. fi and fj are arbitrary features in V. R0, R1, and R2 are the class scopes of rotifers with eggs 0, 1, and 2, respectively, in V, and RD is the class scope of debris.

The similarity measure of these two vectors was defined by

Fi −Fj =



n



% fik −fjk 2

1/2

.

(3)

k=1

One hundred and eighty-five rotifer samples, including 96 without eggs, 63 with single egg, and 26 with two eggs have been investigated for the centers and radii of class scopes in V (mean points for centers and average length for radii). Test samples with their features appeared as points in the feature space. Points located within a region were classified to their corresponding classes. In practice, the rotifer class regions in V have been found to be overlapped each other. A simplified two-dimensional plot is shown in Fig. 5, where fi and fj are chosen arbitrarily from f1 – f12. As shown in Fig. 5, from the points in the overlapped portion, it was not easy to determine the class they belonged. Hence, similarity measurement is not so good to be applied to distinguish rotifers. Nevertheless, it is still appropriate to separate debris RD from rotifers in terms of R0, R1, and R2. Points outside the boundary of the union region are obviously regarded as debris RD. Points inside the union region of R0, R1, and R2 are considered as rotifers.

2.5.2. Degree of membership approach A degree of membership approach was proposed for comparison with the method of similarity measurement for debris separation. The peak-like distributions are based on the probability histograms of a moment invariant fi for different regions, R0, R1, R2, and RD, mentioned in the previous section (Fig. 6). Here, fi is chosen arbitrarily from f1 – f12. The membership for each region appeared from its corresponding probabilities with respect to a specific fi. For example, a test sample which has a value x on the fi -axis in Fig. 6 can yield the probabilities (degrees of membership) Px,R 0, Px,R 1, Px,R 2, and Px,R D corresponding to classes R0, R1, R2, and RD respectively. Since Px,R 0 is zero, the sample is not certainly classified as class R0. Using the magnitudes of these non-zero values, Px,R 1, Px,R 2, and Px,R D, we can determine the corresponding class of the sample. When Px,R 1 or Px,R 2 is greater than their specified threshold TR 1 or TR 2, the sample with value x can be determined as the member of R1 or R2 instead of RD.

42

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

Fig. 6. Schematic diagram to illustrate the degree of membership approach, where: definitions of fi, fj, R0, R1, R2, and RD are the same as in Fig. 8. An input value x is given, particular probabilities (degree of membership) Px,R 0, Px,R 1, Px,R 2, and Px,R D corresponding to classes R0, R1, R2, and RD would be obtained from the distribution curves. TR 1 and TR 2 are specified thresholds for membership determination.

2.5.3. Classification of rotifers The features extracted from rotifer patterns constituted the basis for classification. To develop an effective model with the features, an accurate classification is important. In pattern recognition field, there are several ways to construct such a model. A stochastic model using Fisher’s discrimination function had been evaluated. Since the accuracy was relatively less, they are not quite suitable for the classification of rotifers. Artificial intelligent approaches were considered more suitable than stochastic approach, because of the complicated correlation between three types of rotifers. Therefore, an artificial neural network (ANN) was chosen because of its effectiveness on sophisticated classification problems. The ANN uses a non-algorithmic black box strategy to form a model by supervised or unsupervised training. The ANN has the advantage of solving problems in higher dimensional feature space, especially, complex interactions among features. Fig. 7 shows the basic element of a neural network which is called a neuron. Let the moment invariants such as f1, f2, …, f12 be input variables. As shown in Fig. 7, the

Fig. 7. The processing element in an ANN: (a) model of neuron; (b) example of transfer function.

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

43

Fig. 8. The significant procedures for discrimination.

transformation of a linear combination of input variables with their weights and biases by a transfer function f produces the neuron output y: n

y= f( % wi ·xi −u)

(4)

i=1

where xi, input variables; wi, weights of input variables; u, bias; and y: neuron output. Several types of transfer functions have been developed. Choice of the transfer function depends upon applications. A typical sigmoid non-linear transfer function is shown in Fig. 7(b). The ANN consists of a large number of highly inter-connected processing elements (neurons). It is therefore more robust than the other methods in dealing with complex problems. The most frequently used ANN is a back propagation neural network (BPNN). The BPNN is a typical supervised neural network whose learning rules are to keep adjusting the weights and biases of the network to minimize the sum of squared errors of the network. The minimization is done by continually changing the values of the network weights and biases in the direction of the steepest decent with respect to the sum of errors. This is called a gradient descent procedure. Changes in each weight and bias are proportional to element’s effect on the sum-squared error of the network. Eventually, we use these weights and biases when the training finished to build the classification model for rotifers.

3. Results and discussion A flow chart showing significant procedures for a complete discrimination model is shown in Fig. 8. It still followed the strategy of the two-stage model as mentioned in Section 2.5, but a redundant information reduction procedure was inserted for better efficiency. Several experimental data were used to verify the model programmed with MATLAB (version 5.1, The Mathworks Inc.).

3.1. Separation of debris from rotifers Debris were separated from rotifers in this stage. Rotifers and debris were not easily distinguished using moment invariants. Fig. 9(a) shows a scatter plot of moment invariants, f8 and f9. Data for rotifers crowded around point (0, 0) and data for debris spread more widely than the rotifers. A close up view of data near point (0, 0) in Fig. 9(a) is presented in Fig. 9(b). We could easily conclude that the entire range in f8 and f9 of debris has covered the rotifers. This situation was

44

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

Fig. 9. Plot of moment invariants f8 and f9: on the legend, the hollow square ( ) represents only the debris and solid symbols (, and ) represent rotifers without eggs, rotifers with 1 egg, and rotifers with 2 eggs, respectively. (a) Full scope of f8 and f9, including three types of rotifers as well as debris distributed in the plane. From this plot, we can find that the data regarding rotifers are crowded around point (0, 0). (b) To make the neighborhood near point (0, 0) clear, we magnified the part of full scope near point (0, 0).

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

45

Table 3 Experimental results for separating debris from rotifers in SP-1, SP-2, and SP-3 using similarity measurement approach Actual/Predicted as SP-1: Rotifers Debris SP-2: Rotifers Debris SP-3: Rotifers Debris

Rotifers

Debris

162 7

7 27

325 15

7 28

331 13

13 22

found in other moment invariants, which resulted in poor separating condition of the debris from the rotifers. Tables 3 and 4 show the results obtained using the method introduced in Section 2.5.1. Here SP-1, SP-2 and SP-3 are specimens from Table 1. The tables reported both correct and incorrect discriminations with the two approaches. For SP-2 in Table 3, 325 rotifers were correctly classified as rotifers, 7 rotifers as debris, 15 debris as rotifers, and 28 debris as debris. The misclassifications resulted from an overlap in the moment invariants as mentioned previously. A comparison between these two methods is shown in Table 5, where the error count is the sum of misclassifications. In Table 5, the misclassification rate is the percentage of error counts over the total number in each sample batch. As pointed out in this table, misclassification rate with the degree of membership approach (2.61%) is lower than the one with the similarity measurement (6.48%). However, the degree of membership approach reflects the real distribution characteristics of each group. The similarity measurement approach represents the relationship merely by the distance to the class center that is linearly proportional. Therefore, the former approach should be better than the latter. Table 4 Experimental results for separating debris from rotifers in SP-1, SP-2, and SP-3 using degree of membership approach Actual/Predicted as SP-1: Rotifers Debris SP-2: Rotifers Debris SP-3: Rotifers Debris

Rotifers

Debris

167 4

2 30

329 6

3 37

339 5

5 30

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

46

Table 5 Comparison of misclassifications between similarity measurement and degree of membership approach Similarity measurement approach

Degree of membership approach

Sample

Error count

Misclassification rate (%)

Error count

Misclassification rate (%)

203 375 379 Total: 957

14 22 26

6.90 5.87 6.86

6 9 10

2.96 2.40 2.64

62

6.48

29

2.61

3.2. Selection of moment in6ariants There are two problems when moment invariants were used to classify rotifers and debris: redundant information and magnitude differences for moment invariants. The problem of the magnitude differences among moment invariants is discussed in the next section. We propose a method to select efficient invariant features for redundant information reduction in this section. The bases in the kernel of Fourier – Mellin transform are not orthogonal (Sheng and Arsenault, 1986). This causes the moment invariant fi, derived by Fourier– Mellin transform, correlated or redundancy existed among moment invariants. A subset of these invariant features which is sufficient to accomplish the pattern recognition is necessary to reduce the complex correlation. It is difficult to follow a particular method to determine the appropriate set of invariants and to analyze the redundancy of information. In general, this selection depends on processed images. A Euclidean distance approach was proposed to reduce the dimension of the feature space (Johnson and Wichern, 1998). The coefficient l stands for the grade of separation which is the ratio of inter-class distance to within-class distance: l=

inter-class distance . within-class distance

(5)

Generally, the inter-class distance is greater than the within-class distance to reduce the overlapping condition introduced in Section 2.5.1.1. Table 6 shows a preliminary test for the whole set of features f1 –f12. Ten patterns in each rotifer class were chosen randomly to calculate l for different features and to examine their effectiveness of discrimination. The above discussed method can be formulated as l =Bi, j /Wk \1

(6)

Bi, j : inter-class distance between groups i and j, Wk : within-class distance of group k, for i, j=0, 1, 2; k = i or j. In Table 6, each l was examined for every (i, j ) pair in columns. ls of f1, f2,

l

a

4.38 1.47 1.10 3.18 1.09 1.12

1.38E+00 1.03E+00 3.53E−01 3.16E−01 9.41E−01 3.25E−01

f3

24.82 1.65 1.70 68.55 2.12 0.79

2.68E+00 2.77E+00 8.57E−02 1.08E−01 1.63E+00 4.04E−02

f4

328.21 1.07 1.07 455.69 0.23 0.17

2.99E+00 2.99E+00 1.51E−03 9.10E−03 2.79E+00 6.56E−03

f5

81.47 1.48 1.49 65.56 0.26 0.33

2.90E+00 2.91E+00 1.17E−02 3.56E−02 1.96E+00 4.44E−02

f6

5.21 0.06 0.06 13.78 1.35 0.46

3.25E+00 2.96E+00 2.89E−01 6.23E−01 5.23E+01 2.15E−01

f7

22.45 5.89 2.49 5.32 7.27 12.96

5.92E−01 2.50E−01 3.42E−01 2.64E−02 1.01E−01 4.71E−02

f8

37.16 3.68 2.16 6.58 4.64 15.37

1.98E+00 1.16E+00 8.17E−01 5.32E−02 5.37E−01 1.76E−01

f9

An effective feature should satisfy conditions in Eq. (Eq. (24)). A set of features {f1, f2, f3, f8, f9, f11} was finally selected

26.09 4.93 2.23 5.05 6.12 14.29

1.76E+00 7.98E−01 9.67E−01 6.76E−02 3.58E−01 1.58E−01

2.41E−01 9.22E−02 1.49E−01 1.11E−02 3.48E−02 1.76E−02

B0,1/W0 21.66 B0,1/W1 6.92 B1,2/W1 2.65 B1,2/W2 5.23 B2,0/W2 8.46 B2,0/W0 13.38

B0, 1 B1, 2 B2, 0 W0 W1 W2

f2

f1

Table 6 Effective feature selection to reduce the feature space dimensiona

139.25 2.20 2.10 18.53 0.92 6.62

2.79E+00 2.66E+00 1.33E−01 2.01E−02 1.27E+00 1.44E−01

f10

328.58 1.88 1.70 12.96 1.35 30.89

2.72E+00 2.47E+00 2.56E−01 8.29E−03 1.45E+00 1.90E−01

f11

1.19 0.12 0.14 0.20 0.02 0.12

7.42E+00 8.20E+00 7.77E−01 6.22E+00 6.00E+01 4.03E+01

f12

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57 47

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

48

Table 7 Comparison between inter-class distances and within-class distances in full 12-D feature space Rotifers with 0 egg and 1 egg

Rotifers with 1 egg and 2 eggs

Rotifers with 2 eggs and 0 egg

Inter-class distance

SB0,1 10.71

SB1,2 10.83

SB2,0 1.63

Within-class distance

SW0 6.26

SW1 79.77

SW1 79.77

SW2 40.34

SW2 40.34

SW0 6.26

l

SB0,1/SW0 1.71

SB0,1/SW1 0.13

SB1,2/SW1 0.14

SB1,2/SW2 0.27

SB2,0/SW2 0.04

SB2,0/SW0 0.26

f3, f8, f9 and f11 are greater than 1. As a result, a set of features {f1, f2, f3, f8, f9, f11} was selected to reduce feature space dimension from 12-D to 6-D. For rotifer discrimination, it was preferable to use a subset of lower-order moments than using the entire set of moments. The corresponding results are listed in Table 7 and Table 8 for comparison after redundant information reduction. Here, Bi, j and Wk are defined as

 

 

%Bi, j = %B 2i, j,fn n

%Wk = %W 2k,fn

1/2

(7)

1/2

(8)

n

for i, j, k = 0, 1, 2, and fn  moment invariant set.

Table 8 Comparison between inter-class distances and within-class distances after redundant information reduction of the feature space, when f1, f2, f3, f8, f9, f11 are used

Inter-class distance

Rotifers with 0 egg and 1 egg

Rotifers with 1 egg and 2 eggs

Rotifers with 2 eggs and 0 egg

SB0,1

SB1,2

SB2,0

4.09

3.03

1.39

Within-class distance

SW0 0.33

SW1 1.85

SW1 1.85

SW2 0.45

SW2 0.45

SW0 0.33

l

SB0,1/SW0 12.45

SB0,1/Si1 2.21

SB1,2/SW1 1.64

SB1,2/SW2 6.78

SB2,0/SW2 3.11

SB2,0/SW0 4.23

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

49

Fig. 10. The BPNN model for rotifer classification.

In most cases, ls in Table 8 were greater than those in Table 7. In other words, increase in the distance between groups made the discrimination easier.

3.3. Classification of rotifers A BPNN described in Section 2.5.2 was proposed as a classifier for various rotifer types. To establish the model, a batch of training samples with reduced features (f1, f2, f3, f8, f9, f11) for arbitrary types of rotifers was necessary. With the six moment invariants and an object area (A) as input variables, the BPNN model produced appropriate weights and biases for each node upon finishing the training. Since the magnitude of the invariant features in lower-order was often larger than the features in higher-order, the input variables were unbalanced. Using a weighting operation (normalization) on the features could counterbalance this unbalancing situation. A convenient way to normalize the features is to divide each coefficient by their maximum value. A schematic diagram of the three-layer BPNN model with five neurons in the hidden layer is represented in Fig. 10. One hundred and eighty-five rotifer samples mentioned in Section 2.5.1.1 have been trained. The experimental results for three validation batches are shown in Table 9. Transfer functions for the neurons in the hidden layer and output layer were sigmoid functions: f(x) =

1 . 1 +e − x

(9)

In Table 9, the rows with condition ‘‘debris not discarded in stage 1’’ represent the objects misclassified in the first stage, as described in Table 4. The total classification rate in stage 2 is estimated to be about 93.15% on an average (Table 10). If the condition ‘‘debris not discarded in stage 1’’ was omitted, it reached up to 94.92%. The high accuracy indicates that the ANN approach is effective in the second stage of discrimination. Table 9 shows that the classification rate decreases

a

0 30 5 1 30 5 70 3 0 70 4 61 7 1 61

237 2 0 4 237 205 1 1 1 205

Rotifer with 1 egg

95 0 1 3 95

Rotifer without egg

Samples were from SP-1, SP-2, and SP-3.

SP-1: Rotifer without egg Rotifer with 1 egg Rotifer with 2 eggs Debris not discarded in stage 1 Correct count SP-2: Rotifer without egg Rotifer with 1 egg Rotifer with 2 eggs Debris not discarded in stage 1 Correct count SP-3: Rotifer without egg Rotifer with 1 egg Rotifer with 2 eggs Debris not discarded in stage 1 Correct count

Actual/Predicted as

2 1 57 3 57

0 1 11 2 11

1 5 30 0 30

Rotifer with 2 eggs

211 63 65 5 344

242 73 14 6 335

96 35 36 4 171

Total

93.90

97.16 96.83 87.69

94.93

97.93 95.89 78.57

90.64

98.96 85.71 83.33

Classification rate (%)

Table 9 Three experimental results for classification stage 2, reduced features: f1, f2, f3, f8, f9, f11 and area were used as inputsa

50 C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

51

Table 10 Total classification rate in stage 2a1 Comparison

Condition: ‘‘debris not discarded in stage 1’’ was included Condition: ‘‘debris not discarded in stage 1’’ was excluded

Batch SP-1 (%)

SP-2 (%)

SP-3 (%)

Average (%)

90.64

94.93

93.90

93.15

92.81

96.66

95.28

94.92

a

System performance was examined and compared when the condition ‘‘debris not discarded in stage 1’’ was included or excluded.

as the number of rotifer eggs increases. It indicates that the rotifer shape becomes complex when it carries multiple eggs. The complex shapes resulted in more overlapping in the discrimination space of moment invariants. Table 11 shows the classification results using a full set of features. The classification rate was less accurate compared to the classification in Table 9. The classification rate was degraded due to serious misclassification of rotifers with two eggs. Although the classification rate increased slightly for the first two classes in Table 11, the total classification rate did not increase accordingly due to the serious decrease for the last class. This consequence followed the assumption in Section 3.2, and validated the importance of the removal of non-effective features. The accuracy for each stage was summarized in Table 12. The average accuracy in the three batches was about 97.34% in the first stage, 93.15% in the second stage, and 92.49% overall. The processing time was less than 0.1 s for a frame of image if parameters in the system had already tuned.

4. Conclusions A shape analysis process for rotifer identification was proposed. Shape factors based on moment invariants provide quantitative measures and form a multiple dimensional discrimination basis. A two-stage discrimination model was developed in a multi-dimensional space. Stage 1 separated debris from rotifers. Experimental results showed that the efficiency of stage one using the degree of membership approach was more accurate than using similarity measurement approach. Stage 2 classified rotifers into three groups. A three-layer BPNN model with five neurons in the hidden layer was adopted. Results of the three validation batches are reported in this paper. The identification accuracy was summarized as follows: 97.34% in the first stage, 93.15% in the second stage, and 92.49% overall. Experimental results illustrate that complex correlation appeared among these moment invariants. Certain dimensionality reduction was performed to reduce the complexity of the problem. Results also displayed a lower discrimination rate for rotifers carrying

a

0 31 11 2 31 3 70 6 1 70 4 59 13 1 59

238 1 0 3 238 206 3 2 2 206

Rotifer with 1 egg

96 0 2 2 96

Rotifer without egg

1 1 50 2 50

1 2 8 2 8

0 4 23 0 23

Rotifer with 2 eggs

Samples were the same as they were in Table 7, full set of features and area were used.

SP-1: Rotifer without egg Rotifer with 1 egg Rotifer with 2 eggs Debris not discarded in stage 1 Correct count SP-2: Rotifer without egg Rotifer with 1 egg Rotifer with 2 eggs Debris not discarded in stage 1 Correct count SP-3: Rotifer without egg Rotifer with 1 egg Rotifer with 2 eggs Debris not discarded in stage 1 Correct count

Actual/Predicted as

Table 11 Results of stage 2 classificationa1

211 63 65 5 344

242 73 14 6 335

96 35 36 4 171

Total

91.57

97.63 93.65 76.92

94.33

98.35 95.89 57.14

87.72

100.00 88.57 63.89

Classification rate (%)

52 C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

53

Table 12 Summary of accuracy in the two stages discrimination system Batch

Stages

SP-1 SP-2 SP-3 Average a

Stage 1 (%)a1

Stage 2 (%)

Overall (%)

97.04 97.60 97.36 97.34

90.64 94.93 93.90 93.15

89.66 94.67 93.14 92.49

Degree of membership approach was adopted.

more eggs. Therefore more effective shape factors added to increase the accuracy of the discrimination model may be required.

Acknowledgements We would like to express our gratitude to Council of Agriculture, Taiwan, for the financial support.

Appendix A. Derivation of Hu’s moment invariants Hu introduced regular moments: for two non-negative integer p, q, the (p + q)th order moments of pattern f(x, y) are given by:

& &

mp,q =



x py qf(x,y)dxdy.

(10)

− −

Where f(x, y) is assumed to be a piecewise continuous function, which is only in a finite part of the plane. We also have the discrete form, N

M

mp,q = % % x phy qkf(xh,yk ).

(11)

h = 1k = 1

Where f is a function within the range {x1, x2, …, xN }× {y1, y2, …, yM }. The centroid (x0, y0 ) of f is defined by x0 =

m1,0 m0,1 , y = . m0,0 0 m0,0

A change in the base point of mp,q results in a considerable variation upon mp,q. However, locating the base point of mp,q at the centroid of image f eliminates the effect of the base point translation. Hence, the centralized image fT = f(x-x0, y-y0) is translation-invariant. The central moments are defined by:

& &

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

54

mp,q =





− −

(x − x0)p(y − y0)qf(x,y)dxdy.

(12)

Discrete central moments are redefined correspondingly N

M

mp,q = % % (xh −x0)p(yk −y0)qf(xh,yk ).

(13)

h = 1k = 1

As the image moments are translation-invariant, they now should be scale-invariant by taking normalization. The normalization is obtained by dividing the + q)/2] + 1 moments by m [(p to make the moments dimensionless. The normalized 0,0 central moments, denoted hp,q, are defined as: m

hp,q = m

p,q p+q +1 2 0,0

(14)

where m0,0 =m0,0. Furthermore, for rotation-invariance, Hu derived functions based on the scale normalized central moments defined in Eq. (Eq. (14)), and proposed a set of seven RST invariants of the second and the third-order moments, as Hu’s moments. f1 = h2,0 +h0,2 f2 = (h2,0 −h0,2)2 +4h 21,1 f3 = (h3,0 −3h1,2)2 +(3h2,1 −h0,3)2 f4 = (h3,0 +h1,2)2 +(h2,1 +h0,3)2 f5 = (h3,0 −3h1,2)(h3,0 +h1,2)[(h3,0 + h1,2)2 − 3(h2,1 + h0,3)2] + (3h2,1 −h0,3)(h2,1 +h0,3)[3(h3,0 + h1,2)2 − (h2,1 + h0,3)2] f6 = (h2,0 −h0,2)[(h3,0 +h1,2)2 −(h2,1 + h0,3)2]+ 4h1,1(h3,0 + h1,2)(h2,1 + h0,3) f7 = (3h2,1 −h0,3)(h3,0 +h1,2)[(h3,0 + h1,2)2 − 3(h2,1 + h0,3)2] − (h3,0 −3h1,2)(h2,1 +h0,3)[3(h3,0 + h1,2)2 − (h2,1 + h0,3)2].

Appendix B. Derivation of higher order of moment invariants Using radial and angular moments, Fourier–Mellin transformation of an irradiant distribution function fn (r, u) can be expressed as

&&

M(s,l) =

0

2p

r s − 1fn (r,u)exp( − jlu)dudr

(15)

0

for s =1, 2, 3, …; l= 1, 2, 3, … Where fn (r, u), the polar coordinates representation of f(x, y), is centralized at the centroid of the distributed function (image). The relationship between fn (r, u) and f(x, y) can be transformed by variable substitution:

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

55

x =r cos u, y =r sin u, r = (x 2 + y 2), x, y are replaced by r, u in the kernel of Eq. (Eq. (15)): r s − 2exp( − jlu) =r s − l − 2[re − ju]l =r s − l − 2[r cos u−jr sin u]l =(x 2 +y 2)n(x − jy)l.

(16)

Where l=1, 2, 3, …; n = [(s-l)/2]-1. n is an integer when s-l is given an even number 2, 4, 6…, applying binomial theorem to the right-hand side of the above equation: n

(x 2 +y 2)n = % C nu·x 2(n − u)y 2u

(17)

u=0 l

(x − jy)l = % C l6·x l − 6( − jy)6.

(18)

6=0

Substituting of the above two expansions into Eq. (Eq. (16)) leads to r s − 2exp( − jlu) =(x 2 +y 2)n(x − jy)l = P− jQ.

(19)

Where l

n

%

P=

( − 1)(6/2)C l6

6 = 0,2,4,...

%

l

Q=

n

%

( − 1)(6 − 1)/2C l6

6 = 1,3,5,...

Then

0



=

(20)

%

C nux 2n + l − (6 + 2u)y 6 + 2u.

(21)

u = 0,1,2,...

&& & &

M(s,l) =

C nux 2n + l − (6 + 2u)y 6 + 2u

u = 0,1,2,...

2p

r s − 1fn (r,u)exp( − jlu)du·dr

0



(P − jQ)f(x,y)dxdy

− −

=as,l −jbs,l.

(22)

n Since nu = 0,1,2,...C nu =2n u = 0,2,4,...C u/2, discrete as,l can be expressed as 2n

as,l =

%

l

%

N

M

+ l − (u + 6) (u + 6) ( −1)(6/2)C l6·C nu/2· % % x 2n yk f(xh,yk ). h

u = 0,2,4,...6 = 0,2,4,...

(23)

h = 1k = 1

While the coefficients of the above equations satisfy the following constraint,C nk 0, when k \n or k B 0,as,l can be also expressed as 2n + l

as,l =

%

l

%

N

M

+ l − (u + 6) (u + 6) ( −1)(6/2)C l6·C n(u − 6)· % % x 2n yk f(xh,yk ). h

u = 0,2,4,...6 = 0,2,4,...

2

h = 1k = 1

Substituting 2n + l= p + q =s-2 in Eq. (Eq. (24)) yields

(24)

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

56

s−2

as,l =

%

l

%

( −1)6/2C l6·C n(u − 6)·mp,q.

u = 0,2,4,...6 = 0,2,4,...

(25)

2

bs,l can also be derived in the same way as: s−2

bs,l =

%

l

%

( −1)(6 − 1)/2C l6·C n(u − 6)·mp,q.

u = 1,3,5,...6 = 1,3,5,...

(26)

2

The scale invariance of Fourier–Mellin transform can be achieved by normalization: I(s,l) = M(s,l)/m s/2 0,0.

(27)

I(s, l) has been centralized in the complex plane at present so that it has the property of translation invariance. Multiplying I(s, l) by its complex conjugate to eliminate the rotation invariance, we could derive invariant functions for the arbitrary order. So, we obtained higher order moment invariants: f8 = h4,0 +h2,2 +h0,4 f9 = (h4,0 −h0,4)2 +4(h3,1 +h1,3)2 f10 =(h4,0 −6h2,2 +h0,4)2 +16(h3,1 − h1,3)2 f11 =(h4,0 −6h2,2 +h0,4)((h4,0 −h0,4)2 − 4(h3,1 + h1,3)2) + 16(h4,0 −h0,4)(h3,1 +h1,3)(h3,1 − h1,3) f12 =(h4,0 −6h2,2 +h0,4)((h4,0 −h0,4)2 − 4(h3,1 + h1,3)2) − 16(h4,0 −h0,4)(h3,1 +h1,3)(h3,1 − h1,3).

References Fulks, W., Main, K., 1991. The design and operation of commercial-scale live feeds production system. In: Fulks, W., Main, K. (Eds.), Rotifer and Microalgae Culture System. The Oceanic Institute, HI, pp. 23 –52. Gonzalez, R.C., Woods, R.E., 1992. Digital Image Processing. Addison – Wesley, Reading, MA. Gupta, L., Srinath, M.D., 1987. Contour sequence moments for the classification of closed planar shapes. Patt. Recognit. 20 (3), 267–272. Hoff, F.H., Snell, T.W., 1997. Plankton Culture Manual, 4th edn. Florida Aqua Farms, Dade City, FLpp. Hu, M.K., 1962. Visual pattern recognition by moment invariants. IRE Trans. Inform. Theory 8, 179 – 187. Johnson, R.A., Wichern, D.W., 1998. Applied Multivariate Statistical Analysis, 4th edn. Prentice-Hall, Englewood Cliffs, NJ. Leu, J.G., 1991. Computing a shape’s moments from its boundary. Patt. Recognit. 24 (10), 949 – 957. Li, Y., 1992. Reforming the theory of invariant moments for pattern recognition. Patt. Recognit. 25 (7), 723 – 730. Lubzens, E., Tandler, A., Minkoff, G., 1989. Rotifers as food in aquaculture. Hydrobiologia 186/187, 387 – 400.

C.Y. Yang, J.J. Chou / Aquacultural Engineering 24 (2000) 33–57

57

Reddi, S.S., 1981. Radial angular moment invariants for image identification. IEEE Trans. Patt. Analy. Mach. Intell. PAMI 3 (2), 240–242. Shen, L., Rangayyan, R.M., Desautels, J.E.L., 1994. Application of shape analysis to mammographic calcifications. IEEE Trans. Med. Imag. 13 (2), 263 – 274. Sheng, Y., Arsenault, H.H., 1986. Experiments on pattern recognition using invariant Fourier – Mellin descriptors. J. Opt. Soc. Am. A (Opt. Image Sci.) 3 (6), 771 – 776. Snell, T., Carrillo, W., 1984. Body size variation among strains of rotifer Brachionus plicatilis. Aquaculture 37, 359–367. Tsai, W.H., 1985. Moment-preserving thresholding: a new approach. Comput. Vision, Graphics, Image Processing. 29, 377–393. Watanabe, T., Tamiya, T., Oka, A., Hirata, M., Kitajima, C., Fujita, S., 1983. Improvement of dietary value of live foods for fish larvae by feeding them on omega-3 highly unsaturated fatty acids and fat-soluble vitamins. Bull. Jap. Soc. Scient. Fisher. 49 (3), 471 – 480. Wen, W., Lozzi, A., 1993. Recognition and inspection of manufactured parts using line moments of their boundaries. Patt. Recognit. 26 (10), 1461–1471. Wood, J., 1996. Invariant pattern recognition: a review. Patt. Recognit. 29 (1), 1 – 17. Yang, L., Albregtsen, F., 1996. Fast and exact computation of Cartesian geometric moments using discrete Green’s theorem. Patt. Recognit. 29 (7), 1061 – 1073.

.

.