Staircase dangerous area recognition method and system based on RGB-D camera

The RGB-D camera and instance segmentation model are used to identify dangerous areas such as stairs, and a color point cloud model is established, which solves the problem of mobile robots' insufficient perception of dangerous areas such as stairs, and improves detection and warning capabilities and recognition accuracy.

CN117745828BActive Publication Date: 2024-10-22HANGZHOU LANXIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311807347.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2024-10-22
Estimated Expiration
2043-12-26

AI Technical Summary

Technical Problem

Mobile robots have insufficient perception of dangerous areas such as stairs in complex environments, resulting in pose estimation errors and inaccurate path decisions, and may then enter dangerous areas.

Method used

An RGB-D camera-based identification method for stair-type dangerous areas is adopted. The RGB image is masked through an instance segmentation model. A color point cloud model is established based on the depth map and internal and external parameters to filter out the location information of stair-type dangerous areas.

Benefits of technology

It improves the mobile robot's detection and early warning capabilities for dangerous areas such as stairs, reduces the training workload of the neural network model, and improves the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117745828B_ABST
    Figure CN117745828B_ABST
Patent Text Reader

Abstract

The present invention relates to a staircase-type dangerous area recognition method and system based on an RGB-D camera. The method is applied to a mobile robot, and the method includes: obtaining an RGB image and a depth image through an RGB-D camera; marking the staircase-type dangerous area in the RGB image and inputting it into a pre-established instance segmentation model for mask processing to obtain a masked RGB image; aligning the masked RGB image with the pixel points of the corresponding depth image according to the internal and external parameters of the RGB-D camera to generate an aligned RGB image; constructing a color point cloud model through the aligned RGB image, the depth image and the three-dimensional space information obtained based on the internal and external parameter conversion; traversing all three-dimensional coordinate points of the color point cloud model, and obtaining the position information of the staircase-type dangerous area according to the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions. The present invention improves the perception ability of the mobile robot to the staircase-type dangerous area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method and system for identifying dangerous areas of stairs based on an RGB-D camera. Background Art

[0002] With the rapid development of science and technology, the development of mobile robots is also keeping pace with the times. It has become an important outlet for innovation and industry, and robotics technology has also become one of the important indicators of a country's comprehensive scientific and technological development strength. Today, robots have extended and penetrated from our production to life, and the application scenarios are constantly sinking. The development of intelligence, networking, and digitalization is becoming more and more significant, and the degree of intelligent cognition is also deepening. Mobile robots used in specific scenarios bring great convenience to people and liberate labor. Unlike the relatively fixed workspace of industrial robots, mobile robots often face more complex and unstructured environments with larger activity areas.

[0003] At present, most mobile robots control their posture based on SLAM technology. Research on SLAM systems that use visual sensors to obtain external information often assumes that the external environment has static characteristics. When people pass by a mobile robot in a shopping mall, the images collected by the visual sensor are blurred due to the presence of moving objects, which is different from the static environment assumption. Moving objects will destroy the static environment assumption. As the errors between image frames accumulate, the posture estimation of the mobile robot will be inaccurate, resulting in large posture estimation errors, leading to poor positioning and mapping effects. These information errors will cause the robot to make inaccurate motion decisions, which will cause the mobile robot to enter some dangerous areas.

[0004] Therefore, in order to enhance the mobile robot's ability to perceive and understand dangers in complex application scenarios, it is necessary to identify some specific dangerous areas such as stairs and feed them back to the robot's path decision process, so as to adjust the path planning in time. Summary of the invention

[0005] 1. Technical issues to be resolved

