WO2023005195A1 - 地图数据的处理方法、装置、家用电器和可读存储介质 - Google Patents

地图数据的处理方法、装置、家用电器和可读存储介质 Download PDF

Info

Publication number
WO2023005195A1
WO2023005195A1 PCT/CN2022/076846 CN2022076846W WO2023005195A1 WO 2023005195 A1 WO2023005195 A1 WO 2023005195A1 CN 2022076846 W CN2022076846 W CN 2022076846W WO 2023005195 A1 WO2023005195 A1 WO 2023005195A1
Authority
WO
WIPO (PCT)
Prior art keywords
map data
wall
point
data
building
Prior art date
Application number
PCT/CN2022/076846
Other languages
English (en)
French (fr)
Inventor
程冉
Original Assignee
美智纵横科技有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 美智纵横科技有限责任公司 filed Critical 美智纵横科技有限责任公司
Publication of WO2023005195A1 publication Critical patent/WO2023005195A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Definitions

  • the present application relates to the technical field of data processing, and in particular, relates to a map data processing method, device, household appliance, and readable storage medium.
  • map information is an important source of environmental characteristics. How to re-develop and process the map and extract useful information after the robot has created the map has become the main direction of robot perception. Among them, the understanding of the map affects Subsequent robot control, planning, and tracking of dynamic objects. Similarly, how to process the map information established by the robot into data that can be used in production or life is also a problem worth exploring.
  • This application aims to solve at least one of the technical problems existing in the prior art or related art.
  • the first aspect of the present application is to provide a method for processing map data.
  • the second aspect of the present application is to provide a map data processing device.
  • the third aspect of the present application is to provide a household appliance.
  • a fourth aspect of the present application is to provide a readable storage medium.
  • the present application provides a method for processing map data, including: receiving map data, classifying and processing the map data to obtain wall endpoints; generating a two-dimensional map data according to the wall endpoints Point cloud image, extract the outline of the two-dimensional point cloud image, and connect the extracted results to obtain the building outline information corresponding to the map data; filter the map data according to the building outline information; filter the filtered map data Connect the wall line segments in to obtain the internal wall frame information; combine the building outline information with the internal wall frame information to obtain the building frame information.
  • the technical solution of this application uses a laser ranging sensor to measure the environmental distance, and forms a complete two-dimensional laser map by summarizing the ranging results, so as to construct the frame information of the building.
  • the morphological method filters out the above irregular objects such as furniture and sundries, and uses the combination of morphology and image science to extract the outline of the two-dimensional point cloud image generated by the end points of the wall, so as to realize the noise wall line segment in the building. Filtering, and then through the outline connection of the extracted results, to complete the reconstruction of the outline information of the building.
  • the two-dimensional point cloud images other than the building outline information in the map data are filtered out, and then the internal wall frame information of the building is left
  • the map data of the filtered map data is connected to reconstruct the internal wall frame information by connecting the wall line segments in the filtered map data.
  • the obtained above two kinds of information are combined to obtain the frame information of the constructed building.
  • the frame information of the building is constructed based on the two-dimensional point cloud image. While ensuring the recognition accuracy, the complexity of the calculation is reduced, the amount of calculation for data processing is reduced, and it is easy to deploy on miniaturized equipment. .
  • the amount of calculation required is reduced compared with the existing technical solution, so it is beneficial to reduce the cost required for map data processing, and at the same time, it is also convenient to reduce the cost of products or equipment that apply the map data processing solution. cost.
  • map data processing method claimed in this application also has the following additional technical features.
  • the above technical solution before classifying the map data and obtaining the end point of the wall, it also includes: using a horizontal filter and a vertical filter to filter the map data respectively to obtain the corresponding first mask data and second mask data.
  • Mask data OR the first mask data and the second mask data, and use the OR result as a filter to clean the map data.
  • the impact on the reconstruction of the frame information of the building may be to increase the amount of calculation, such as increasing the amount of calculation for classification processing, or to affect the calculation accuracy of the end points of the wall, such as due to the existence of the above-mentioned discrete objects , will lead to deviation of the end point of the wall, and finally cause the deviation of the outline information of the building.
  • the technical solution of the present application adopts a horizontal filter and a vertical filter, wherein the horizontal filter, that is, only able to pass through the horizontal line segment, has a filtering effect on the vertical line segment, and the map data is processed by using the horizontal filter. Filtering out to obtain the first mask data; the vertical filter can only pass through the vertical line segment, and has the function of filtering out the horizontal line segment to obtain the filtered second mask data.
  • the above steps belong to preliminary filtering.
  • the horizontal filter and the vertical filter can be adjusted according to the actual usage scenario, such as adjusting the angle between the horizontal filter and the vertical filter according to the shape of the building's outer contour, so that the arc wall Identify to meet more applicable scenarios.
  • classifying the map data to obtain the wall endpoints includes: taking the non-empty position corresponding to the first data in the map data as a reference point, and performing a neighborhood search along a preset direction; based on the reference point
  • the neighborhood of the preset direction of the reference point is a non-wall space, then mark the first data as the wall endpoint;
  • the neighborhood of the preset direction based on the reference point is the wall space, and the neighborhood in the preset direction of the reference point is
  • the second data of the wall space is used as the updated reference point until traversing all the data in the map data or the boundary of the map data to obtain the end point of the wall.
  • the determination of the end points of the wall is realized. Since the discrete and regular wall line segments formed in the cleaned map data can be clustered through a simple depth optimization traversal algorithm, therefore, clustering through the map data is The extraction of the above-mentioned discrete rules of the wall line segment can be realized.
  • the map data is measured based on equipment such as laser ranging sensors. If there is no wall around the measuring point, it will be reflected in the measured data. There is no line segment at the surrounding position; if there is a wall around the measuring point , it is reflected in the measured data, there are line segments or discrete points in the surrounding positions.
  • the neighborhood of its preset direction is a non-wall space, that is, there is no wall
  • the detection result is no, that is, the neighborhood of its preset direction is the wall space, obviously, it is not the corner position.
  • the reference point in order to further determine whether the reference point is the end point of the wall, In this process, the determination of the end point of the wall body of the building can be realized, and the accuracy of the end point of the wall body obtained is ensured.
  • the preset direction may be directly up, directly below, directly left and directly right, that is, neighborhood search is performed in a cross direction, that is, cross clustering.
  • the final wall endpoint can be obtained, so as to avoid the influence of large-sized rooms or objects in the building on the detection results.
  • the above-mentioned restrictions ensure that Accuracy of test results.
  • the number of times of classification processing is greater than or equal to two.
  • the number of classification processing is specifically limited to at least two times.
  • the filtering effect of line segments is ensured, so that the amount of data processing can be reduced when extracting convex polygons in the later stage, which is suitable for deployment in miniaturized equipment. provides the basis.
  • the core of the filter element is larger than that of the first classification for the second, third, or Nth time, so as to improve its filtration efficiency. Effect.
  • N is a positive integer greater than or equal to 4.
  • the classification processing may be clustering processing, that is, the cross clustering mentioned above.
  • a two-dimensional point cloud image is generated according to the wall endpoints obtained after clustering, so as to extract the outline information of the building according to the two-dimensional point cloud image.
  • contour extraction is performed on the two-dimensional point cloud image, and the contour connection is performed on the extraction results to obtain the outer contour information of the building corresponding to the map data, which specifically includes: Convex the outer contour of the two-dimensional point cloud image Polygon extraction; connect the extracted convex polygons with right-angled edges to obtain the building outline information corresponding to the map data.
  • the wall structure around the building can represent the outline of the building, and the outline of the building can be summarized by extracting convex polygons, so as to confirm that the obtained outline information of the building conforms to the actual situation.
  • the quickHull method can be used to extract convex polygons from the two-dimensional point cloud image, so as to ensure that the extracted convex polygons can accurately represent the outline of the building.
  • the quickHull method that is, the quick Hull method, selects the leftmost, rightmost, uppermost and lowermost points, and combines them to form a convex quadrilateral (or triangle).
  • the points in this quadrilateral must not be in the convex package, and then divide the rest of the points into four parts according to the closest side, and then perform fast package method extraction.
  • the wall of the building is square, and the extracted convex polygon does not have the above characteristics, in order to ensure that the obtained building outline information is consistent with the actual building
  • the contours are consistent, and the technical solution of the present application limits the connection of the extracted convex polygons with a right-angled side connection.
  • the right-angled side connection it is ensured that the obtained building outline is square and square, so as to improve the calculation results and The matching degree of the actual scene.
  • the extracted convex polygons are connected at right angles, specifically including: determining the coordinate data of the starting endpoint to be connected and the ending endpoint to be connected in the endpoints of the convex polygon, wherein the starting endpoint to be connected and The terminal endpoints to be connected are the two endpoints sorted along the preset sorting direction among the endpoints of the convex polygon; determine the coordinate data of the anchor point to be selected according to the coordinate data; determine the centroid of the endpoint point cloud of the convex polygon; The coordinate data determine the target anchor point located outside the convex polygon; connect the start endpoint to be connected, the end point to be connected and the target anchor point.
  • two endpoints are selected from the extracted convex polygon endpoints, that is, the wall endpoints, that is, the starting endpoint to be connected and the termination endpoint to be connected above. , where the two points can be the two nearest adjacent points.
  • the outline of the building is usually square, if the start point to be connected is directly connected to the end point to be connected, it may It will cause the outline of the obtained building to be not square. Therefore, when connecting the start point to be connected and the end point to be connected, the connection strategy needs to be adjusted.
  • the preset sorting direction may be clockwise sorting or counterclockwise sorting.
  • the clockwise sorting and counterclockwise sorting are sorting methods based on the centroid of the endpoint point cloud as a reference.
  • the coordinate data can be given based on the coordinate axes of the two-dimensional plane.
  • the wall indicated by the map data is parallel to the X-axis or the Y-axis in the coordinate axes of the two-dimensional plane, so that based on the two-dimensional
  • the X-axis or Y-axis in the plane coordinate axis is used to determine the coordinate data.
  • the coordinate data is determined based on the X-axis or the Y-axis in the coordinate axes of the two-dimensional plane, the data of one of the coordinate axes can be limited to zero, thereby reducing the complexity of calculation.
  • the coordinate data of the anchor point to be selected can be determined according to the coordinate data.
  • the coordinate data of the first wall endpoint is A(Ax, Ay) and the second wall endpoint B(Bx, By), then there are only C(Ax, By) and D(Bx, Ay) points that can be connected at right angles to the first wall endpoint and the second wall endpoint, that is, the coordinate data of the anchor point to be selected.
  • the outline of a building is a convex polygon, so it is only necessary to determine the points outside the polygon in C(Ax, By) and D(Bx, Ay) to achieve the target anchor Point of OK.
  • first wall endpoint and the second wall endpoint are two endpoints selected on a convex polygon, it may not be able to complete the expression of the building outline. By traversing all the wall endpoints, all the wall endpoints are used The right-angled sides are connected to realize the expression of the outline of the building.
  • the target anchor point is determined based on the point-in-polygon method.
  • determining the centroid of the endpoint point cloud of the convex polygon includes: determining the average value of the coordinate data of all the endpoints of the convex polygon; determining the centroid of the endpoint point cloud according to the average value.
  • the coordinate data of the first wall endpoint of the convex polygon is A (Ax, Ay), the second wall endpoint B (Bx, By), the third wall endpoint E (Ex, Ey) and the fourth wall endpoint
  • the wall endpoint F(Fx, Fy), the coordinate data corresponding to the point cloud centroid of the endpoint is ((Ax+Bx+Ex+Fx)/4, (Ay+By+Ey+Fy)/4).
  • the wall line segments in the filtered map data are connected to obtain the internal wall frame information, which specifically includes: establishing k-d according to the endpoints corresponding to all wall line segments in the filtered map data Tree: According to the k-d tree, query the adjacent points of each selected end point, connect the selected end point with the adjacent points, until the end points corresponding to all wall line segments are traversed to obtain the internal wall frame information.
  • a k-d tree is constructed, wherein the k-d tree corresponds to the endpoints corresponding to all wall line segments, so as to determine the nearest Proximity.
  • the k-d tree (the abbreviation of k-dimensional tree) is a tree-shaped data structure that stores instance points in k-dimensional space for fast retrieval. It is mainly used in the search of key data in multi-dimensional space. By constructing k-d tree, which simplifies the determination process of adjacent points, and facilitates the reconstruction of internal wall frame information at a very fast speed.
  • the selected end point before connecting the selected end point with the adjacent point, it also includes: determining the connection situation of the adjacent point or the line segment where the adjacent point is located; based on the adjacent point or the line segment where the adjacent point is not connected, then according to The selected end points are connected to neighboring points.
  • the selected end point is skipped based on the adjacent point or the line segment where the adjacent point is located has been connected.
  • the present application provides a map data processing device, including: a classification module for receiving map data, and classifying the map data to obtain wall endpoints; a first connection module for To generate a two-dimensional point cloud image according to the end points of the wall, extract the outline of the two-dimensional point cloud image, and perform outline connection on the extracted results to obtain the building outline information corresponding to the map data;
  • the information filters the map data;
  • the second connection module is used to connect the wall line segments in the filtered map data to obtain the internal wall frame information;
  • the combination module is used to combine the building outline information and the internal wall Combine the body frame information to get the frame information of the building.
  • the map data is classified and processed to obtain the end point of the wall, and the classification module is also used to: use a horizontal filter and a vertical filter to filter the map data respectively to obtain the corresponding first mask code data and the second mask data; OR the first mask data and the second mask data, and use the OR result as a filter to clean the map data.
  • the classification module is specifically configured to use the non-empty position corresponding to the first data in the map data as a reference point to perform neighborhood search along a preset direction; the neighborhood based on the preset direction of the reference point is a non-empty Wall space, mark the first data as the end point of the wall; the neighborhood based on the preset direction of the reference point is the wall space, and use the neighborhood in the preset direction of the reference point as the second data of the wall space as an update After traversing all the data in the map data or the boundary of the map data to obtain the end point of the wall.
  • the number of times of classification processing is greater than or equal to two.
  • the first connection module is specifically used to extract a convex polygon from the outer contour of the two-dimensional point cloud image; connect the extracted convex polygons with right-angled edges to obtain the building outer contour information corresponding to the map data .
  • the first connection module is specifically used to determine the coordinate data of the start point to be connected and the end point to be connected among the convex polygon endpoints; determine the coordinate data of the anchor point to be selected according to the coordinate data; determine the coordinate data of the convex polygon The centroid of the endpoint point cloud; determine the target anchor point outside the convex polygon according to the centroid of the endpoint point cloud and the coordinate data of the anchor point to be selected; connect the start endpoint to be connected, the end point to be connected to the target anchor point.
  • the target anchor point is determined based on the point-in-polygon method.
  • the first connection module is specifically configured to determine the average value of the coordinate data of all convex polygon endpoints; and determine the centroid of the endpoint point cloud according to the average value.
  • the second connection module is specifically used to establish a k-d tree according to the end points corresponding to all wall line segments in the filtered map data; according to the k-d tree, query the adjacent points of each selected end point, and select The fixed end points are connected with adjacent points until the end points corresponding to all wall line segments are traversed to obtain the internal wall frame information.
  • the second connection module before connecting the selected end point with the adjacent point, is also used to: determine the connection status of the adjacent point or the line segment where the adjacent point is located; is connected, establish a connection with the adjacent point according to the selected endpoint.
  • the second connection module is further configured to: skip the selected end point based on the adjacent point or the line segment where the adjacent point is located has been connected.
  • the present application provides a household appliance, including: a memory, on which a computer program is stored; a controller, the controller executes the computer program to realize the processing method of map data as any one of the above A step of.
  • the household appliance is a cleaning robot.
  • the present application provides a readable storage medium on which programs or instructions are stored, and when the programs or instructions are executed by a processor, the method for processing map data as described in any one of the above is implemented. step.
  • FIG. 1 shows a schematic flow chart of a method for processing map data in an embodiment of the present application
  • Fig. 2 shows the schematic flow diagram of obtaining the end points of the wall by classifying the received map data in the embodiment of the present application
  • FIG. 3 shows a schematic flow diagram of connecting the right-angled sides of the extracted convex polygons in the embodiment of the present application
  • Fig. 4 shows a schematic flow diagram of connecting the wall line segments in the filtered map data to obtain the internal wall frame information in the embodiment of the present application
  • Fig. 5 shows one of the schematic block diagrams of the map data processing device in the embodiment of the present application
  • Fig. 6 shows the second schematic block diagram of the map data processing device in the embodiment of the present application.
  • Fig. 7 shows the schematic diagram of two-dimensional laser map in the embodiment of the present application.
  • Figure 8 shows a schematic diagram of the first mask data in the embodiment of the present application.
  • Fig. 9 shows a schematic diagram of the second mask data in the embodiment of the present application.
  • Fig. 10 shows a schematic diagram of realizing the cleaning of map data in the embodiment of the present application
  • Fig. 11 shows the schematic diagram of the continuous wall body in the embodiment of the present application.
  • Fig. 12 shows a schematic diagram of the wall in the mask in the embodiment of the present application.
  • Figure 13 shows a schematic diagram of wall endpoints and line segments in the embodiment of the present application.
  • Fig. 14 shows a schematic diagram of the end points of the wall and the end points of the convex polygon when the number of times of classification processing in the embodiment of the present application is two;
  • Fig. 15 shows a schematic diagram of target anchor points, endpoint point cloud centroids and wall endpoints in the embodiment of the present application
  • Fig. 16 shows a schematic diagram of target anchor point determination in the embodiment of the present application.
  • Fig. 17 shows one of the schematic diagrams of the connection between the selected end point and the adjacent point right-angled side in the embodiment of the present application
  • Figure 18 shows the second schematic diagram of the connection between the selected end point and the adjacent point right-angled side in the embodiment of the present application
  • Fig. 19 shows a schematic diagram of determining the endpoint of a wall in the embodiment of the present application.
  • the application provides a method for processing map data, including:
  • Step 102 classifying and processing the received map data to obtain wall endpoints
  • Step 104 drawing a two-dimensional point cloud image according to the end points of the wall, so as to perform contour extraction on the two-dimensional point cloud image;
  • Step 106 connecting the contours of the extracted results to obtain the building contour information
  • Step 108 filtering the building outline information in the map data
  • Step 110 connecting the wall line segments in the filtered map data to obtain internal wall frame information
  • step 112 the frame information of the building is obtained according to the outline information of the building and the frame information of the internal wall.
  • the embodiment of the present application adopts a laser ranging sensor to measure the environmental distance, and forms a complete two-dimensional laser map by summarizing the ranging results, so as to construct the frame information of the building.
  • the morphological method filters out the above irregular objects such as furniture and sundries, and uses the combination of morphology and image science to extract the outline of the two-dimensional point cloud image generated by the end points of the wall, so as to realize the noise wall line segment in the building. Filtering, and then through the outline connection of the extracted results, to complete the reconstruction of the outline information of the building.
  • the two-dimensional point cloud images other than the building outline information in the map data are filtered out, and then the internal wall frame information of the building is left
  • the map data of the filtered map data is connected to reconstruct the internal wall frame information by connecting the wall line segments in the filtered map data.
  • the obtained above two kinds of information are combined to obtain the frame information of the constructed building.
  • the frame information of the building is constructed based on the two-dimensional point cloud image, while ensuring the recognition accuracy, the complexity of the calculation is reduced, the calculation amount of the data processing is reduced, and it is convenient to be deployed on a miniaturized device .
  • the amount of calculation required is reduced compared with the existing embodiment, so it is beneficial to reduce the cost required for map data processing, and at the same time, it is also convenient to reduce the cost of products or equipment that apply the map data processing solution. cost.
  • the classification processing of the map data before the classification processing of the map data, it also includes: using a horizontal filter to filter the map data to obtain the first mask data; using a vertical filter to filter the map data to obtain the second mask data; ORing the first mask data and the second mask data, and using the OR result as a filter to clean the map data.
  • the map data before the map data is classified, the map data also needs to be cleaned.
  • the map data By cleaning the map data, the data corresponding to the smaller discrete objects existing in the building are cleaned, so as to reduce the The impact of this part of the data on the reconstruction of the frame information of the building.
  • the impact on the reconstruction of the frame information of the building may be to increase the amount of calculation, such as increasing the amount of calculation for classification processing, or to affect the calculation accuracy of the end points of the wall, such as due to the existence of the above-mentioned discrete objects , will lead to deviation of the end point of the wall, and finally cause the deviation of the outline information of the building.
  • the embodiment of the present application adopts a horizontal filter and a vertical filter, wherein the horizontal filter, that is, only able to pass through the horizontal line segment, has a filtering effect on the vertical line segment, and the map data is processed by using the horizontal filter. Filtering out to obtain the first mask data; the vertical filter can only pass through the vertical line segment, and has the function of filtering out the horizontal line segment to obtain the filtered second mask data.
  • the above steps belong to preliminary filtering.
  • the received map data is classified and processed to obtain the wall endpoints, including:
  • Step 202 selecting a reference point, and performing a neighborhood search along a preset direction
  • Step 204 when the neighborhood of the preset direction of the reference point is a non-wall space, mark the first data as a wall end point.
  • the second data of the wall space in the neighborhood of the preset direction of the reference point is used as the updated reference point, and repeatedly execute steps 202, In step 204, all data or boundaries of map data are traversed, so as to obtain wall endpoints.
  • the reference point is a non-empty position corresponding to the first data in the map data.
  • the determination of the end points of the wall is realized. Since the discrete and regular wall line segments formed in the cleaned map data can be clustered through a simple depth optimization traversal algorithm, clustering through the map data is The extraction of the above-mentioned discrete rules of the wall line segment can be realized.
  • the map data is measured based on equipment such as laser ranging sensors. If there is no wall around the measuring point, it will be reflected in the measured data. There is no line segment at the surrounding position; if there is a wall around the measuring point , it is reflected in the measured data, there are line segments or discrete points in the surrounding positions.
  • the neighborhood of its preset direction is a non-wall space, that is, there is no wall
  • the detection result is no, that is, the neighborhood of its preset direction is the wall space, obviously, it is not the corner position.
  • the reference point in order to further determine whether the reference point is the end point of the wall, In this process, the determination of the end point of the wall body of the building can be realized, and the accuracy of the end point of the wall body obtained is ensured.
  • the preset direction may be directly up, directly below, directly left and directly right, that is, neighborhood search is performed in a cross direction, that is, cross clustering.
  • the final wall endpoint can be obtained, so as to avoid the influence of large-sized rooms or objects in the building on the detection results.
  • the above-mentioned restrictions ensure that Accuracy of test results.
  • the number of sorting processes is greater than or equal to two.
  • the number of times of classification processing is specifically limited to at least two times.
  • the filter core core is larger than that of the first sorting process during the second, third or Nth time, so as to improve its filtration efficiency. Effect.
  • N is a positive integer greater than or equal to 4.
  • the classification processing may be clustering processing, that is, the cross clustering mentioned above.
  • a two-dimensional point cloud image is generated according to the wall endpoints obtained after clustering, so as to extract the outline information of the building according to the two-dimensional point cloud image.
  • the specific scheme of extracting the contour of the two-dimensional point cloud image is: performing convex polygon extraction on the two-dimensional point cloud image.
  • the contours of the extraction results are connected to obtain the outer contour information of the building, specifically: the convex polygons obtained after extraction are connected at right angles to obtain the outer contour information of the building.
  • the wall structure around the building can represent the outline of the building, and the outline of the building can be summarized by extracting convex polygons, so as to confirm that the obtained outline information of the building conforms to the actual situation.
  • the quickHull method can be used to extract convex polygons from the two-dimensional point cloud image, so as to ensure that the extracted convex polygons can accurately represent the outline of the building.
  • the quickHull method that is, the quick-pack method, selects the leftmost, rightmost, uppermost and lowermost points, and combines them to form a convex quadrilateral (or triangle).
  • the points in this quadrilateral must not be in the convex quadrilateral package, and then divide the rest of the points into four parts according to the closest side, and then perform fast package method extraction.
  • the wall of the building is square, and the extracted convex polygon does not have the above characteristics, in order to ensure that the obtained building outline information is consistent with the actual building
  • the contours are consistent, and the embodiment of the present application limits the connection of the extracted convex polygons by using a right-angled edge connection.
  • a right-angled edge connection it is ensured that the obtained building outline is square and square, so as to improve the calculation results and The matching degree of the actual scene.
  • the convex polygons obtained after extraction are connected at right angles, specifically including:
  • Step 302 determining the coordinate data of the starting endpoint to be connected among the convex polygon endpoints, and the coordinate data of the to-be-connected termination endpoint among the convex polygon endpoints;
  • Step 304 determine the coordinate data of the anchor point to be selected according to the coordinate data
  • Step 306 determining the point cloud centroid of the endpoints of the convex polygon
  • Step 308 determine the target anchor point according to the coordinate data of the anchor point to be selected and the centroid of the endpoint point cloud, wherein the target anchor point is outside the convex polygon;
  • Step 310 connect the target anchor point, the starting endpoint to be connected and the ending endpoint to be connected.
  • start endpoint to be connected and the end endpoint to be connected are two endpoints sorted along a preset sorting direction among the convex polygon endpoints.
  • the specific implementation of right-angle side connection is defined.
  • two endpoints are selected on the extracted convex polygon endpoints, that is, the wall endpoints, that is, the starting endpoint to be connected and the termination endpoint to be connected above. , where the two points can be the two nearest adjacent points.
  • the outline of the building is usually square, if the start point to be connected is directly connected to the end point to be connected, it may The outline of the obtained building will not be square. Therefore, when connecting the start point to be connected with the end point to be connected, the connection strategy needs to be adjusted.
  • the preset sorting direction may be clockwise sorting or counterclockwise sorting.
  • the clockwise sorting and counterclockwise sorting are based on the sorting methods given based on the centroid of the endpoint point cloud as a reference.
  • the coordinate data can be given based on the coordinate axes of the two-dimensional plane.
  • the wall indicated by the map data is parallel to the X-axis or the Y-axis in the coordinate axes of the two-dimensional plane, so that based on the two-dimensional
  • the X-axis or Y-axis in the plane coordinate axis is used to determine the coordinate data.
  • the coordinate data is determined based on the X-axis or the Y-axis in the coordinate axes of the two-dimensional plane, the data of one of the coordinate axes can be limited to zero, thereby reducing the complexity of calculation.
  • the coordinate data of the anchor point to be selected can be determined according to the coordinate data.
  • the coordinate data of the first wall endpoint is A(Ax, Ay) and the second wall endpoint B(Bx, By), then there are only C(Ax, By) and D(Bx, Ay) points that can be connected at right angles to the first wall endpoint and the second wall endpoint, that is, the coordinate data of the anchor point to be selected.
  • the outline of a building is a convex polygon, so it is only necessary to determine the points outside the polygon in C(Ax, By) and D(Bx, Ay) to achieve the target anchor Point of OK.
  • first wall endpoint and the second wall endpoint are two endpoints selected on a convex polygon, it may not be able to complete the expression of the building outline. By traversing all the wall endpoints, all the wall endpoints are used The right-angled sides are connected to realize the expression of the outline of the building.
  • step 308 is implemented based on the point-in-polygon method.
  • the process of determining the centroid of the endpoint point cloud includes: determining the average value of the coordinate data of the endpoints of all convex polygons; wherein, the point corresponding to the average value of the coordinate data of the endpoints of all convex polygons is the centroid of the endpoint point cloud.
  • the coordinate data of the endpoint of the convex polygon that is, the coordinate data of the wall endpoint coincident with the convex polygon
  • the average value of the components of the axis or Y axis in order to obtain the coordinate data of the centroid of the endpoint point cloud.
  • the coordinate data of the first wall endpoint of the convex polygon is A (Ax, Ay), the second wall endpoint B (Bx, By), the third wall endpoint E (Ex, Ey) and the fourth wall endpoint
  • the wall endpoint F(Fx, Fy), the coordinate data corresponding to the point cloud centroid of the endpoint is ((Ax+Bx+Ex+Fx)/4, (Ay+By+Ey+Fy)/4).
  • the wall line segments in the filtered map data are connected to obtain internal wall frame information, specifically including:
  • Step 402 establishing a k-d tree, wherein the k-d tree is established based on the endpoints corresponding to all wall line segments in the map data except for the outline information of the building;
  • Step 404 in combination with the k-d tree, determine the adjacent points corresponding to each selected endpoint
  • Step 406 connect the selected end point with the right-angle side of the adjacent point until all the end points corresponding to all the wall line segments are connected.
  • a k-d tree is constructed, wherein the k-d tree corresponds to the endpoints corresponding to all wall line segments, so as to determine the nearest Proximity.
  • the k-d tree (the abbreviation of k-dimensional tree) is a tree-shaped data structure that stores instance points in k-dimensional space for fast retrieval. It is mainly used in the search of key data in multi-dimensional space. By constructing k-d tree, which simplifies the determination process of adjacent points, and facilitates the reconstruction of internal wall frame information at a very fast speed.
  • the selected end point before connecting the selected end point with the adjacent point right-angled side, it also includes: judging whether the connection of the adjacent point or the line segment where the adjacent point is located is connected; In the connected state, the selected end point is connected to the adjacent point at right angles.
  • any of the above embodiments when the adjacent point or the line segment where the adjacent point is located is in a connected state, cancel the connection between the selected end point and the right-angle side of the adjacent point, and skip the selected end point.
  • it is necessary to further determine whether the adjacent point has been connected, if not, connect it, so as to realize the drawing of the internal wall frame information , and for the case that has already been connected, there is no need to connect again, at this time, only need to skip this node.
  • the determination of whether the adjacent points have been connected is implemented based on the union search set.
  • a map data processing device 500 including: a classification module 502 for classifying and processing the received map data to obtain wall endpoints; a first connection module 504 , used to draw a two-dimensional point cloud image according to the end points of the wall, so as to extract the outline of the two-dimensional point cloud image, and connect the outlines of the extracted results to obtain the building outline information; the filtering module 506 is used to obtain the building outline according to the building outline information to filter the map data; the second connection module 508 is used to connect the wall line segments in the filtered map data to obtain internal wall frame information; the combination module 510 is used to The frame information of the building is obtained from the body frame information.
  • the embodiment of the present application uses a laser ranging sensor to measure the environmental distance, and forms a complete two-dimensional laser map by summarizing the ranging results, so as to construct the frame information of the building.
  • the morphological method filters out the above irregular objects such as furniture and sundries, and uses the combination of morphology and image science to extract the outline of the two-dimensional point cloud image generated by the end points of the wall, so as to realize the noise wall line segment in the building. Filtering, and then through the outline connection of the extracted results, to complete the reconstruction of the outline information of the building.
  • the two-dimensional point cloud images other than the building outline information in the map data are filtered out, and then the internal wall frame information of the building is left
  • the map data of the filtered map data is connected to reconstruct the internal wall frame information by connecting the wall line segments in the filtered map data.
  • the obtained above two kinds of information are combined to obtain the frame information of the constructed building.
  • the frame information of the building is constructed based on the two-dimensional point cloud image, while ensuring the recognition accuracy, the complexity of the calculation is reduced, the calculation amount of the data processing is reduced, and it is convenient to be deployed on a miniaturized device .
  • the amount of calculation required is reduced compared with the existing embodiment, so it is beneficial to reduce the cost required for map data processing, and at the same time, it is also convenient to reduce the cost of products or equipment that apply the map data processing solution. cost.
  • the map data processing device 500 can be transformed into a block diagram as shown in FIG.
  • the second connection module 508 constitutes the internal wall frame information extraction module 604 .
  • the classifying module 502 before classifying the map data, is also used to: as shown in Fig. 8, use a transverse filter to filter the map data to obtain the first Mask data; As shown in Figure 9, adopt vertical filter to filter map data, obtain the second mask data; As shown in Figure 10, the first mask data and the second mask data are taken or, and with The OR result is used as a filter to clean the map data.
  • the map data before the map data is classified, the map data also needs to be cleaned.
  • the map data By cleaning the map data, the data corresponding to the smaller discrete objects existing in the building are cleaned, so as to reduce the The impact of this part of the data on the reconstruction of the frame information of the building.
  • the impact on the reconstruction of the frame information of the building may be to increase the amount of calculation, such as increasing the amount of calculation for classification processing, or to affect the calculation accuracy of the end points of the wall, such as due to the existence of the above-mentioned discrete objects , will lead to deviation of the end point of the wall, and finally cause the deviation of the outline information of the building.
  • the embodiment of the present application adopts a horizontal filter and a vertical filter, wherein the horizontal filter, that is, only able to pass through the horizontal line segment, has a filtering effect on the vertical line segment, and the map data is processed by using the horizontal filter. Filtering out to obtain the first mask data; the vertical filter can only pass through the vertical line segment, and has the function of filtering out the horizontal line segment to obtain the filtered second mask data.
  • the above steps belong to preliminary filtering.
  • the part of the classification module 502 used for cleaning the map data is divided into a map preprocessing module 606 separately.
  • the classification module 502 is specifically configured to select a reference point and perform a neighborhood search along a preset direction, wherein the reference point is the position corresponding to the first data in the map data ;
  • the neighborhood of the preset direction of the reference point is a non-wall space, mark the first data as the end point of the wall;
  • the neighborhood in the preset direction of is the second data of the wall space as the updated reference point, and repeat the steps from selecting the reference point to marking the first data as the end point of the wall until traversing all data or map data Boundary to get the wall endpoints.
  • the determination of the end points of the wall is realized. Since the discrete and regular wall line segments formed in the cleaned map data can be clustered through a simple depth optimization traversal algorithm, clustering through the map data is The extraction of the above-mentioned discrete rules of the wall line segment can be realized.
  • the map data is measured based on equipment such as laser ranging sensors. If there is no wall around the measuring point, it will be reflected in the measured data. There is no line segment at the surrounding position; if there is a wall around the measuring point , then reflected in the measured data, there are line segments around the position.
  • the neighborhood of its preset direction is a non-wall space, that is, there is no wall
  • the position corresponding to the data belongs to the corner position of the wall, and for detection
  • the result is no, that is, the neighborhood of its preset direction is the wall space. Obviously, it is not the most corner position.
  • redesignating the reference point in order to further determine whether the reference point is the end point of the wall, here In the process, the determination of the end point of the wall body of the building can be realized, and the accuracy of the end point of the wall body obtained is ensured.
  • the preset direction may be directly up, directly below, directly left and directly right, that is, neighborhood search is performed in a cross direction, that is, cross clustering.
  • the final wall endpoint can be obtained, so as to avoid the influence of large-sized rooms or objects in the building on the detection results.
  • the above-mentioned restrictions ensure that Accuracy of test results.
  • the continuous wall can be determined according to the number of wall endpoints.
  • FIG. 12 shows a schematic diagram of walls in the mask, where the numbers 1, 2, 3, 4 and 5 are different walls.
  • FIG. 13 a schematic diagram of wall endpoints and line segments.
  • the number of times of classification processing is greater than or equal to two.
  • the number of times of classification processing is specifically limited to at least two times.
  • FIG. 14 a schematic diagram of wall endpoints and convex polygon endpoints when the number of times of classification processing is two.
  • the filter core core is larger than that of the first sorting process during the second, third or Nth time, so as to improve its filtration efficiency. Effect.
  • N is a positive integer greater than or equal to 4.
  • the classification processing may be clustering processing, that is, the cross clustering mentioned above.
  • a two-dimensional point cloud image is generated according to the wall endpoints obtained after clustering, so as to extract the outline information of the building according to the two-dimensional point cloud image.
  • the first connection module 504 is specifically configured to extract convex polygons from the outer contour of the two-dimensional point cloud image; and connect the extracted convex polygons with right-angled edges to obtain building outer contour information.
  • the wall structure around the building can represent the outline of the building, and the outline of the building can be summarized by extracting convex polygons, so as to confirm that the obtained outline information of the building conforms to the actual situation.
  • the quickHull method can be used to extract convex polygons from the two-dimensional point cloud image, so as to ensure that the extracted convex polygons can accurately represent the outline of the building.
  • the quickHull method that is, the quick-pack method, selects the leftmost, rightmost, uppermost and lowermost points, and combines them to form a convex quadrilateral (or triangle).
  • the points in this quadrilateral must not be in the convex quadrilateral Then divide the remaining points into four parts according to the closest side, and perform the fast wrapping method.
  • the wall of the building is square, and the extracted convex polygon does not have the above characteristics, in order to ensure that the obtained building outline information is consistent with the actual building
  • the contours are consistent, and the embodiment of the present application limits the connection of the extracted convex polygons by using a right-angled edge connection.
  • a right-angled edge connection it is ensured that the obtained building outline is square and square, so as to improve the calculation results and The matching degree of the actual scene.
  • the first connection module 504 is specifically used to determine the coordinate data of the start point to be connected among the convex polygon endpoints and the coordinate data of the end point to be connected among the convex polygon endpoints; Anchor point coordinate data; determine the centroid of the endpoint point cloud of the convex polygon; determine the target anchor point according to the coordinate data of the anchor point to be selected and the point cloud centroid of the endpoint point, wherein the target anchor point is outside the convex polygon; connect the target anchor point, to be connected The start point and the end point to be connected.
  • FIG. 15 shows a schematic diagram of the target anchor point, the point cloud centroid of the endpoint, and the endpoint of the wall.
  • the specific implementation of the connection of right-angled sides is defined.
  • two endpoints are selected on the extracted convex polygon, that is, the endpoints of the wall, that is, the starting endpoint to be connected and the termination endpoint to be connected above.
  • the two points can be the two nearest adjacent points.
  • the outline of the building is usually square, if the start point to be connected and the end point to be connected are directly connected, it may be The outline of the resulting building is not square. Therefore, when connecting the start point to be connected and the end point to be connected, the connection strategy needs to be adjusted.
  • the preset sorting direction may be clockwise sorting or counterclockwise sorting.
  • the clockwise sorting and counterclockwise sorting are based on the sorting methods given based on the centroid of the endpoint point cloud as a reference.
  • the coordinate data can be given based on the coordinate axes of the two-dimensional plane.
  • the wall indicated by the map data is parallel to the X-axis or the Y-axis in the coordinate axes of the two-dimensional plane, so that based on the two-dimensional
  • the X-axis or Y-axis in the plane coordinate axis is used to determine the coordinate data.
  • the coordinate data is determined based on the X-axis or the Y-axis in the coordinate axes of the two-dimensional plane, the data of one of the coordinate axes can be limited to zero, thereby reducing the complexity of calculation.
  • the coordinate data of the anchor point to be selected can be determined according to the coordinate data.
  • the coordinate data of the first wall endpoint is A(Ax, Ay) and the second wall endpoint B(Bx, By), then there are only C(Ax, By) and D(Bx, Ay) points that can be connected at right angles to the first wall endpoint and the second wall endpoint, that is, the coordinate data of the anchor point to be selected.
  • the outline of a building is a convex polygon, so it is only necessary to determine the points outside the polygon in C(Ax, By) and D(Bx, Ay) to achieve the target anchor Point of OK.
  • first wall endpoint and the second wall endpoint are two endpoints selected on a convex polygon, it may not be able to complete the expression of the building outline. By traversing all the wall endpoints, all the wall endpoints are used The right-angled sides are connected to realize the expression of the outline of the building.
  • the target anchor point is determined based on the point-in-polygon method.
  • the first connection module 504 is specifically configured to determine the average value of all convex polygon endpoint coordinate data; wherein, the point corresponding to the average value of all convex polygon endpoint coordinate data is the centroid of the endpoint point cloud.
  • the coordinate data of the endpoint of the convex polygon that is, the coordinate data of the wall endpoint coincident with the convex polygon
  • the average value of the components of the axis or Y axis in order to obtain the coordinate data of the centroid of the endpoint point cloud.
  • the coordinate data of the first wall endpoint of the convex polygon is A (Ax, Ay), the second wall endpoint B (Bx, By), the third wall endpoint E (Ex, Ey) and the fourth wall endpoint
  • the wall endpoint F(Fx, Fy), the coordinate data corresponding to the point cloud centroid of the endpoint is ((Ax+Bx+Ex+Fx)/4, (Ay+By+Ey+Fy)/4).
  • the second connection module 508 is specifically used to establish a k-d tree, wherein the k-d tree is based on the map data except for the outline information of the building Established by the endpoints corresponding to all other wall segments; combined with the k-d tree, determine the adjacent points corresponding to each selected endpoint; connect the selected endpoints with the right-angled sides of the adjacent points until the endpoints corresponding to all wall segments are connected. .
  • a k-d tree is constructed, wherein the k-d tree corresponds to the endpoints corresponding to all wall line segments, so as to determine the nearest Proximity.
  • the k-d tree (the abbreviation of k-dimensional tree) is a tree-shaped data structure that stores instance points in k-dimensional space for fast retrieval. It is mainly used in the search of key data in multi-dimensional space. By constructing k-d tree, which simplifies the determination process of adjacent points, and facilitates the reconstruction of internal wall frame information at a very fast speed.
  • the adjacent points are k adjacent points, where k ⁇ 3.
  • the right-angle connection is similar to the convex polygon connection part. Assuming that the current endpoints to be connected are C and D, two corresponding anchor points R and S are generated for the current two endpoints to be connected. If the current anchor point On the wall segment (such as S), select another anchor point on the opposite side (such as R). If the current end points to be connected are A and B, there is no wall at the anchor point, and the connection is made along the direction of the extension line of the line segment where the current end points to be connected are located. This connection method ensures that no local closed loops are generated and at the same time does not destroy the spatial structure of the overall environment, and restores the spatial outline of the building to the greatest extent.
  • the second connection module 508 before connecting the selected end point with the adjacent point, is also used to: determine whether the connection condition of the adjacent point or the line segment where the adjacent point is located is connected; When the line segment is not connected, connect the selected end point with the right-angled side of the adjacent point.
  • the second connection module 508 is also used for: when the adjacent point or the line segment where the adjacent point is located is in the state of being connected, cancel the connection between the selected end point and the right-angled side of the adjacent point, and skip the selection. endpoint.
  • the determination of whether the adjacent points have been connected is implemented based on the union search set.
  • a household appliance including: a memory, on which a computer program is stored; and a controller, which executes the computer program to implement the steps of the method for processing map data in any one of the above.
  • a household appliance in which a laser ranging sensor is used to measure the environmental distance, and a complete two-dimensional laser map is formed by summarizing the ranging results, so as to carry out the frame information of the building Construct.
  • the morphological method filters out the above irregular objects such as furniture and sundries, and uses the combination of morphology and image science to extract the outline of the two-dimensional point cloud image generated by the end points of the wall, so as to realize the noise wall line segment in the building. Filtering, and then through the outline connection of the extracted results, to complete the reconstruction of the outline information of the building.
  • the filtering function of the reconstructed building outline information on the map data uses the filtering function of the reconstructed building outline information on the map data, the information about the building outline in the map data is filtered out, and then the map data about the internal wall frame information of the building is left.
  • the wall line segments in the filtered map data are connected to reconstruct the internal wall frame information.
  • the obtained above two kinds of information are combined to obtain the frame information of the constructed building.
  • the frame information of the building is constructed based on the two-dimensional point cloud image, while ensuring the recognition accuracy, the complexity of the calculation is reduced, the calculation amount of the data processing is reduced, and it is convenient to be deployed on a miniaturized device .
  • the amount of calculation required is reduced compared with the existing embodiment, so it is beneficial to reduce the cost required for map data processing, and at the same time, it is also convenient to reduce the cost of products or equipment that apply the map data processing solution. cost.
  • the household appliance is a cleaning robot.
  • a readable storage medium on which programs or instructions are stored, and when the programs or instructions are executed by a processor, the steps of any one of the methods for processing map data described above are implemented.
  • Embodiments of the present application provide a readable storage medium, and the method for processing map data stored thereon has the above-mentioned beneficial technical effects when executed, which will not be repeated here.
  • connection refers to two or more than two.
  • connection can be fixed connection, detachable connection, or integral connection; it can be directly connected or through an intermediate The medium is indirectly connected.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Remote Sensing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请提供了一种地图数据的处理方法、装置、家用电器和可读存储介质,地图数据的处理方法,包括:接收地图数据,对地图数据进行分类处理,得到墙体端点;根据墙体端点生成二维点云图,对二维点云图进行轮廓提取,并对提取结果进行轮廓连接,以得到地图数据对应的建筑物外轮廓信息;根据建筑物外轮廓信息对地图数据进行过滤;对过滤后的地图数据中的墙体线段进行连接,以得到内部墙体框架信息;将建筑物外轮廓信息和内部墙体框架信息进行组合,以得到建筑物的框架信息,实现了基于二维点云图来构建建筑物的框架信息,在确保了识别精度的同时,降低了计算的复杂度,减少了数据处理的计算量,便于部署在小型化设备上。

