A simple algorithm for distance estimation without radar and stereo vision based on the bionic principle of bee eyes

Simple navigation algorithms are needed for small autonomous unmanned aerial vehicles (UAVs). These algorithms can be implemented in a small microprocessor with low power consumption. This will help to reduce the weight of the UAVs computing equipment and to increase the flight range. The proposed algorithm uses only the number of opaque channels (ommatidia in bees) through which a target can be seen by moving an observer from location 1 to 2 toward the target. The distance estimation is given relative to the distance between locations 1 and 2. The simple scheme of an appositional compound eye to develop calculation formula is proposed. The distance estimation error analysis shows that it decreases with an increase of the total number of opaque channels to a certain limit. An acceptable error of about 2 % is achieved with the angle of view from 3 to 10° when the total number of opaque channels is 21600.


Introduction
Simple navigation algorithms are needed for small autonomous unmanned aerial vehicles (UAVs) used, for example, for an intelligence service. These algorithms can be implemented in a small microprocessor with low power consumption. This will help to reduce the weight of the UAVs computing equipment and to increase the flight range.
Satellite navigation systems (GPS, GLONASS, etc.) are highly vulnerable to various classes of interference. In addition, they do not solve the problems of the local navigation (collision avoidance, detection of the targets, autonomous takeoff and landing, etc.).
Radars are the most often used in the distance and speed measurements, but radar's radiation is easy to determine, which is unacceptable in secret flying. Stereo vision requires a precise installation of cameras and complex computer image processing.
Bees and other flying insects have extraordinary navigation capabilities without radars and stereo vision, despite their tiny brains. Scientists try recreating a similar light-weight imaging system, which could change the way to build mobile robots and small flying vehicles.
Researchers from the University of Bielefeld (Germany) designed a small catadioptric system with a field of view of 280 degrees, simulating the eyes of a bee [1]. However, this system does not divide the optical beam into parts, as it occurs in the eye of a bee, and related to catadioptric systems, which contain elements reflecting and refracting light; in other words, they are composed of mirrors and lenses. Therefore, the processing of the optical flow requires a sufficiently powerful microprocessor (Core 2 Duo T7500 with 2.2 GHz [1]). Fundamental review [2] describes the principles of visual guidance of honeybees. The experiments described in this review show that bees stabilize flight, negotiate narrow passages, and orchestrate smooth landings by using what seem to be a series of simple, low-level visual reflexes. But they do not tell us whether flying bees 'see' the world in three dimensions in the way we do. It was shown only that the bees were able to distinguish flowers at different heights. 'Under the experimental conditions, the only cue that a bee could have used to gauge the height of each flower would be the speed of the flower's image as a bee flew over it: the higher the flower, the faster the motion of its image.' [2].
Additional experiments have shown how it is possible to change trajectories of bee landing when the disk displayed a four-arm spiral pattern that was either stationary or rotating at speeds of 0.5 or 1 rotation per second, either in the counterclockwise or the clockwise direction, so as to increase or decrease the apparent rate of expansion, respectively [3].
Australian scientists create a guidance system for achieving automatic landing of a fixed-wing aircraft in the unstructured outdoor terrain, using onboard video cameras. The system uses optic flow information for sensing and controlling the height above the ground. At low heights, when the optic flow is unreliable, stereo information is used to guide the descent, close to touchdown [4]. The main advantages of such systems are that they do not emit active radiation and do not rely on any external information such as a global positioning system or an instrument landing system.
An onboard monocular vision system for autonomous takeoff, hovering and landing uses the letter "H" surrounded by a circle with known sizes [5]. A vision algorithm for robust and real-time landing pad recognition is implemented. But we are interested in the distance estimation of unknown size objects.
Yet another video method for movement measurements is an analysis of the images sequence received by a single camera [6]. Police use this method for vehicle velocity measurements on the roads. But it needs a powerful computer that is caused by a complex image processing [6]. Thus, this method is not applicable for small UAVs.
Thus, there are experiments showing that bees (and similar flying insects) are able to determine the distance to the target object of unknown size using the optical flow. However, published algorithms are based on determining the distance using stereo vision, optic flow analysis frame by frame or using geometric shapes with known parameters. Algorithms based on stereo vision or optic flow analysis are very complex to implement in a small microprocessor. Algorithms based on using geometric shapes with known parameters are unacceptable for unknown size objects.

Research objective
The aim of this study is to create a simple algorithm for distance estimation to unknown size objects, using some properties of a bee eye. We assume that the main bee eyes feature is the segmentation of the entire image to the pixels via opaque channels named as ommatidia ( Figure 1). Such division allows a preliminary signal processing that does not require the participation of a small bee brain, which is often used in engineering: see, e.g. [7].
We will also assume an equable motion toward the target object. It should be noted that this is not a complete list of special properties of bee eyes, but in this case, it is enough to create a simple algorithm for the distance estimation.

