A scene recognition method, device, computer readable storage medium and robot

CN117496465BActive Publication Date: 2026-10-13UBTECH ROBOTICS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311373728.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2026-10-13
Estimated Expiration
2043-10-20

AI Technical Summary

Technical Problem

然而,当机器人处于复杂场景时,如激光源周围存在多个障碍物,若继续使用该重定位方法,则障碍物后方的激光点云数据可能会存在大片缺失,导致重定位失败;因此,准确高效的场景识别方法对于机器人的重定位而言十分重要

Benefits of technology

[0019]本申请实施例的第五方面提供了一种计算机程序产品,当计算机程序产品在机器人上运行时,使得机器人执行上述任一种场景识别方法的步骤。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117496465B_ABST
    Figure CN117496465B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of robots, and particularly relates to a scene recognition method and device, a computer readable storage medium and a robot. The method comprises the following steps: acquiring laser point cloud data of a robot; performing image mapping processing on the laser point cloud data to obtain a target scene image corresponding to the laser point cloud data; calculating a graph complexity corresponding to the target scene image; and determining a scene in which the robot is located according to the graph complexity. Through the above method, the graph complexity corresponding to the target scene image can be calculated, and the scene in which the robot is located can be determined according to the graph complexity, so that a suitable repositioning method can be used in different scenes, and the robustness and scene adaptability of robot repositioning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of robotics technology, and in particular relates to a scene recognition method, device, computer-readable storage medium, and robot. Background Technology

[0002] With the development of technology, more and more robots are entering households. When a robot is working, if it is moved by a person, it needs to be relocalized. Typically, the robot will rotate in place, acquiring multiple frames of laser point cloud data and matching them with an existing map template to obtain new positioning information. However, when the robot is in a complex scene, such as when there are multiple obstacles around the laser source, continuing to use the same relocalization method may result in large gaps in the laser point cloud data behind the obstacles, leading to relocalization failure. Therefore, accurate and efficient scene recognition methods are crucial for robot relocalization. Summary of the Invention

[0003] In view of this, embodiments of this application provide a scene recognition method, apparatus, computer-readable storage medium, and robot to perform scene recognition and improve the robustness of robot relocalization.

[0004] A first aspect of this application provides a scene recognition method, which may include: Acquire the robot's laser point cloud data; The laser point cloud data is subjected to image mapping processing to obtain a target scene image corresponding to the laser point cloud data; The first number of white pixels in the target scene image is counted; wherein white pixels are used to represent known areas; black pixels in the target scene image are converted into white pixels to obtain a converted image; wherein black pixels are used to represent obstacles; edge extraction is performed on the converted image to obtain an edge image; the second number of edge pixels in the edge image is counted; the graphics complexity corresponding to the target scene image is calculated based on the first number and the second number. The scene in which the robot is located is determined based on the graphical complexity.

[0005] In one specific implementation of the first aspect, calculating the graphical complexity corresponding to the target scene image based on the first number and the second number may include: Calculate the ratio of the second number to the first number; The ratio is used as the graphical complexity corresponding to the target scene image.

[0006] In one specific implementation of the first aspect, determining the scene in which the robot is located based on the graph complexity may include: If the complexity of the graph is greater than a preset complexity threshold, then the scene in which the robot is located is determined to be a complex scene. If the graphics complexity is less than or equal to the complexity threshold, then the scene in which the robot is located is determined to be a normal scene.

[0007] In one specific implementation of the first aspect, before determining the scene in which the robot is located based on the graphical complexity, the method may further include: Calculate the maximum ratio of the perimeter to the area of ​​a regular polygon; Obtain the robot's laser frame rate and the maximum number of missing point cloud pixels; The complexity threshold is calculated based on the maximum perimeter-to-area ratio, the laser frame rate, and the maximum number of missing point cloud pixels.