[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a method and system for identifying staircase dangerous areas based on an RGB-D camera, which solves the technical problem that the mobile robot has poor perception ability of staircase dangerous areas.

[0007] (II) Technical solution

[0008] In order to achieve the above object, the main technical solutions adopted by the present invention include:

[0009] In a first aspect, an embodiment of the present invention provides a method for identifying dangerous areas of stairs based on an RGB-D camera, the method being applied to a mobile robot, the method comprising:

[0010] The RGB image and depth image of the operating environment of the mobile robot are obtained through the RGB-D camera;

[0011] After marking the staircase-like dangerous areas in the RGB image, the images are input into the pre-established instance segmentation model for mask processing to obtain the masked RGB image.

[0012] According to the obtained internal and external parameters of the RGB-D camera, the masked RGB image is aligned with the pixels of the corresponding depth image to generate an aligned RGB image;

[0013] The color point cloud model is constructed through the three-dimensional spatial information obtained by the aligned RGB image, depth image and the internal and external parameters conversion based on the RGB-D camera;

[0014] All three-dimensional coordinate points of the color point cloud model are traversed, and the location information of the staircase-type dangerous area is obtained according to the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions.

[0015] Optionally, after marking the staircase-like dangerous area in the RGB image, inputting it into a pre-established instance segmentation model for mask processing to obtain the masked RGB image, the method further includes:

[0016] Use an RGB-D camera to obtain several RGB images containing staircase-like dangerous areas;

[0017] Annotate the staircase-like dangerous area in each RGB image in the form of polygonal polylines, and generate a corresponding image data set in a data exchange format containing the annotation information;

[0018] After the image dataset is divided into a training dataset and a validation dataset according to a set ratio, the dataset formats of the training dataset and the validation dataset are converted into a COCO format dataset;

[0019] The pre-established initial instance segmentation model based on the fully convolutional neural network is trained using the training dataset and validation dataset in COCO format to generate an instance segmentation model.

[0020] Optionally, after marking the staircase-like dangerous area in the RGB image, input it into a pre-established instance segmentation model for mask processing, and obtain the mask-processed RGB image including:

[0021] Mark the staircase dangerous areas in the obtained RGB image;

[0022] Input the annotated RGB image into the trained instance segmentation model;

[0023] Generate the category confidence, position regression parameters and mask coefficients of each pixel in the RGB image through the first branch in the instance segmentation model;

[0024] The second branch in the instance segmentation model generates Figure 1 A consistent prototype mask is obtained, and the masked RGB image of the staircase dangerous area is obtained based on the prototype mask and the mask coefficient.

[0025] Optionally, aligning the masked RGB image with pixels of a corresponding depth image according to the acquired internal and external parameters of the RGB-D camera, and generating the aligned RGB image includes:

[0026] Establish a depth camera coordinate system with the depth camera as the origin and an RGB camera coordinate system with the RGB camera as the origin;

[0027] Get the intrinsic matrix, rotation matrix and translation vector of the RGB-D camera;

[0028] The pixel coordinates of the filtered depth map are transformed through the depth camera intrinsic parameter matrix and the depth value to obtain the three-dimensional coordinate points in the depth camera coordinate system;

[0029] According to the rotation matrix and translation vector of the RGB-D camera, the three-dimensional coordinate point in the RGB camera coordinate system is matched with the three-dimensional coordinate point in the depth camera coordinate system;

[0030] The three-dimensional coordinate points in the RGB camera coordinate system are projected through the intrinsic parameter matrix of the RGB camera to obtain the pixel coordinates of the masked RGB image;

[0031] Traverse all the pixels in the depth map and align them with the pixels of the masked RGB map to generate an RGB map that corresponds one-to-one to the pixels in the depth map.

[0032] Optionally, constructing a color point cloud model using the aligned RGB image, the depth image, and three-dimensional space information obtained by converting internal and external parameters of an RGB-D camera includes:

[0033] Establish a world coordinate system with the mobile robot's motion center as the origin;

[0034] The three-dimensional coordinates in the world coordinate system are mapped to the coordinates in the depth camera coordinate system through a mapping formula to obtain a point cloud model;

[0035] Assign the RGB information and mask color information of the second RGB image to the point cloud model to obtain a color point cloud model;

[0036] in,

[0037] The origin of the world coordinate system coincides with the origin of the depth camera coordinate system;

[0038] The mapping formula is:

[0039]

[0040] In the formula, Z c is the z-axis value of the depth camera coordinate, (u, v) is any coordinate point in the depth camera coordinate system, (u 0 , v 0 ) is the center coordinate of the depth map; [RT] is the external parameter matrix of the RGB-D camera, R is the 3*3 rotation matrix, and T is the 3*1 translation vector; (x w ,y w , z w ) is the three-dimensional coordinate point in the world coordinate system.

[0041] Optionally, traversing all three-dimensional coordinate points of the color point cloud model, and obtaining the location information of the staircase-type dangerous area according to the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions includes:

[0042] Traverse all three-dimensional coordinate points in the color point cloud model and obtain the number and coordinates of three-dimensional coordinate points that meet the set conditions;

[0043] Determine whether the number of three-dimensional coordinate points that meet the set conditions exceeds a set number threshold;

[0044] If the number of three-dimensional coordinate points that meet the set conditions does not exceed the set number threshold, there is no staircase-type dangerous area in the aligned RGB image;

[0045] If the number of three-dimensional coordinate points that meet the set conditions exceeds the set number threshold, there is a staircase-type dangerous area in the aligned RGB image, and the location information of the staircase-type dangerous area is obtained by the number and coordinates of the three-dimensional coordinate points.

[0046] In a second aspect, an embodiment of the present invention provides a staircase dangerous area identification system based on an RGB-D camera, which includes: a mobile robot and an RGB-D camera and a controller configured on the mobile robot;

[0047] The RGB-D camera is used to collect RGB images and depth images of the mobile robot's operating environment;

[0048] The controller is connected to the RGB-D camera and is used to execute the above-mentioned staircase dangerous area recognition method based on the RGB-D camera.

[0049] Optionally, the controller includes:

[0050] The image information acquisition module is used to obtain the RGB image and depth image of the operating environment of the mobile robot;

[0051] A mask processing module is used to mark the staircase-like dangerous area in the RGB image and input it into a pre-established instance segmentation model for mask processing to obtain a mask-processed RGB image;

[0052] An image alignment module is used to align the pixel points of the masked RGB image with the corresponding depth image according to the internal and external parameters of the acquired RGB-D camera to generate an aligned RGB image;

[0053] A color point cloud model construction module is used to construct a color point cloud model through the aligned RGB image, depth image, and three-dimensional spatial information obtained by converting the internal and external parameters of the RGB-D camera;

[0054] The staircase dangerous area location determination module is used to traverse all three-dimensional coordinate points of the color point cloud model, and obtain the location information of the staircase dangerous area based on the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions.

[0055] (III) Beneficial effects

[0056] The staircase dangerous area recognition method based on RGB-D camera provided by the present invention uses an instance segmentation model to mask the RGB image with staircase dangerous areas, aligns the masked RGB image with the corresponding depth image, and then establishes a color point cloud model in combination with the internal and external parameters of the RGB-D camera. Finally, the location information of the staircase dangerous area is obtained by performing specific screening on the color point cloud model. Compared with the prior art, it has the following beneficial effects:

[0057] First, the instance segmentation model used for mask processing of dangerous areas such as stairs only requires less data to train the required model, reducing the training workload of the neural network model.

[0058] Secondly, when constructing the color point cloud model, the mask color information of the masked RGB image is used for assignment, which improves the accuracy of identifying dangerous areas such as stairs.

[0059] Finally, after specific screening of the color point cloud model, the location information of the mobile robot and the stair-like dangerous areas is obtained, which greatly improves the detection and early warning capabilities of the mobile robot for stair-like dangerous areas within a certain range. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1A schematic diagram of a staircase dangerous area recognition method based on an RGB-D camera provided by an embodiment of the present invention;

[0061] Figure 2 A schematic diagram of a process for identifying staircase-type dangerous areas in an RGB image using an example segmentation model provided in an embodiment of the present invention;

[0062] Figure 3 A visualization flow chart of staircase hazardous areas provided by an embodiment of the present invention;

[0063] Figure 4 A mapping diagram of world coordinate points and depth map pixel points provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.

[0065] refer to Figure 1-4 As shown, an embodiment of the present invention proposes a method and system for identifying staircase-type dangerous areas based on an RGB-D camera. The method is applied to a mobile robot, comprising: first, obtaining an RGB image and a depth image of the operating environment of the mobile robot through an RGB-D camera; secondly, annotating the staircase-type dangerous areas in the RGB image and inputting them into a pre-established instance segmentation model for mask processing to obtain a masked RGB image; then, according to the obtained internal and external parameters of the RGB-D camera, aligning the pixel points of the masked RGB image with the corresponding depth image to generate an aligned RGB image; then, constructing a color point cloud model through the aligned RGB image, the depth image and the three-dimensional space information obtained based on the internal and external parameters of the RGB-D camera; finally, traversing all three-dimensional coordinate points of the color point cloud model, and obtaining the position information of the staircase-type dangerous areas according to the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions.

[0066] The present invention adopts a technical solution that uses an instance segmentation model to mask an RGB image with a staircase-like dangerous area, aligns the masked RGB image with the corresponding depth image, and then establishes a color point cloud model in combination with the internal and external parameters of the RGB-D camera. Finally, the color point cloud model is specifically screened to obtain the location information of the staircase-like dangerous area. Compared with the prior art, it has the following beneficial effects: First, the instance segmentation model used for masking the staircase-like dangerous area only requires less data to train the required model, reducing the training workload of the neural network model. Secondly, when constructing the color point cloud model, the mask color information of the masked RGB image is used for assignment, which improves the accuracy of identifying the staircase-like dangerous area. Finally, after specific screening of the color point cloud model, the location information of the mobile robot and the staircase-like dangerous area is obtained, which greatly improves the detection and early warning capabilities of the mobile robot for staircase-like dangerous areas within a certain range.

[0067] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0068] Specifically, the present invention provides a staircase dangerous area recognition method based on an RGB-D camera, which is applied to a mobile robot and includes:

[0069] S1. Obtain the RGB image and depth image of the operating environment of the mobile robot through the RGB-D camera. The RGB-D camera has two camera functions: RGB camera and depth camera. The RGB-D camera can obtain data sets such as RGB images, depth images, and infrared ray images. The RGB-D camera is calibrated through the RGB image and infrared ray image to obtain the internal and external parameters of the RGB camera and the depth camera.

[0070] S2. After marking the staircase-like dangerous areas in the RGB image, the image is input into a pre-established instance segmentation model for mask processing to obtain a masked RGB image.

[0071] Furthermore, before step S1, the method further includes:

[0072] F1. Obtain several RGB images containing staircase-like dangerous areas through the RGB-D camera.

[0073] F2. Label the staircase-like dangerous areas in each RGB image in the form of polygonal polylines, and generate a corresponding image data set in a data exchange format containing the labeling information.

[0074] F3. After the image dataset is divided into a training dataset and a validation dataset according to a set ratio, the dataset formats of the training dataset and the validation dataset are converted into a COCO format dataset.

[0075] F4. Train the pre-established initial instance segmentation model based on the fully convolutional neural network using the COCO format training dataset and verification dataset to generate an instance segmentation model.

[0076] In a specific embodiment, first, 10,350 RGB images of actual staircase scene data are collected by an RGB-D camera; secondly, each RGB image is annotated with a staircase dangerous area in the form of a polygon polyline by the image annotation software Labelme, and the coordinates of the discrete points of the annotated bounding box are stored in each point, and the target and name of the corresponding RGB image annotation are generated and saved in an image dataset in a data exchange format, wherein the downstairs area is represented by a green border area, and the upstairs area is represented by a red border area; then, GitHub (a hosting platform for open source and private software projects) is used to randomly divide the image dataset in the data exchange format into 9,100 training set images and 1,250 validation set images, and the dataset format is converted into a COCO dataset format suitable for instance segmentation model training; finally, the weight file generated by the training is used to evaluate and detect the test image to obtain a result map of staircase dangerous area recognition, in which the red area mask is the identified upstairs area, and the blue area mask is the identified downstairs area.