Research methodology
The research method is simply based on the analysis of the sensor in motion similar to the compound eye of flying insects (Figure 1).
'Apposition compound eyes are made up of ommatidia. In conventional apposition eyes, the receptive rod (rhabdom) acts as a detector that measures the average brightness of a small region of space, typically about 1° across. The overall erect image seen by the animal is the mosaic formed by these adjacent fields of view.' [8].
Each pair maximally accepts only the normally impinging rays. There are more complex superposition eyes of flying insects. Normally impinging rays are perceived as not only by one of the ommatidia, but also be those that are nearby. Resolution can be as good as in an apposition eye with similar-sized facets, and the sensitivity is usually much greater than in an apposition eye of the same size [8]. In this study, we will not consider such superposition eyes.
We used a simple two-dimensional model of the compound eye to keep simple analytical formulas. Further, they can be easily converted into a three-dimensional model.
We also did not consider the problem of selection of the target object in the landscape, which can be solved by using a two-stage continuous wavelet transform [9] and by artificial neural networks [10].

The research scheme and results
The simple two-dimensional research scheme for distance estimation by a compound eye is presented in Figure 2. a b Figure 2. The simple two-dimensional research scheme for distance estimation by an observer with a compound eye: athe eye center is in location 1 where the angles of view for objects A and B are the same; b -the eye center shifted to location 2, where the angles of view for objects A and B are various.
This research scheme demonstrates that two objects with different heights at various distances look the same, because they have the same angle of view (Figure 2a). They can only be discerned by an observer moving from location 1 to location 2 (Figure 2b). Such research scheme makes it easy to MEACS2016 IOP where d 1B is the distance between location 1 and object B, h B is the height of object B, α is the angle of view of object B from location 1, β is the angle of view of object B from location 2.
The distance between location 1 and object A and the height of object A can be calculated similarly by equations (1).
Equations (1) are based on the measurement of angles of view of objects. But they are very intricate. Bees' eyes are probably able to assess the relative number of receptors that are hit by the rays of the target received through ommatidia of a compound eye. The device, similar to a compound eye, can calculate the relative amount of opaque channels through which the beams fall on the target. This relative amount will correspond to the angle of view with some error. It is obvious that it can be used instead of the tangent in equations (1). The tangent of an angle is equal to this angle at low angles with an error of about 2 % (to 15°) and with an error of about 10 % (to 30°). This error is quite acceptable in the assessment of long distances in order to avoid collisions. Then, equation (1)  where N 1B and N 2B are the relative amount of opaque channels through which the beams fall on the target from location 1 and 2, respectively.

Error estimation
The first source of error caused by the replacement of the tangent of the angle by the angle value is described above.
The second source of error is a resolution error. It is caused by a limit of the number of opaque channels. The number of ommatidia in various flying insects varies from 5 to 28 thousand pcs. It is limited by the diffraction of light. Diffraction effects are generally most pronounced for a wave which wavelength is roughly comparable to the dimensions of the diffracting object or slit. The device, similar to a compound eye, can be made larger than the eyes of a bee. It will decrease diffraction effects.
Therefore, error estimation of the formulas (2) depending on the number of channels in this device is very interesting. Error δ was calculated as: %. 100 IOP Publishing IOP Conf. Series: Materials Science and Engineering 177 (2017) 012028 doi:10.1088/1757-899X/177/1/012028 Formula (2) takes into account both sources of the error noted above. Figure 3 shows the relationship between the calculated distance error and the angle of view of the target object for the different number of opaque channels through which the beams fall from the target. We can observe in Figure 3 that the distance error using the compound eye depends on the angle of view of the target object and the total number of opaque channels. Increasing the total number of opaque channels from 720 to 21600 allows reducing the error very significant.
The error of about 2 % and lower is achieved when the angle of view is from 3 to 10°, and the total number of opaque channels is 21600. It corresponds to 1' of the angle resolution. The further increase of the total number of opaque channels does not reduce the error significantly except for tiny angles of view.
So the total number of opaque channels and the angle of view are very important characteristics for designing of this device.

Discussion
Which error is acceptable for the distance estimation using this algorithm? Figure 3 shows that the distance estimation error is very high at near and far distances, when we see the target at a viewing angle of less than 2° or above 15°.
Obviously, the accuracy of 10 % or even 2 % is unacceptable for precise landing. It is known that bees have three simple eyes in addition to a pair of compound eyes. Perhaps a bee uses them for shortrange navigation, when the compound eyes are working with a serious error. Australian scientists MEACS2016 IOP Publishing IOP Conf. Series: Materials Science and Engineering 177 (2017) 012028 doi:10.1088/1757-899X/177/1/012028 create their system for automatic landing of a fixed-wing with a similar decision. At low heights, when the optic flow is unreliable, stereo information is used to guide the descent close to touchdown [4].
However, such type of an error, from 2 to 10 %, is acceptable for avoiding collisions while moving. To avoid collision, we do not need to measure the distance to the obstacle with high accuracy. Therefore, the proposed algorithm is quite suitable for the collision avoidance function for UAVs. Perhaps, there are still applications for this algorithm, which we do not know yet.

Conclusions
The simple algorithm for distance estimation without radar and stereo vision based on the bionic principle of bee eyes is created.
The simple two-dimensional research scheme for distance estimation by a compound eye is presented.
The formula for calculating the distance to an object of the unknown size, based on the calculation of the relative amount of opaque channels through which a target can be seen by an observer moving from location 1 to 2 toward a target, has been presented.
Analysis of the distance estimation error for the proposed algorithm has been executed. It was shown that the error decreases with an increase of the total number of opaque channels to a certain limit.
It is shown that the minimal error lower 2 % is achieved at the angle of view of a target from 3 to 10° when the total number of opaque channels is 21600. However, the acceptable error from 2 to 10 % is achieved at the angle of view from 2 to 20°.