[0008] In one specific implementation of the first aspect, calculating the maximum value of the perimeter-to-area ratio of the regular polygon may include: Obtain the robot's maximum effective laser range and map resolution; The side length of the regular polygon is calculated based on the maximum effective distance of the laser and the map resolution. Calculate the maximum ratio of the perimeter to the area of ​​the regular polygon based on the side length of the regular polygon.

[0009] In one specific implementation of the first aspect, after determining the scene in which the robot is located based on the graphical complexity, it may further include: Determine the target relocation algorithm corresponding to the scene in which the robot is located; The target relocation algorithm is used to relocate the robot, and the relocation result is obtained.

[0010] A second aspect of the embodiments of this application provides a scene recognition device, which may include: The data acquisition module is used to acquire the robot's laser point cloud data; The mapping processing module is used to perform image mapping processing on the laser point cloud data to obtain a target scene image corresponding to the laser point cloud data. The complexity calculation module is used to count the first number of white pixels in the target scene image, where white pixels represent known areas; convert black pixels in the target scene image to white pixels to obtain a converted image, where black pixels represent obstacles; perform edge extraction on the converted image to obtain an edge image; count the second number of edge pixels in the edge image; and calculate the graphics complexity corresponding to the target scene image based on the first number and the second number. The scene determination module is used to determine the scene in which the robot is located based on the graphics complexity.

[0011] In one specific implementation of the second aspect, the complexity calculation module may include: The first number counting submodule is used to count the first number of white pixels in the target scene image; wherein, white pixels are used to represent known areas; The pixel conversion submodule is used to convert black pixels in the target scene image into white pixels to obtain a converted image; wherein, black pixels are used to represent obstacles; An edge extraction submodule is used to extract edges from the converted image to obtain an edge image; The second number counting submodule is used to count the second number of edge pixels in the edge image; The complexity calculation submodule is used to calculate the graphics complexity corresponding to the target scene image based on the first number and the second number.

[0012] In one specific implementation of the second aspect, the complexity calculation submodule may include: A ratio calculation unit is used to calculate the ratio of the second number to the first number; The complexity determination unit is used to take the ratio as the graphics complexity corresponding to the target scene image.

[0013] In one specific implementation of the second aspect, the scene determination module may include: The complex scene determination submodule is used to determine that the scene in which the robot is located is a complex scene if the complexity of the graphics is greater than a preset complexity threshold. The normal scene determination submodule is used to determine that the scene in which the robot is located is a normal scene if the graphics complexity is less than or equal to the complexity threshold.

[0014] In one specific implementation of the second aspect, the scene recognition device may further include: The maximum value calculation module is used to calculate the maximum ratio of the perimeter to the area of ​​a regular polygon. The frame rate acquisition module is used to acquire the laser frame rate and the maximum number of missing point cloud pixels of the robot. The complexity threshold is calculated based on the maximum perimeter-to-area ratio, the laser frame rate, and the maximum number of missing point cloud pixels.

[0015] In one specific implementation of the second aspect, the maximum value calculation module may include: The resolution acquisition submodule is used to acquire the robot's maximum effective laser range and map resolution; The side length calculation submodule is used to calculate the side length of the regular polygon based on the maximum effective distance of the laser and the map resolution. The maximum value calculation submodule is used to calculate the maximum value of the perimeter-area ratio of the regular polygon based on the side length of the regular polygon.

[0016] In one specific implementation of the second aspect, the scene recognition device may further include: The relocation algorithm determination module is used to determine the target relocation algorithm corresponding to the scene in which the robot is located; The relocation module is used to relocate the robot using the target relocation algorithm to obtain the relocation result.

[0017] A third aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described scene recognition methods.

[0018] A fourth aspect of this application provides a robot including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above-described scene recognition methods.

[0019] The fifth aspect of this application provides a computer program product that, when run on a robot, causes the robot to perform the steps of any of the above-described scene recognition methods.

