Target tracking method based on four cameras, cluster robot and storage medium
By using four cameras on the swarm robot to generate a tetrahedron model and perform inverse perspective transformation, the problem of a single camera's limited viewing angle is solved, all-round recognition and tracking of the queen bee robot is achieved, and the accuracy and stability of target tracking are improved. sex.
Patent Information
- Application Number
- CN202410805037.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-21
AI Technical Summary
Existing swarm robots are only equipped with a single camera, which cannot achieve all-round target tracking, resulting in a limited viewing angle and inability to effectively identify and track the queen robot.
Four cameras in different directions are used to collect images, generate a tetrahedron model, use a target detection algorithm to identify the position information of the queen robot, and convert the position information through inverse perspective transformation and camera parameters to determine the main camera for tracking.
It achieves more comprehensive, accurate and fast recognition and tracking of the queen bee robot, overcomes the problem of limited viewing angle of a single camera, and improves the accuracy and stability of target tracking.
Smart Images

Figure CN118379330B
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent robots, and in particular to a target tracking method based on four cameras, a cluster robot and a storage medium. Background Art
[0002] Swarm robotics involves the design, construction, and deployment of large groups of robots that can coordinate and collaborate to solve problems or perform tasks. In some application scenarios, one robot in the swarm is used as a queen robot, and the other robots are used as swarm robots. The swarm robots follow the queen robot to perform corresponding tasks.
[0003] Existing swarm robots are only equipped with a single camera to track the queen bee robot. Although this method is simple to implement, its viewing angle is limited and it cannot achieve all-round target tracking. Summary of the invention
[0004] Based on this, it is necessary to provide a target tracking method, cluster robot and storage medium based on four cameras to address the above technical problems.
[0005] In a first aspect, an embodiment of the present invention proposes a target tracking method based on four cameras, which is used for a cluster robot. The cluster robot is provided with four cameras in different directions, one of which is used as a main camera and the other three cameras are used as auxiliary cameras. The method includes:
[0006] Generate a tetrahedron model based on the images collected by the four cameras;
[0007] Using a target detection algorithm to identify the queen bee robot in the tetrahedron model, and obtaining position information of the queen bee robot in the tetrahedron model;
[0008] Based on the position information, the position information is converted back into an image of a corresponding camera using an inverse perspective transformation and camera parameters, and the camera is determined as a main camera, and the main camera is controlled to track the queen bee robot using a target tracking algorithm.
[0009] In some embodiments, generating a tetrahedron model based on the images captured by the four cameras includes:
[0010] constructing four planar representations of the images;
[0011] Based on the plane expression, the points in the four images are mapped to a tetrahedron template using a camera model to obtain a tetrahedron model.
[0012] In some embodiments, mapping the points in the four images to a tetrahedron template using a camera model based on the plane expression to obtain a tetrahedron model includes:
[0013] Convert each point in the image into a three-dimensional coordinate point based on a coordinate transformation relationship;
[0014] Obtaining the minimum distance from each of the three-dimensional coordinate points to the tetrahedron template;
[0015] By moving the minimum distance along the normal vector direction, each projection point in the tetrahedron template is obtained, thereby obtaining the tetrahedron model.
[0016] In some embodiments, the step of identifying the queen bee robot in the tetrahedron model using a target detection algorithm to obtain the position information of the queen bee robot in the tetrahedron model includes:
[0017] The tetrahedron model is input into a trained target detection model to obtain the position information of the queen bee robot in the tetrahedron model.
[0018] In some embodiments, the training of the target detection model includes:
[0019] Obtaining a tetrahedron model sample training set, and labeling the bounding box and category of the robot in each tetrahedron model sample; the categories of the robots include queen bee robots and swarm robots;
[0020] The initial three-dimensional detection model is trained using the labeled tetrahedron model sample training set to obtain the target detection model.
[0021] In some embodiments, while the main camera is tracking the queen bee robot using a target tracking algorithm, each of the auxiliary cameras continuously captures images and uses a target detection algorithm to identify whether the queen bee robot is switched.
[0022] In some embodiments, the method further comprises:
[0023] When the main camera cannot track the queen bee robot, the four cameras are controlled to increase the angle or frequency of image acquisition.
[0024] In a second aspect, an embodiment of the present invention proposes a swarm robot, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps described in the first aspect.
[0025] The method comprises:
[0026] Generate a tetrahedron model based on the images collected by the four cameras;
[0027] Using a target detection algorithm to identify the queen bee robot in the tetrahedron model, and obtaining position information of the queen bee robot in the tetrahedron model;
[0028] Based on the position information, the position information is converted back into an image of a corresponding camera using an inverse perspective transformation and camera parameters, and the camera is determined as a main camera, and the main camera is controlled to track the queen bee robot using a target tracking algorithm.
[0029] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the processor implements the steps described in the first aspect when executing the computer program.
[0030] The method comprises:
[0031] Generate a tetrahedron model based on the images collected by the four cameras;
[0032] Using a target detection algorithm to identify the queen bee robot in the tetrahedron model, and obtaining position information of the queen bee robot in the tetrahedron model;
[0033] Based on the position information, the position information is converted back into an image of a corresponding camera using an inverse perspective transformation and camera parameters, and the camera is determined as a main camera, and the main camera is controlled to track the queen bee robot using a target tracking algorithm.
[0034] Compared with the prior art, the above method, apparatus, computer equipment and storage medium generate a tetrahedron model based on the images collected by the four cameras, use a target detection algorithm to identify the queen bee robot in the tetrahedron model, obtain the position information of the queen bee robot in the tetrahedron model, and based on the position information, use the inverse perspective transformation and camera parameters to convert the position information back to the image of the corresponding camera, determine the camera as the main camera, and control the main camera to track the queen bee robot using the target tracking algorithm. Since the tetrahedron model is generated using the images of the four cameras, the queen bee robot can be identified more comprehensively, accurately and quickly, which is conducive to tracking the queen bee robot. At the same time, converting the position information back to the image of the main camera can also better track the queen bee robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a schematic diagram of the structure of a cluster robot in one embodiment;
[0036] Figure 2 1 is a flow chart of a target tracking method based on four cameras in one embodiment;
[0037] Figure 3 A schematic diagram of a tetrahedron model obtained in one embodiment;
[0038] Figure 4 A schematic diagram of a process for obtaining a tetrahedron model in one embodiment;
[0039] Figure 5 A schematic diagram of a specific process of obtaining a tetrahedron model in an embodiment;
[0040] Figure 6 Schematic diagram of a process for training a model for target detection in one embodiment. DETAILED DESCRIPTION
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present invention. For ordinary technicians in this field, the present invention can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.
[0042] As shown in the present invention and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular, but also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list, and the method or device may also include other steps or elements.
[0043] Although the present invention makes various references to certain modules in the apparatus according to the embodiments of the present invention, any number of different modules can be used and run on a computing device and / or processor. The modules are only illustrative, and different aspects of the apparatus and method can use different modules.
[0044] It should be understood that when a unit or module is described as being "connected," "coupled" to other units, modules, or blocks, it may refer to being directly connected or coupled, or communicating with other units, modules, or blocks, or there may be intermediate units, modules, or blocks, unless the context clearly indicates otherwise. The term "and / or" as used herein may include any and all combinations of one or more of the associated listed items.
[0045] The target tracking method based on four cameras provided in this application can be applied to Figure 1In the cluster robot shown, the cluster robot generates a tetrahedron model based on the images collected by the four cameras; uses the target detection algorithm to identify the queen bee robot in the tetrahedron model, and obtains the position information of the queen bee robot in the tetrahedron model; based on the position information, uses the inverse perspective transformation and camera parameters to convert the position information back to the image of the corresponding camera, and determines the camera as the main camera, and controls the main camera to track the queen bee robot using the target tracking algorithm. Figure 1 As shown, the cluster robot may include one or two ( Figure 1 The swarm robot may also include a transmission device 106 and an input / output device 108 for communication functions. A person skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned swarm robot. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0046] The input-output device 108 includes cameras arranged in four different directions.
[0047] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the target tracking method based on four cameras in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the cluster robot via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0048] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the cluster robot. In one embodiment, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one embodiment, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0049] like Figure 2 As shown, the embodiment of the present invention provides a target tracking method based on four cameras, and the method is applied to Figure 1 The cluster robot in the example is used to illustrate, including the following steps:
[0050] S202: Generate a tetrahedron model based on the images captured by the four cameras.
[0051] The four cameras collect images from four different directions.
[0052] Preferably, after the image is acquired, the image is preprocessed, such as correcting the image, etc., which is conducive to obtaining a more accurate tetrahedron model.
[0053] like Figure 3 As shown, the tetrahedron template is a three-dimensional template with four blank faces (front, back, left, and right) that is preset and stored in the swarm robot. The points in the four plane images are respectively mapped to the four blank faces in the tetrahedron template to obtain a tetrahedron model. The front, back, left, and right faces of the tetrahedron model are mapped with plane images, and the top and bottom faces are blank faces.
[0054] S204: Using a target detection algorithm to identify the queen bee robot in the tetrahedron model, and obtaining position information of the queen bee robot in the tetrahedron model.
[0055] The target detection algorithm can output the queen bee robot in the tetrahedron model and the position information of the queen bee robot in the tetrahedron model.
[0056] In this embodiment, the cluster robot includes a queen bee robot and a swarm robot, and the swarm robot tracks the queen bee robot. The cluster robot can receive a control signal from a host computer, and the control signal includes a control instruction for setting the queen bee robot or the swarm robot. After receiving the control signal, the cluster robot is set as a queen bee robot or a swarm robot according to the control instruction. The queen bee robot and the swarm robot are distinguished by setting indicator lights of different colors.
[0057] S206: Based on the position information, the position information is converted back into an image of a corresponding camera using an inverse perspective transformation and camera parameters, and the camera is determined as a main camera, and the main camera is controlled to track the queen bee robot using a target tracking algorithm.
[0058] Based on the above steps S202-S206, a tetrahedron model is generated based on the images collected by the four cameras, and the queen bee robot in the tetrahedron model is identified using a target detection algorithm to obtain the position information of the queen bee robot in the tetrahedron model. Based on the position information, the position information is converted back to the image of the corresponding camera using a reverse perspective transformation and camera parameters, and the camera is determined as the main camera, and the main camera is controlled to track the queen bee robot using a target tracking algorithm. Since the tetrahedron model is generated using images from four cameras, the queen bee robot can be identified more comprehensively, which is conducive to tracking the queen bee robot. At the same time, converting the position information back to the image of the main camera can also better track the queen bee robot.
[0059] Furthermore, by deploying four cameras on the robot, images can be collected from different directions at the same time to form an all-round view, effectively overcoming the problem of limited view of a single camera. This method can not only provide a more comprehensive view and higher target tracking accuracy, but also achieve more stable and real-time target tracking in dynamic environments.
[0060] In step S204, Figure 4 As shown, generating a tetrahedron model based on the images collected by the four cameras includes:
[0061] S302: Construct a plane expression of the four images.
[0062] For each tetrahedron model, its plane expression needs to be defined. Each plane expression can be determined by three vertices. , the plane expression is obtained by the following steps. Specifically, the edge vector of the plane image is constructed:
[0063]
[0064] Wherein, V1, V2, and V3 represent three vertices of the plane image;
[0065] Construct the normal vector of the plane image:
[0066]
[0067] Construct a plane expression of the plane image:
[0068]
[0069] Among them, (x, y, z) represents the coordinates of any point in space; (x1, y1, z1) represents the three-dimensional coordinates of a known point on the plane or the three-dimensional coordinates of the cluster robot itself; n1, n2, n3 represent the normal vector The amount.
[0070] S304: Based on the plane expression, use a camera model to map the points in the four images to a tetrahedron template to obtain a tetrahedron model.
[0071] The tetrahedron template is a three-dimensional template containing four blank faces that is preset and stored in the swarm robot. The points in the four images are mapped to the four blank faces in the tetrahedron template to obtain a tetrahedron model.
[0072] In step S304, Figure 5 As shown, based on the plane expression, the camera model is used to map the points in the four images to a tetrahedron template to obtain a tetrahedron model including:
[0073] S402: Convert each point in the image into a three-dimensional coordinate point based on a coordinate conversion relationship.
[0074] Assuming that each camera follows the pinhole camera model, the transformation relationship converts each point in the plane image Convert to three-dimensional coordinate points , the coordinate transformation relationship is:
[0075]
[0076] Wherein, K represents the intrinsic parameter matrix of the camera, and z represents the depth.
[0077] S404: Obtain the minimum distance between each of the three-dimensional coordinate points and the tetrahedral template.
[0078] Through the three-dimensional coordinate points obtained above, the projection of these points on the tetrahedron template can be calculated. The minimum distance D to the plane on the tetrahedron template is:
[0079]
[0080] S406: Obtain each projection point in the tetrahedron template by moving the minimum distance along the normal vector direction , and obtain the tetrahedral model.
[0081] After obtaining the three-dimensional coordinate points, these points need to be projected onto the tetrahedron template. The key step is to move the minimum distance along the normal vector direction to determine the projection point.
[0082] By moving this minimum distance along the normal vector direction, the point in space can be projected onto the plane of the tetrahedron template. The calculation method is:
[0083]
[0084] This completes the process of obtaining any three-dimensional coordinate point in space. Get the projection point of the tetrahedron model .
[0085] The tetrahedron model constructed based on the above steps enables image data from four different directions to be effectively processed and analyzed in a unified three-dimensional space, so that the swarm robot can better understand the structure of its surrounding environment and accurately identify the queen bee robot.
[0086] In some embodiments, the tetrahedron model is input into a trained target detection model to obtain the position information of the queen bee robot in the tetrahedron model.
[0087] The training of the target detection model is described in detail below. Figure 6 As shown, the following steps are included:
[0088] S502: Obtain a tetrahedron model sample training set, and label the boundary box and category of the robot in each tetrahedron model sample.
[0089] The method of step S204 can be used to construct the tetrahedron model sample. Use four cameras to capture images and annotate them, including the bounding box and category of the queen bee robot. Preprocess the image to adapt to the spatial representation of the tetrahedron model, ensure that the annotation of the queen bee robot is converted to a three-dimensional coordinate system, and convert the image from the projection of the four faces into a consistent three-dimensional expression - the tetrahedron model sample.
[0090] The categories of the robots include queen bee robots and swarm robots. The queen bee robots and swarm robots can be distinguished by indicator lights of different colors, for example, a queen bee robot has a red indicator light, and a swarm robot has a green indicator light. The robots can be marked by the color of the indicator light.
[0091] S504: Train the initial three-dimensional detection model using the labeled tetrahedron model sample training set to obtain the target detection model.
[0092] The initial 3D detection model is a neural network suitable for processing 3D spatial data, such as a 3D CNN-based model, or an advanced point cloud processing model PointNet.
[0093] The initial 3D detection model is trained using the labeled tetrahedron model sample training set, and the model is optimized to identify and locate objects in 3D space. At the same time, a multi-task loss function is applied to simultaneously learn the classification and location information (bounding box) of the object.
[0094] The trained target detection model can identify and locate the queen bee robot in the tetrahedron model.
[0095] In some embodiments, while the main camera is tracking the queen bee robot using a target tracking algorithm, each of the auxiliary cameras continuously captures images and uses a target detection algorithm to identify whether the queen bee robot is switched.
[0096] When the main camera is tracking the target, other auxiliary cameras can maintain the detection status, provide auxiliary information, and enhance the stability of the overall system. By allocating camera tasks, the demand for computing resources can be reduced and system performance can be optimized.
[0097] Since the queen bee robot may be switched in some scenarios, each camera continuously collects images and uses a target detection algorithm to identify whether the queen bee robot is switched, so that the switched queen bee robot can be tracked quickly.
[0098] In some embodiments, when the main camera cannot track the queen bee robot, the four cameras are controlled to increase the angle or frequency of image acquisition.
[0099] The image acquisition angle or frequency of the camera in this embodiment can be adjusted. Taking into account some special circumstances that cause the queen bee robot to be lost, the lost queen bee robot can be found by controlling the four cameras to increase the image acquisition angle or frequency, thereby achieving continued tracking of the queen bee robot.
[0100] In some embodiments, the last detected position and motion trajectory of the queen bee robot may also be used to predict the current position of the queen bee robot.
[0101] For example, a motion prediction model can be used to provide position prediction based on uncertain position information.
[0102] The following is a detailed description of step S206.
[0103] The specific steps of step S206 are:
[0104] Get position information: Get the position information of the queen bee robot in three-dimensional space from the tetrahedron model .
[0105] Inverse perspective transformation: Use the camera parameters to convert the position information in 3D space back to the 2D image coordinates of each camera.
[0106] Determine the main camera: Map the converted 2D image coordinates to the specific camera image and determine the main camera as needed.
[0107] Control main camera tracking: Use the target tracking algorithm to control the main camera to track the Queen Bee robot and update its position in real time.
[0108] The inverse perspective transform is a geometric transformation that projects a point in three-dimensional space onto a two-dimensional image plane. This process depends on the intrinsic and extrinsic parameters of the camera.
[0109] Camera intrinsic matrix K Parameters describing the imaging characteristics of the camera, including focal length and principal point offset. The format is as follows:
[0110]
[0111] in, and is the focal length of the camera in the x and y directions, and are the coordinates of the principal point of the image (the intersection of the optical axis and the imaging plane).
[0112] The camera extrinsic matrix describes the position and direction of the camera in space, including the rotation matrix R and the translation vector t. The form of the extrinsic matrix is:
[0113]
[0114] The rotation matrix R and the translation vector t are usually obtained through the camera calibration process. Calibration can be done using a variety of methods, such as using a checkerboard or a special calibration plate, by capturing multiple views at different angles, and using a computer vision algorithm (such as the calibration function in OpenCV) to process these images to calculate R and t.
[0115] The three-dimensional space point Projection to 2D image points The process uses the following formula:
[0116]
[0117] Simplified:
[0118]
[0119] The goal of the inverse perspective transform is to convert points on the 2D image back to coordinates in 3D space. This process involves projecting the image coordinates back to the camera coordinate system.
[0120] Assume we know the points in the image And the corresponding depth information Z. First, the image coordinates need to be converted into three-dimensional points in camera coordinates .
[0121] Use the inverse matrix of the camera's built-in matrix :
[0122]
[0123] Next, we need to transform the 3D points in the camera coordinate system into the world coordinate system. Use the camera's external parameter matrix to perform the inverse transformation:
[0124]
[0125] Simplified calculation:
[0126]
[0127] in, is the inverse of the rotation matrix, and t is the translation vector.
[0128] The target tracking method proposed in the above embodiment uses the images of four cameras to generate a tetrahedron model, which can more comprehensively identify the queen bee robot and facilitate tracking of the queen bee robot. At the same time, converting the position information back into the image of the main camera can also better track the queen bee robot.
[0129] In summary, the target tracking method based on four cameras significantly improves the target tracking capability of swarm robots in complex environments by providing a full range of viewing angles, improving real-time performance and accuracy. This method provides an effective technical approach to address the limitations of existing technologies and has significant application potential and practical value.
[0130] It should be understood that, although the various steps in the above flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0131] In one embodiment, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in any one of the above-mentioned target tracking method embodiments based on four cameras are implemented.
[0132] Wherein, the method comprises:
[0133] Generate a tetrahedron model based on the images collected by the four cameras;
[0134] Using a target detection algorithm to identify the queen bee robot in the tetrahedron model, and obtaining position information of the queen bee robot in the tetrahedron model;
[0135] Based on the position information, the position information is converted back into an image of a corresponding camera using an inverse perspective transformation and camera parameters, and the camera is determined as a main camera, and the main camera is controlled to track the queen bee robot using a target tracking algorithm.
[0136] In some embodiments, generating a tetrahedron model based on the images captured by the four cameras includes:
[0137] constructing four planar representations of the images;
[0138] Based on the plane expression, the points in the four images are mapped to a tetrahedron template using a camera model to obtain a tetrahedron model.
[0139] In some embodiments, mapping the points in the four images to a tetrahedron template using a camera model based on the plane expression to obtain a tetrahedron model includes:
[0140] Convert each point in the image into a three-dimensional coordinate point based on a coordinate transformation relationship;
[0141] Obtaining the minimum distance from each of the three-dimensional coordinate points to the tetrahedron template;
[0142] By moving the minimum distance along the normal vector direction, each projection point in the tetrahedron template is obtained, thereby obtaining the tetrahedron model.
[0143] In some embodiments, the step of identifying the queen bee robot in the tetrahedron model using a target detection algorithm to obtain the position information of the queen bee robot in the tetrahedron model includes:
[0144] The tetrahedron model is input into a trained target detection model to obtain the position information of the queen bee robot in the tetrahedron model.
[0145] In some embodiments, the training of the target detection model includes:
[0146] Obtaining a tetrahedron model sample training set, and labeling the bounding box and category of the robot in each tetrahedron model sample; the categories of the robots include queen bee robots and swarm robots;
[0147] The initial three-dimensional detection model is trained using the labeled tetrahedron model sample training set to obtain the target detection model.
[0148] In some embodiments, while the main camera is tracking the queen bee robot using a target tracking algorithm, each of the auxiliary cameras continuously captures images and uses a target detection algorithm to identify whether the queen bee robot is switched.
[0149] In some embodiments, the method further comprises:
[0150] When the main camera cannot track the queen bee robot, the four cameras are controlled to increase the angle or frequency of image acquisition.
[0151] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0152] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0153] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A target tracking method based on four cameras, used for cluster robots, wherein each cluster robot is provided with four cameras in different directions, one of which is used as a main camera and the other three cameras are used as auxiliary cameras, characterized in that: The method comprises: Generate a tetrahedron model based on the images collected by the four cameras; Using a target detection algorithm to identify the queen bee robot in the tetrahedron model, and obtaining position information of the queen bee robot in the tetrahedron model; Based on the position information, the position information is converted back into an image of a corresponding camera using an inverse perspective transformation and camera parameters, and the camera is determined as a main camera, and the main camera is controlled to track the queen bee robot using a target tracking algorithm; The generating of the tetrahedron model based on the images collected by the four cameras comprises: constructing four planar representations of the images; Based on the plane expression, using a camera model, the points in the four images are mapped to a tetrahedron template to obtain a tetrahedron model; Based on the plane expression, the camera model is used to map the points in the four images to a tetrahedron template to obtain a tetrahedron model, which includes: Convert each point in the image into a three-dimensional coordinate point based on a coordinate transformation relationship; Obtaining the minimum distance from each of the three-dimensional coordinate points to the tetrahedron template; By moving the minimum distance along the normal vector direction, each projection point in the tetrahedron template is obtained to obtain the tetrahedron model; The method of using a target detection algorithm to identify the queen bee robot in the tetrahedron model and obtaining the position information of the queen bee robot in the tetrahedron model includes: The tetrahedron model is input into a trained target detection model to obtain the position information of the queen bee robot in the tetrahedron model.
2. The method according to claim 1, characterized in that The training of the target detection model includes: Obtaining a tetrahedron model sample training set, and labeling the bounding box and category of the robot in each tetrahedron model sample; the categories of the robots include queen bee robots and swarm robots; The initial three-dimensional detection model is trained using the labeled tetrahedron model sample training set to obtain the target detection model.
3. The method according to claim 1, characterized in that While the main camera tracks the queen bee robot using a target tracking algorithm, each of the auxiliary cameras continuously collects images and uses a target detection algorithm to identify whether the queen bee robot is switched.
4. The method according to claim 1, characterized in that: The method further comprises: When the main camera cannot track the queen bee robot, the four cameras are controlled to increase the angle or frequency of image acquisition.
5. A swarm robot, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
6. The cluster robot according to claim 5, characterized in that: It comprises a queen bee robot and a bee colony robot, wherein the queen bee robot and the bee colony robot are distinguished by setting indicator lights of different colors.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
