Design of intelligent power distribution robot system based on machine vision

With the increasingly serious aging of our society, labor shortage will seriously hinder the development of social economy. Robots gradually integrate into human production and life, and gradually serve more and more people. In order to solve the problem of large path deviation of the transmission system in the food conveying path, an intelligent food conveying system based on machine vision is proposed. The hardware circuit of the whole system is composed of image acquisition module, power module, electric drive module, etc. in the software part, the vertical volume matching method is used to set the optimal path. Through practical investigation, the scheme is feasible, can rely on the actual intelligence of catering distribution, has good application and promotion value.


Introduction
As the problem of aging continues to increase, the needs of the club for service workers are increasing. In the food and beverage industry in China, the service of customers, such as ordering and delivering food, is the most complicated job [1] . The cost of food and drink industry is getting higher and higher. In addition to the increasing aging of the clubs, the traditional people-driven operation is far from being able to meet the needs of the clubs. At the same time, the economic pressure on the whole world is increasing. How to reduce to the original is also a question which every profession and profession is pondering.
The navigation method of the food delivery machine is directly connected to determine the efficiency of the food delivery machine. The commonly used methods are as follows : (1) to use the reflector red outer photoelectric tube [2] ; (2) to sweep with a flash light [3] ; (3) the inductor is induced by magnetic conduction [4] ; (4) GPS navigation. Therefore, the speed of the signal processing is faster and the circuit structure is simpler than that of the reflector red outer photoelectric tube, but the distance between the front square road is limited, and the tolerance is vulnerable to the dry disturbance of the outer boundary, and the precision is low. Make use of light sweep to guide, the environment is not clear to seek, through the reflective belt to change the road line, but the cost is too high; The magnetic guide inductor can change the circuit line by laying the magnetic belt, which has good flexibility. However, a common magnetic guide inductor can only detect the slightly weak magnetic field below 100 Gauss above the magnetic strip. It is susceptible to the dry disturbance of the surrounding gold material, and the fruit bearing capacity of the test is easy to produce poor; With GPS navigation, the shadow noise of the environment is relatively small, stability and precision are very high, but the cost is too high. In addition to the above several navigation methods, visual navigation should also be widely used. Visual navigation by using CCD camera to construct visual navigation system is one of the best methods for realizing intelligent navigation, and it is also a practical technique with potential [6] . The maximum advantage of using CCD is that it can accurately determine the direction of a long distance in front of the machine from the upper road surface, which can provide more information for the control of the machine. It can well fill in the gaps in the navigational case.
In this paper, binocular vision system is used to provide path planning for intelligent food delivery operators. Compared with the path planning of communication system, the path planning is lower in cost and can collect and store image information in sufficient time. Square then after the division. The vertical volume matching method used in the system can reduce the calculation amount in the process of information acquisition, and slow down the pressure on the data of micro controller. So that the whole system has the characteristics of fast process speed, good stability and high accuracy.

Overall structure of intelligent food delivery robot
During the operation of the system, the image gathering module blocks are firstly collected by two CCD cameras on the left and the right to collect the image information on the path. At the same time, the visual frequency decoder is used to convert the analog image into a digital image. However, the digital images obtained from the processing are pre-processed, including the steps of feature extraction, pattern identification, matching, etc., among which the most important loop is the three-dimensional reconstruction. Binocular vision technique is a commonly used method for practical 3D reconstruction. A complete set of binocular vision system includes camera calibration, binocular alignment, vertical body matching, 3D reconstruction and other processes [7] . After the three-dimensional reconstruction, we can obtain the body coordinates of the object under the world coordinates system, and provide the necessary information for the establishment and operation of the intelligent machine model. The internal environment setting information is stored in the machine's memory, and the road and path setting information is compared with the internal environment setting information, and the results are obtained by analyzing the data difference value. The machine sends the fruit message to the main control module, which controls the various movements of the machine. The system integral formula is shown in Fig. 1.

System hardware design
On the basis of the above principle, the self-knowledge path of intelligent food delivery machine is realized. The basic module block is organized as shown in Figure 2.

Fig. 2 The system block diagram
Power source module: the power of the power source module provides the power source needed for other modules of the system. Two 12-V tandem storage pools form an external power source, and the 24V voltage division is converted to 5V through the LM2596 voltage regulator.
(1) Signal acquisition module block: the image information of the road is obtained through the CCD camera, and the correlation parameters of the road are obtained through the information point.
(2) electric drive die block: the current output from the I/O end port of the micro manager is not directly connected to the drive electric machine, because of this need to add another drive die block. Through MC33886 to control and drive the electrical pressure of the two ends of the electric machine can be vivid enough to show the acceleration and deceleration of the machine.
(3) the steering gear drive module: the use of PWM wave to control the output Angle of the steering gear.

Design of the whole project
Through the image information collected by CCD camera, through camera calibration, binocular correction, stereo matching, three-dimensional reconstruction and other processes, the path coordinate information is obtained, and the information is processed and handed to the main control module, so as to control the movement of the robot.

Binocular stereoscopic visual perception system
Binocular stereoscopic vision system uses the human eyes as the origin point, and two camera heads are used to replace the human eyes, so as to reverse the human's process of recognizing other objects through the eyes and eyes. A complete binocular stereoscopic vision system consists of the following parts: binocular vision system labeling, image acquisition, binocular alignment, stereoscopic matching and three-dimensional reconstruction [10] .

Binocular visual perception system labeling
The parameter number of the camera is divided into internal and external parameters, and the calibration of binocular vision system is the process of obtaining the internal and external parameters of the camera.
Because of the error between the center of the imager and the optical axis, two parameters, Cx and Cy, need to be introduced when the internal parameters of the camera head are obtained. On the other side It is considered that the imager is of a rectangular shape, rather than a rational square shape. Therefore, the focal length of x and y directions is divided into fx and fy. The three-dimensional space coordinates are indicated by x, y, and z. The x and y tables in q show the two-dimensional projection space. W is used to limit the intersection ratio of any two points to remain unchanged. By using projection transformation, point Q in the coordinates of the world boundary is projected into projection plane Q, as shown in Equation (1). (1) In its ,M represents the internal parameters of the image head. To calculate the external parameters of the camera head, we need to consider the relation between the left and right camera heads in the binocular vision system, and the main characteristic is that the translational vector T and the rotational torque matrix R are identical. T and R are the outer parameters of the image head to be solved, and their relation is shown in Equations (2) and (3).

Binocular alignment
After binocular calibration, in order to complete the alignment of the two images, the above calibration results are obtained through the Bouguet method to obtain the rotational torque matrix and the horizontal shift quantity to make the binocular alignment. This method is designed to minimize the number of reprojection of any one of the two images acquired by the camera head, and thus to maximize the surface product of the observation. According to the parameters obtained from the binocular mapping, the two-dimensional points are re-projected into the three-dimensional coordinates, and the re-projected moment matrix M is shown in Equation (4).

(4)
Among them (ax, ay) is the positioning mark of the main point in the image taken by the left side camera, ax is the positioning mark of the image taken by the right side camera with the main point, Tx is the binocular distance, and f is the focal length of the camera. After binocular correction, the buckets deformities in the two images can be well corrected, and the two images can be realisedly matched.

Vertical body matching
In the whole system, the vertical coordinate is the most important ring node. The principle is to find the corresponding point between two images after correction, and then calculate the visual difference of this point, so as to obtain the three-dimensional information.
There are many questions that need to be considered in terms of alternative coordination primitives, alternative registration rules and so on, among which the most important one is to determine the  [11] . For the first time, the main method of vertical matching refers to SGBM(Semi-Global Block Matching).
The flow path of SGBM algorithm is as follows: First, select the Disparity of each pixel point in the image and group it into a Disparity Map. Then, set up an energy function of the whole area. Relate it to the labor disparity map, calculate the minimum value of this energy function, and the resulting result is the optimal solution to the labor disparity. The expression of energy function is shown in Equation (5) : Where, D represents the Disparity Map mentioned above. E(D) shows the energy function corresponding to the labor disparity map. Both P and Q refer to a certain pixel in the image, NP refers to the adjacent pixel point of the pixel P, and P1 and P2 refer to the number of penalty lines. C(p, Dp) refers to the cost of the pixel point when the current pixel parity is Dp. When the function condition is true, the I function returns 1; if it is false, it returns 0. Considering the complexity of obtaining the optimal solution in a two-dimensional image, the problem can be decomposed into several onedimensional problems. Consider the following function: (6) In it, R refers to a certain direction pointing to the current pixel p, and Lr(p, d) refers to the minimum cost value when dis the parity value of p in the current direction. Since Lr(p, d) increases with the movement of pixels, in order to prevent the overflow of the value, the cost value of the foreground pixel needs to subtract the minimum cost value when the previous pixel uses different labor disparity. Then, all cost values in different directions are added together, and the incremental cost with the smallest labor disparity is selected as the final labor disparity of pixels.
After performing the above operations on each object, a Disparity Map for the entire image is obtained. The specific formula is shown in Equation (7). (7) 4.6. Three-dimensional reconstruction 3D reconstruction refers to restoring the coordinates of an object in space by a single image taken from different angles [12] . The principle of 3D reconstruction is shown in Figure 3, where P is a point on the object in the world coordinate system, P1 and P2 are the projections on the image plane generated by the camera C1 and C2, O1 and O2 are the optical centers of C1 and C2, and P is the optical center of C1 and C2. Point P is positively positioned on the connecting line of O1P1 and O2P2, that is, the intersection point of two straight lines, which is uniquely determined by the three-dimensional space position of point P.
In Equations (8) and (9), Z, C1 and Z, C2 are eliminated to obtain four linear equations related to X, Y and Z: The value of (X, Y, Z) can be obtained by combining Equations (10) and (11).

Fruit analysis by actual test
Because the intelligent food delivery robot works in the room and takes into account the surface product in the room, the experiment only simulates the robot's trajectory in a range of 30 m long and 5 m wide, and compares it with the actual trajectory. The results of the actual test were shown in Figure  4. As can be seen from the figure, the simulated trajectory is roughly consistent with the actual trajectory of the robot.

Fig. 4 Track fitting bears fruit
In order to better verify the stability of the food delivery robot system, the above data are further analyzed. When different X values are taken, the difference between the simulated path and the actual path in the Y direction corresponding to each other is calculated, and the error curve obtained is shown in Figure 5.