[0020] The beneficial effects of this application embodiment compared with the prior art are as follows: This application embodiment acquires laser point cloud data of a robot; performs image mapping processing on the laser point cloud data to obtain a target scene image corresponding to the laser point cloud data; calculates the graphics complexity corresponding to the target scene image; and determines the scene in which the robot is located based on the graphics complexity. Through this application embodiment, the graphics complexity corresponding to the target scene image can be calculated, and the scene in which the robot is located can be determined based on the graphics complexity, thereby enabling the use of appropriate relocalization methods in different scenes and improving the robustness and scene adaptability of robot relocalization. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A schematic diagram of the scene in which the robot is located; Figure 2 This is a flowchart of one embodiment of a scene recognition method in this application. Figure 3 This is a schematic diagram of the target scene image; Figure 4 This is a schematic diagram of the image conversion. Figure 5 This is a schematic diagram of an edge image; Figure 6 This is a flowchart illustrating the process of calculating the complexity threshold. Figure 7 This is a structural diagram of one embodiment of a scene recognition device according to the present application. Figure 8 This is a schematic block diagram of a robot according to an embodiment of this application. Detailed Implementation

[0023] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0025] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0026] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0027] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0028] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0029] With the development of technology, more and more robots are entering households. When a robot is in operation, if it is moved manually, it will need to relocalize. Typically, the robot will rotate in place, acquiring multiple frames of laser point cloud data and matching them with an existing map template to obtain new positioning information. When the robot is in a normal environment, please refer to [link to relevant documentation]. Figure 1 When a detected obstacle (such as a wall or a sofa against a wall) has no other features behind it, the laser point cloud data will not have large gaps due to occlusion by the obstacle, so this relocalization method can effectively perform relocalization. However, when the robot is in a complex scene, please refer to [the relevant section here]. Figure 1 If there are multiple obstacles around the laser source, there may be large areas of missing laser point cloud data behind the obstacles, which may lead to relocation failure.

[0030] In view of this, embodiments of this application provide a scene recognition method, apparatus, computer-readable storage medium, and robot to solve the problem that robots are prone to relocation failure in complex scenes.

[0031] It should be noted that the implementing entity of the method in this application is a robot, which may include, but is not limited to, robots commonly found in the prior art such as sweeping robots, floor scrubbing robots, inspection robots, guiding robots, and food delivery robots.

[0032] Please see Figure 2 One embodiment of a scene recognition method in this application may include: Step S201: Obtain the robot's laser point cloud data.

[0033] In this embodiment of the application, the robot's surrounding environment can be detected and scanned by a preset lidar device to obtain lidar point cloud data, thereby obtaining information about the robot's surrounding environment.

[0034] Specifically, robots are typically equipped with pre-installed LiDAR devices for map detection, navigation, and obstacle avoidance. When scene recognition is required, the robot can be controlled to rotate in place and use the pre-installed LiDAR devices to collect laser point cloud data in real time. Then, the laser point cloud data can be stored in a pre-installed storage module, through which the robot's laser point cloud data can be obtained.

[0035] Step S202: Perform image mapping processing on the laser point cloud data to obtain the target scene image corresponding to the laser point cloud data.

[0036] In this embodiment, image mapping processing can be performed on the laser point cloud data to enhance its visualization and improve the efficiency of subsequent processing. For details, please refer to... Figure 3 The known areas in the laser point cloud data can be set as white pixels, obstacles in the laser point cloud data can be set as black pixels, and unknown areas in the laser point cloud data can be set as gray pixels, thus obtaining the target scene image corresponding to the laser point cloud data.

[0037] In practical applications, laser point cloud data can also be processed by image mapping according to actual needs, but this application does not make specific limitations on this.

[0038] Step S203: Calculate the graphical complexity corresponding to the target scene image.

[0039] In this embodiment, the compactness of the graphic composed of laser point cloud data can be used to determine whether the robot is in a complex scene. Here, the perimeter-to-area ratio of a known region in the target scene image can be calculated.

