Motion Detection Based on Curved Artificial Compound Eyes

Compound eyes have the advantage of fast motion detection and significantly wide viewing field. Curved artificial compound eyes (CACEs) can perform most of the functions of real compound eyes, such as moving detection, with a wide field of view (FOV) in a small size and have attracted considerable interest owing to their unique optical structure and rapid response properties. In this work, images captured by these CACEs are used to detect the moving direction of a moving target. The subimages captured at the same time by an eye lens are enlarged, shrunk, or rotated. Temporal differences between these images captured at consecutive time intervals are calculated and compared. The minimum difference indicates the moving direction. Experiment results showed that the motion detection system can detect different lateral and axial motions in a simple and effective way.


Introduction
Insect compound eyes have some unique features, such as wide field of view (FOV), small size, and high sensitivity for moving objects. Artificial compound eye models based on insect compound eyes have important applications in many fields, such as robot navigation, intelligent monitoring, patten recognition, and space attack. Curved artificial compound eyes (CACEs) and their image processing are attractive research topics in the field of compound eyes.
Image processing based on artificial compound eyes has increasingly attracted researchers' interest. (1) Tanida presented an artificial compound-eye camera and used it in object distance detection and object extraction. (2) Floreano et al. presented a way of fabricating artificial compound eyes that have an embedded information processing system. (3) Di et al. developed a 9 × 9 microlens array on a planar glass to simulate the function of compound eyes. (4) Duparré et al. presented an artificial compound eye zoom camera with a variable field of view. (5) Those works used some sophisticated image processing of artificial compound eyes to simulate the function of the compound eye system in insects. In most cases, some simple function that can be implemented with low cost and real-time processing is needed, such as motion detection. In this paper, we focus on image processing on CACEs, which were previously fabricated, (6) and give a simple algorithm to detect motion. CACEs were fabricated using microscale replication, stamping, and casting processes to form deposited 2-D microlens-pattern composite films into 3-D structures. The films are composed of polydimethylsiloxane (PDMS)-Parylene-C-PDMS layers. The layers are used for pattern replication, isolation, and buffering. The CACE optical prototype is set up by assembling the CACE camera, an optical sensor [charge-coupled device (CCD) of 3 × 2 mm 2 ], and an adjustable sleeve. Subimages with specific angles can be observed in each unit of the multiple images.
On the basis of this structure, a simple motion detection method for micro-electromechanical system (MEMS)-type CACEs is developed. The subimage of each eye lens captured at the same time is enlarged, shrunk, or moved left and right. Temporal differences between these images captured at consecutive time intervals are calculated and compared. The minimum difference indicates the moving direction. Experiment results showed that the motion detection system can detect different motion modes simply and in real time.

Bidirectional Comparison Motion Detection (BCMD)
Moving objects are captured by the CACEs, which are shown in Fig. 1. Subimages in the central area (inside the dashed area), which have less distortions, are used to determine motion status. In this paper, a new method called BCMD is introduced.
As shown in Fig. 2, subimages of each eye lens captured in frame (n−1) are transformed to simulate the objects moving towards the CACEs (moving near), away from the CACEs (moving far), from left to right (moving right), and from right to left (moving left). That is, for S(n−1, j) as the subimage of the jth eye lens in frame(n−1), S F (n−1, j), S N (n−1, j), S L (n−1, j), and S R (n−1, j) are used to present the transformed images resulting from the above-mentioned movement. S F (n−1, j), S N (n−1, j), S L (n−1, j), and S R (n−1, j) form the processing result set S P (n−1, j). Subimages of each eye lens in frame n are processed in the same way, and the results of the jth eye lens are noted as S F (n, j), S N (n, j), S L (n, j), and S R (n, j). The processing result set is noted as S P (n, j), which includes S F (n, j), S N (n, j), S L (n, j), and S R (n, j). The differences in RGB color space between subimages in S P (n−1, j) and S(n, j) are calculated pixel by pixel, as well as that of S P (n, j) and S(n−1, j). All of the differences in the same direction of each eye lens are added up to obtain the difference at the frame level, noted as DIFF[F P (n−1,dir), F(n)] and DIFF[F P (n, dir), F(n−1)], where F(n) means frame n, F(n−1) means frame (n−1), and dir represents the moving direction, such as far, near, left, and right. DIFF[F P (n−1, dir), F(n)] represents the difference between transformed subimages in F(n−1) in the direction dir and that in F(n), while DIFF[F P (n, dir), F(n−1)] represents the difference between transformed subimages in F(n) in the direction dir and that in F(n−1). For lateral movements, the processed frame will move one pixel right or left each time, and the total moving range is 46 pixels in one direction. For axial movements, the processed frame will be scaled to 1.02, which is 1+1/46, each time and the scale range is from 1 to 2 times the original one.

Experimental Results
The images captured by CACEs are pixel arrays in frame format in every 1/50 s. BCMD is used to obtain the moving direction of the objects. A program coded in Matlab is used to implement the algorithm. For lateral movements, the distance is counted in pixels in the image plane of the camera, while for axial movements, the movement is counted as the ratio between F(n) and F(n−1). It indicates the object moving towards the camera if the ratio is larger than 1. Experiments show that this method can detect motions in lateral and axial modes but it cannot detect rotation. Figures 3(a) and 3(b) show consecutive frames captured by the artificial compound eyes. In these frames, a man moved from left to right for 10 cm. The average differences in subimages between these two images were calculated. Figure 4 shows the average differences on different moving distances and directions. The difference is counted as average RGB color difference of the corresponding subimages in the consecutive frames. The blue one shows the average difference between the right-moved image of Fig. 3(a) and the original Fig. 3(b). The green one shows that between the right-moved image of Fig. 3(b) and the original Fig. 3(a). The results show that the average difference between the right-moved image of Fig. 3(a) and the original Fig. 3(b) is less than that between the right-moved image of Fig. 3(b) and the original Fig. 3(a), which means that in these two consecutive frames, the man moved to the right in about 13 pixels.
Figures 3(c) and 3(d) show consecutive frames captured by the artificial compound eyes. In these frames, a man moved towards the artificial compound eyes for 30 cm. The two images were scaled and the average differences with different scale parameters were calculated. Figure 5 shows the average difference convergence with different scaling parameters. The horizontal axis is scaling parameters, and the vertical axis is the average difference between the scaled frame and its consecutive original frame. The green one shows the average differences between the enlarged image of Fig. 3(c) and the  Fig. 3(d), while the blue one shows the average differences between the enlarged image of Fig. 3(d) and the original Fig. 3(c). The results show that the minimum average difference is that between the enlarged image of Fig. 3(c) and the original Fig. 3(d).
That is, frame n−1 is enlarged 1.34 times. This means that the man moved towards the artificial compound eyes.

Conclusions
A method that is used in artificial compound eye image processing is presented. It gives a simple way of detecting the moving direction. Two consecutive frames captured by artificial compound eyes are used as input. The average differences of subimages on different directions are calculated and compared to obtain the minimum value, which indicates the moving direction. Motions in lateral and axial modes can be detected.