Description

地图数据的处理方法、装置、家用电器和可读存储介质
本申请要求于2021年07月27日提交到中国国家知识产权局、申请号为“202110848175.8”,申请名称为“地图数据的处理方法、装置、家用电器和可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,具体而言,涉及一种地图数据的处理方法、装置、家用电器和可读存储介质。
背景技术
在机器人领域,地图信息是一种重要的环境特征来源,如何在机器人创建完地图后对地图进行二次开发和处理并提取有用信息成为了机器人感知的主要方向,其中,对地图的理解影响着后续机器人的控制,规划以及动态物体的追踪等内容。同样的,如何将机器人建立好的地图信息进行处理后变为可供生产或生活中使用的数据也是一个值得探索的问题。
本领域的技术人员发现,现有建筑物室内布局蓝图都采用三维点云或多传感器(多视角,彩色图片等)信息来捕捉更多维度的信息,用增加特征的方法实现基于点云的精确的建筑物框架提取,然上述方案存在数据处理量大,无法在小型化的产品上部署,同时,现有方案落实到实际产品时需要的成本比较高。
申请内容
本申请旨在至少解决现有技术或相关技术中存在的技术问题之一。
为此,本申请的第一个方面在于,提供了一种地图数据的处理方法。
本申请的第二个方面在于,提供了一种地图数据的处理装置。
本申请的第三个方面在于,提供了一种家用电器。
本申请的第四个方面在于,提供了一种可读存储介质。
有鉴于此,根据本申请的第一个方面,本申请提供了一种地图数据的 处理方法,包括:接收地图数据,对地图数据进行分类处理,得到墙体端点;根据墙体端点生成二维点云图,对二维点云图进行轮廓提取,并对提取结果进行轮廓连接,以得到地图数据对应的建筑物外轮廓信息;根据建筑物外轮廓信息对地图数据进行过滤;对过滤后的地图数据中的墙体线段进行连接,以得到内部墙体框架信息;将建筑物外轮廓信息和内部墙体框架信息进行组合,以得到建筑物的框架信息。
本申请的技术方案采用激光测距传感器,用来测量环境距离,通过将测距结果汇总形成完整的二维激光地图,以便进行建筑物的框架信息的构建。
本领域的技术人员发现,采用激光测距传感器来对建筑物的框架信息进行重建时,室内环境中如家具,杂物等不规则物体会表现为较短线段,基于此,可以应用形态学的方法将上述家具,杂物等不规则物体滤除掉,利用形态学和图像学的结合,对以墙体端点生成的二维点云图进行轮廓提取,以便实现对建筑物中的噪声墙体线段的过滤,再经由对提取结果进行轮廓连接,以完成建筑物外轮廓信息的重建。
此外,利用重建的建筑物外轮廓信息对地图数据的过滤作用,将地图数据中的有关建筑物外轮廓信息以外的二维点云图滤除掉,进而剩下有关建筑物的内部墙体框架信息的地图数据,通过对过滤后的地图数据中的墙体线段进行连接,以便对内部墙体框架信息的重建。
在获取得到建筑物外轮廓信息和内部墙体框架信息之后,对获取得到的上述两种信息进行组合,以便得到构建的建筑物的框架信息。
采用上述技术方案,实现了基于二维点云图来构建建筑物的框架信息,在确保了识别精度的同时,降低了计算的复杂度,减少了数据处理的计算量,便于部署在小型化设备上。
此外,在上述技术方案中,需要的计算量较现有技术方案有所降低,故有利于降低地图数据处理所需要的成本,同时,也便于降低应用该地图数据的处理方案的产品或设备的成本。
另外,本申请所请求保护的地图数据的处理方法,还具有以下附加技术特征。
在上述技术方案中,对地图数据进行分类处理,得到墙体端点之前,还包括:采用横向滤波器与纵向滤波器分别对地图数据进行滤波处理,以得到对应的第一掩码数据和第二掩码数据;对第一掩码数据和第二掩码数据取或,并以取或结果作为过滤器对地图数据进行清洗。
在上述技术方案中,在对地图数据进行分类前,还需要对地图数据进行清洗,通过对地图数据进行清洗,以便将建筑物中存在的较小的离散物体所对应的数据清洗掉,以便降低该部分数据对建筑物的框架信息重建所产生的影响。
在其中一个技术方案中,对建筑物的框架信息重建所产生的影响可以是增加计算量,如增加分类处理的计算量,还可以是影响墙体端点的计算精度,如由于上述离散物体的存在,会致使墙体端点出现偏差,最终造成建筑物外轮廓信息的偏差。
具体地,本申请的技术方案采用横向滤波器和纵向滤波器,其中,横向滤波器,即仅能够透过横向线段,对于纵向线段具有滤除的作用,通过采用横向滤波器来对地图数据进行滤除,以得到第一掩码数据;纵向滤波器仅能够透过纵向线段,对于横向线段具有滤除的作用,得到过滤后的第二掩码数据,上述步骤属于初步过滤。
将第一掩码数据和第二掩码数据取或,并以取或结果作为过滤器对地图数据进行清洗,以实现地图数据的重构,通过对地图数据的重构,将原始地图数据中的横向小线段和/或纵向小线段滤除掉,以便在后续的处理过程中,可以减少分类所需要处理的数据量,为降低了计算的复杂度,减少了数据处理的计算量,便于部署在小型化设备上提供了基础。
在其中一个技术方案中,横向滤波器与纵向滤波器可以根据实际使用场景进行调整,如根据建筑物外轮廓的形状调整横向滤波器与纵向滤波器之间的夹角,以便对弧形墙体进行识别,从而满足更多的适用场景。
在上述任一技术方案中,对地图数据进行分类处理,得到墙体端点,包括:以地图数据中第一数据对应的非空位置作为基准点,沿预设方向进行邻域搜索;基于基准点的预设方向的邻域为非墙体空间,则标记第一数据为墙体端点;基于基准点的预设方向的邻域为墙体空间,以基准点的预 设方向中的邻域为墙体空间的第二数据作为更新后的基准点,直至遍历地图数据中的所有数据或地图数据的边界,以得到墙体端点。
在该技术方案中,实现了对墙体端点的确定,由于清洗后的地图数据中形成的离散规则墙体线段可以通过简单的深度优化遍历算法进行聚类,因此,通过地图数据进行聚类即可实现上述离散规则的墙体线段的提取。
具体地,地图数据是基于激光测距传感器等设备测定得到的,若测定点位置的周围没有墙体,则反映到测定的数据上来说,周边位置没有线段;若测定点位置的周围有墙体,则反映到测定的数据上来说,周边位置有线段或离散的点。
基于此,可以知悉的是,地图数据中的数据之间具有位置关系,在地图数据中选取一个数据,该数据在地图数据中具有一个确定的位置,也即第一数据对应的位置,通过进行邻域搜索,可以实现墙体边角位置的搜索。
具体地,若在某一数据对应的非空位置处,其预设方向的邻域为非墙体空间,也即没有墙体,则认定该数据对应的位置处属于墙体的角落位置,而对于检测结果为否,即其预设方向的邻域为墙体空间,显然,其并非为最边角的位置,此时,通过重新指定基准点,以便进一步判定基准点是否为墙体端点,在此过程中,可以实现了建筑物的墙体端点的确定,确保了得到的墙体端点的准确性。
在上述任一技术方案中,预设方向可以是正上、正下、正左和正右,也即十字方向上进行邻域查找,即十字聚类。
通过限定只有地图数据中的所有数据或地图数据的边界都被遍历后来才能得到最终的墙体端点,以避免建筑物中存在较大尺寸的房间或物品对检测结果的影响,通过上述限定确保了检测结果的准确性。
在上述任一技术方案中,分类处理的次数大于或等于两次。
在该技术方案中,具体限定了分类处理的次数为至少两次,通过上述限定,确保了线段的过滤效果,以便在后期凸多边形提取时,可以降低数据处理的量,为部署在小型化设备提供了基础。
在上述任一技术方案中,在存在多次分类处理的情况下,第二次、第三次或第N次时,滤芯核较第一次分类处理时的滤芯核要大,以便提高其 过滤效果。
在上述任一技术方案中,N为大于或等于4的正整数。
在上述技术方案中,分类处理可以是聚类处理,即上文中所涉及到的十字聚类。
在聚类结束之后,根据聚类后的得到的墙体端点生成二维点云图,以便根据二维点云图进行建筑物外轮廓信息的提取。
在上述任一技术方案中,对二维点云图进行轮廓提取,并对提取结果进行轮廓连接,以得到地图数据对应的建筑物外轮廓信息,具体包括:对二维点云图的外轮廓进行凸多边形提取;对提取后的凸多边形进行直角边连接,以得到地图数据对应的建筑物外轮廓信息。
通常情况下,建筑物外围的墙体结构能够表现建筑物的轮廓,通过凸多边形提取可以实现建筑物的轮廓的概括,以便确定得到的建筑物外轮廓信息符合实际情况。
具体地,可以采用quickHull方法从二维点云图中提取凸多边形,以便确保提取出来的凸多边形能够准确表征出建筑物的轮廓。
在该技术方案中,quickHull方法,即快包法,即选取最左、最右、最上和最下的点,将它们组合起来形成一个凸四边形(或三角形),这个四边形内的点必定不在凸包上,然后将其余的点按最接近的边分成四部分,再进行快包法提取。
在其中一个技术方案中,考虑到实际情况下,建筑物的墙体是方方正正的,而提取得到的凸多边形不具有上述特征,为了确保确定得到的建筑物外轮廓信息与实际的建筑物轮廓一致,本申请的技术方案限定了对提取后的凸多边形采用直角边连接的方式连接,通过采用直角边连接,以便确保得到的建筑物轮廓是方方正正的,以此来提高计算结果与实际场景的匹配程度。
在上述任一技术方案中,对提取后的凸多边形进行直角边连接,具体包括:确定凸多边形端点中的待连接起始端点和待连接终止端点的坐标数据,其中,待连接起始端点和待连接终止端点为凸多边形端点中沿预设排序方向排序的两个端点;根据坐标数据确定待选锚点坐标数据;确定凸多边形的 端点点云质心;根据端点点云质心、待选锚点坐标数据确定位于凸多边形之外的目标锚点;将待连接起始端点、待连接终止端点和目标锚点连接。
在该技术方案中,限定了直角边连接的具体实现方式,首先,在提取的凸多边形端点上选取两个端点,即墙体端点,也即上文中的待连接起始端点、待连接终止端点,其中,该两点可以是相邻最近的两个点,就上文所记载的那样,由于建筑物轮廓通常是方方正正的,若待连接起始端点和待连接终止端点直接连接,可能会造成得到的建筑物的轮廓不是方方正正的,因此,在将待连接起始端点、待连接终止端点连接起来的时候,需要调整连接策略。
在其中一个技术方案中,预设排序方向可以是顺时针排序、也可以是逆时针排序。
在其中一个技术方案中,顺时针排序、逆时针排序是基于端点点云质心为参考所给出的排序方式。
在其中一个技术方案中,坐标数据可以是基于二维平面坐标轴给出的,具体地,地图数据所指示的墙体与二维平面坐标轴中的X轴或Y轴平行,以便基于二维平面坐标轴中的X轴或Y轴来确定坐标数据。
由于基于二维平面坐标轴中的X轴或Y轴来确定坐标数据,因此,可以限定其中一个坐标轴的数据为零,进而降低计算的复杂度。
其次,待选锚点坐标数据可以根据坐标数据来确定,具体地,在二维坐标系下,第一墙体端点的坐标数据为A(Ax,Ay)和第二墙体端点B(Bx,By),则与第一墙体端点和第二墙体端点能够进行直角连接的点有且仅有C(Ax,By)与D(Bx,Ay),也即待选锚点坐标数据,就上位所记载的那样,通常情况下,建筑物的轮廓是凸多边形的,因此,只需要确定C(Ax,By)与D(Bx,Ay)中位于多边形之外的点,即可实现目标锚点的确定。
在确定目标锚点之后,按照预设排序方向,将第一墙体端点、第二墙体端点以及目标锚点连接。
由于第一墙体端点以及第二墙体端点是在凸多边形上选取两个端点,其可能无法完成建筑物轮廓的表达,通过遍历所有的墙体端点,以便将所有的墙体端点之间使用直角边连接,以实现建筑物的轮廓的表达。
在上述任一技术方案中,基于point-in-polygon方法确定目标锚点。
在上述任一技术方案中,确定凸多边形的端点点云质心,包括:确定所有凸多边形端点的坐标数据的平均值;根据平均值确定端点点云质心。
在该技术方案中,在获取得到凸多边形后,对凸多边形端点,也即与凸多边形重合的墙体端点的坐标数据之后,计算所有墙体端点的坐标数据在二维平面坐标轴中的X轴或Y轴的分量的平均值,以便得到端点点云质心的坐标数据。
举例来说,凸多边形端点有第一墙体端点的坐标数据为A(Ax,Ay)、第二墙体端点B(Bx,By)、第三墙体端点E(Ex,Ey)和第四墙体端点F(Fx,Fy),则端点点云质心对应的坐标数据为((Ax+Bx+Ex+Fx)/4,(Ay+By+Ey+Fy)/4)。
在确定端点点云质心对应的坐标数据之后,基于point-in-polygon方法确定判定C(Ax,By)与D(Bx,Ay)中的哪个位于凸多边形内,哪个位于凸多边形外,将位于凸多边形外的待选锚点坐标数据作为目标锚点,以便进行连接。
在上述任一技术方案中,对过滤后的地图数据中的墙体线段进行连接,以得到内部墙体框架信息,具体包括:根据过滤后的地图数据中的所有墙体线段对应的端点建立k-d树;根据k-d树,查询每一选定端点的邻近点,将选定端点与邻近点进行连接,直至遍历所有墙体线段对应的端点,以得到内部墙体框架信息。
在该技术方案中,考虑到内部墙体框架中属于同一个物体的线段之间的距离比较近,通过构建k-d树,其中,该k-d树对应所有墙体线段所对应的端点,以便确定最近的邻近点。
其中,k-d树(即k-dimensional树的简称)是一种对k维空间中实例点进行存储以便对其进行快速检索的树形数据结构,主要应用于多维空间关键数据的搜索,通过构建k-d树,简化了邻近点的确定过程,便于以很快的速度实现内部墙体框架信息的重建。
通过限定遍历所有的墙体线段所对应的端点,以便确保所有的内部墙体框架信息都能得以绘制,确保了内部墙体框架信息的准确性。
在上述任一技术方案中,将选定端点与邻近点进行连接之前,还包括:确定邻近点或邻近点所在的线段的连接情况;基于邻近点或邻近点所在的线段未被连接,则根据选定端点与邻近点建立连接。
在上述任一技术方案中,基于邻近点或邻近点所在的线段已被连接,跳过选定端点。
在该技术方案中,在将选定端点和邻近点连接起来之前,还需要进一步判断邻近点是否已经被连接过,若未被连接,则将其进行连接,以便实现内部墙体框架信息的绘制,而对于已经被连接过的情况下,无需再次连接,此时,只需要跳过该节点。
在该技术方案中,通过限定在将选定端点与邻近点进行连接之前判断邻近点以及邻近点所在的线段是否已经被连接过,以避免选定端点与邻近点出现重复连接的情况出现,由于存在连接状态的判断,有效降低了数据的处理量。
根据本申请的第二个方面,本申请提供了一种地图数据的处理装置,包括:分类模块,用于接收地图数据,对地图数据进行分类处理,得到墙体端点;第一连接模块,用于根据墙体端点生成二维点云图,对二维点云图进行轮廓提取,并对提取结果进行轮廓连接,以得到地图数据对应的建筑物外轮廓信息;过滤模块,用于根据建筑物外轮廓信息对地图数据进行过滤;第二连接模块,用于对过滤后的地图数据中的墙体线段进行连接,以得到内部墙体框架信息;组合模块,用于将建筑物外轮廓信息和内部墙体框架信息进行组合,以得到建筑物的框架信息。
在上述任一技术方案中,对地图数据进行分类处理,得到墙体端点之前,分类模块还用于:采用横向滤波器与纵向滤波器分别对地图数据进行滤波处理,以得到对应的第一掩码数据和第二掩码数据;对第一掩码数据和第二掩码数据取或,并以取或结果作为过滤器对地图数据进行清洗。
在上述任一技术方案中,分类模块具体用于以地图数据中第一数据对应的非空位置作为基准点,沿预设方向进行邻域搜索;基于基准点的预设方向的邻域为非墙体空间,则标记第一数据为墙体端点;基于基准点的预设方向的邻域为墙体空间,以基准点的预设方向中的邻域为墙体空间的第 二数据作为更新后的基准点,直至遍历地图数据中的所有数据或地图数据的边界,以得到墙体端点。
在上述任一技术方案中,分类处理的次数大于或等于两次。
在上述任一技术方案中,第一连接模块具体用于对二维点云图的外轮廓进行凸多边形提取;对提取后的凸多边形进行直角边连接,以得到地图数据对应的建筑物外轮廓信息。
在上述任一技术方案中,第一连接模块具体用于确定凸多边形端点中的待连接起始端点和待连接终止端点的坐标数据;根据坐标数据确定待选锚点坐标数据;确定凸多边形的端点点云质心;根据端点点云质心、待选锚点坐标数据确定位于凸多边形之外的目标锚点;将待连接起始端点、待连接终止端点和目标锚点连接。
在上述任一技术方案中,基于point-in-polygon方法确定目标锚点。
在上述任一技术方案中,第一连接模块具体用于确定所有凸多边形端点的坐标数据的平均值;根据平均值确定端点点云质心。
在上述任一技术方案中,第二连接模块具体用于根据过滤后的地图数据中的所有墙体线段对应的端点建立k-d树;根据k-d树,查询每一选定端点的邻近点,将选定端点与邻近点进行连接,直至遍历所有墙体线段对应的端点,以得到内部墙体框架信息。
在上述任一技术方案中,将选定端点与邻近点进行连接之前,第二连接模块还用于:确定邻近点或邻近点所在的线段的连接情况;基于邻近点或邻近点所在的线段未被连接,则根据选定端点与邻近点建立连接。
在上述任一技术方案中,第二连接模块还用于:基于邻近点或邻近点所在的线段已被连接,跳过选定端点。
根据本申请的第三个方面,本申请提供了一种家用电器,包括:存储器,存储器上存储有计算机程序;控制器,控制器执行计算机程序实现如上述中任一项的地图数据的处理方法的步骤。
在上述任一技术方案中,家用电器为清扫机器人。
根据本申请的第四个方面,本申请提供了一种可读存储介质,其上存储有程序或指令,程序或指令被处理器执行时实现如上述中任一项的地图 数据的处理方法的步骤。
本申请的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:
图1示出了本申请实施例中的地图数据的处理方法的流程示意图;
图2示出了本申请实施例中的对接收的地图数据分类处理,得到墙体端点的流程示意图;
图3示出了本申请实施例中对提取后得到的凸多边形进行直角边连接的流程示意图;
图4示出了本申请实施例中对过滤后的地图数据中墙体线段进行连接,得到内部墙体框架信息的流程示意图;
图5示出了本申请实施例中地图数据的处理装置的示意框图之一;
图6示出了本申请实施例中地图数据的处理装置的示意框图之二;
图7示出了本申请实施例中二维激光地图的示意图;
图8示出了本申请实施例中第一掩码数据的示意图;
图9示出了本申请实施例中第二掩码数据的示意图;
图10示出了本申请实施例中实现地图数据的清洗的示意图;
图11示出了本申请实施例中连续墙体的示意图;
图12示出了本申请实施例中墙体在掩码中的示意图;
图13示出了本申请实施例中墙体端点以及线段的示意图;
图14示出了本申请实施例中分类处理的次数为两次时的墙体端点和凸多边形的端点示意图;
图15示出了本申请实施例中目标锚点、端点点云质心以及墙体端点的示意图;
图16示出了本申请实施例中目标锚点确定的示意图;
图17示出了本申请实施例中选定端点与邻近点直角边连接的示意图之一;
图18示出了本申请实施例中选定端点与邻近点直角边连接的示意图之二;
图19示出了本申请实施例中确定墙体端点的示意图。
具体实施方式
为了能够更清楚地理解本申请的上述方面、特征和优点,下面结合附图和具体实施方式对本申请进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本申请,但是,本申请还可以采用其他不同于在此描述的其他方式来实施,因此,本申请的保护范围并不受下面公开的具体实施例的限制。
实施例一
如图1所示,根据本申请的第一个方面,本申请提供了一种地图数据的处理方法,包括:
步骤102,对接收的地图数据分类处理,得到墙体端点;
步骤104,根据墙体端点绘制二维点云图,以便对二维点云图进行轮廓提取;
步骤106,对提取结果的轮廓进行连接,以得到建筑物外轮廓信息;
步骤108,将地图数据中的建筑物外轮廓信息过滤;
步骤110,对过滤后的地图数据中墙体线段进行连接,得到内部墙体框架信息;
步骤112,根据建筑物外轮廓信息以及内部墙体框架信息得到建筑物的框架信息。
本申请的实施例采用激光测距传感器,用来测量环境距离,通过将测距结果汇总形成完整的二维激光地图,以便进行建筑物的框架信息的构建。
本领域的技术人员发现,采用激光测距传感器来对建筑物的框架信息进行重建时,室内环境中如家具,杂物等不规则物体会表现为较短线段, 基于此,可以应用形态学的方法将上述家具,杂物等不规则物体滤除掉,利用形态学和图像学的结合,对以墙体端点生成的二维点云图进行轮廓提取,以便实现对建筑物中的噪声墙体线段的过滤,再经由对提取结果进行轮廓连接,以完成建筑物外轮廓信息的重建。
此外,利用重建的建筑物外轮廓信息对地图数据的过滤作用,将地图数据中的有关建筑物外轮廓信息以外的二维点云图滤除掉,进而剩下有关建筑物的内部墙体框架信息的地图数据,通过对过滤后的地图数据中的墙体线段进行连接,以便对内部墙体框架信息的重建。
在获取得到建筑物外轮廓信息和内部墙体框架信息之后,对获取得到的上述两种信息进行组合,以便得到构建的建筑物的框架信息。
采用上述实施例,实现了基于二维点云图来构建建筑物的框架信息,在确保了识别精度的同时,降低了计算的复杂度,减少了数据处理的计算量,便于部署在小型化设备上。
此外,在上述实施例中,需要的计算量较现有实施例有所降低,故有利于降低地图数据处理所需要的成本,同时,也便于降低应用该地图数据的处理方案的产品或设备的成本。
实施例二
在上述实施例中,对地图数据分类处理之前,还包括:采用横向滤波器对地图数据进行滤波,得到第一掩码数据;采用纵向滤波器对地图数据进行滤波,得到第二掩码数据;对第一掩码数据和第二掩码数据取或,并以取或结果作为过滤器对地图数据进行清洗。
在上述实施例中,在对地图数据进行分类前,还需要对地图数据进行清洗,通过对地图数据进行清洗,以便将建筑物中存在的较小的离散物体所对应的数据清洗掉,以便降低该部分数据对建筑物的框架信息重建所产生的影响。
在其中一个实施例中,对建筑物的框架信息重建所产生的影响可以是增加计算量,如增加分类处理的计算量,还可以是影响墙体端点的计算精度,如由于上述离散物体的存在,会致使墙体端点出现偏差,最终造成建筑物外轮廓信息的偏差。
具体地,本申请的实施例采用横向滤波器和纵向滤波器,其中,横向滤波器,即仅能够透过横向线段,对于纵向线段具有滤除的作用,通过采用横向滤波器来对地图数据进行滤除,以得到第一掩码数据;纵向滤波器仅能够透过纵向线段,对于横向线段具有滤除的作用,得到过滤后的第二掩码数据,上述步骤属于初步过滤。
将第一掩码数据和第二掩码数据取或,并以取或结果作为过滤器对地图数据进行清洗,以实现地图数据的重构,通过对地图数据的重构,将原始地图数据中的横向小线段和/或纵向小线段滤除掉,以便在后续的处理过程中,可以减少分类所需要处理的数据量,为降低了计算的复杂度,减少了数据处理的计算量,便于部署在小型化设备上提供了基础。
实施例三
在上述任一实施例中,如图2所示,对接收的地图数据分类处理,得到墙体端点,包括:
步骤202,选取基准点,并沿预设方向执行邻域搜索;
步骤204,在基准点的预设方向的邻域是非墙体空间的情况下,将第一数据标记为墙体端点。
在基准点的预设方向的邻域是墙体空间的情况下,以基准点的预设方向中的邻域为墙体空间的第二数据作为更新后的基准点,并重复执行步骤202、步骤204的步骤,直至遍历所有数据或地图数据的边界,从而得到墙体端点。
其中,基准点为地图数据中的第一数据所对应的非空位置。
在该实施例中,实现了对墙体端点的确定,由于清洗后的地图数据中形成的离散规则墙体线段可以通过简单的深度优化遍历算法进行聚类,因此,通过地图数据进行聚类即可实现上述离散规则的墙体线段的提取。
具体地,地图数据是基于激光测距传感器等设备测定得到的,若测定点位置的周围没有墙体,则反映到测定的数据上来说,周边位置没有线段;若测定点位置的周围有墙体,则反映到测定的数据上来说,周边位置有线段或离散的点。
基于此,可以知悉的是,地图数据中的数据之间具有位置关系,在地 图数据中选取一个数据,该数据在地图数据中具有一个确定的位置,也即第一数据对应的位置,通过进行邻域搜索,可以实现墙体边角位置的搜索。
具体地,若在某一数据对应的非空位置处,其预设方向的邻域为非墙体空间,也即没有墙体,则认定该数据对应的位置处属于墙体的角落位置,而对于检测结果为否,即其预设方向的邻域为墙体空间,显然,其并非为最边角的位置,此时,通过重新指定基准点,以便进一步判定基准点是否为墙体端点,在此过程中,可以实现了建筑物的墙体端点的确定,确保了得到的墙体端点的准确性。
在上述任一实施例中,预设方向可以是正上、正下、正左和正右,也即十字方向上进行邻域查找,即十字聚类。
通过限定只有地图数据中的所有数据或地图数据的边界都被遍历后来才能得到最终的墙体端点,以避免建筑物中存在较大尺寸的房间或物品对检测结果的影响,通过上述限定确保了检测结果的准确性。
在上述任一实施例中,分类处理的次数大于或等于两次。
在该实施例中,具体限定了分类处理的次数为至少两次,通过上述限定,确保了线段的过滤效果,以便在后期凸多边形提取时,可以降低数据处理的量,为部署在小型化设备提供了基础。
在上述任一实施例中,在存在多次分类处理的情况下,第二次、第三次或第N次时,滤芯核较第一次分类处理时的滤芯核要大,以便提高其过滤效果。
在上述任一实施例中,N为大于或等于4的正整数。
在上述实施例中,分类处理可以是聚类处理,即上文中所涉及到的十字聚类。
在聚类结束之后,根据聚类后的得到的墙体端点生成二维点云图,以便根据二维点云图进行建筑物外轮廓信息的提取。
实施例四
在上述任一实施例中,对二维点云图进行轮廓提取的具体方案是:对二维点云图进行凸多边形提取。
在其中一个实施例中,对提取结果的轮廓进行连接,以得到建筑物外 轮廓信息,具体为:对提取后得到的凸多边形进行直角边连接,以得到建筑物外轮廓信息。
通常情况下,建筑物外围的墙体结构能够表现建筑物的轮廓,通过凸多边形提取可以实现建筑物的轮廓的概括,以便确定得到的建筑物外轮廓信息符合实际情况。
具体地,可以采用quickHull方法从二维点云图中提取凸多边形,以便确保提取出来的凸多边形能够准确表征出建筑物的轮廓。
在该实施例中,quickHull方法,即快包法,即选取最左、最右、最上和最下的点,将它们组合起来形成一个凸四边形(或三角形),这个四边形内的点必定不在凸包上,然后将其余的点按最接近的边分成四部分,再进行快包法提取。
在其中一个实施例中,考虑到实际情况下,建筑物的墙体是方方正正的,而提取得到的凸多边形不具有上述特征,为了确保确定得到的建筑物外轮廓信息与实际的建筑物轮廓一致,本申请的实施例限定了对提取后的凸多边形采用直角边连接的方式连接,通过采用直角边连接,以便确保得到的建筑物轮廓是方方正正的,以此来提高计算结果与实际场景的匹配程度。
实施例五
在上述任一实施例中,如图3所示,对提取后得到的凸多边形进行直角边连接,具体包括:
步骤302,确定凸多边形端点中的待连接起始端点的坐标数据、凸多边形端点中的待连接终止端点的坐标数据;
步骤304,根据坐标数据确定待选锚点坐标数据;
步骤306,确定凸多边形的端点点云质心;
步骤308,根据待选锚点坐标数据、端点点云质心确定目标锚点,其中,目标锚点在凸多边形的外侧;
步骤310,连接目标锚点、待连接起始端点和待连接终止端点。
其中,待连接起始端点和待连接终止端点是凸多边形端点中沿预设排序方向排序的两个端点。
在该实施例中,限定了直角边连接的具体实现方式,首先,在提取的凸多边形端点上选取两个端点,即墙体端点,也即上文中的待连接起始端点、待连接终止端点,其中,该两点可以是相邻最近的两个点,就上文所记载的那样,由于建筑物轮廓通常是方方正正的,若待连接起始端点和待连接终止端点直接连接,可能会造成得到的建筑物的轮廓不是方方正正的,因此,在将待连接起始端点和待连接终止端点连接起来的时候,需要调整连接策略。
在其中一个实施例中,预设排序方向可以是顺时针排序、也可以是逆时针排序。
在其中一个实施例中,顺时针排序、逆时针排序是基于端点点云质心为参考所给出的排序方式。
在其中一个实施例中,坐标数据可以是基于二维平面坐标轴给出的,具体地,地图数据所指示的墙体与二维平面坐标轴中的X轴或Y轴平行,以便基于二维平面坐标轴中的X轴或Y轴来确定坐标数据。
由于基于二维平面坐标轴中的X轴或Y轴来确定坐标数据,因此,可以限定其中一个坐标轴的数据为零,进而降低计算的复杂度。
其次,待选锚点坐标数据可以根据坐标数据来确定,具体地,在二维坐标系下,第一墙体端点的坐标数据为A(Ax,Ay)和第二墙体端点B(Bx,By),则与第一墙体端点和第二墙体端点能够进行直角连接的点有且仅有C(Ax,By)与D(Bx,Ay),也即待选锚点坐标数据,就上位所记载的那样,通常情况下,建筑物的轮廓是凸多边形的,因此,只需要确定C(Ax,By)与D(Bx,Ay)中位于多边形之外的点,即可实现目标锚点的确定。
在确定目标锚点之后,按照预设排序方向,将第一墙体端点、第二墙体端点以及目标锚点连接。
由于第一墙体端点以及第二墙体端点是在凸多边形上选取两个端点,其可能无法完成建筑物轮廓的表达,通过遍历所有的墙体端点,以便将所有的墙体端点之间使用直角边连接,以实现建筑物的轮廓的表达。
在上述任一实施例中,步骤308基于point-in-polygon方法来实现。
在上述任一实施例中,端点点云质心的确定过程包括:确定所有凸多 边形端点坐标数据的平均值;其中,所有凸多边形端点坐标数据的平均值对应的点为端点点云质心。
在该实施例中,在获取得到凸多边形后,对凸多边形端点,也即与凸多边形重合的墙体端点的坐标数据之后,计算所有墙体端点的坐标数据在二维平面坐标轴中的X轴或Y轴的分量的平均值,以便得到端点点云质心的坐标数据。
举例来说,凸多边形端点有第一墙体端点的坐标数据为A(Ax,Ay)、第二墙体端点B(Bx,By)、第三墙体端点E(Ex,Ey)和第四墙体端点F(Fx,Fy),则端点点云质心对应的坐标数据为((Ax+Bx+Ex+Fx)/4,(Ay+By+Ey+Fy)/4)。
在确定端点点云质心对应的坐标数据之后,基于point-in-polygon方法确定判定C(Ax,By)与D(Bx,Ay)中的哪个位于凸多边形内,哪个位于凸多边形外,将位于凸多边形外的待选锚点坐标数据作为目标锚点,以便进行连接。
实施例六
在上述任一实施例中,如图4所示,对过滤后的地图数据中墙体线段进行连接,得到内部墙体框架信息,具体包括:
步骤402,建立k-d树,其中,k-d树是基于地图数据中除建筑物外轮廓信息之外所有墙体线段对应的端点所建立的;
步骤404,结合k-d树,确定每一选定端点对应的邻近点;
步骤406,将选定端点与邻近点直角边连接,直至所有墙体线段对应的端点都连接结束。
在该实施例中,考虑到内部墙体框架中属于同一个物体的线段之间的距离比较近,通过构建k-d树,其中,该k-d树对应所有墙体线段所对应的端点,以便确定最近的邻近点。
其中,k-d树(即k-dimensional树的简称)是一种对k维空间中实例点进行存储以便对其进行快速检索的树形数据结构,主要应用于多维空间关键数据的搜索,通过构建k-d树,简化了邻近点的确定过程,便于以很快的速度实现内部墙体框架信息的重建。
通过限定遍历所有的墙体线段所对应的端点,以便确保所有的内部墙体框架信息都能得以绘制,确保了内部墙体框架信息的准确性。
在上述任一实施例中,将选定端点与邻近点直角边连接之前,还包括:判断邻近点或邻近点所在的线段的连接情况是否处于连接;在邻近点或邻近点所在的线段处于未被连接的状态下,将选定端点与邻近点直角边连接。
在上述任一实施例中,在邻近点或邻近点所在的线段处于被连接的状态下,取消选定端点与邻近点直角边连接,并跳过该选定端点。在该实施例中,在将选定端点和邻近点连接起来之前,还需要进一步判断邻近点是否已经被连接过,若未被连接,则将其进行连接,以便实现内部墙体框架信息的绘制,而对于已经被连接过的情况下,无需再次连接,此时,只需要跳过该节点。
在该实施例中,通过限定在将选定端点与邻近点进行连接之前判断邻近点以及邻近点所在的线段是否已经被连接过,以避免选定端点与邻近点出现重复连接的情况出现,由于存在连接状态的判断,有效降低了数据的处理量。
在其中一个实施例中,基于并查集来实现邻近点是否已经被连接过的确定。
实施例七
在其中一个实施例中,如图5所示,提供了一种地图数据的处理装置500,包括:分类模块502,用于对接收的地图数据分类处理,得到墙体端点;第一连接模块504,用于根据墙体端点绘制二维点云图,以便对二维点云图进行轮廓提取,对提取结果的轮廓进行连接,以得到建筑物外轮廓信息;过滤模块506,用于根据建筑物外轮廓信息对地图数据进行过滤;第二连接模块508,用于对过滤后的地图数据中墙体线段进行连接,得到内部墙体框架信息;组合模块510,用于根据建筑物外轮廓信息以及内部墙体框架信息得到建筑物的框架信息。
如图7所示,本申请的实施例采用激光测距传感器,用来测量环境距离,通过将测距结果汇总形成完整的二维激光地图,以便进行建筑物的框架信息的构建。
本领域的技术人员发现,采用激光测距传感器来对建筑物的框架信息进行重建时,室内环境中如家具,杂物等不规则物体会表现为较短线段,基于此,可以应用形态学的方法将上述家具,杂物等不规则物体滤除掉,利用形态学和图像学的结合,对以墙体端点生成的二维点云图进行轮廓提取,以便实现对建筑物中的噪声墙体线段的过滤,再经由对提取结果进行轮廓连接,以完成建筑物外轮廓信息的重建。
此外,利用重建的建筑物外轮廓信息对地图数据的过滤作用,将地图数据中的有关建筑物外轮廓信息以外的二维点云图滤除掉,进而剩下有关建筑物的内部墙体框架信息的地图数据,通过对过滤后的地图数据中的墙体线段进行连接,以便对内部墙体框架信息的重建。
在获取得到建筑物外轮廓信息和内部墙体框架信息之后,对获取得到的上述两种信息进行组合,以便得到构建的建筑物的框架信息。
采用上述实施例,实现了基于二维点云图来构建建筑物的框架信息,在确保了识别精度的同时,降低了计算的复杂度,减少了数据处理的计算量,便于部署在小型化设备上。
此外,在上述实施例中,需要的计算量较现有实施例有所降低,故有利于降低地图数据处理所需要的成本,同时,也便于降低应用该地图数据的处理方案的产品或设备的成本。
在其中一个实施例中,地图数据的处理装置500可以变形为如图6所示的框图,具体地,分类模块502与第一连接模块504组成建筑物轮廓信息提取模块602,过滤模块506和第二连接模块508构成内部墙体框架信息提取模块604。
在上述任一技术方案中,如图8和图9所示,对地图数据分类处理之前,分类模块502还用于:如图8所示,采用横向滤波器对地图数据进行滤波,得到第一掩码数据;如图9所示,采用纵向滤波器对地图数据进行滤波,得到第二掩码数据;如图10所示,对第一掩码数据和第二掩码数据取或,并以取或结果作为过滤器对地图数据进行清洗。
在上述实施例中,在对地图数据进行分类前,还需要对地图数据进行清洗,通过对地图数据进行清洗,以便将建筑物中存在的较小的离散物体 所对应的数据清洗掉,以便降低该部分数据对建筑物的框架信息重建所产生的影响。
在其中一个实施例中,对建筑物的框架信息重建所产生的影响可以是增加计算量,如增加分类处理的计算量,还可以是影响墙体端点的计算精度,如由于上述离散物体的存在,会致使墙体端点出现偏差,最终造成建筑物外轮廓信息的偏差。
具体地,本申请的实施例采用横向滤波器和纵向滤波器,其中,横向滤波器,即仅能够透过横向线段,对于纵向线段具有滤除的作用,通过采用横向滤波器来对地图数据进行滤除,以得到第一掩码数据;纵向滤波器仅能够透过纵向线段,对于横向线段具有滤除的作用,得到过滤后的第二掩码数据,上述步骤属于初步过滤。
将第一掩码数据和第二掩码数据取或,并以取或结果作为过滤器对地图数据进行清洗,以实现地图数据的重构,通过对地图数据的重构,将原始地图数据中的横向小线段和/或纵向小线段滤除掉,以便在后续的处理过程中,可以减少分类所需要处理的数据量,为降低了计算的复杂度,减少了数据处理的计算量,便于部署在小型化设备上提供了基础。
在其中一个实施例中,如图6所示,分类模块502中用于对地图数据的清洗的部分单独划分为地图预处理模块606。
在上述任一技术方案中,如图19所示,分类模块502具体用于选取基准点,并沿预设方向执行邻域搜索,其中,基准点为地图数据中的第一数据所对应的位置;在基准点的预设方向的邻域是非墙体空间的情况下,将第一数据标记为墙体端点;在基准点的预设方向的邻域是墙体空间的情况下,以基准点的预设方向中的邻域为墙体空间的第二数据作为更新后的基准点,并重复执行选取基准点至将第一数据标记为墙体端点的步骤,直至遍历所有数据或地图数据的边界,从而得到墙体端点。
在该实施例中,实现了对墙体端点的确定,由于清洗后的地图数据中形成的离散规则墙体线段可以通过简单的深度优化遍历算法进行聚类,因此,通过地图数据进行聚类即可实现上述离散规则的墙体线段的提取。
具体地,地图数据是基于激光测距传感器等设备测定得到的,若测定 点位置的周围没有墙体,则反映到测定的数据上来说,周边位置没有线段;若测定点位置的周围有墙体,则反映到测定的数据上来说,周边位置有线段。
基于此,可以知悉的是,地图数据中的数据之间具有位置关系,在地图数据中选取一个数据,该数据在地图数据中具有一个确定的位置,也即第一数据对应的位置,通过进行邻域搜索,可以实现墙体边角位置的搜索。
具体地,若在某一数据对应的位置处,其预设方向的邻域为非墙体空间,也即没有墙体,则认定该数据对应的位置处属于墙体的角落位置,而对于检测结果为否,即其预设方向的邻域为墙体空间,显然,其并非为最边角的位置,此时,通过重新指定基准点,以便进一步判定基准点是否为墙体端点,在此过程中,可以实现了建筑物的墙体端点的确定,确保了得到的墙体端点的准确性。
在上述任一实施例中,预设方向可以是正上、正下、正左和正右,也即十字方向上进行邻域查找,即十字聚类。
通过限定只有地图数据中的所有数据或地图数据的边界都被遍历后来才能得到最终的墙体端点,以避免建筑物中存在较大尺寸的房间或物品对检测结果的影响,通过上述限定确保了检测结果的准确性。
在其中一个实施例中,如图11所示,根据墙体端点的数量可以确定连续墙体。
在其中一个实施例中,如图12所示,图12示出了墙体在掩码中的示意图,其中,标号1、2、3、4和5分别为不同的墙体。
在其中一个实施例中,如图13所示,墙体端点以及线段的示意图。
在上述任一技术方案中,分类处理的次数大于或等于两次。
在该实施例中,具体限定了分类处理的次数为至少两次,通过上述限定,确保了线段的过滤效果,以便在后期凸多边形提取时,可以降低数据处理的量,为部署在小型化设备提供了基础。
如图14所示,分类处理的次数为两次时的墙体端点和凸多边形端点示意图。
在上述任一实施例中,在存在多次分类处理的情况下,第二次、第三 次或第N次时,滤芯核较第一次分类处理时的滤芯核要大,以便提高其过滤效果。
在上述任一实施例中,N为大于或等于4的正整数。
在上述实施例中,分类处理可以是聚类处理,即上文中所涉及到的十字聚类。
在聚类结束之后,根据聚类后的得到的墙体端点生成二维点云图,以便根据二维点云图进行建筑物外轮廓信息的提取。
在上述任一技术方案中,第一连接模块504具体用于对二维点云图的外轮廓进行凸多边形提取;对提取后得到的凸多边形进行直角边连接,以得到建筑物外轮廓信息。
通常情况下,建筑物外围的墙体结构能够表现建筑物的轮廓,通过凸多边形提取可以实现建筑物的轮廓的概括,以便确定得到的建筑物外轮廓信息符合实际情况。
具体地,可以采用quickHull方法从二维点云图中提取凸多边形,以便确保提取出来的凸多边形能够准确表征出建筑物的轮廓。
在该实施例中,quickHull方法,即快包法,即选取最左、最右、最上和最下的点,将它们组合起来形成一个凸四边形(或三角形),这个四边形内的点必定不在凸包上,然后将其余的点按最接近的边分成四部分,在进行快包法。
在其中一个实施例中,考虑到实际情况下,建筑物的墙体是方方正正的,而提取得到的凸多边形不具有上述特征,为了确保确定得到的建筑物外轮廓信息与实际的建筑物轮廓一致,本申请的实施例限定了对提取后的凸多边形采用直角边连接的方式连接,通过采用直角边连接,以便确保得到的建筑物轮廓是方方正正的,以此来提高计算结果与实际场景的匹配程度。
在上述任一技术方案中,第一连接模块504具体用于确定凸多边形端点中的待连接起始端点的坐标数据、凸多边形端点中的待连接终止端点的坐标数据;根据坐标数据确定待选锚点坐标数据;确定凸多边形的端点点云质心;根据待选锚点坐标数据、端点点云质心确定目标锚点,其中,目标 锚点在凸多边形的外侧;连接目标锚点、待连接起始端点和待连接终止端点。
在其中一个实施例中,图15给出了目标锚点、端点点云质心以及墙体端点的示意图。
在该实施例中,限定了直角边连接的具体实现方式,首先,在提取的凸多边形上选取两个端点,即墙体端点,也即上文中的待连接起始端点、待连接终止端点,其中,该两点可以是相邻最近的两个点,就上文所记载的那样,由于建筑物轮廓通常是方方正正的,若待连接起始端点、待连接终止端点直接连接,可能会造成得到的建筑物的轮廓不是方方正正的,因此,在将待连接起始端点、待连接终止端点连接起来的时候,需要调整连接策略。
在其中一个实施例中,预设排序方向可以是顺时针排序、也可以是逆时针排序。
在其中一个实施例中,顺时针排序、逆时针排序是基于端点点云质心为参考所给出的排序方式。
在其中一个实施例中,坐标数据可以是基于二维平面坐标轴给出的,具体地,地图数据所指示的墙体与二维平面坐标轴中的X轴或Y轴平行,以便基于二维平面坐标轴中的X轴或Y轴来确定坐标数据。
由于基于二维平面坐标轴中的X轴或Y轴来确定坐标数据,因此,可以限定其中一个坐标轴的数据为零,进而降低计算的复杂度。
其次,待选锚点坐标数据可以根据坐标数据来确定,具体地,在二维坐标系下,第一墙体端点的坐标数据为A(Ax,Ay)和第二墙体端点B(Bx,By),则与第一墙体端点和第二墙体端点能够进行直角连接的点有且仅有C(Ax,By)与D(Bx,Ay),也即待选锚点坐标数据,就上位所记载的那样,通常情况下,建筑物的轮廓是凸多边形的,因此,只需要确定C(Ax,By)与D(Bx,Ay)中位于多边形之外的点,即可实现目标锚点的确定。
在确定目标锚点之后,按照预设排序方向,将第一墙体端点、第二墙体端点以及目标锚点连接。
由于第一墙体端点以及第二墙体端点是在凸多边形上选取两个端点,其可能无法完成建筑物轮廓的表达,通过遍历所有的墙体端点,以便将所有的墙体端点之间使用直角边连接,以实现建筑物的轮廓的表达。
在上述任一技术方案中,基于point-in-polygon方法确定目标锚点。
在上述任一技术方案中,第一连接模块504具体用于确定所有凸多边形端点坐标数据的平均值;其中,所有凸多边形端点坐标数据的平均值对应的点为端点点云质心。
在该实施例中,在获取得到凸多边形后,对凸多边形端点,也即与凸多边形重合的墙体端点的坐标数据之后,计算所有墙体端点的坐标数据在二维平面坐标轴中的X轴或Y轴的分量的平均值,以便得到端点点云质心的坐标数据。
举例来说,凸多边形端点有第一墙体端点的坐标数据为A(Ax,Ay)、第二墙体端点B(Bx,By)、第三墙体端点E(Ex,Ey)和第四墙体端点F(Fx,Fy),则端点点云质心对应的坐标数据为((Ax+Bx+Ex+Fx)/4,(Ay+By+Ey+Fy)/4)。
在确定端点点云质心对应的坐标数据之后,基于point-in-polygon方法确定判定C(Ax,By)与D(Bx,Ay)中的哪个位于凸多边形内,哪个位于凸多边形外,将位于凸多边形外的待选锚点坐标数据作为目标锚点,以便进行连接。
在上述任一技术方案中,具体地,如图16、图17和图18所示,第二连接模块508具体用于建立k-d树,其中,k-d树是基于地图数据中除建筑物外轮廓信息之外所有墙体线段对应的端点所建立的;结合k-d树,确定每一选定端点对应的邻近点;将选定端点与邻近点直角边连接,直至所有墙体线段对应的端点都连接结束。在该实施例中,考虑到内部墙体框架中属于同一个物体的线段之间的距离比较近,通过构建k-d树,其中,该k-d树对应所有墙体线段所对应的端点,以便确定最近的邻近点。
其中,k-d树(即k-dimensional树的简称)是一种对k维空间中实例点进行存储以便对其进行快速检索的树形数据结构,主要应用于多维空间关键数据的搜索,通过构建k-d树,简化了邻近点的确定过程,便于以很快的速度实现内部墙体框架信息的重建。
在其中一个实施例中,邻近点为k邻近点,其中,k≥3。
在其中一个实施例中,该直角连接与凸多边形连接部分类似,假设当 前待连接端点为C和D,则对当前两个待连接的端点生成对应两个锚点R和S,如果当前锚点在墙体线段上(如S),则选择对侧位的另一个锚点(如R)。若当前待连接端点为A和B这种情况的话,锚点出均无墙体,则沿着当前待连接端点所在线段的延长线方向进行连接。这样的连接方式在保证不生成局部闭环的同时不破坏整体环境的空间结构,在最大范围内还原了建筑物的空间轮廓。
通过限定遍历所有的墙体线段所对应的端点,以便确保所有的内部墙体框架信息都能得以绘制,确保了内部墙体框架信息的准确性。
在上述任一技术方案中,将选定端点与邻近点进行连接之前,第二连接模块508还用于:判断邻近点或邻近点所在的线段的连接情况是否处于连接;在邻近点或邻近点所在的线段处于未被连接的状态下,将选定端点与邻近点直角边连接。
在上述任一技术方案中,第二连接模块508还用于:在邻近点或邻近点所在的线段处于被连接的状态下,取消选定端点与邻近点直角边连接,并跳过该选定端点。
在该实施例中,在将选定端点和邻近点连接起来之前,还需要进一步判断邻近点是否已经被连接过,若未被连接,则将其进行连接,以便实现内部墙体框架信息的绘制,而对于已经被连接过的情况下,无需再次连接,此时,只需要跳过该节点。
在该实施例中,通过限定在将选定端点与邻近点进行连接之前判断邻近点以及邻近点所在的线段是否已经被连接过,以避免选定端点与邻近点出现重复连接的情况出现,由于存在连接状态的判断,有效降低了数据的处理量。
在其中一个实施例中,基于并查集来实现邻近点是否已经被连接过的确定。
实施例八
在上述任一实施例中,提供了一种家用电器,包括:存储器,存储器上存储有计算机程序;控制器,控制器执行计算机程序实现如上述中任一项的地图数据的处理方法的步骤。
本申请的实施例中,提出了一种家用电器,其中,采用激光测距传感器,用来测量环境距离,通过将测距结果汇总形成完整的二维激光地图,以便进行建筑物的框架信息的构建。
本领域的技术人员发现,采用激光测距传感器来对建筑物的框架信息进行重建时,室内环境中如家具,杂物等不规则物体会表现为较短线段,基于此,可以应用形态学的方法将上述家具,杂物等不规则物体滤除掉,利用形态学和图像学的结合,对以墙体端点生成的二维点云图进行轮廓提取,以便实现对建筑物中的噪声墙体线段的过滤,再经由对提取结果进行轮廓连接,以完成建筑物外轮廓信息的重建。
此外,利用重建的建筑物外轮廓信息对地图数据的过滤作用,将地图数据中的有关建筑物外轮廓信息滤除掉,进而剩下有关建筑物的内部墙体框架信息的地图数据,通过对过滤后的地图数据中的墙体线段进行连接,以便对内部墙体框架信息的重建。
在获取得到建筑物外轮廓信息和内部墙体框架信息之后,对获取得到的上述两种信息进行组合,以便得到构建的建筑物的框架信息。
采用上述实施例,实现了基于二维点云图来构建建筑物的框架信息,在确保了识别精度的同时,降低了计算的复杂度,减少了数据处理的计算量,便于部署在小型化设备上。
此外,在上述实施例中,需要的计算量较现有实施例有所降低,故有利于降低地图数据处理所需要的成本,同时,也便于降低应用该地图数据的处理方案的产品或设备的成本。
在上述任一实施例中,家用电器为清扫机器人。
实施例九
在上述任一实施例中,提供了一种可读存储介质,其上存储有程序或指令,程序或指令被处理器执行时实现如上述中任一项的地图数据的处理方法的步骤。
本申请的实施例提出了一种可读存储介质,其上存储的地图数据的处理方法被执行时具有上述有益技术效果,在此,不再赘述。
在本申请的描述中,术语“多个”则指两个或两个以上,除非另有明确 的限定,术语“上”、“下”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制;术语“连接”、“安装”、“固定”等均应做广义理解,例如,“连接”可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本申请中的具体含义。
在本申请的描述中,术语“一个实施例”、“一些实施例”、“具体实施例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或特点包含于本申请的至少一个实施例或示例中。在本申请中,对上述术语的示意性表述不一定指的是相同的实施例或实例。而且,描述的具体特征、结构、材料或特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
以上仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (15)

  1. 一种地图数据的处理方法,其中,包括:
    接收地图数据,对所述地图数据进行分类处理,得到墙体端点;
    根据所述墙体端点生成二维点云图,对所述二维点云图进行轮廓提取,并对提取结果进行轮廓连接,以得到所述地图数据对应的建筑物外轮廓信息;
    根据所述建筑物外轮廓信息对所述地图数据进行过滤;
    对过滤后的地图数据中的墙体线段进行连接,以得到内部墙体框架信息;
    将所述建筑物外轮廓信息和所述内部墙体框架信息进行组合,以得到所述建筑物的框架信息。
  2. 根据权利要求1所述的地图数据的处理方法,其中,对所述地图数据进行分类处理,得到墙体端点之前,还包括:
    采用横向滤波器与纵向滤波器分别对所述地图数据进行滤波处理,以得到对应的第一掩码数据和第二掩码数据;
    对所述第一掩码数据和所述第二掩码数据取或,并以取或结果作为过滤器对所述地图数据进行清洗。
  3. 根据权利要求1所述的地图数据的处理方法,其中,所述对所述地图数据进行分类处理,得到墙体端点,包括:
    以地图数据中第一数据对应的非空位置作为基准点,沿预设方向进行邻域搜索;
    基于所述基准点的预设方向的邻域为非墙体空间,则标记所述第一数据为墙体端点;
    基于所述基准点的预设方向的邻域为墙体空间,以基准点的预设方向中的邻域为墙体空间的第二数据作为更新后的基准点,直至遍历所述地图数据中的所有数据或所述地图数据的边界,以得到所述墙体端点。
  4. 根据权利要求3所述的地图数据的处理方法,其中,所述分类处理的次数大于或等于两次。
  5. 根据权利要求1所述的地图数据的处理方法,其中,对所述二维点云图进行轮廓提取,并对提取结果进行轮廓连接,以得到所述地图数据对应的建 筑物外轮廓信息,具体包括:
    对所述二维点云图的外轮廓进行凸多边形提取;
    对提取后的凸多边形进行直角边连接,以得到地图数据对应的建筑物外轮廓信息。
  6. 根据权利要求1至5中任一项所述的地图数据的处理方法,其中,所述对提取后的凸多边形进行直角边连接,具体包括:
    确定凸多边形端点中的待连接起始端点和待连接终止端点的坐标数据;
    根据所述坐标数据确定待选锚点坐标数据;
    确定所述凸多边形的端点点云质心;
    根据所述端点点云质心、所述待选锚点坐标数据确定位于所述凸多边形之外的目标锚点;
    将所述待连接起始端点、所述待连接终止端点和所述目标锚点连接。
  7. 根据权利要求6所述的地图数据的处理方法,其中,
    基于point-in-polygon方法确定所述目标锚点。
  8. 根据权利要求6所述的地图数据的处理方法,其中,确定所述凸多边形的端点点云质心,包括:
    确定所有凸多边形端点的坐标数据的平均值;
    根据所述平均值确定所述端点点云质心。
  9. 根据权利要求1至5中任一项所述的地图数据的处理方法,其中,对过滤后的地图数据中的墙体线段进行连接,以得到内部墙体框架信息,具体包括:
    根据过滤后的地图数据中的所有墙体线段对应的端点建立k-d树;
    根据所述k-d树,查询每一选定端点的邻近点,将所述选定端点与所述邻近点进行连接,直至遍历所有墙体线段对应的端点,以得到所述内部墙体框架信息。
  10. 根据权利要求9所述的地图数据的处理方法,其中,将所述选定端点与所述邻近点进行连接之前,还包括:
    确定所述邻近点或所述邻近点所在的线段的连接情况;
    基于所述邻近点或所述邻近点所在的线段未被连接,则根据所述选定端点 与所述邻近点建立连接。
  11. 根据权利要求10所述的地图数据的处理方法,其中,基于所述邻近点或所述邻近点所在的线段已被连接,跳过所述选定端点。
  12. 一种地图数据的处理装置,其中,包括:
    分类模块,用于接收地图数据,对所述地图数据进行分类处理,得到墙体端点;
    第一连接模块,用于根据所述墙体端点生成二维点云图,对所述二维点云图进行轮廓提取,并对提取结果进行轮廓连接,以得到所述地图数据对应的建筑物外轮廓信息;
    过滤模块,用于根据所述建筑物外轮廓信息对所述地图数据进行过滤建筑物外轮廓信息;
    第二连接模块,用于对过滤后的地图数据中的墙体线段进行连接,以得到内部墙体框架信息;
    组合模块,用于将所述建筑物外轮廓信息和所述内部墙体框架信息进行组合,以得到所述建筑物的框架信息。
  13. 一种家用电器,其中,包括:
    存储器,所述存储器上存储有计算机程序;
    控制器,所述控制器执行所述计算机程序实现如权利要求1至11中任一项所述的地图数据的处理方法的步骤。
  14. 根据权利要求13所述的家用电器,其中,所述家用电器为清扫机器人。
  15. 一种可读存储介质,其上存储有程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1至11中任一项所述的地图数据的处理方法的步骤。