[0040] It should be noted that different colored pixels can be used to represent different regions in the target scene image, facilitating differentiation and processing. Here, white pixels can be used to represent known areas, black pixels can be used to represent obstacles, and gray pixels can be used to represent unknown areas.

[0041] Specifically, the first number of white pixels in the target scene image can be counted. (i.e., the area of ​​the known region); then, the black pixels in the target scene image can be converted into white pixels to obtain the converted image, such as... Figure 4 As shown, a preset edge extraction algorithm can be used to extract edges from the converted image to obtain an edge image, such as... Figure 5 As shown; subsequently, a second count of edge pixels in the edge image can be performed. (i.e., the perimeter of the known region), based on the first and second numbers, the graphical complexity corresponding to the target scene image can be calculated.

[0042] In this embodiment of the application, the ratio of the second number to the first number can be calculated. :

[0043] This ratio can then be used as the graphical complexity corresponding to the target scene image.

[0044] The aforementioned edge extraction algorithm can be any common edge extraction algorithm in the prior art, including but not limited to the Canny edge detection operator, Roberts edge detection operator, Sobel edge detection operator, Prewitt edge detection operator, Laplacian edge detection operator, and other common edge detection algorithms.

[0045] Step S204: Determine the scene in which the robot is located based on the complexity of the graphics.

[0046] In this embodiment of the application, if the complexity of the graph is greater than a preset complexity threshold, it can be considered that the compactness of the graph in the known region is low, such as... Figure 1 The scene shown is complex; therefore, the scene in which the robot is located can be determined to be complex. If the graphic complexity is less than or equal to the complexity threshold, then the compactness of the graphic in the known area can be considered high. Figure 1 The scenario shown is a normal scenario, therefore, the scenario in which the robot is located can be determined to be a normal scenario. The complexity threshold can be specifically and contextually set according to actual needs; for example, it can be set to 0.1, 0.15, 0.2, or other values. This application embodiment does not specifically limit this.

[0047] In one specific implementation, the complexity threshold can be calculated based on the maximum perimeter-to-area ratio, the laser frame rate, and the maximum number of missing point cloud pixels. Please refer to [link / reference]. Figure 6 Specifically, the calculation process for the complexity threshold may include the following steps: Step S601: Calculate the maximum value of the perimeter-to-area ratio of the regular polygon.

[0048] In this embodiment of the application, the robot's maximum effective laser range and map resolution can be obtained. The maximum effective laser range is the maximum effective detection range of the lidar device, and the map resolution is the actual distance represented by each pixel on the map. For example, if the map resolution is 0.05, it means that the actual distance represented by one pixel on the map is 0.05 meters.

[0049] Here, a regular polygon can be used as the baseline shape for the computational complexity threshold, and the robot's maximum effective laser range can be used as the baseline side length of the regular polygon. Based on the maximum effective laser range and map resolution, the number of pixels corresponding to the side length of the regular polygon in the scene image can be calculated.

[0050] in, The number of pixels is the side length of the regular polygon. This represents the maximum effective distance of the laser. This refers to the map resolution.

[0051] Based on the side length of the regular polygon It can calculate the perimeter of regular polygons. :

[0052] in, The number of sides of the regular polygon.

[0053] In addition, the area of ​​a regular polygon can be calculated. :

[0054] in, Let be the number of sides of the regular polygon. Based on this, the ratio of the perimeter to the area of ​​the regular polygon can be calculated. :

[0055] The perimeter of the regular polygon Area of ​​regular polygons Substituting the calculation formula into the above equation, we get:

[0056] It is important to understand that the lower the compactness of a shape (i.e., the higher its divergence), the larger its perimeter-to-area ratio; conversely, the higher the compactness of a shape (i.e., the lower its divergence), the smaller its perimeter-to-area ratio. Therefore, in this embodiment, the complexity threshold can be calculated based on the highest possible compactness (maximum perimeter-to-area ratio) that a known region may achieve under normal conditions.