[0077] Further, step S2 includes:

[0078] S21, marking the staircase dangerous areas in the obtained RGB image.

[0079] S22: Input the annotated RGB image into the trained instance segmentation model.

[0080] S23. Generate the category confidence, position regression parameter and mask coefficient of each pixel in the RGB image through the first branch in the instance segmentation model.

[0081] S24, generated by the second branch in the instance segmentation model and RGB Figure 1 A consistent prototype mask is obtained, and the masked RGB image of the staircase dangerous area is obtained based on the prototype mask and the mask coefficient.

[0082] The instance segmentation model achieves real-time instance segmentation task decomposition through two parallel sub-networks: one branch uses a fully convolutional neural network to generate a set of prototype masks that are consistent with the size of the RGB image, and then multiplies the prototype masks and the mask coefficients of the mask to obtain the mask of each target object in the RGB image; the other branch generates the category confidence, position regression parameters and mask coefficients of the mask for each pixel in the RGB image.

[0083] S3. According to the obtained internal and external parameters of the RGB-D camera, the masked RGB image is aligned with the pixels of the corresponding depth image to generate an aligned RGB image.

[0084] Further, step S3 includes:

[0085] S31. Establish a depth camera coordinate system with the depth camera as the origin and an RGB camera coordinate system with the RGB camera as the origin.

