Obstacle detection method, robot, equipment and storage medium
By using image processing and tracking algorithms in cleaning robots, the object detection frames and corner positions of obstacles are generated and predicted, the problem of traditional obstacle detection inefficiency is solved, and obstacle information update and detection efficiency are improved at higher frequency.
Patent Information
- Application Number
- CN202411938961.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-25
AI Technical Summary
The existing cleaning robots are inefficient in complex home environments due to the inefficient detection efficiency of traditional obstacle detection methods, which affects the normal operation of the robot.
The robot obtains the current frame image and movement speed containing the obstacle, generates an object detection box, calculates the depth of the obstacle, and assigns the target corner points in the object detection box, predicts the predicted corner points position in the next frame image through a tracking algorithm, and generates a predicted object detection box to determine the predicted position of the obstacle.
It greatly reduces the calculation burden of the robot for obstacle detection, allowing the robot to update obstacle information at a higher frequency and improves detection efficiency.
Smart Images

Figure CN119888681A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to an obstacle detection method, robot, device and storage medium. Background Art
[0002] In order to achieve autonomous cleaning and efficient navigation, existing cleaning robots all have obstacle detection capabilities. However, in complex home environments, cleaning robots need to process a large amount of data in real time to ensure smooth operation. Traditional obstacle detection methods may affect the normal operation of cleaning robots due to low detection efficiency. Summary of the invention
[0003] In a first aspect, the present application provides an obstacle detection method, comprising:
[0004] Acquire, by the robot, a current frame image containing an obstacle and a moving speed of the robot, and generate an object detection frame corresponding to the obstacle in the current frame image;
[0005] Calculating the depth of the obstacle according to the position of the object detection frame in the current frame image;
[0006] Allocate a plurality of target corner points in the object detection frame, and predict the predicted corner point positions in the next frame image by a tracking algorithm according to the depth and the moving speed;
[0007] A predicted object detection frame is generated according to the predicted corner point position, and a predicted position of the obstacle is determined according to the predicted object detection frame.
[0008] In one implementation, generating an object detection frame corresponding to the obstacle in the current frame image includes:
[0009] Determine a time window for image acquisition, and judge whether the time frame corresponding to the current frame image is the starting frame of the time window;
[0010] If so, the obstacle in the current frame image is detected by a target detection algorithm, and the corresponding object detection frame is generated.
[0011] In one implementation, after detecting the obstacle in the current frame image by using a target detection algorithm and generating the corresponding object detection frame, the method further includes:
[0012] Initialize a tracking template of the current time window, where the tracking template is an object detection frame corresponding to the current time window, and each time window corresponds to one tracking template.
[0013] In one implementation, allocating a plurality of target corner points in the object detection frame includes:
[0014] Dividing the object detection frame into regions of interest according to the tracking template;
[0015] A corner point detection algorithm is used to select candidate corner points in the region of interest, and a maximum value suppression algorithm is used to screen out the corresponding target corner points from the candidate corner points.
[0016] In one implementation, predicting the predicted corner point position in the next frame of image by using a tracking algorithm includes:
[0017] According to the depth and the moving speed, using an optical flow algorithm to estimate the corner point offset between the tracking template corresponding to the current frame image and the next frame image;
[0018] The predicted corner point position corresponding to the next frame image is predicted according to the corner point offset.
[0019] In one implementation, generating a predicted object detection frame according to the predicted corner point position includes:
[0020] Perform homography transformation on the predicted corner points to obtain a predicted object detection frame corresponding to the next frame image.
[0021] In one implementation, calculating the depth of the obstacle according to the position of the object detection frame in the current frame image includes:
[0022] Obtaining the distance between the bottom border of the object detection frame and the bottom edge of the current frame image;
[0023] The actual height of the obstacle is obtained, and the depth of the obstacle is calculated according to the distance and the actual height.
[0024] In a second aspect, the present application provides a robot, comprising:
[0025] A generating module, configured to obtain, by a robot, a current frame image containing an obstacle and a moving speed of the robot, and generate an object detection frame corresponding to the obstacle in the current frame image;
[0026] A calculation module, used for calculating the depth of the obstacle according to the position of the object detection frame in the current frame image;
[0027] An allocation module, configured to allocate a plurality of target corner points in the object detection frame, and predict the predicted corner point positions in the next frame image through a tracking algorithm according to the depth and the moving speed;
[0028] A prediction module is used to generate a predicted object detection frame according to the predicted corner point position, and determine the predicted position of the obstacle according to the predicted object detection frame.
[0029] In a third aspect, the present application provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the obstacle detection method described in the first aspect.
[0030] In a fourth aspect, the present application provides a computer storage medium storing a computer program, wherein when the computer program is executed on a processor, the obstacle detection method according to the first aspect is implemented.
[0031] The embodiments of the present application have the following beneficial effects:
[0032] An obstacle detection method provided in an embodiment of the present application uses a robot to acquire an image containing an obstacle, then determines an object detection frame corresponding to the obstacle in the image, assigns target corner points in the object detection frame, and then predicts the position of the target corner points through a tracking algorithm to obtain the predicted position of the obstacle, thereby greatly reducing the computational burden of the robot for obstacle detection and allowing the robot to update obstacle information at a higher frequency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. For ordinary technicians in this field, other related drawings can also be obtained based on these drawings without creative work.
[0034] Figure 1 A schematic diagram of a process of an obstacle detection method provided in an embodiment of the present application is shown;
[0035] Figure 2 A schematic diagram showing the principle of an obstacle detection method provided in an embodiment of the present application is shown;
[0036] Figure 3 A schematic diagram of a process for generating an object detection frame provided in an embodiment of the present application is shown;
[0037] Figure 4 A schematic diagram of a process of a target corner point screening method provided in an embodiment of the present application is shown;
[0038] Figure 5 A schematic diagram of the frame structure of a robot provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0040] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0041] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.
[0042] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0043] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0044] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0045] Reference Figure 1 , Figure 1 A flowchart of an obstacle detection method provided in this embodiment is provided. The method can be used to reduce the difficulty of obstacle recognition by a robot. The method includes:
[0046] S101. Acquire a current frame image containing an obstacle and a moving speed of the robot through a robot, and generate an object detection frame corresponding to the obstacle in the current frame image.
[0047] Reference Figure 2, Figure 2 A schematic diagram of the principle of an obstacle detection method provided in this embodiment.
[0048] Among them, A is the obstacle in the image, B is the object detection frame corresponding to the obstacle, and C is the current frame image. During the movement, the robot will use its built-in camera to scan the environment image in its forward direction, and judge whether there is an obstacle in the forward direction based on the environment image. If there is an obstacle, it can avoid it in advance or take other measures.
[0049] like Figure 2 As shown in the figure, when the robot obtains the current frame image containing the obstacle, according to the imaging principle of the camera, the farther the obstacle is from the camera, the smaller its size in the image. Therefore, as the robot moves, the size of the obstacle in the image will gradually increase. When a certain upper limit is reached, it means that the robot is about to or has come into contact with the obstacle. Therefore, an object detection frame corresponding to the obstacle can be generated. When the size of the image occupied by the object detection frame reaches a certain threshold, or the boundary of the object detection frame reaches a certain boundary of the image, it can be determined that the distance between the robot and the obstacle is very close, and it needs to stop moving forward or turn to avoid collision with the obstacle.
[0050] For the detection of obstacles in the current frame image, it can be extracted through a neural network model, such as the YOLOV6 model. Various images containing obstacles and images without obstacles can be used as training sets for the YOLOV6 model until the YOLOV6 model meets the requirements for obstacle recognition.
[0051] S102: Calculate the depth of the obstacle according to the position of the object detection frame in the current frame image.
[0052] The depth of an obstacle can be understood as the distance between the robot and the obstacle. The distance between the obstacle and the robot is different, the angle at which the robot's camera shoots the obstacle is different, and the position of the obstacle in the image is also different. Therefore, the depth of the obstacle can be calculated based on the position of the object detection box corresponding to the obstacle in the current frame image.
[0053] The depth of the obstacle can usually be determined based on the distance between the obstacle and the lower boundary of the image, such as the distance between the lower edge of the object detection frame and the lower boundary of the image. The depth of the obstacle can be calculated based on the imaging principle of the camera, that is, first obtain the actual height of the obstacle, and calculate the depth of the obstacle based on the distance and the actual height. Since the obstacles of the cleaning robot are usually household items when working, the robot can obtain the parameters of the obstacle from the obstacle database after determining the type of obstacle, or the user can input the data of various items in the room into the robot in advance.
[0054] S103, allocating a plurality of target corner points in the object detection frame, and predicting the predicted corner point positions in the next frame image by a tracking algorithm according to the depth and the moving speed.
[0055] As the robot moves, the position of the obstacle in the image taken by the robot will also change. In order to predict the position of the obstacle at the next moment, since the position tracking or prediction of the entire obstacle is computationally difficult and will occupy a large amount of the robot's computing resources, multiple target corner points can be allocated in the object detection frame of the obstacle, and then the position of the obstacle can be predicted by predicting the position change of the target corner points.
[0056] S104: Generate a predicted object detection frame according to the predicted corner point position, and determine the predicted position of the obstacle according to the predicted object detection frame.
[0057] The target corner points are allocated in the obstacle detection frame, and then the position changes of the target corner points are predicted to obtain the predicted corner point positions. Then, based on the predicted corner point positions, the predicted object detection frame is generated in reverse, and the predicted position of the obstacle is determined based on the predicted object detection frame.
[0058] In this embodiment, the robot acquires an image containing an obstacle, then determines an object detection frame corresponding to the obstacle in the image, allocates target corner points in the object detection frame, and then predicts the position of the target corner points through a tracking algorithm to obtain the predicted position of the obstacle, thereby greatly reducing the computational burden of the robot for obstacle detection and allowing the robot to update obstacle information at a higher frequency.
[0059] Reference Figure 3 , step S101 includes: steps S1011-S1012.
[0060] S1011, determining a time window for image acquisition, and judging whether the time frame corresponding to the current frame image is the starting frame of the time window.
[0061] S1012: If yes, detect obstacles in the current frame image using a target detection algorithm, and generate the corresponding object detection frame.
[0062] For example, define the time window as T, T is 3 seconds, if the current frame image is an image captured at the 1st second, then determine its corresponding time frame as the starting frame; if the current frame image is an image captured at the 2nd or 3rd second, then determine its corresponding time frame is not the starting frame.
[0063] In this embodiment, the extraction of the object detection frame is determined based on the image corresponding to the starting frame. After the object detection frame is determined based on the starting frame, the object detection frame corresponding to the subsequent time frame in the time window can be predicted.
[0064] For example, taking 3 seconds as a time window, first collect the current frame image of the 1st second and determine the object detection frame corresponding to the current frame image, and then predict the object detection frames of the 2nd and 3rd seconds based on the object detection frame of the 1st second. In some scenarios, such as when the scene is relatively simple or in order to save computing resources, the object detection frame of the next time window can also be predicted based on the current time window.
[0065] If the current frame image is not an image captured at the 1st second, such as an image captured at the 2nd or 3rd second, the image captured at the 1st second within the time window can be obtained, and then the object detection frame corresponding to the image captured at the 1st second can be determined to predict the object detection frames at the 2nd and 3rd seconds.
[0066] In this embodiment, a corresponding time window is set, and then a corresponding object detection frame acquisition method can be used for each frame image in the time window. Moreover, for the same time window, it is only necessary to acquire an image containing an obstacle once to predict the object detection frames corresponding to other time frames in the time window, thereby improving the obstacle detection efficiency and enabling the robot to update obstacle information at a higher frequency.
[0067] In one implementation, after detecting the obstacle in the current frame image by using a target detection algorithm and generating the corresponding object detection frame, the method further includes:
[0068] Initialize a tracking template of the current time window, where the tracking template is an object detection frame corresponding to the current time window, and each time window corresponds to one tracking template.
[0069] In order to reduce the amount of calculation, each time window only needs to be configured with one tracking template, and the tracking target is the object detection box corresponding to the starting frame image.
[0070] For example, taking 3 seconds as a time window, first collect the current frame image of the 1st second, and determine the object detection frame corresponding to the current frame image, and then use the object detection frame as the tracking template of the entire time window. The position of the object detection frame corresponding to the 2nd or 3rd second can be predicted and determined by the tracking template, thereby determining the position information of the obstacle at the 2nd or 3rd second.
[0071] For the image acquired at the 4th second, since the 4th second belongs to the second time window, the tracking template of the second time window can be determined based on the image acquired at the 4th second, and so on.
[0072] This embodiment extracts the corresponding object detection frame based on the starting frame image of each time window, and uses the object detection frame as a tracking template for the entire time window to predict the position of the object detection frame corresponding to other time frames in the time window, thereby reducing the demand for image acquisition and the computational burden of the robot.
[0073] Reference Figure 4 , step S103 includes: steps S1031-S1032.
[0074] S1031. Divide the object detection frame into regions of interest according to the tracking template.
[0075] S1032: Select candidate corner points in the region of interest using a corner point detection algorithm, and select corresponding target corner points from the candidate corner points using a maximum value suppression algorithm.
[0076] After extracting the object detection frame from the starting frame image, the object detection frame can be used as a tracking template to predict the object detection frame corresponding to the subsequent time frame, and then determine the position of the obstacle in the subsequent time frame. Since the position tracking of the entire obstacle requires a lot of calculation, the subsequent position of the obstacle can be predicted through the corner detection algorithm and the tracking algorithm.
[0077] The tracking template is just the object detection frame corresponding to the starting frame image, and other frame images also have corresponding object detection frames. Therefore, all object detection frames are first divided into regions of interest according to the tracking template, and then the corner detection algorithm is used to select candidate corner points in the region of interest. The corner detection algorithm can select the FAST corner detection algorithm, and then use the maximum suppression algorithm to screen out the target corner points with the strongest local response from the candidate corner points.
[0078] In the field of target detection, the detection model usually pre-selects multiple target candidate boxes. Due to the imperfection of the target detection model and the overlap of targets in the image, there are often multiple target detection boxes corresponding to the same target, and the maximum suppression algorithm (non maximum suppression, NMS) can find the target detection box with the highest confidence from multiple target detection boxes. In this embodiment, multiple candidate corner points may correspond to one region of interest, so the target corner point can be selected from multiple candidate corner points by the maximum suppression algorithm.
[0079] Since this embodiment predicts the position of the obstacle based on the distance between the lower edge of the object detection frame and the lower boundary of the image, in the process of extracting the target corner points, in order to more accurately predict the lower edge of the detection frame, the region of interest can be divided into an upper half frame area and a lower half frame area, and different maximum suppression thresholds are used for these two areas, so that more corner points are retained in the lower half frame area.
[0080] Specifically, suppose there are multiple detection boxes B in the tracking template i , the region of interest corresponding to each detection box is ROI (B i ), in ROI(B i ), the FAST corner detection algorithm is used to select candidate corner points, which are recorded as:
[0081] P(B i )={p1,p2,...p n},p j ∈ROI(B i )
[0082] Among them, {p1,p2,...p n} is a candidate corner point, and each detection box B i Divided into upper half frame area B (i,upper) and lower half frame area B (i,lower) , and based on different maximum suppression thresholds θ upper and θ lower , where θ upper >θ lower , so that more corner points are retained in the lower half of the frame area:
[0083] P NMS (B (i,upper) )=NMS(P(B (i,upper) ),θ upper )
[0084] P NMS (B (i,lower) )=NMS(P(B (i,lower) ),θ lower )
[0085] Finally, in ROI (B i ), the selected corner point set is P NMS (B (i,upper) )∪P NMS (B (i,lower) ).
[0086] This embodiment uses a corner point detection method to extract the target corner points that best represent the object detection frame from the object detection frame, and specifically increases the number of corner points in the lower half of the object detection frame, thereby making obstacle detection more accurate.
[0087] In one implementation, predicting the predicted corner point position in the next frame of image by using a tracking algorithm includes:
[0088] According to the depth and the moving speed, using an optical flow algorithm to estimate the corner point offset between the tracking template corresponding to the current frame image and the next frame image;
[0089] The predicted corner point position corresponding to the next frame image is predicted according to the corner point offset.
[0090] After corner detection, the Lucas-Kanade optical flow algorithm can be used to estimate the corner offset from the current tracking template to the next frame image. The corner offset can be determined according to the robot's moving speed and the depth of the obstacle. For example, if it is determined that the robot moves 2 cm towards the obstacle every second, the robot's displacement information can be determined based on this data. Then, based on the robot's displacement information, the optical flow algorithm is used to estimate the corner displacement of the next frame image to obtain the predicted corner point. The predicted corner point is then subjected to homography transformation to obtain the predicted object detection frame corresponding to the next frame image. Then, the predicted position of the obstacle is obtained based on the predicted object detection frame.
[0091] This embodiment predicts the predicted corner point position corresponding to the next frame of the image through the optical flow algorithm and homography transformation, and then obtains the predicted obstacle position. During the operation of the sweeper, the obstacle may change in scale and translation due to the movement of the robot. The homography transformation can adapt to the changes of obstacles in different frames caused by the movement of the sweeper through its comprehensive processing capabilities of translation, rotation and scaling. Using homography transformation, obstacles can be accurately located and described in images of different perspectives and positions, thereby improving the navigation and obstacle avoidance capabilities of the sweeper in complex environments.
[0092] Reference Figure 5 This embodiment further provides a robot 500, comprising:
[0093] The generating module 501 is used to obtain a current frame image containing an obstacle and a moving speed of the robot through a robot, and generate an object detection frame corresponding to the obstacle in the current frame image.
[0094] The calculation module 502 is used to calculate the depth of the obstacle according to the position of the object detection frame in the current frame image.
[0095] The allocation module 503 is used to allocate multiple target corner points in the object detection frame, and predict the predicted corner point positions in the next frame image through a tracking algorithm according to the depth and the moving speed.
[0096] The prediction module 504 is used to generate a predicted object detection frame according to the predicted corner point position, and determine the predicted position of the obstacle according to the predicted object detection frame.
[0097] It can be understood that the robot of this embodiment corresponds to the obstacle recognition method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.
[0098] The present application also provides a computer device. Exemplarily, the computer device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the computer device to execute the above-mentioned obstacle recognition method or the functions of each module in the above-mentioned robot.
[0099] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.
[0100] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.
[0101] The present application also provides a computer storage medium for storing the computer program used in the above-mentioned computer device. The computer storage medium may be a readable storage medium, or a non-volatile storage medium or a volatile storage medium. For example, the computer storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0102] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0104] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
[0105] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. An obstacle detection method, characterized in that: include: Acquire, by the robot, a current frame image containing an obstacle and a moving speed of the robot, and generate an object detection frame corresponding to the obstacle in the current frame image; Calculating the depth of the obstacle according to the position of the object detection frame in the current frame image; Allocate a plurality of target corner points in the object detection frame, and predict the predicted corner point positions in the next frame image by a tracking algorithm according to the depth and the moving speed; A predicted object detection frame is generated according to the predicted corner point position, and a predicted position of the obstacle is determined according to the predicted object detection frame.
2. The obstacle detection method according to claim 1, characterized in that: The generating an object detection frame corresponding to the obstacle in the current frame image includes: Determine a time window for image acquisition, and judge whether the time frame corresponding to the current frame image is the starting frame of the time window; If so, the obstacle in the current frame image is detected by a target detection algorithm, and the corresponding object detection frame is generated.
3. The obstacle detection method according to claim 2, characterized in that: After detecting the obstacle in the current frame image by the target detection algorithm and generating the corresponding object detection frame, the method further includes: Initialize a tracking template of the current time window, where the tracking template is an object detection frame corresponding to the current time window, and each time window corresponds to one tracking template.
4. The obstacle detection method according to claim 3, characterized in that: The allocating a plurality of target corner points in the object detection frame comprises: Dividing the object detection frame into regions of interest according to the tracking template; A corner point detection algorithm is used to select candidate corner points in the region of interest, and a maximum value suppression algorithm is used to screen out the corresponding target corner points from the candidate corner points.
5. The obstacle detection method according to claim 4, characterized in that: The predicting corner point position in the next frame image by using a tracking algorithm includes: According to the depth and the moving speed, using an optical flow algorithm to estimate the corner point offset between the tracking template corresponding to the current frame image and the next frame image; The predicted corner point position corresponding to the next frame image is predicted according to the corner point offset.
6. The obstacle detection method according to claim 5, characterized in that: Generating a predicted object detection frame according to the predicted corner point position includes: Perform homography transformation on the predicted corner points to obtain a predicted object detection frame corresponding to the next frame image.
7. The obstacle detection method according to claim 1, characterized in that: The calculating the depth of the obstacle according to the position of the object detection frame in the current frame image includes: Obtaining the distance between the bottom border of the object detection frame and the bottom edge of the current frame image; The actual height of the obstacle is obtained, and the depth of the obstacle is calculated according to the distance and the actual height.
8. A robot, characterized in that: include: A generating module, configured to obtain, by a robot, a current frame image containing an obstacle and a moving speed of the robot, and generate an object detection frame corresponding to the obstacle in the current frame image; A calculation module, used for calculating the depth of the obstacle according to the position of the object detection frame in the current frame image; An allocation module, configured to allocate a plurality of target corner points in the object detection frame, and predict the predicted corner point positions in the next frame image through a tracking algorithm according to the depth and the moving speed; A prediction module is used to generate a predicted object detection frame according to the predicted corner point position, and determine the predicted position of the obstacle according to the predicted object detection frame.
9. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the obstacle detection method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed on a processor, the obstacle detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Invisible object 4D character interaction generation method based on text description
CN120491813A