[0057] Specifically, due to The value is Furthermore, it can generally be assumed that the pattern detected by a lidar device has at least four sides, i.e. ,therefore, The maximum value of can be 1, then the ratio of the perimeter to the area of ​​the regular polygon is the maximum value. for:

[0058] Step S602: Obtain the robot's laser frame rate and the maximum number of missing point cloud pixels.

[0059] In this embodiment of the application, the robot's laser frame rate can also be obtained based on the actual situation when calculating the complexity threshold. and the maximum number of missing point cloud pixels Among them, laser frame rate The number of frames of laser point cloud data acquired per second, and the maximum number of missing point cloud pixels. This represents the maximum tolerable number of missing point cloud pixels.

[0060] It's important to understand that the robot's laser frame rate is negatively correlated with the perimeter-to-area ratio of the regular polygon. The higher the robot's laser frame rate, the smaller the perimeter-to-area ratio of the regular polygon; conversely, the lower the robot's laser frame rate, the smaller the perimeter-to-area ratio of the regular polygon. On the other hand, the maximum number of missing point cloud pixels is positively correlated with the perimeter-to-area ratio of the regular polygon. The higher the maximum number of missing point cloud pixels, the larger the perimeter-to-area ratio of the regular polygon; conversely, the lower the maximum number of missing point cloud pixels, the smaller the perimeter-to-area ratio of the regular polygon.

[0061] Step S603: Calculate the complexity threshold based on the maximum perimeter-to-area ratio, the laser frame rate, and the maximum number of missing point cloud pixels.

[0062] In this embodiment, the complexity threshold can be calculated based on the maximum perimeter-to-area ratio, the laser frame rate, and the maximum number of missing point cloud pixels. The specific formula is as follows:

[0063] in, The maximum number of missing point cloud pixels is the complexity threshold. The value can be set according to actual needs and contextualization. This application does not limit it. Here, it can be preferably set to 40.

[0064] For example, the robot's laser has a maximum effective range of 6.5 meters and a map resolution of [missing information]. The laser frame rate is 0.05. The value is 6 (meaning 6 frames of laser point cloud data can be acquired per second). Based on the above process, the complexity threshold can be calculated. It is 0.205.

[0065] It should be noted that, in one specific implementation of this application embodiment, after determining the scene where the robot is located based on the graphics complexity, a target relocation algorithm corresponding to the scene where the robot is located can also be determined, and the target relocation algorithm can be used to relocate the robot to obtain the relocation result. Specifically, when the robot is in a normal scenario, the traditional laser relocation algorithm can be used as the target relocation algorithm. In this case, the robot can be controlled to rotate in place and acquire laser point cloud data. The laser point cloud data is then matched with an existing map template to obtain the relocation result. When the robot is in a complex scenario, other sensors and corresponding relocation methods can be used for relocation. For example, the ultrasonic relocation algorithm can be used as the target relocation algorithm. In this case, the reflection and propagation characteristics of ultrasonic signals can be used to determine the robot's location by comparing the distances between the robot and various preset calibration objects. Another example is the Radio Frequency Identification (RFID) relocation algorithm, which can be used as the target relocation algorithm. In this case, RFID tags can be installed on the robot and various preset calibration objects. Wireless communication can be used to read the tag information to determine the distance between the robot and each calibration object, thereby calculating the robot's location. Yet another example is the relocation algorithm combining multiple sensors, which can be used as the target relocation algorithm. Specifically, infrared sensors and geomagnetic sensors can be used to acquire the robot's position information. The position and attitude of the robot can be calculated by processing and analyzing the data from the infrared and geomagnetic sensors, thereby performing robot relocation.

[0066] Therefore, appropriate relocation algorithms can be flexibly selected based on the actual scenario in which the robot is located, thereby improving the robustness and scenario adaptability of robot relocation and helping to enhance the user experience.