[0086] S32. Obtain the intrinsic parameter matrix, rotation matrix, and translation vector of the RGB-D camera.

[0087] S33: transform the pixel coordinates of the filtered depth map through the depth camera intrinsic parameter matrix and the depth value to obtain a three-dimensional coordinate point in the depth camera coordinate system.

[0088] S34. According to the rotation matrix and translation vector of the RGB-D camera, obtain the three-dimensional coordinate point in the RGB camera coordinate system that matches the three-dimensional coordinate point in the depth camera coordinate system.

[0089] S35, projecting the three-dimensional coordinate points in the RGB camera coordinate system through the intrinsic parameter matrix of the RGB camera to obtain pixel coordinates of the masked RGB image.

[0090] S36, traversing all the pixels in the depth map and aligning them with the pixels of the masked RGB map to generate an RGB map that corresponds one-to-one to the pixels in the depth map.

[0091] To further explain, the process of aligning the depth map with the RGB map is:

[0092] The first step is to obtain the depth map and RGB map by using an RGB-D camera.

[0093] The second step is to use MATLAB software to obtain the intrinsic parameter matrix H of the depth camera d , the intrinsic parameter matrix H of the RGB camera r And the external parameter matrix [RT] between them, where R is the rotation matrix and T is the translation vector.

[0094] The third step is to take the depth map pixel points to construct a three-dimensional vector p d =[x d y d z], where x d ,y d is the pixel coordinate of the pixel in the depth image coordinates, and z is the depth value of the pixel.

[0095] The fourth step is to use the intrinsic parameter matrix H of the depth camera d The inverse of the pixel is multiplied by the three-dimensional vector p of the pixel. d , get the spatial coordinates P in the depth camera coordinate system d .

[0096]

[0097] The fifth step is to convert the spatial coordinates P in the depth camera coordinate system d Multiply it by a rotation matrix R and add a translation vector T to get the spatial coordinate P of the RGB camera coordinate system. r .

[0098] P r =RP d +T (2)

[0099] Step 6: Use the intrinsic parameter matrix H of the RGB camera r Multiply the spatial coordinate P of the RGB camera coordinate system r Find the RGB pixel coordinates p in the RGB image coordinate system r =(x r ,y r ), take the pixel coordinates p in RGB image coordinates r The pixel value c.

[0100] p r =H r P r (3)

[0101] In the seventh step, the pixel points in the depth image are traversed to perform the process from the third step to the sixth step to generate a second RGB image that corresponds one-to-one to the pixel points of the depth image.

[0102] Among them, the rotation matrix R of the depth camera d , the rotation matrix R of the RGB camera r , the translation vector T of the depth camera r And the translation vector T of the RGB camera r Together they form the extrinsic matrix [RT] of the RGB camera. The extrinsic matrix [RT] can transform a point P in one spatial coordinate system to another spatial coordinate system. The process of obtaining the extrinsic matrix [RT] of the depth camera and the RGB camera is as follows:

[0103] In the first step, the spatial coordinate system of the RGB camera is transformed as shown in formula (4).

[0104] P r =R r P+T r (4)

[0105] The second step is to transform the spatial coordinate system of the depth camera as shown in formula (5):

[0106] P d =R d P+T d (5)

[0107] The third step is to combine formula (4) and formula (5) to obtain formula (6).

[0108]

[0109] The fourth step is to convert P d Transform to P r , compared with the previous formula (4), the external parameter matrix [RT] of the depth camera and the RGB camera can be obtained to obtain formulas (7) and (8).

[0110]

[0111]

[0112] S4. Construct a color point cloud model through the aligned RGB image, depth map and the three-dimensional spatial information obtained by converting the internal and external parameters of the RGB-D camera.

[0113] Further, step S4 includes:

[0114] S41. Establish a world coordinate system with the motion center of the mobile robot as the origin.