PCT/CN2022/076846 2021-07-27 2022-02-18 地图数据的处理方法、装置、家用电器和可读存储介质 WO2023005195A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110848175.8 2021-07-27
CN202110848175.8A CN113592976A (zh) 2021-07-27 2021-07-27 地图数据的处理方法、装置、家用电器和可读存储介质

Publications (1)

Publication Number Publication Date
WO2023005195A1 true WO2023005195A1 (zh) 2023-02-02

Family

ID=78250617

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/076846 WO2023005195A1 (zh) 2021-07-27 2022-02-18 地图数据的处理方法、装置、家用电器和可读存储介质

Country Status (2)

Country Link
CN (1) CN113592976A (zh)
WO (1) WO2023005195A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113592976A (zh) * 2021-07-27 2021-11-02 美智纵横科技有限责任公司 地图数据的处理方法、装置、家用电器和可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103148804A (zh) * 2013-03-04 2013-06-12 清华大学 一种基于激光扫描的室内未知结构识别方法
US20150063707A1 (en) * 2010-06-10 2015-03-05 Autodesk, Inc. Outline approximation for point cloud of building
CN110888960A (zh) * 2019-11-29 2020-03-17 深圳市银星智能科技股份有限公司 一种室内空间分区方法、装置及移动机器人
CN111308495A (zh) * 2020-03-13 2020-06-19 厦门知本家科技有限公司 一种雷达测距生成室内户型3d数据的方法
CN113592976A (zh) * 2021-07-27 2021-11-02 美智纵横科技有限责任公司 地图数据的处理方法、装置、家用电器和可读存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101182421B1 (ko) * 2012-02-09 2012-09-12 (주)씨투엘이큅먼트 실내 이미지 촬영 위치 정보 획득 시스템 및 방법
US9025861B2 (en) * 2013-04-09 2015-05-05 Google Inc. System and method for floorplan reconstruction and three-dimensional modeling
CN110274602A (zh) * 2018-03-15 2019-09-24 奥孛睿斯有限责任公司 室内地图自动构建方法及系统
KR20200015340A (ko) * 2018-08-02 2020-02-12 주식회사 유진로봇 속성 블록에 따라 동적 주행하는 이동 로봇, 사용자 단말 장치, 및 지도 관리 서버
CN110197153B (zh) * 2019-05-30 2023-05-02 南京维狸家智能科技有限公司 一种户型图中墙体自动识别方法
CN112052489B (zh) * 2019-07-22 2022-07-08 江苏艾佳家居用品有限公司 一种户型图生成方法及系统
CN111915730B (zh) * 2020-07-20 2023-05-19 北京建筑大学 一种顾及语义从点云自动生成室内三维模型的方法及系统
CN112595258B (zh) * 2020-11-23 2022-04-22 湖南航天智远科技有限公司 基于地面激光点云的地物轮廓提取方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150063707A1 (en) * 2010-06-10 2015-03-05 Autodesk, Inc. Outline approximation for point cloud of building
CN103148804A (zh) * 2013-03-04 2013-06-12 清华大学 一种基于激光扫描的室内未知结构识别方法
CN110888960A (zh) * 2019-11-29 2020-03-17 深圳市银星智能科技股份有限公司 一种室内空间分区方法、装置及移动机器人
CN111308495A (zh) * 2020-03-13 2020-06-19 厦门知本家科技有限公司 一种雷达测距生成室内户型3d数据的方法
CN113592976A (zh) * 2021-07-27 2021-11-02 美智纵横科技有限责任公司 地图数据的处理方法、装置、家用电器和可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CAI ZHAN, LI RU-REN; LI XIN-KE; WU HUA-YI: "Building Roof Boundary Extraction from LiDAR Point Cloud", GEOGRAPHY AND GEO-INFORMATION SCIENCE, vol. 29, no. 5, 1 September 2013 (2013-09-01), pages 17 - 21,25, XP093029726, ISSN: 1672-0504, DOI: 10.7702/dlydlxxkx20130504 *