[0067] In summary, this application embodiment acquires laser point cloud data of a robot; performs image mapping processing on the laser point cloud data to obtain a target scene image corresponding to the laser point cloud data; calculates the graphics complexity corresponding to the target scene image; and determines the scene in which the robot is located based on the graphics complexity. Through this application embodiment, the graphics complexity corresponding to the target scene image can be calculated, and the scene in which the robot is located can be determined based on the graphics complexity. This allows for the use of appropriate relocalization methods in different scenes, improving the robustness and scene adaptability of robot relocalization.

[0068] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0069] Corresponding to the scene recognition method described in the above embodiments, Figure 7 This diagram illustrates a structural diagram of an embodiment of a scene recognition device provided in this application.

[0070] In this embodiment of the application, a scene recognition device may include: The data acquisition module 701 is used to acquire the robot's laser point cloud data; The mapping processing module 702 is used to perform image mapping processing on the laser point cloud data to obtain a target scene image corresponding to the laser point cloud data. The complexity calculation module 703 is used to calculate the graphics complexity corresponding to the target scene image; Scene determination module 704 is used to determine the scene in which the robot is located based on the graphics complexity.

[0071] In one specific implementation of this application embodiment, the complexity calculation module may include: The first number counting submodule is used to count the first number of white pixels in the target scene image; wherein, white pixels are used to represent known areas; The pixel conversion submodule is used to convert black pixels in the target scene image into white pixels to obtain a converted image; wherein, black pixels are used to represent obstacles; An edge extraction submodule is used to extract edges from the converted image to obtain an edge image; The second number counting submodule is used to count the second number of edge pixels in the edge image; The complexity calculation submodule is used to calculate the graphics complexity corresponding to the target scene image based on the first number and the second number.

[0072] In one specific implementation of this application embodiment, the complexity calculation submodule may include: A ratio calculation unit is used to calculate the ratio of the second number to the first number; The complexity determination unit is used to take the ratio as the graphics complexity corresponding to the target scene image.

[0073] In one specific implementation of this application embodiment, the scene determination module may include: The complex scene determination submodule is used to determine that the scene in which the robot is located is a complex scene if the complexity of the graphics is greater than a preset complexity threshold. The normal scene determination submodule is used to determine that the scene in which the robot is located is a normal scene if the graphics complexity is less than or equal to the complexity threshold.

[0074] In one specific implementation of this application embodiment, the scene recognition device may further include: The maximum value calculation module is used to calculate the maximum ratio of the perimeter to the area of ​​a regular polygon. The frame rate acquisition module is used to acquire the laser frame rate and the maximum number of missing point cloud pixels of the robot. The complexity threshold is calculated based on the maximum perimeter-to-area ratio, the laser frame rate, and the maximum number of missing point cloud pixels.

[0075] In one specific implementation of this application embodiment, the maximum value calculation module may include: The resolution acquisition submodule is used to acquire the robot's maximum effective laser range and map resolution; The side length calculation submodule is used to calculate the side length of the regular polygon based on the maximum effective distance of the laser and the map resolution. The maximum value calculation submodule is used to calculate the maximum value of the perimeter-area ratio of the regular polygon based on the side length of the regular polygon.

[0076] In one specific implementation of this application embodiment, the scene recognition device may further include: The relocation algorithm determination module is used to determine the target relocation algorithm corresponding to the scene in which the robot is located; The relocation module is used to relocate the robot using the target relocation algorithm to obtain the relocation result.

[0077] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0078] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0079] Figure 8 A schematic block diagram of a robot provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiment of this application are shown.

[0080] like Figure 8 As shown, the robot 8 in this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, it implements the steps in the various scene recognition method embodiments described above, for example... Figure 2Steps S201 to S204 are shown. Alternatively, when the processor 80 executes the computer program 82, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 7 The functions of modules 701 to 704 are shown.

[0081] For example, the computer program 82 may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 82 in the robot 8.

[0082] Those skilled in the art will understand that Figure 8 This is merely an example of robot 8 and does not constitute a limitation on robot 8. It may include more or fewer components than shown, or combine certain components, or different components. For example, robot 8 may also include input / output devices, network access devices, buses, etc.

[0083] The processor 80 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0084] The memory 81 can be an internal storage unit of the robot 8, such as a hard drive or memory. The memory 81 can also be an external storage device of the robot 8, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 81 can include both internal and external storage units of the robot 8. The memory 81 is used to store the computer program and other programs and data required by the robot 8. The memory 81 can also be used to temporarily store data that has been output or will be output.

[0085] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0086] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0087] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0088] In the embodiments provided in this application, it should be understood that the disclosed devices / robots and methods can be implemented in other ways. For example, the device / robot embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0089] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0090] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0091] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0092] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A scene recognition method, characterized in that, include: Acquire the robot's laser point cloud data; The laser point cloud data is subjected to image mapping processing to obtain a target scene image corresponding to the laser point cloud data; The first number of white pixels in the target scene image is counted; wherein white pixels are used to represent known areas; black pixels in the target scene image are converted into white pixels to obtain a converted image; wherein black pixels are used to represent obstacles; edge extraction is performed on the converted image to obtain an edge image; the second number of edge pixels in the edge image is counted; the graphics complexity corresponding to the target scene image is calculated based on the first number and the second number. The scene in which the robot is located is determined based on the graphical complexity.

2. The scene recognition method according to claim 1, characterized in that, The step of calculating the graphical complexity corresponding to the target scene image based on the first number and the second number includes: Calculate the ratio of the second number to the first number; The ratio is used as the graphical complexity corresponding to the target scene image.

3. The scene recognition method according to claim 1, characterized in that, Determining the scene where the robot is located based on the graphics complexity includes: If the complexity of the graph is greater than a preset complexity threshold, then the scene in which the robot is located is determined to be a complex scene. If the complexity of the graphics is less than or equal to the complexity threshold, then the scene in which the robot is located is determined to be a normal scene.

4. The scene recognition method according to claim 3, characterized in that, Before determining the scene in which the robot is located based on the said graph complexity, the process also includes: Calculate the maximum ratio of the perimeter to the area of ​​a regular polygon; Obtain the robot's laser frame rate and the maximum number of missing point cloud pixels; The complexity threshold is calculated based on the maximum perimeter-to-area ratio, the laser frame rate, and the maximum number of missing point cloud pixels.

5. The scene recognition method according to claim 4, characterized in that, The calculation of the maximum ratio of the perimeter to the area of ​​a regular polygon includes: Obtain the robot's maximum effective laser range and map resolution; The side length of the regular polygon is calculated based on the maximum effective distance of the laser and the map resolution. Calculate the maximum ratio of the perimeter to the area of ​​the regular polygon based on the side length of the regular polygon.

6. The scene recognition method according to any one of claims 1 to 5, characterized in that, After determining the scene in which the robot is located based on the aforementioned graphical complexity, the process further includes: Determine the target relocation algorithm corresponding to the scene in which the robot is located; The target relocation algorithm is used to relocate the robot, and the relocation result is obtained.

7. A scene recognition device, characterized in that, include: The data acquisition module is used to acquire the robot's laser point cloud data; The mapping processing module is used to perform image mapping processing on the laser point cloud data to obtain a target scene image corresponding to the laser point cloud data. The complexity calculation module is used to count the first number of white pixels in the target scene image, where white pixels represent known areas; convert black pixels in the target scene image to white pixels to obtain a converted image, where black pixels represent obstacles; perform edge extraction on the converted image to obtain an edge image; count the second number of edge pixels in the edge image; and calculate the graphics complexity corresponding to the target scene image based on the first number and the second number. The scene determination module is used to determine the scene in which the robot is located based on the graphics complexity.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the scene recognition method as described in any one of claims 1 to 6.

9. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the scene recognition method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Self-moving robot positioning method and device, robot and readable storage medium

    CN112179353A