[0115] S42, map the three-dimensional coordinates in the world coordinate system to the coordinates in the depth camera coordinate system through the mapping formula (9) to obtain a point cloud model. w ,y w , z w ) is mapped to the coordinate point m(u, v) in the depth image coordinate system as follows Figure 4 shown.

[0116]

[0117] In the formula, Z cis the z-axis value of the depth camera coordinate, (u, v) is any coordinate point in the depth camera coordinate system, (u 0 , v 0 ) is the center coordinate of the depth map; [RT] is the external parameter matrix of the RGB-D camera, R is the 3*3 rotation matrix, and T is the 3*1 translation vector; (x w ,y w , z w ) is the three-dimensional coordinate point in the world coordinate system.

[0118] Among them, the origin of the world coordinate system coincides with the origin of the depth camera coordinate system, and [RT] can be set as shown in formula (10).

[0119]

[0120] Formula (9) is further simplified according to formula (10) to obtain formula (11).

[0121]

[0122] Through the above matrix transformation formula, we can get the three-dimensional coordinate point M(x) in the world coordinate system from any coordinate point m(u, v) in the depth camera coordinate system. w ,y w , z w ) is shown in formula (12):

[0123]

[0124] S43. Assign the RGB information and the mask color information of the second RGB image to the point cloud model to obtain a color point cloud model.

[0125] The model obtained by reconstructing the point cloud using the depth map alone lacks color texture information, which is different from the visual effect of the actual scene captured by the RGB-D camera. After masking and alignment, there are blue and red masks in the dangerous areas of stairs. The RGB information of a certain pixel in the masked and aligned RGB image is mapped to the point cloud generated by the corresponding depth map pixel to reconstruct a point cloud model with color texture. The 3D reconstruction result after color texture mapping can reflect the actual scene. The blue point cloud represents the downstairs area and the red area represents the upstairs area.

[0126] S5. Filter each three-dimensional coordinate point of the color point cloud model according to the set filtering conditions, and obtain the location information of the staircase dangerous area by calculating the average value of the filtering results.

[0127] Further, step S5 includes:

[0128] S51, traversing all three-dimensional coordinate points in the color point cloud model, and obtaining the number and coordinates of the three-dimensional coordinate points that meet the set conditions.

[0129] S52: Determine whether the number of three-dimensional coordinate points that meet the set conditions exceeds a set number threshold.

[0130] S53a: If the number of three-dimensional coordinate points that meet the set conditions does not exceed the set number threshold, there is no staircase-type dangerous area in the aligned RGB image.

[0131] S53b. If the number of three-dimensional coordinate points that meet the set conditions exceeds the set number threshold, there is a staircase-type dangerous area in the aligned RGB image, and the location information of the staircase-type dangerous area is obtained through the number and coordinates of the three-dimensional coordinate points.

[0132] In a specific embodiment, all three-dimensional coordinate points in the color point cloud model are traversed, and the number and coordinates of the three-dimensional coordinate points whose RGB meets the set conditions (33≤R≤85, 127≤G≤150, 167≤B≤255) are recorded. The position information of the stair-like dangerous area in the direction of travel of the mobile robot can be obtained by taking the average value. When the number of three-dimensional coordinate points exceeds the set lower limit of 100, it is determined that there is a stair-like dangerous area in front of the mobile robot, thereby assisting the mobile robot in making braking decisions.

[0133] On the other hand, the present invention also provides a staircase dangerous area identification system based on an RGB-D camera, which includes: a mobile robot and an RGB-D camera and a controller configured on the mobile robot.

[0134] The RGB-D camera is used to collect RGB images and depth images of the mobile robot's operating environment;

[0135] The controller is connected to the RGB-D camera and is used to execute the above-mentioned staircase dangerous area recognition method based on the RGB-D camera.

[0136] Further explanation, the controller includes:

[0137] The image information acquisition module is used to obtain the RGB image and depth image of the operating environment of the mobile robot.

[0138] The mask processing module is used to mark the staircase-like dangerous areas in the RGB image and input them into a pre-established instance segmentation model for mask processing to obtain a mask-processed RGB image.

[0139] The image alignment module is used to align the pixel points of the masked RGB image with the corresponding depth image according to the internal and external parameters of the acquired RGB-D camera to generate an aligned RGB image.

