Search

CN-116540685-B - Boundary configuration method based on obstacle pixel points, chip and robot

CN116540685BCN 116540685 BCN116540685 BCN 116540685BCN-116540685-B

Abstract

The invention discloses a boundary configuration method based on obstacle pixel points, a chip and a robot, wherein the boundary configuration method comprises the steps of traversing and counting the obstacle pixel points in a preconfigured map area row by row and column by column in a map constructed by the robot, and then marking boundary barrier rows and configuring boundaries distributed along the row direction according to the number information of the barrier pixel points in the corresponding rows, and marking boundary barrier columns and configuring boundaries distributed along the column direction according to the number information of the barrier pixel points in the corresponding columns. The boundary of the working area is contacted with the complete or regular contour line of the obstacle as much as possible, so that the robot can orderly move within the range limited by the boundary of the working area and can traverse to more and more farther areas.

Inventors

  • HUANG HUIBAO
  • CHEN ZHUOBIAO
  • ZHOU HEWEN
  • SUN MING
  • Xu Songzhou

Assignees

  • 珠海一微半导体股份有限公司

Dates

Publication Date
20260505
Application Date
20220125

Claims (15)

  1. 1. The boundary configuration method based on the obstacle pixel points is characterized by comprising the following steps: traversing and counting obstacle pixel points in a preconfigured map area row by row and column by column in a map constructed by a robot, marking boundary obstacle rows according to the quantity information of the obstacle pixel points in the corresponding rows and configuring the boundary along the row direction, marking boundary obstacle columns according to the quantity information of the obstacle pixel points in the corresponding columns and configuring the boundary along the column direction; the boundary configuration method specifically comprises the following steps: performing image processing on the preconfigured map area; Marking obstacle pixel points and non-obstacle pixel points in a preconfigured map area subjected to image processing, wherein the obstacle pixel points are pixel points used for representing obstacles in the preconfigured map area, and the non-obstacle pixel points are pixel points used for representing non-obstacles in the preconfigured map area; Marking boundary obstacle rows by counting the number of obstacle pixel points in the preconfigured map area row by row, and configuring the boundary obstacle rows as boundaries distributed along the row direction, so that the boundary obstacle rows are configured as boundaries of a working area of the robot in the row direction; Marking boundary barrier columns by counting the number of barrier pixel points in the preconfigured map area column by column, and configuring the boundary barrier columns as boundaries distributed along the column direction, so that the boundary barrier columns are configured as boundaries of the working area of the robot in the column direction.
  2. 2. The boundary configuration method according to claim 1, wherein the method for marking boundary obstacle lines by counting the number of obstacle pixels in the preconfigured map area line by line specifically comprises: In the preconfigured map area subjected to image processing, every time the number of obstacle pixel points in a row of pixel points is counted to be larger than a line number threshold value, marking the row as an obstacle row; repeating the steps until all lines in the preconfigured map area subjected to image processing are traversed, and marking two barrier lines with the largest linear distance in the column direction as boundary barrier lines; the line number threshold is a preset multiple of the length of a straight line occupied by the preconfigured map area in the line direction, and the preset multiple is set to be more than 0 and less than 1.
  3. 3. The boundary configuring method according to claim 2, wherein a column direction is an ordinate axis direction of the pre-configured map area, and a row direction is an abscissa axis direction of the pre-configured map area; Marking two boundary barrier rows in the preconfigured map area, wherein the ordinate of the pixel point of one boundary barrier row is the maximum ordinate among the ordinate of the pixel points of all barrier rows, and the ordinate of the pixel point of the other boundary barrier row is the minimum ordinate among the ordinate of the pixel points of all barrier rows; Wherein the ordinate of all pixel points in each barrier row is equal; Wherein the number of lines threshold is a preset multiple of the length of the preconfigured map area in the direction of the abscissa axis.
  4. 4. The boundary configuration method according to claim 3, wherein the pixel points in the pre-configured map area subjected to the image processing are traversed line by line along the first column direction, the line is marked as an obstacle line every time the number of obstacle pixel points existing in the line of pixel points is counted to be greater than a line number threshold value, the next line of pixel points is continuously traversed along the first column direction every time the line of pixel points is traversed or one obstacle line is marked; Traversing pixel points in the preconfigured map area subjected to image processing line by line along the second column direction, and marking a line as an obstacle line every time the number of obstacle pixel points in the line of pixel points is counted to be greater than a line number threshold value; every time a row of pixel points is traversed or an obstacle row is marked, the next row of pixel points is continuously traversed along the second column direction; repeating the steps, if the existence of the obstacle row is detected, marking the obstacle row farthest from the position point of the robot as a second boundary obstacle row; if no obstacle row is detected, determining that the robot cannot search the second boundary obstacle row; Wherein the first column direction is opposite to the second column direction; wherein the second boundary obstacle row and the first boundary obstacle row both belong to boundary obstacle rows.
  5. 5. The boundary configuring method according to claim 4, wherein the first column direction is the negative direction of the ordinate axis when the second column direction is the positive direction of the ordinate axis, or the first column direction is the positive direction of the ordinate axis when the second column direction is the negative direction of the ordinate axis.
  6. 6. The boundary configuration method according to claim 1, wherein the method for marking boundary obstacle columns by counting the number of obstacle pixels in the preconfigured map area column by column specifically includes: In the preconfigured map area subjected to image processing, each time the number of obstacle pixel points in a column of pixel points is counted to be larger than a column number threshold value, marking the column as an obstacle column, each time one column of pixel points is traversed or one obstacle column is marked, continuing to traverse the pixel points in the next column, repeating the counting until all columns in the preconfigured map area subjected to image processing are traversed, and marking two obstacle columns with the largest linear distance in the row direction as boundary obstacle columns; The column number threshold is a preset multiple of the length of a straight line occupied by the preconfigured map area in the column direction, and the preset multiple is larger than 0 and smaller than 1.
  7. 7. The boundary configuring method according to claim 6, wherein a row direction is an abscissa axis direction of the preconfigured map area; marking two boundary barrier columns in the preconfigured map area, wherein the abscissa of the pixel point of one boundary barrier column is the maximum abscissa among the abscissas of the pixel points of all barrier columns, and the abscissa of the pixel point of the other boundary barrier column is the minimum abscissa among the abscissas of the pixel points of all barrier columns; Wherein the abscissa of all pixel points in each barrier column is equal; wherein the column number threshold is a preset multiple of the width of the preconfigured map area in the direction of the ordinate axis.
  8. 8. The boundary configuring method according to claim 7, wherein the pixel points in the pre-configured map area subjected to the image processing are traversed column by column along the first row direction, the column is marked as an obstacle column each time the number of obstacle pixel points existing in the column of pixel points is counted to be greater than a column number threshold value, the next column of pixel points is continuously traversed along the first row direction each time one column of pixel points is traversed or one obstacle column is marked; The pixel points in the preconfigured map area subjected to image processing are traversed column by column along the second row direction, each time the number of the obstacle pixel points in one column of the pixel points is counted to be larger than a column number threshold value, the column is marked as an obstacle column, each time the pixel points in one column are traversed or one obstacle column is marked, the pixel points in the next column are continuously traversed along the second row direction; Wherein the first row direction is opposite to the second row direction; wherein the second boundary obstacle column and the first boundary obstacle column both belong to the boundary obstacle column.
  9. 9. The boundary configuring method according to claim 8, wherein the first row direction is an abscissa axis negative direction when the second row direction is an abscissa axis positive direction, or the first row direction is an abscissa axis positive direction when the second row direction is an abscissa axis negative direction.
  10. 10. The boundary configuring method according to any one of claims 2 to 9, wherein the position point of the robot is located inside the preconfigured map area; Among all the marked obstacle rows, the boundary obstacle row is the obstacle row farthest from the position point of the robot in the corresponding column direction; Among all the marked obstacle columns, the boundary obstacle column is the obstacle column farthest from the position point of the robot in the corresponding row direction.
  11. 11. The boundary configuring method according to claim 1, wherein the preconfigured map area is a map area having a position point of the robot as a center of symmetry.
  12. 12. The boundary configuring method according to claim 11, wherein the method of image processing of the preconfigured map area includes performing a closing operation on the preconfigured map area so that a contour line of an obstacle marked in the preconfigured map area is completely described, wherein the closing operation is used for connecting connected domains in the preconfigured map area; Wherein the preconfigured map area is an image area of a specific size which belongs to the position feature of the obstacle constructed by the robot.
  13. 13. The boundary configuring method according to claim 12, wherein the closing operation includes: Performing image expansion processing on the binary map, and performing image corrosion processing on the binary map after the image expansion processing, so that partial pixels representing non-obstacle are configured as pixels representing obstacle; in the binarized map, the pixel value of the pixel representing the obstacle is different from the pixel value of the pixel representing the non-obstacle.
  14. 14. A chip, built-in with a control program for controlling a robot to execute the boundary configuring method according to any one of claims 1 to 13.
  15. 15. A robot is characterized in that, the chip of claim 14 is built in the robot.

Description

Boundary configuration method based on obstacle pixel points, chip and robot Technical Field The invention relates to the technical field of map construction, in particular to a boundary configuration method based on obstacle pixel points, a chip and a robot. Background When a cleaning robot with laser navigation performs cleaning operation in an indoor working area, the whole indoor working area is divided into a plurality of MxN subareas, and the subareas are generally 4 meters by 4 meters in a physical environment. Generally, the boundary of the first rectangular working area with the robot as the symmetry center is not easy to cover the wall contour or corner position points of the indoor working area, and the contour of the obstacle surrounded by the corresponding boundary is random, so that the cleaning robot is limited in the clear area (the area not occupied by the obstacle) cleaned in the rectangular working area, and the cleaning route becomes complex, and the overall cleaning efficiency and quality are reduced. Disclosure of Invention Aiming at the technical problems, the invention discloses a boundary configuration method based on obstacle pixel points, a chip and a robot, which solve the problem that the robot plans the boundary of a working area in an indoor working environment, so that the planned boundary can cover the outline of the obstacle furthest in the detection range of the robot. The specific technical scheme is as follows: The boundary configuration method based on the obstacle pixel points comprises the steps of traversing and counting the obstacle pixel points in a preconfigured map area row by row and column by column in a map constructed by a robot, marking boundary obstacle rows according to the quantity information of the obstacle pixel points in the corresponding rows and configuring the boundary along the row direction, and marking boundary obstacle columns according to the quantity information of the obstacle pixel points in the corresponding columns and configuring the boundary along the column direction. Further, the boundary configuration method specifically comprises the steps of carrying out image processing on a pre-configuration map area, marking obstacle pixel points and non-obstacle pixel points in the pre-configuration map area subjected to the image processing, wherein the obstacle pixel points are pixel points used for representing obstacles in the pre-configuration map area, the non-obstacle pixel points are pixel points used for representing non-obstacles in the pre-configuration map area, marking boundary obstacle rows through counting the number of the obstacle pixel points in the pre-configuration map area row by row, configuring the boundary obstacle rows as boundaries distributed along the row direction, enabling the boundary obstacle rows to be configured as boundaries of a working area of a robot in the row direction, marking boundary obstacle columns through counting the number of the obstacle pixel points in the pre-configuration map area row by row, and configuring the boundary obstacle columns as boundaries distributed along the column direction, so that the boundary obstacle columns are configured as boundaries of the working area of the robot in the column direction. Further, the method for marking boundary obstacle lines by counting the number of obstacle pixel points in the preconfigured map area line by line specifically comprises the steps of marking the line as an obstacle line every time the number of obstacle pixel points in one line of pixel points is counted to be larger than a line number threshold value in the preconfigured map area subjected to image processing, continuously traversing the next line of pixel points every time one line of pixel points is traversed or one obstacle line is marked, repeating the steps until all lines in the preconfigured map area subjected to image processing are traversed, marking two obstacle lines with the largest linear distance in the column direction as boundary obstacle lines, wherein the line number threshold value is a preset multiple of the linear length occupied by the preconfigured map area in the line direction, and the preset multiple is set to be larger than 0 and smaller than 1. Further, the column direction is the ordinate axis direction of the preconfigured map area, the row direction is the abscissa axis direction of the preconfigured map area, two boundary barrier rows are marked in the preconfigured map area, the ordinate of a pixel point of one boundary barrier row is the largest ordinate among the ordinate of a pixel point of all barrier rows, the ordinate of a pixel point of the other boundary barrier row is the smallest ordinate among the ordinate of a pixel point of all barrier rows, the ordinate of all pixel points in each barrier row is equal, and the line number threshold is a preset multiple of the length of the preconfigured map area in the abscissa axis direction. Further, p