Method for robot to obtain ceiling contour
The robot obtains the outline of the ceiling and uses depth image technology and sensor information to solve the problem of inaccurate room outlines caused by obstacles in the existing technology, achieving higher accuracy and user experience.
Patent Information
- Application Number
- CN202110868382.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-07-30
AI Technical Summary
Existing technology makes it difficult to obtain accurate room outlines in a house because laser scanning can be blocked by obstacles such as furniture, resulting in inaccurate outlines.
The robot searches for open areas and obtains the outline of the ceiling. It uses sensor information and depth image technology to calculate the depth of the ceiling and filter straight lines to obtain the accurate outline of the ceiling, and then generates an accurate floor plan of the room.
It achieves obtaining the accurate outline of the room in the presence of obstacles, improving user experience and data accuracy.
Smart Images

Figure CN113643344B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of intelligent robots, and in particular to a method for a robot to obtain a ceiling contour. Background Art
[0002] With the development of technology, robots can now achieve a higher level of intelligence by using sensor fusion computing to build and explore physical spaces. The current mainstream mapping technologies include vision, laser, etc. In some low-end applications, the outline of the map is achieved by using two-dimensional lasers, which can scan out maps of open spaces, but cannot do anything about the layout of a house, because the furniture in the house will block the laser, so that the outline obtained by the robot is not the real outline of the house. Summary of the invention
[0003] In order to solve the above problems, the present invention discloses a method for a robot to obtain the outline of a ceiling, which can obtain the accurate outline of a room by obtaining the outline of the ceiling, thereby improving the user experience. The specific technical solution is as follows:
[0004] A method for a robot to obtain a ceiling outline, the method comprising the following steps: S1: the robot searches for an open area in a room and then moves into the open area; S2: the robot obtains sensor information from different positions, then obtains the depth of the ceiling edge and point features from the sensor information, and calculates the optimal ceiling depth; S3: the robot extracts straight lines from the depth image, and filters the straight lines according to the relationship between the height of the end point of the straight line and the height between the ceiling and the ground; S4: the robot selects the corresponding straight line from the filtered straight lines according to the position of the straight line in the image, and obtains the outline of the ceiling according to the selected straight line. Compared with the prior art, the present application can obtain the accurate outline of the room by obtaining the outline of the ceiling, will not be blocked by obstacles in the room, has high practicality, and improves the user experience.
[0005] Furthermore, in step S1, before the robot searches for an open area, it first locates itself based on the walking map to determine its own position. By first locating itself, the data subsequently acquired by the robot is more accurate.
[0006] Furthermore, in step S1, the robot determines whether the area is an open area based on the distance between itself and the surrounding obstacles. When determining an open area, the robot obtains the distance between obstacles in the environment. If the distance between the robot itself and the nearest obstacle is greater than the set distance, it is determined that the robot is in an open area.
[0007] Furthermore, in step S2, the robot obtains the depth of the ceiling edge and point features through the pinhole model according to the sensor information, and calculates the optimal ceiling depth.
[0008] Furthermore, obtaining the depth of the ceiling edge and point features through the pinhole imaging model and calculating the optimal ceiling depth includes the following steps:
[0009] The robot moves the set straight-line distance, and then according to the straight-line distance L and two sets of pixel coordinates (u 1 ,v 1 ),(u 2 ,v 2 ) is calculated by depth data formula:
[0010]
[0011] Wherein, f is the focal length, and Z is the depth data; obtain a number of depth data Z, then sort the obtained depth data, select a sequence of a set length to obtain the maximum difference between the depth data in the sequence, and if the maximum difference is within a set range, use the average value of the depth data Z in the sequence as the optimal ceiling depth, and use the optimal ceiling depth as the height between the ceiling and the ground.
[0012] Furthermore, the depth data calculation formula is obtained according to the basic formula of the pinhole imaging module:
[0013]
[0014]
[0015] Among them, f is the focal length, X, Y, Z are global coordinates, c is the center point of the camera, and u and v are the pixel coordinates of the image.
[0016] Furthermore, in step S2, the robot first randomly acquires an image through the camera, and then the camera vertically upward randomly acquires two pictures.
[0017] Furthermore, in step S3, the robot filters out straight lines whose endpoints are lower than the height between the ceiling and the ground.
[0018] Furthermore, in step S4, the robot selects a straight line located at the outermost circle of the depth image from the filtered straight lines as the boundary line between the ceiling and the wall.
[0019] Furthermore, in step S4, the robot projects the three-dimensional coordinates of the endpoints of the boundary line onto the walking map of the robot, and then connects the endpoints located on the same boundary line and projected on the walking map to obtain the outline of the ceiling.
[0020] A method for using a robot to establish a floor plan, comprising the following steps: obtaining the outline of a ceiling according to the above-mentioned method for using a robot to obtain the outline of a ceiling; and generating a floor plan that is identical to the outline of the ceiling.
[0021] Furthermore, the robot obtains the ceiling image, and then obtains the boundary line between the ceiling and the wall from the image, and then projects the endpoints of the boundary line onto the walking map and connects them to obtain the outline of the ceiling; the outline of the ceiling is merged with the walking map, and then the non-overlapping part is set as an obstacle area to obtain a floor plan that is the same as the outline of the ceiling. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The present invention is a flowchart of a method for a robot to obtain a ceiling contour in one embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0024] Reference Figure 1 It can be seen that a method for identifying the outline of a ceiling includes the following steps: S1: the robot searches for an open area in the room and then moves to the open area; S2: the robot obtains sensor information from different positions, then obtains the depth of the ceiling edge and point features from the sensor information, and calculates the optimal ceiling depth; S3: the robot extracts straight lines from the depth image, and filters the straight lines according to the relationship between the height of the end point of the straight line and the height between the ceiling and the ground; S4: the robot selects the corresponding straight line from the filtered straight lines according to the position of the straight line in the image, and obtains the outline of the ceiling according to the selected straight line. Using a depth camera to identify the ceiling can directly obtain the three-dimensional space of the ceiling, and the calculation complexity is small. The same effect can also be achieved by using a single wide-angle camera and slam positioning to identify and calculate the outline of the ceiling. Compared with the prior art, the present application can obtain the accurate outline of the room by obtaining the outline of the ceiling, which will not be blocked by obstacles in the room, has high practicality, and improves the user experience.
[0025] As one of the embodiments, in step S1, before the robot searches for an open area, it first locates itself based on the walking map to determine its own position. By first locating itself, the data subsequently acquired by the robot is more accurate. In step S1, the robot determines whether the area is an open area based on the distance between itself and the surrounding obstacles. When determining whether it is in an open area, the robot obtains the distance between the obstacles in the environment. If the distance between the robot itself and the nearest obstacle is greater than the set distance, it is determined that it is in an open area. At this time, the robot can directly proceed to the next step, or slightly adjust its position to be a certain distance away from the nearest obstacle. The central area of the room can also be used as an open area.
[0026] As one embodiment, in step S2, the robot obtains the depth of the ceiling edge and point features through the pinhole model according to the sensor information, and calculates the optimal ceiling depth. Obtaining the depth of the ceiling edge and point features through the pinhole imaging model and calculating the optimal ceiling depth includes the following steps: the robot moves a set straight-line distance, and then calculates the optimal ceiling depth according to the straight-line distance L and the two sets of pixel coordinates (u 1 ,v 1 ),(u 2 ,v 2 ) is calculated by depth data formula:
[0027]
[0028] Where f is the focal length and Z is the depth data; obtain a number of depth data Z, then sort the obtained depth data, select a sequence of set length to obtain the maximum difference between the depth data in the sequence, if the maximum difference is within the set range, then the average value of the depth data Z in the sequence is used as the optimal ceiling depth, and the optimal ceiling depth is used as the height between the ceiling and the ground. The depth data calculation formula is obtained according to the basic formula of the pinhole imaging module:
[0029]
[0030]
[0031] Among them, f is the focal length, X, Y, Z are global coordinates, c is the center point of the camera, and u and v are the pixel coordinates of the image.
[0032] As one of the embodiments, in step S2, the robot first randomly acquires an image through the camera, and then the camera randomly acquires two pictures vertically upward. In step S3, the robot filters out straight lines whose endpoints are lower than the height between the ceiling and the ground. In step S4, the robot selects the straight line located in the outermost circle of the depth image from the filtered straight lines as the boundary between the ceiling and the wall. In step S4, the robot projects the three-dimensional coordinates of the endpoints of the boundary line onto the robot's walking map, and then connects the endpoints located on the same boundary line and projected on the walking map. The acquired ceiling outline can be merged with the robot's walking map, and the non-overlapping parts of the graphics in the walking map that are formed with the ceiling outline are marked as obstacles, so that the robot's walking map is more complete and accurate, which can bring a more intuitive experience to the user.
[0033] A method for using a robot to establish a floor plan, comprising the following steps: obtaining the outline of a ceiling according to the above-mentioned method for using a robot to obtain the outline of a ceiling; and generating a floor plan that is identical to the outline of the ceiling.
[0034] Furthermore, the robot obtains the ceiling image, and then obtains the boundary line between the ceiling and the wall from the image, and then projects the endpoints of the boundary line onto the walking map and connects them to obtain the outline of the ceiling; the outline of the ceiling is merged with the walking map, and then the non-overlapping part is set as an obstacle area to obtain a floor plan that is the same as the outline of the ceiling.
[0035] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0036] The above embodiments only express several embodiments of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A method for obtaining a ceiling contour by a robot, characterized in that: The method comprises the following steps: S1: The robot looks for an open area in the room and moves to the open area; S2: The robot obtains sensor information from different positions, then obtains the depth of the ceiling edge and point features from the sensor information, and calculates the optimal ceiling depth; S3: The robot extracts straight lines from the depth image and filters the straight lines based on the relationship between the height of the endpoints of the straight lines and the height between the ceiling and the ground; S4: The robot selects a corresponding straight line from the filtered straight lines according to the position of the straight line in the image, and obtains the outline of the ceiling according to the selected straight line; In step S2, the robot obtains the depth of the ceiling edge and point features through the pinhole imaging model according to the sensor information, and calculates the optimal ceiling depth; Obtaining the depth of ceiling edges and point features through the pinhole imaging model and calculating the optimal ceiling depth includes the following steps: The robot moves the set straight-line distance, and then calculates the formula based on the straight-line distance L and two sets of pixel coordinates (u1, v1) and (u2, v2) through the depth data: Among them, f is the focal length, and Z is the depth data; Acquire a number of depth data Z, then sort the acquired depth data, select a sequence of a set length to obtain the maximum difference between the depth data in the sequence, and if the maximum difference is within a set range, use the average value of the depth data Z in the sequence as the optimal ceiling depth, and use the optimal ceiling depth as the height between the ceiling and the ground; In step S4, the robot selects a straight line located at the outermost circle of the depth image from the filtered straight lines as the boundary line between the ceiling and the wall; In step S4, the robot projects the three-dimensional coordinates of the endpoints of the boundary line onto the robot's walking map, and then connects the endpoints located on the same boundary line and projected on the walking map to obtain the outline of the ceiling.
2. The method for obtaining a ceiling contour by a robot according to claim 1, characterized in that: In step S1, before searching for an open area, the robot first locates itself based on the walking map to determine its own position.
3. The method for obtaining a ceiling contour by a robot according to claim 1, characterized in that: In step S1, the robot determines whether the area is an open area based on the distance between itself and the surrounding obstacles. When determining an open area, the robot obtains the distance between obstacles in the environment. If the distance between the robot itself and the nearest obstacle is greater than the set distance, it is determined that the robot is in an open area.
4. The method for obtaining a ceiling contour by a robot according to claim 1, characterized in that: The depth data calculation formula is obtained according to the basic formula of the pinhole imaging module: Among them, f is the focal length, X, Y, Z are global coordinates, c is the center point of the camera, and u and v are the pixel coordinates of the image.
5. The method for obtaining a ceiling contour by a robot according to claim 1, characterized in that: In step S2, the robot first randomly acquires an image through the camera, and then the camera vertically upward randomly acquires two pictures.
6. The method for obtaining a ceiling contour by a robot according to claim 1, characterized in that: In step S3, the robot filters out straight lines whose endpoints are lower than the height between the ceiling and the ground.
7. A method for creating a floor plan by a robot, characterized in that: The steps include: The method for obtaining a ceiling contour by a robot according to any one of claims 1 to 6, obtaining a ceiling contour; Generates a floor plan with the same profile as the ceiling.
8. The method for establishing a floor plan by a robot according to claim 7, characterized in that: The robot obtains the ceiling image, then obtains the boundary line between the ceiling and the wall from the image, and then projects the endpoints of the boundary line onto the walking map and connects them to obtain the outline of the ceiling; The ceiling outline and the walking map are merged, and then the non-overlapping parts are set as obstacle areas to obtain a floor plan that is the same as the ceiling outline.