[0140] The color point cloud model construction module is used to construct a color point cloud model through the aligned RGB image, depth map and the three-dimensional space information obtained by converting the internal and external parameters of the RGB-D camera.

[0141] The staircase dangerous area location determination module is used to traverse all three-dimensional coordinate points of the color point cloud model, and obtain the location information of the staircase dangerous area based on the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions.

[0142] In summary, the present invention provides a method and system for identifying staircase-type dangerous areas based on an RGB-D camera. First, the present invention uses an RGB-D camera to collect RGB images and depth images of a mobile robot in a running environment, and calibrates the RGB-D camera through matlab software. Secondly, the staircase-type dangerous areas in the RGB image are marked and masked through a trained instance segmentation model to obtain a masked RGB image. Then, the masked RGB image and the depth image are aligned through the internal and external parameters of the RGB-D camera to obtain an aligned RGB image. Then, a color point cloud model is constructed through the aligned RGB image, the depth image, and the three-dimensional space information obtained by the internal and external parameters of the RGB-D camera. Finally, all three-dimensional coordinate points of the color point cloud model are traversed, and the position information of the staircase-type dangerous area is obtained according to the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions. The present invention provides a technical solution for a mobile robot to detect staircase-type dangerous areas during movement, which enhances the perception ability of the mobile robot to external staircase-type dangerous areas.

[0143] The system / device described in the above embodiment is a system / device used to implement the method of the above embodiment of the present invention. Therefore, based on the method described in the above embodiment of the present invention, a person skilled in the art can understand the specific structure and deformation of the system / device, so it is not repeated here. All systems / devices used in the method of the above embodiment of the present invention belong to the scope of protection of the present invention.

[0144] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0145] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.

[0146] It should be noted that in the claims, any reference numerals placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience of expression only and does not indicate any order. These words may be understood as part of the component name.

[0147] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0148] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.

[0149] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include these modifications and variations.

Claims

1. A method for identifying dangerous areas of stairs based on RGB-D camera, characterized in that: The method is applied to a mobile robot and includes: The RGB image and depth image of the operating environment of the mobile robot are obtained through the RGB-D camera; After marking the staircase-like dangerous areas in the RGB image, the images are input into the pre-established instance segmentation model for mask processing to obtain the masked RGB image. According to the obtained internal and external parameters of the RGB-D camera, the masked RGB image is aligned with the pixels of the corresponding depth image to generate an aligned RGB image; The color point cloud model is constructed through the three-dimensional spatial information obtained by the aligned RGB image, depth image and the internal and external parameters conversion based on the RGB-D camera; Traverse all three-dimensional coordinate points of the color point cloud model, and obtain the location information of the staircase-type dangerous area according to the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions; According to the obtained internal and external parameters of the RGB-D camera, the RGB image processed by the mask is aligned with the pixels of the corresponding depth image to generate the aligned RGB image, including: Establish a depth camera coordinate system with the depth camera as the origin and an RGB camera coordinate system with the RGB camera as the origin; Get the intrinsic matrix, rotation matrix and translation vector of the RGB-D camera; The pixel coordinates of the filtered depth map are transformed through the depth camera intrinsic parameter matrix and the depth value to obtain the three-dimensional coordinate points in the depth camera coordinate system; According to the rotation matrix and translation vector of the RGB-D camera, the three-dimensional coordinate point in the RGB camera coordinate system is matched with the three-dimensional coordinate point in the depth camera coordinate system; The three-dimensional coordinate points in the RGB camera coordinate system are projected through the intrinsic parameter matrix of the RGB camera to obtain the pixel coordinates of the masked RGB image; Traverse all the pixels in the depth map and align them with the pixels of the masked RGB map to generate an RGB map that corresponds one-to-one with the pixels in the depth map. The color point cloud model is constructed by using the aligned RGB image, depth image, and the three-dimensional spatial information obtained by converting the internal and external parameters of the RGB-D camera, including: Establish a world coordinate system with the mobile robot's motion center as the origin; The three-dimensional coordinates in the world coordinate system are mapped to the coordinates in the depth camera coordinate system through a mapping formula to obtain a point cloud model; The RGB information and mask color information of the aligned RGB image are assigned to the point cloud model to obtain a color point cloud model.

2. The staircase dangerous area recognition method based on RGB-D camera according to claim 1, characterized in that: After marking the staircase-like dangerous area in the RGB image, the method further includes: Use an RGB-D camera to obtain several RGB images containing staircase-like dangerous areas; Annotate the staircase-like dangerous area in each RGB image in the form of polygonal polylines, and generate a corresponding image data set in a data exchange format containing the annotation information; After the image dataset is divided into a training dataset and a validation dataset according to a set ratio, the dataset formats of the training dataset and the validation dataset are converted into a COCO format dataset; The pre-established initial instance segmentation model based on the fully convolutional neural network is trained using the training dataset and validation dataset in COCO format to generate an instance segmentation model.

3. The staircase dangerous area recognition method based on RGB-D camera as claimed in claim 2, characterized in that: After marking the staircase-like dangerous areas in the RGB image, the image is input into the pre-established instance segmentation model for mask processing, and the masked RGB image obtained includes: Mark the staircase dangerous areas in the obtained RGB image; Input the annotated RGB image into the trained instance segmentation model; Generate the category confidence, position regression parameters and mask coefficients of each pixel in the RGB image through the first branch in the instance segmentation model; A prototype mask consistent with the RGB image is generated through the second branch in the instance segmentation model, and the masked RGB image of the staircase dangerous area is obtained based on the prototype mask and the mask coefficient.

4. The staircase dangerous area recognition method based on RGB-D camera as claimed in claim 1, characterized in that: The origin of the world coordinate system coincides with the origin of the depth camera coordinate system; The mapping formula is: In the formula, Z c is the z-axis value of the depth camera coordinates, (u, v) is an arbitrary coordinate point in the depth camera coordinate system, (u0, v0) is the center coordinate of the depth map; [RT] is the external parameter matrix of the RGB-D camera, R is a 3*3 rotation matrix, and T is a 3*1 translation vector; (x w ,y w , z w ) is the three-dimensional coordinate point in the world coordinate system.

5. The staircase dangerous area recognition method based on RGB-D camera as claimed in claim 1, characterized in that: Traverse all the three-dimensional coordinate points of the color point cloud model, and obtain the location information of the staircase dangerous area according to the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions, including: Traverse all three-dimensional coordinate points in the color point cloud model and obtain the number and coordinates of three-dimensional coordinate points that meet the set conditions; Determine whether the number of three-dimensional coordinate points that meet the set conditions exceeds a set number threshold; If the number of three-dimensional coordinate points that meet the set conditions does not exceed the set number threshold, there is no staircase-type dangerous area in the aligned RGB image; If the number of three-dimensional coordinate points that meet the set conditions exceeds the set number threshold, there is a staircase-type dangerous area in the aligned RGB image, and the location information of the staircase-type dangerous area is obtained through the number and coordinates of the three-dimensional coordinate points.

6. A staircase dangerous area recognition system based on RGB-D camera, characterized in that: include: A mobile robot and an RGB-D camera and a controller configured on the mobile robot; The RGB-D camera is used to collect RGB images and depth images of the mobile robot's operating environment; The controller is connected to the RGB-D camera and is used to execute the staircase dangerous area identification method based on the RGB-D camera as described in any one of claims 1 to 5.

7. The staircase dangerous area recognition system based on RGB-D camera as claimed in claim 6, characterized in that: The controller includes: The image information acquisition module is used to obtain the RGB image and depth image of the operating environment of the mobile robot; A mask processing module is used to mark the staircase-like dangerous area in the RGB image and input it into a pre-established instance segmentation model for mask processing to obtain a mask-processed RGB image; An image alignment module is used to align the pixel points of the masked RGB image with the corresponding depth image according to the internal and external parameters of the acquired RGB-D camera to generate an aligned RGB image; A color point cloud model construction module is used to construct a color point cloud model through the aligned RGB image, depth image, and three-dimensional spatial information obtained by converting the internal and external parameters of the RGB-D camera; The staircase dangerous area location determination module is used to traverse all three-dimensional coordinate points of the color point cloud model, and obtain the location information of the staircase dangerous area based on the number and coordinates of the obtained three-dimensional coordinate points that meet the set conditions.