Also Published As

Publication number Publication date
CN113592976A (zh) 2021-11-02

Similar Documents

Publication Publication Date Title
CN107123164B (zh) 保持锐利特征的三维重建方法及系统
WO2020134082A1 (zh) 一种路径规划方法、装置和移动设备
CN111665842B (zh) 一种基于语义信息融合的室内slam建图方法及系统
KR102318023B1 (ko) 에지를 이용한 3차원 모델 생성
CN100559398C (zh) 自动的深度图像配准方法
JP6323993B2 (ja) 情報処理装置、情報処理方法、及びコンピュータプログラム
JP6632208B2 (ja) 情報処理装置、情報処理方法、プログラム
JP2009093611A (ja) 三次元オブジェクト認識のためのシステムおよび方法
EP2430588A1 (en) Object recognition method, object recognition apparatus, and autonomous mobile robot
WO2020093950A1 (zh) 三维物体分割方法、设备和介质
CN109035207B (zh) 密度自适应的激光点云特征检测方法
CN110827398A (zh) 基于深度神经网络的室内三维点云自动语义分割算法
WO2023024482A1 (zh) 一种室内结构化重建方法、装置及计算机可读存储介质
JP6185385B2 (ja) 空間構造推定装置、空間構造推定方法及び空間構造推定プログラム
US20230015214A1 (en) Planar contour recognition method and apparatus, computer device, and storage medium
WO2023005195A1 (zh) 地图数据的处理方法、装置、家用电器和可读存储介质
CN113168729A (zh) 一种基于局部参考坐标系的3d形状匹配方法及装置
WO2021231265A1 (en) Methods and apparatus for generating point cloud histograms
CN112002007A (zh) 基于空地影像的模型获取方法及装置、设备、存储介质
Cociaş et al. Multiple-superquadrics based object surface estimation for grasping in service robotics
CN113744416B (zh) 一种基于遮罩的全局点云滤波方法、设备和存储介质
Ran et al. Normal estimation algorithm for point cloud using KD-Tree
Arbeiter et al. Efficient segmentation and surface classification of range images
WO2022252036A1 (zh) 障碍物信息获取方法、装置、可移动平台及存储介质
Hlubik et al. Advanced point cloud estimation based on multiple view geometry

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22847815

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE