Disclosure of Invention
The invention aims to provide an object identification method based on binocular three-dimensional vision of a robot, which improves the efficiency of a monitoring algorithm and saves manpower by adapting the pose, and comprises the following steps,
the line patrol robot with the double camera modules is configured, and the poses of the double camera modules can be rotationally adjusted along the normal phase of the line patrol robot; the inspection robot is also at least provided with a base; the base is provided with a guide wheel of an independent motor; the double cameras are electrically connected with a control communication module arranged on the base;
still have with the control communication module wireless connection's of patrolling line robot collection terminal: the acquisition terminal continuously receives the image information sent by the inspection robot, temporarily stores the received image information and forwards the temporarily stored image information to the server;
the configuration server is used for calculating the image information forwarded by the acquisition terminal to obtain the 3D position of the object in the image information and marking the corresponding appearance position on a preset map; then clustering the moving objects, and drawing time sequence 3D position information according to the appearance positions; clustering includes either manually assisted clustering or automatic clustering. And sending prompt information to the administrator for the 3D position information meeting the preset alarm condition. By the method, the intelligent attribute of line patrol monitoring can be enlarged, fewer line patrol robots can be used for monitoring large-area factory areas, cells and warehouses, and the monitoring intelligence degree and the utilization of image information are improved.
The double cameras are connected to a substrate; the base plate is connected with an angle control stepping motor; the base plate is connected with the base through a machine head and an upright post which can control the elevation angle; an overlapping area capable of generating 3D vision is arranged between the monitoring areas of the two cameras; the line patrol robot can acquire real-time position information in the area through radio or GPS; therefore, the pedestrian or the object monitored by the stereoscopic vision can obtain the relative position information by a simple function transformation. And in the overlapping area, simple geometric transformation can be carried out through the positions of two or more double cameras to obtain the corresponding 3D position.
Further optimization measures adopted also include:
the clustering of the moving objects comprises automatic clustering and artificial auxiliary clustering. After the server obtains the image information, the automatic clustering of the machine is firstly carried out, and the recognition is carried out after the clustering. And identifying the moving objects after automatic clustering in the characteristic database, wherein the moving objects cannot be identified, and performing artificial assisted clustering by an administrator. Through data accumulation for a period of time, a basic database for monitoring regional line patrol can be established in a short time.
The pose optimization instruction comprises an inspection robot identification code, horizontal front and back elevation angle adjustment information, horizontal left and right elevation angle adjustment information and horizontal rotation angle adjustment information. After the machine receives the image information, the horizontal elevation angles of the double cameras of the inspection robot are automatically adjusted, the stepping motor is adjusted to adjust the left deflection angle and the right deflection angle, and the degree of the horizontal rotation angle is adjusted by adjusting the guide wheel, so that the optimal matching between the image information acquired by the inspection robot can be improved. The accuracy of 3D distance recognition can be improved by uniformly leveling the vanishing points of the images, and meanwhile, the calculation power of a server in the process of adjusting the angles of the images to perform clustering operation can be distributed due to the improvement of the original quality of the images.
The administrator presets the inspection point of the inspection robot through a coordinate input mode, and the inspection robot sequentially passes through the inspection points according to a preset sequence to perform inspection monitoring.
A three-dimensional vision based robot recognition and control method, comprising: decomposing the image information in the form of two-dimensional windows into two one-dimensional windows (W ij ) And the aggregation is accelerated by pre-calculating a horizontal integral image and a vertical integral image, and the filter function is as follows:
the line patrol robot with the double camera modules is adopted, and the poses of the double camera modules can be rotationally adjusted along the normal phase of the line patrol robot; the inspection robot is also at least provided with a base; the base is provided with a guide wheel of an independent motor; the double cameras are electrically connected with a control communication module arranged on the base; still have with the control communication module wireless connection's of patrolling line robot collection terminal: the acquisition terminal continuously receives the image information sent by the inspection robot, temporarily stores the received image information and forwards the temporarily stored image information to the server; the server is used for calculating the image information forwarded by the acquisition terminal to obtain the 3D position of the object in the image information and marking the corresponding appearance position on a preset map; and then clustering the moving objects, and performing time sequence 3D position information drawing and other new technologies according to the appearance positions. Therefore, the invention has the advantages of improving the efficiency of the monitoring algorithm, saving labor and reducing cost.
Detailed Description
The present invention will be described in further detail with reference to the following examples.
The reference numbers illustrate: the device comprises a base 1, a guide wheel 11, a power motor 12, a control communication module 2, an upright post 3, a machine head 4, an angle control stepping motor 41, a base plate 42 and double cameras 43.
Example 1:
referring to fig. 1 to 3, in the present embodiment, an object identification method based on binocular three-dimensional vision of a robot includes an inspection robot having two camera modules, and poses of the two camera modules can be rotationally adjusted along a normal phase of the inspection robot; the inspection robot is also at least provided with a base; the base is provided with a guide wheel of an independent motor; the double cameras are electrically connected with a control communication module arranged on the base;
still have with the control communication module wireless connection's of patrolling line robot collection terminal: the acquisition terminal continuously receives the image information sent by the inspection robot, temporarily stores the received image information and forwards the temporarily stored image information to the server;
the server is used for calculating the image information forwarded by the acquisition terminal to obtain the 3D position of the object in the image information and marking the corresponding appearance position on a preset map; then clustering the moving objects, and drawing time sequence 3D position information according to the appearance positions; clustering includes either manually assisted clustering or automatic clustering. And sending prompt information to the administrator for the 3D position information meeting the preset alarm condition. By the method, the intelligent attribute of line patrol monitoring can be enlarged, fewer line patrol robots can be used for monitoring large-area factory areas, cells and warehouses, and the monitoring intelligence degree and the utilization of image information are improved.
The double cameras are connected to a substrate; the base plate is connected with an angle control stepping motor; the base plate is connected with the base through a machine head and an upright post which can control the elevation angle; an overlapping area capable of generating 3D vision is arranged between the monitoring areas of the two cameras; the line patrol robot can acquire real-time position information in the area through radio or GPS; therefore, the pedestrian or the object monitored by the stereoscopic vision can obtain the relative position information by a simple function transformation. And in the overlapping area, simple geometric transformation can be carried out through the positions of two or more double cameras to obtain the corresponding 3D position.
The clustering of the moving objects comprises automatic clustering and artificial auxiliary clustering. After the server obtains the image information, the automatic clustering of the machine is firstly carried out, and the recognition is carried out after the clustering. And identifying the moving objects after automatic clustering in the characteristic database, wherein the moving objects cannot be identified, and performing artificial assisted clustering by an administrator. Through data accumulation for a period of time, a basic database for monitoring regional line patrol can be established in a short time.
The pose optimization instruction comprises an inspection robot identification code, horizontal front and back elevation angle adjustment information, horizontal left and right elevation angle adjustment information and horizontal rotation angle adjustment information. After the machine receives the image information, the horizontal elevation angles of the double cameras of the inspection robot are automatically adjusted, the stepping motor is adjusted to adjust the left deflection angle and the right deflection angle, and the degree of the horizontal rotation angle is adjusted by adjusting the guide wheel, so that the optimal matching between the image information acquired by the inspection robot can be improved. The accuracy of 3D distance recognition can be improved by uniformly leveling the vanishing points of the images, and meanwhile, the calculation power of a server in the process of adjusting the angles of the images to perform clustering operation can be distributed due to the improvement of the original quality of the images.
The administrator presets the inspection point of the inspection robot through a coordinate input mode, and the inspection robot sequentially passes through the inspection points according to a preset sequence to perform inspection monitoring.
The 2D rotation matrix estimation algorithm of the present embodiment adopts the textbook classical theory, but some explanations are still provided for easy understanding. The planar projection of the image has a series of straight lines and these lines eventually intersect at a point, referred to as a vanishing point. From the center to the edge of the image
Intersects the image plane at a vanishing point, while on a 3D scale the direction of the ray and the original 3D parallel lines are parallel under the camera coordinate system. The solution of the intersection point can calculate the normal vectors of each 2D straight line and the camera center which form a plane, then the normal vectors are coplanar, and the cross product of any two normal directions is the intersection point. Thus, 3D parallel lines under the point cloud coordinate system
Vanishing point ray to camera coordinate system
The transformation between is a 3D rigid transformation.
Wherein
And t
And rotation and translation parameters for the transformation from the point cloud coordinate system to the image coordinate system of the
dual camera 43, the rotation matrix R needs to satisfy special orthogonality.
And
showing the inhomogeneous vanishing point direction and the 3D parallel line direction.
Since three-dimensional rotation has 3 degrees of freedom, at least 2 sets of 2D-3D direction matching can be used to estimate the rotation matrix.
To facilitate understanding, the pseudo-code implementing the vanishing point-based rotation matrix estimation of the above classical theory is as follows:
input 2D line set l2d},3D line set { l3dOutputting 8 candidate rotation matrixes R = { R1, R2.., R8};
1. calculating M2d (M2d>3) Clustering the 2D straight lines according to the vanishing points in the vanishing point direction;
2. merge M
2dMultiple vanishing point directions and extracting the first 2 main vanishing point directions with the maximum number of 2D lines
3. Parallel clustering out by using 3D line direction
A 3D line principal direction;
4. merging 3D line principal directions to reject noise and extracting two principal directions with the largest number of lines
5. Computing a rotation matrix candidate using (equation 1)
the above pseudo code content belongs to the idea of the classical scheme, and is only for facilitating the understanding of the technical scheme. The clustering detection algorithm uses a classical particle swarm optimization fuzzy clustering method (PSO), belongs to a classical method and is not described any more.
The server processes the image information, including filtering; the filtering processing is carried out by adopting an improved self-adaptive algorithm, and the method comprises the following steps: defining a linear coefficient ak、bkComprises the following steps:
wherein, the input image I, the filtering image is P, and the output image is Q. i and k are pixel points;
an adaptive support window of k;
to represent
The total number of inner pixels;
is composed of
The average value of (a) of (b),
is composed of
The variance of (a) is determined,
is a penalty factor; the filter function is:
wherein the content of the first and second substances,
、
respectively represent
、
Total number of inner pixels.
The pose optimization method comprises the following steps: reading or inputting the collected image, filtering, and reading the 2D line set
l 2dGreat, 3D line set
l 3dAnd the aforementioned 8 candidate rotation matrices
(ii) a Merging collinear 2D and 3D line segments, and then removing shorter line segment noise; initializing 2D-3D line match number N
i(ii) a Randomly combining 3 pairs of 2D-3D line matching in a small restaurant matching set, and calculating a translation vector t by using the following formula:
e.g. N>Ni then iteration Ni = N, 2D-3D line matching set iteration
Iteration of translation vector t
i= t; up to Ni>e*N(
l 2d) /4 or reaching the maximum iteration number; extraction of
And corresponding pose and matching set R
*,t
*,
. According to R
*,t
*,
Parameters can be easily converted to obtain the horizontal elevation angle, the left-right deflection angle and the horizontal rotation angle of the corresponding camera, and the parameters can be automatically adjusted correspondingly by taking the difference value with the existing state.
Theoretically, for a pair of matched 2D-3D lines, the registration error contains the overlap distance and the angular difference. Since the overlap length is already constrained in the matching estimation, the pose is optimized here using the matching projection overlap angle as the error. If a 3D line matches a corresponding 2D line, then the projection of the two 3D end points onto the image plane should lie on the 2D straight line.
Example 2:
further, referring to fig. 4, a two-dimensional window is decomposed into two one-dimensional windows by introducing a quadrature integration method into the filtering method of the present invention (
) And the horizontal integral image and the vertical integral image are pre-calculated to accelerate the aggregation, and the improved filter function is as follows:
in the action process of the line patrol robot, a fixed-point sequential line patrol mode is adopted for monitoring, images of the double cameras 43 are continuously shot, so that one camera of the double cameras 43 is a main camera, the obtained image information of line patrol monitoring is used for clustering objects or people, and the other camera is used for matching with the main camera to perform phase difference positioning to convert a relative position.
Acquiring position information of a patrol point in an area, wherein the position information comprises line type information of a patrol point track which is marked in advance in a three-dimensional map model of the area; when the track of the inspection point is in a curve shape, at least acquiring a position information data set of an initial inspection point and a final inspection point, which are sent by a GPS sensor; the method also comprises the steps of acquiring position information data of each patrol viewpoint sent by the three-dimensional point cloud sensor; when the track between the inspection points is linear, at least acquiring the position information data set of the initial inspection point and the final inspection point sent by the GPS sensor, wherein the position information data set comprises the following steps: and acquiring a position information data set of the starting patrol point, a position of the ending patrol point and a patrol point information data set therebetween. The method for establishing the traversal tour route according to the information of the tour viewpoint preset by the administrator can adopt a classic ant colony algorithm.
The routing logic between the tour points in the area includes but is not limited to the following parameters: range, congestion level, intersection and inflection point. In the route, namely in the map of the area, assuming that each grid is one step, the path length problem is converted into the step number problem, and the problem is simplified to the problem of searching the minimum number of steps passing through the grid for avoiding obstacles from the departure point to the target point. I.e. the optimal path optimization problem can be understood as a problem of minimum distance (number of steps) and can be implemented by means of a counter in the running of the algorithm. I.e. the solution including the least number of steps by recording the output path is the best path standard. The congestion degree, namely the number of other traffic participants according to the position of the intelligent vehicle and the planned driving route, can also be understood as the traffic flow and the congestion degree. And respectively setting the path and the patrol point with larger traffic flow as targets with larger weights through historical experience or a learning algorithm, and adjusting the set weights through a feedback mechanism in subsequent operation. The intersection points are determined according to the repeatedly selected tour points, the more tour points of the planned path are repeated, the greater the weight of the associated tour points and the connected edges, and the points can be traffic hubs and junction points in an actual map. The inflection point is selected according to the number of turns and the number of intersections of the planned path. On the regional map, if one patrol point only has one connected edge and one adjacent point, it can be understood that the patrol point is the simplest patrol point in the selectable patrol points. However, when a node and many other patrol points can communicate with each other, it means that the number of intersections traversed by the path passing through the patrol point is the largest. And when two adjacent patrol points in the planned path are respectively located on two intersecting edges, the two patrol points can be called as inflection points. The planning method can refer to a path planning mechanism introduced in the research of an optimal path selection mechanism and a method facing the intelligent vehicle driving by using the existing classical method.
The processing process of the routing logic between the patrol viewpoints in the area comprises image acquisition, graying, filtering, edge detection, point set generation, positioning on key point confirmation, path calculation, optimal path selection, smoothing, output, recording and archiving. On the basis of the intelligent vehicle optimal running path selection mechanism, a learner researches and explores the optimal path selection method of the intelligent driving vehicle through different designs and algorithms, and optimizes and designs the optimal path selection method in a targeted manner through different strategies so as to achieve a better effect. Because of the space of the application text of the invention, the method can be used for a plurality of alternative ways of path planning in the prior art without being expanded.
Patrol and be equipped with the position that supplementary sign of vision is used for calibration robot near the sight point, supplementary sign of vision includes: bar code label, two-dimensional code label, character label, trademark identification. Because GPS signals may be subject to errors in weather, electromagnetic, and other different environments, such as underground installations, GPS location information is often not available. Therefore, the adaptability and the precision of the system can be improved by arranging the visual auxiliary labels near each patrol point to carry out GPS position calibration.
While the invention has been described in connection with a preferred embodiment, it is not intended to limit the invention, and it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the spirit and scope of the invention.