Carpet area marking method and device, robot and computer readable storage medium
By receiving the detection data of the carpet detection module and constructing and converting carpet information images, the problem of low accuracy of carpet area marking in the prior art is solved, and higher marking accuracy and user intuitive experience are achieved.
Patent Information
- Application Number
- CN202411749453.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
AI Technical Summary
The existing carpet area marking method has low accuracy, making it difficult for users to intuitively feel the carpet area.
By receiving the detection data of the carpet detection module, a carpet information image is constructed, discrete target pixel points are converted into a connected carpet area, and superimposed with the map image to generate a target map image to mark the carpet area.
Improves the accuracy of carpet area marking, allowing users to intuitively perceive the carpet area and avoids mislabeling in non-carpet areas.
Smart Images

Figure CN119606264A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robotics technology, and in particular, relates to a carpet area marking method, device, robot and computer-readable storage medium. Background Art
[0002] With the continuous advancement of robotics technology and the continuous development of society, the demand for intelligent robots is also increasing.
[0003] Cleaning robots are a more practical type of intelligent robot, which can automatically clean the area to be cleaned. In some scenarios (such as indoor floor cleaning at home), carpets are laid in the area to be cleaned. There are large differences in cleaning requirements between carpeted areas and non-carpeted areas. For example, when the cleaning robot is vacuuming, since the carpet has a stronger adsorption capacity for garbage, a greater suction force is required to achieve the purpose of removing garbage; and when the cleaning robot is mopping the floor, the wet mop will wet the carpet, and may even cause the carpet to become dirtier, making it impossible to achieve the cleaning effect.
[0004] In order to enable the cleaning robot to perform cleaning work better, the carpet area needs to be marked. However, the accuracy of the existing carpet area marking method is low, and the user cannot intuitively feel the area where the carpet is located. Summary of the invention
[0005] The embodiments of the present application provide a carpet area marking method, device, robot and computer-readable storage medium, which can improve the accuracy of carpet area marking and allow users to intuitively feel the area where the carpet is located.
[0006] In a first aspect, an embodiment of the present application provides a carpet area marking method, comprising:
[0007] Receiving detection data output by a carpet detection module disposed on the robot, the detection data including status information for indicating whether each detection point detected by the carpet detection module is a carpet point;
[0008] According to the detection data, an image coordinate point set is obtained, the image coordinate point set includes pixel coordinates of each target pixel point, the target pixel point is a pixel point corresponding to a first detection point in the map image, the first detection point is a detection point whose state information is a first state, and the first state represents that the detection point is a carpet point;
[0009] Constructing a first carpet information image according to the image coordinate point set, wherein the first carpet information image includes discrete target pixel points;
[0010] Obtaining a second carpet information image by converting discrete target pixel points in the first carpet information image into connected carpet regions;
[0011] The second carpet information image and the map image are superimposed to obtain a target map image, which includes the carpet area.
[0012] The embodiment of the present application maps the detected carpet points to the map image, obtains the pixel coordinates of the target pixel points corresponding to each carpet point, and then constructs a first carpet information image including discrete target pixel points based on the image coordinate point set including the pixel coordinates of each target pixel point, and connects the discrete target pixel points in the first carpet information image to obtain a second carpet information image including a connected carpet area, and finally superimposes the second carpet information image and the map image to obtain a target map image including a marked carpet area. In this way, compared with the marking method of constructing the outline of discrete carpet points through circumscribed polygons, the embodiment of the present application converts the discrete target pixel points into a connected carpet area after constructing the first carpet information image based on the target pixel points corresponding to the detection points, and superimposes the second carpet information image and the map image, thereby improving the marking accuracy of the carpet area and allowing the user to intuitively feel the area where the carpet is located.
[0013] In some possible implementations of the first aspect, obtaining the second carpet information image by converting discrete target pixel points in the first carpet information image into connected carpet regions includes:
[0014] By performing a morphological closing operation on the first carpet information image to perform a filling operation and connect discrete target pixel points, at least one connected region is obtained;
[0015] Determine the area of each connected region;
[0016] Removing connected regions whose areas are less than or equal to a preset area to obtain remaining connected regions;
[0017] A morphological dilation operation is performed on the remaining connected regions to obtain a second carpet information image.
[0018] In this implementation, discrete target pixel points are converted into connected carpet areas by performing morphological processing on the first carpet information image. In addition, connected areas with smaller areas are usually caused by data misreporting. By deleting connected areas with smaller areas, the accuracy of carpet area display can be guaranteed; and only connected areas with smaller areas are deleted when displaying, but the data corresponding to the connected areas with smaller areas are still in the data set. If more carpet data is accumulated in this area later, it will be displayed normally. This can not only avoid carpet area display errors caused by data misreporting as much as possible, but also avoid erroneous deletion of data corresponding to actual carpet points as much as possible, further ensuring the accuracy of carpet area marking.
[0019] In some possible implementations of the first aspect, the detection data includes the collection time of each detection point;
[0020] According to the detection data, the image coordinate point set is obtained, including:
[0021] According to the collection time of each detection point, determine the physical location of each detection point in the map coordinate system;
[0022] For the first detection point, determine the pixel coordinates of the target pixel point corresponding to the physical position point of the first detection point in the map image, add the pixel coordinates of the target pixel point to the image coordinate point set, add the physical position point of the first detection point to the position point set, and add the acquisition time of the first detection point to the time set;
[0023] If there are at least two consecutive second detection points, construct a data clearing area according to the physical position points of the second detection points; clear the first physical position point in the position point set, clear the pixel coordinates of the target pixel point corresponding to the first physical position point in the image coordinate point set, and clear the acquisition time corresponding to the first physical position point in the time set;
[0024] The second detection point is a detection point whose state information is a second state, the second state represents that the detection point is a non-carpet point, and the first physical location point is a physical location point that falls into the data clearing area.
[0025] In this implementation, by adding the relevant data of the carpet point to the image coordinate point set, time set and position point set according to the status information of the detection point, and clearing the relevant data in the image coordinate point set, time set and position point set, the carpet-related data is updated timely and accurately, thereby ensuring the accuracy of the carpet data and further ensuring the accuracy of the carpet area marking.
[0026] In some possible implementations of the first aspect, adding the pixel coordinates of the target pixel point to the image coordinate point set, adding the physical position point of the first detection point to the position point set, and adding the acquisition time of the first detection point to the time set includes:
[0027] Determine whether there is a target coordinate in the image coordinate point set that is consistent with the pixel coordinate of the target pixel point;
[0028] If not, add the pixel coordinates of the target pixel point to the image coordinate point set, add the physical position point of the first detection point to the position point set, and add the acquisition time of the first detection point to the time set;
[0029] If so, the physical location point is used to replace the physical location point corresponding to the old detection point in the location point set, and the collection time of the first detection point is used to replace the collection time corresponding to the old detection point in the time set. The old detection point is the detection point corresponding to the target coordinates.
[0030] In this implementation, one pixel only stores one corresponding physical location point and acquisition time, which can prevent data duplication and unlimited increase in data volume.
[0031] In some possible implementations of the first aspect, constructing a data clearing area according to a physical location of the second detection point includes:
[0032] Constructing an initial data clearing area according to the physical location of the second detection point;
[0033] The initial data clearing area is expanded by a preset range to obtain a data clearing area.
[0034] In this implementation, by expanding the preset range based on the initial data clearing area, outdated carpet data can be cleared more efficiently.
[0035] In some possible implementations of the first aspect, clearing a first physical position point in a position point set, clearing pixel coordinates of a target pixel point corresponding to the first physical position point in an image coordinate point set, and clearing an acquisition time corresponding to the first physical position point in a time set include:
[0036] For each first physical location point, determining a difference between a current time and a collection time of the first physical location point;
[0037] Clear the second physical position point in the position point set, clear the pixel coordinates of the target pixel point corresponding to the second physical position point in the image coordinate point set, and clear the acquisition time corresponding to the second physical position point in the time set, where the second physical position point is the first physical position point whose difference is greater than or equal to the preset time threshold.
[0038] In this implementation, when clearing data, only data in the data clearing area with a time difference greater than or equal to a preset time threshold is cleared, which can reduce the negative impact of false data reports and expansion of the data clearing area, and further improve the accuracy of carpet area marking.
[0039] In some possible implementations of the first aspect, determining a physical location point of each detection point in a map coordinate system according to a collection time of each detection point includes:
[0040] For each detection point, the position and posture of the robot in the map coordinate system are obtained according to the collection time, and the relative position and posture between the carpet detection module and the robot are obtained; according to the position and posture and relative position, the physical position of the detection point in the map coordinate system is determined.
[0041] In a second aspect, an embodiment of the present application provides a carpet area marking device, comprising:
[0042] A detection data acquisition module, used to receive detection data output by a carpet detection module provided on the robot, the detection data including status information for indicating whether each detection point detected by the carpet detection module is a carpet point;
[0043] An image coordinate point acquisition module is used to obtain an image coordinate point set according to the detection data, wherein the image coordinate point set includes pixel coordinates of each target pixel point, the target pixel point is a pixel point in the map image corresponding to a first detection point, the first detection point is a detection point whose state information is a first state, and the first state represents that the detection point is a carpet point;
[0044] An image construction module, used to construct a first carpet information image according to the image coordinate point set, wherein the first carpet information image includes discrete target pixel points;
[0045] A conversion module, used for converting discrete target pixel points in the first carpet information image into connected carpet areas to obtain a second carpet information image;
[0046] The superposition module is used to superimpose the second carpet information image and the map image to obtain a target map image, wherein the target map image includes the carpet area.
[0047] In a third aspect, an embodiment of the present application provides a robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method as described in any one of the first aspects above is implemented.
[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of any one of the above-mentioned first aspects is implemented.
[0049] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a robot, enables the robot to execute any of the methods described in the first aspect.
[0050] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1A schematic flowchart of a carpet area marking method provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of the installation position of the ultrasonic sensor module provided in the embodiment of the present application;
[0054] Figure 3 A schematic diagram of a first carpet information image provided by an embodiment of the present application;
[0055] Figure 4 A schematic diagram of a second carpet information image provided by an embodiment of the present application;
[0056] Figure 5 A schematic diagram of a structural element provided in an embodiment of the present application;
[0057] Figure 6 A schematic diagram of the expansion process of a rectangular structural element provided in an embodiment of the present application;
[0058] Figure 7 A schematic diagram of the corrosion process of a rectangular structural element provided in an embodiment of the present application;
[0059] Figure 8 A schematic diagram of a target map image provided in an embodiment of the present application;
[0060] Fig. 9 A schematic diagram of a carpet point update and addition process provided in an embodiment of the present application;
[0061] Fig.10 A schematic diagram of a location point set, an image coordinate point set, and a collection time set provided in an embodiment of the present application;
[0062] Fig.11 A structural block diagram of a carpet area marking device provided in an embodiment of the present application;
[0063] Fig.12 A schematic diagram of the structure of the robot provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0065] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0066] It should also be understood that the term “and / or” used in the specification and appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0067] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0068] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0069] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0070] See also Figure 1 , is a schematic flow chart of a carpet area marking method provided in an embodiment of the present application, and the method may include the following steps:
[0071] Step S101: receiving detection data output by a carpet detection module disposed on the robot, wherein the detection data includes status information for indicating whether each detection point detected by the carpet detection module is a carpet point.
[0072] The carpet detection module is a sensor module used to detect carpets, which may be an ultrasonic sensor module or other sensor modules (such as infrared or radar, etc.), which are not limited here.
[0073] The carpet detection module is installed on the robot, and the specific installation position can be set according to actual needs. Figure 2 The ultrasonic sensor module is specifically installed on the front right side of the cleaning robot (i.e. Figure 2 at the ultrasound position in the
[0074] During the robot cleaning process or the execution of a certain task, the carpet detection module performs carpet detection and outputs detection data. The detection data includes the status information of each detection point. When the status information of a detection point is the first state, it indicates that the detection point is a carpet point; when the status information of a detection point is the second state, it indicates that the detection point is a non-carpet point.
[0075] The first state is used to indicate that the detection point is a carpet point, and the second state is used to indicate that the detection point is a non-carpet point. For example, the first state is 1, and the second state is 0, that is, 0 and 1 are used to represent the two states respectively, 0 indicates that the carpet is not detected, and 1 indicates that the carpet is detected.
[0076] Normally, the carpet detection module can perform detection according to the detection frequency and publish data (i.e., output data) according to the publishing frequency. For example, the detection frequency is 10 Hz (Hertz) and the publishing frequency is 5 Hz. When the state of the detection data changes, the carpet detection module can publish the data immediately. Therefore, the data detected by the carpet detection module is discrete data.
[0077] In addition to the status information, the detection data may also include the collection time of each detection point. The collection time may be specifically expressed as a timestamp.
[0078] Taking the carpet detection module as an ultrasonic sensor module as an example, when the robot is cleaning or performing tasks, the ultrasonic sensor module installed on the robot moves with the movement of the robot. During the movement, the ultrasonic sensor module continuously emits ultrasonic signals to the environment; when the ultrasonic signal propagates in the environment, it will be reflected when it encounters an object, so that the ultrasonic sensor module can receive the reflected signal; the ultrasonic sensor module can determine whether the point hit by the ultrasonic signal (i.e., the detection point) is a carpet point based on the strength of the received signal and the measured distance (calculated based on the received signal), and output the detection data.
[0079] The detection data released (ie, output) by the ultrasonic sensor module has two states: carpet detected (ie, first state) and carpet not detected (ie, second state), 0 indicates that the carpet is not detected, and 1 indicates that the carpet is detected.
[0080] Step S102: obtaining an image coordinate point set according to the detection data, the image coordinate point set including the pixel coordinates of each target pixel point, the target pixel point being a pixel point in the map image corresponding to a first detection point, the first detection point being a detection point whose state information is a first state, and the first state characterizing the detection point being a carpet point.
[0081] According to the state information of the detection point, it can be determined whether the detection point is a carpet point or a non-carpet point.
[0082] For the carpet point (i.e., the first detection point), the detection point can be mapped to the map image according to the physical coordinates of the detection point in the map coordinate system, and then the pixel coordinate point of the detection point in the map image is determined. The pixel coordinate point is the pixel coordinate of the target pixel point corresponding to the detection point.
[0083] The detection data may include the status information and the acquisition time of each detection point. For each detection point, the physical coordinates of the detection point in the map coordinate system may be determined according to the acquisition time of the detection point.
[0084] In some embodiments, for each detection point, the position and posture of the robot in the map coordinate system at the collection time can be obtained according to the collection time of the detection point, and the relative position and posture between the robot and the carpet detection module at the collection time can be obtained; based on the position and the relative position and posture, the physical position point of the detection point in the map coordinate system can be determined, that is, the physical coordinates of the detection point in the map coordinate system can be determined.
[0085] For example, the acquisition time of a certain detection point is t m Get t m The robot's position T in the map coordinate system r Among them, T r =[R r t r ] 3*4 . R r is the direction of the robot in the map coordinate system (θ r ), represented by a 2*2 matrix; t r is the position of the robot in the map coordinate system (x r ,y r ), represented by a 2*1 matrix; Tr is the robot's position in the map coordinate system, which contains direction information and position information and is an odd-order matrix.
[0086] in,
[0087] Get m The relative position T between the robot and the carpet detection module (such as an ultrasonic sensor module) rs , the relative position and posture can also refer to the position and posture of the detection point of the carpet detection module in the robot coordinate system. rs =[R rs t rs ] 3*4 .
[0088] R rs is the direction of the detection point of the carpet detection module in the robot coordinate system (θ rs ), represented by a 2*2 matrix; t rs is the position of the detection point of the carpet detection module in the robot coordinate system (x rs ,y rs ), represented by a 2*1 matrix; T rs It is the position of the detection point of the carpet detection module in the robot coordinate system, including direction information and position information.
[0089] According to t m The robot's position T in the map coordinate system at the moment r , and t m The position T of the detection point of the carpet detection module in the robot coordinate system at the moment rs , determine t m The position T of the detection point of the carpet detection module in the map coordinate system at the moment s .
[0090] Among them, T s =T r *T rs =[R s t s ]. s is the direction of the detection point of the carpet detection module in the map coordinate system (θ s ), represented by a 2*2 matrix; t s is the position of the detection point of the carpet detection module in the map coordinate system (x s ,y s ), represented by a 2*1 matrix; T s is the position of the detection point of the carpet detection module in the map coordinate system, including direction information and position information. s , the physical location of the detection point in the map coordinate system can be obtained, that is, the physical coordinates of the detection point in the map coordinate system.
[0091] It should be noted that, with R r ,t r The calculation method of R is similar.rs ,t rs According to θ rs and (x rs ,y rs ) is calculated, R s ,t s According to θ s and (x s ,y s ) is calculated and will not be repeated here.
[0092] After determining the physical position of each detection point under the map coordinates, for each first detection point, the physical position of the first detection point can be mapped to the map image based on the physical position of the first detection point and the resolution of the map image to obtain the pixel coordinates of the physical position of the first detection point on the map image (i.e., the pixel coordinates of the target pixel).
[0093] For example, the coordinates of the target pixel point corresponding to the first detection point are determined by grid_x=(x-origin_x) / resolution and grid_y=(y-origin_y) / resolution, so as to map the physical position point of the first detection point into the map image.
[0094] Among them, (origin_x, origin_y) is the physical coordinates of the origin (0,0) of the map image, (x, y) is the physical position point of the detection point (i.e. physical coordinates), (grid_x, grid_y) is the pixel coordinate point of the detection point on the map image, i.e. the pixel coordinates of the target pixel point, and resolution is the resolution of the map image.
[0095] Step S103: construct a first carpet information image according to the image coordinate point set, wherein the first carpet information image includes discrete target pixel points.
[0096] The size of the first carpet information image is consistent with the size of the map image. Figure 3 A schematic diagram of a first carpet information image provided by an embodiment of the present application is shown. Figure 3 It includes two binary images on the left and right, both of which are first carpet information images. The white discrete points in the two binary images on the left and right are discrete target pixel points. Since the motion gap of the robot is greater than the pixel resolution, each target pixel point in the image coordinate point set appears as some discrete pixel points in the binary image.
[0097] Step S104: Obtain a second carpet information image by converting discrete target pixel points in the first carpet information image into connected carpet regions.
[0098] It should be noted that in order to allow users to better intuitively experience the carpet area and improve the accuracy of carpet marking, so as to facilitate the navigation module to use carpet information, the discrete target pixel points in the first carpet information image can be converted into a connected block to obtain a second carpet information image.
[0099] In a specific application, the first carpet information image can be morphologically processed to transform discrete target pixel points into connected carpet regions, thereby obtaining the second carpet information image. Figure 4 The schematic diagram of the second carpet information image provided by the embodiment of the present application is shown. Figure 4 It includes two binary images, left and right, both of which are second carpet information images. Figure 3 The binary image on the left is morphologically processed to connect the white discrete pixels into a white area, obtaining Figure 4 The binary image on the left. Similarly, Figure 3 The binary image on the right is processed by morphology to obtain Figure 4 Binarized image on the right. Figure 4 The white areas in the binary image are the connected carpet areas.
[0100] In some embodiments, during the morphological processing of the first carpet information image, a morphological closing operation may be performed on the first carpet information image to fill and connect discrete target pixel points to obtain at least one connected region; then the area of each connected region is determined, and connected regions with an area less than or equal to a preset area are removed to obtain the remaining connected regions; finally, a morphological dilation operation is performed on the remaining connected regions to obtain the second carpet information image. The second carpet information image includes a connected carpet region.
[0101] In the morphological closing operation, a structural element of a corresponding size (e.g., a 5*5 rectangle) can be selected to fill small holes and small gaps in the first carpet information image, and adjacent discrete target pixel points in the first carpet information image can be connected to obtain multiple connected regions. In the process of filling and connecting discrete points, the basic shape and size of the object can be kept unchanged.
[0102] After obtaining multiple connected regions, connected regions with an area less than or equal to a preset area may be deleted. The preset area may be set according to actual needs and is not limited here.
[0103] It is worth pointing out that connected areas with smaller areas are usually caused by data misreporting. By deleting connected areas with smaller areas, the accuracy of carpet area display can be guaranteed. In addition, only connected areas with smaller areas are deleted when displaying, but the data corresponding to connected areas with smaller areas are still in the data set. If more carpet data is accumulated in this area later, it will be displayed normally. This can not only avoid data misreporting leading to incorrect display of carpet areas, but also avoid erroneous deletion of data corresponding to actual carpet points, further ensuring the accuracy of carpet area marking.
[0104] After deleting the connected regions with smaller areas, the corresponding structural elements can be used to perform morphological dilation operations on the remaining connected regions, so as to transform the remaining multiple connected regions into a connected carpet region.
[0105] During the morphological dilation operation, different structural elements can produce different dilation results. Structural elements can include rectangular structural elements, cross structural elements, and single-line structural elements. Rectangular structural elements, cross structural elements, and single-line structural elements can be found in Figure 5 A schematic diagram of a structural element is shown. In the embodiment of the present application, a 3*3 rectangular structural element can be used to perform a morphological dilation operation.
[0106] Among them, morphological processing can include related operations such as dilation and erosion.
[0107] Expansion means: slide the center point of the structural element in the figure to be expanded one by one. When there is a member of the structure that is white, the center point of the structural element is set to white. For example, see Figure 6 The schematic diagram of the expansion process of the rectangular structure element provided in the embodiment of the present application is shown. Figure 6 The leftmost image is the original image, the middle image is the image expanded by one pixel, and the rightmost image is the expanded image.
[0108] Erosion means: sliding the center point of the structural element in the figure to be expanded one by one, and when there is a member of the structural element that is black, the center point of the structural element is set to black. For example, see Figure 7 The schematic diagram of the corrosion process of the rectangular structure element provided in the embodiment of the present application is shown. Figure 7 The leftmost image is the original image, the middle image is the image after one pixel has been eroded, and the rightmost image is the image after the erosion.
[0109] Step S105: superimpose the second carpet information image and the map image to obtain a target map image, where the target map image includes the carpet area.
[0110] For example, see Figure 8The target map image schematic diagram provided by the embodiment of the present application is shown, which includes two images on the left and right, and these two images are target map images of the same room. The robot running track is different in the image on the left and the image on the right. The white area on the right side of these two images is the carpet area.
[0111] It is understandable that robots are Figure 8 After the image shown is displayed, the image can be sent to a terminal device such as a mobile phone, so that the terminal device such as the mobile phone can present it to the user through an application program interface, so that the user can intuitively perceive the area where the carpet is located.
[0112] It is worth pointing out that in the related art, after discrete carpet points are collected by ultrasonic sensors, a circumscribed polygon is used to frame the discrete carpet points, and then the outline of the discrete carpet points is constructed to achieve the marking of the carpet area. However, the circumscribed polygon may also frame areas that are not carpets, and then mark the non-carpet areas as carpet areas, resulting in incorrect marking of carpet areas and low accuracy. In addition,
[0113] In the embodiment of the present application, by converting discrete carpet points into target pixel points in the map image, and then converting the discrete target pixel points into connected carpet areas, it is possible to avoid mislabeling non-carpet areas as carpet areas, thereby improving the accuracy of carpet area labeling. In addition, a connected carpet area is formed and superimposed with the map image to obtain a target map image, so that the user can intuitively feel the area where the carpet is located through the target map image.
[0114] Based on the above embodiments, see Fig. 9 The schematic diagram of carpet point updating and adding process is shown. The process of obtaining the image coordinate point set according to the detection data may include the following steps:
[0115] Step S901: Determine the physical position of each detection point in the map coordinate system according to the collection time of each detection point.
[0116] Specifically, the position and posture of the robot in the map coordinate system can be obtained according to the collection time of the detection point, the relative position and posture between the carpet detection module and the robot can be obtained, and then the physical position of the detection point in the map coordinate system can be determined according to the position and posture and relative position.
[0117] Whether the detection point is a carpet point or a non-carpet point, the physical location of the detection point can be determined according to the acquisition time of the detection point. That is, whether the carpet detection module detects a carpet point or not, a physical location (i.e., physical coordinates) can be obtained.
[0118] Step S902: for the first detection point, determine the pixel coordinates of the target pixel point corresponding to the physical position point of the first detection point in the map image, add the pixel coordinates of the target pixel point to the image coordinate point set, add the physical position point of the first detection point to the position point set, and add the acquisition time of the first detection point to the time set.
[0119] In some embodiments, for each first detection point, the physical position point of the first detection point is mapped to the map image, and after obtaining the pixel coordinates of the target pixel point corresponding to the first detection point, the pixel coordinates of the target pixel point can be directly added to the image coordinate point set, the physical position point can be added to the position point set, and the acquisition time can be added to the time set. In this way, the pixel coordinates, physical position point, and acquisition time of the target pixel point corresponding to the first detection point are stored in three different sets respectively.
[0120] However, different physical location points can be mapped to the same pixel point in the map image. Therefore, if the pixel coordinates, physical location point, and acquisition time of the target pixel point are directly stored in three different sets, the same pixel point will be saved with multiple physical location points and acquisition times, resulting in data duplication and increased data volume.
[0121] For example, the physical length of a pixel in a map image is 5 cm (centimeter). Two physical location points with physical coordinates of 5.12 and 5.14 are mapped to the same pixel, that is, the pixel corresponds to two physical location points with different physical values of 5.12 and 5.14.
[0122] In other embodiments, in order to save only one corresponding physical position point and acquisition time for one pixel point to prevent the data volume from increasing infinitely and data duplication, after obtaining the pixel coordinates of the target pixel point corresponding to the first detection point, it is possible to determine whether the pixel coordinates of the target pixel point to be added already exist in the image coordinate point set; if so, the old data in the position point set and the time set are replaced by the new physical position point and the new acquisition time respectively; if not, the pixel coordinates, physical position point, and acquisition time of the target pixel point are directly stored (i.e., added) to three different sets respectively.
[0123] Exemplarily, after the pixel coordinates of the target pixel point are obtained, it is first determined whether there are target coordinates in the image coordinate point set that are consistent with the pixel coordinates of the target pixel point.
[0124] If there are no target coordinates in the image coordinate point set that are consistent with the pixel coordinates of the target pixel point, the pixel coordinates of the target pixel point are directly added to the image coordinate point set, the physical position point of the first detection point is added to the position point set, and the acquisition time of the first detection point is added to the time set.
[0125] If there are target coordinates in the image coordinate point set that are consistent with the pixel coordinates of the target pixel point, the new physical position point is used to replace the physical position point corresponding to the old detection point in the position point set, and the acquisition time of the first detection point is used to replace the acquisition time corresponding to the old detection point in the time set. The old detection point is the detection point corresponding to the target coordinates.
[0126] For example, the physical location of the detection point n is mapped to the map image, and the pixel coordinates of the target pixel corresponding to the detection point n are obtained as (x n ,y n ), that is, the pixel coordinates of the target pixel to be added to the set are (x n ,y n ). At this time, (x n ,y n ) are compared with the pixel coordinates in the image coordinate point set to determine whether there is a pixel coordinate in the image coordinate point set that is consistent with (x n ,y n ) consistent or identical pixel coordinates to determine (x n ,y n ) is already in the image coordinate point set.
[0127] If the image coordinate point set (x m ,y m ) and (x n ,y n ) is consistent, that is, (x n ,y n ) is already in the image coordinate point set. The pixel coordinate (x m ,y m ) is obtained by mapping the physical location of the detection point m to the map image. At this time, the detection point m is an old detection point.
[0128] In order to ensure that a pixel point only retains one physical location point and collection time, the physical location point of detection point n (new detection point) is used to replace the physical location point of detection point m (old detection point) in the location point set; the collection time of detection point n is used to replace the collection time of detection point m in the time set, so as to update the relevant data in the location point set and the time set to the latest data.
[0129] It should be noted that when the pixel coordinates of the target pixel point to be added to the set already exist in the image coordinate point set, by updating the acquisition time in the time set to the latest data, it is possible to avoid mistakenly clearing the data related to the detection point that was originally a carpet point when clearing data subsequently based on the difference between the current time and the data acquisition time, thereby further improving the accuracy of carpet area marking.
[0130] For example, see Fig.10The schematic diagram of the position point set, image coordinate point set and acquisition time set provided by the embodiment of the present application is shown, and the three sets store data corresponding to 20 detection points. For example, the physical position point of a detection point is (-0.0871915, -1.43561) in the position point set, the pixel coordinates of the target pixel point corresponding to the physical position point are (18, 119) in the image coordinate point set, and the timestamp corresponding to the detection point is 1727602703.832197 of the timestamp in the acquisition time set.
[0131] Step S903: If there are at least two consecutive second detection points, a data clearing area is constructed according to the physical position points of the second detection points; the first physical position point in the position point set is cleared, the pixel coordinates of the target pixel point corresponding to the first physical position point in the image coordinate point set are cleared, and the acquisition time corresponding to the first physical position point in the time set is cleared. The second detection point is a detection point whose state information is the second state, the second state indicates that the detection point is a non-carpet point, and the first physical position point is a physical position point that falls into the data clearing area.
[0132] For the second detection point (i.e., non-carpet point), if there are at least two adjacent second detection points, the relevant data in the three data sets can be cleared to ensure the timeliness and accuracy of the relevant data in the three data sets, and further improve the accuracy of the carpet area marking. For example, during the detection process, there are at least two relevant second detection points, which indicates that there is no carpet in the area corresponding to these second detection points. However, if the relevant data corresponding to these second detection points are stored in the position point set, the image coordinate point set, and the time set, it may be that the position of the carpet area has changed (for example, the carpet has moved from one position to another), resulting in no carpet points being detected in these areas during the detection. At this time, if the relevant data in the three sets are not cleared in time, these areas will still be marked as carpet areas, which will cause the carpet area to be mislabeled. In the embodiment of the present application, when at least two adjacent second detection points are detected, the relevant data in the three sets are cleared in time, and the outdated carpet-related data in the three sets are cleared in time, thereby improving the accuracy of the carpet area marking.
[0133] In some embodiments, a data clearing area may be constructed directly based on the physical location point (ie, physical coordinates) of the second detection point.
[0134] For example, two consecutive adjacent physical location points are ts1 and ts2, where ts1 = [x1, y1], ts2 = [x2, y2]. Based on ts1 and ts2, the constructed data clearing area is: {[min_x, min_y], [max_x, max_y]}.
[0135] Wherein, min_x = min(x1, x2);
[0136] min_y = min(y1, y2);
[0137] max_x = max(x1, x2);
[0138] max_y = max(y1, y2);
[0139] In other embodiments, in order to more efficiently clear outdated carpet data, the data clearing area may be expanded by a preset range, that is, firstly, an initial data clearing area is constructed according to the physical location of the second detection point, and then the initial data clearing area is expanded by a preset range to obtain a data clearing area.
[0140] For example, two consecutive adjacent physical location points are ts1 and ts2. According to ts1 and ts2, the initial data clearing area constructed is: {[min_x, min_y], [max_x, max_y]}.
[0141] After expanding the preset range expan_range on the basis of the initial data clearing area, the obtained data clearing range is: {[min_x-expan_range, min_y-expan_range], [max_x+expan_range, max_y+expan_range]}.
[0142] After the data clearing range is constructed, a first physical location point within the data clearing range is determined, and data related to the first physical location point in the three sets is cleared.
[0143] In some embodiments, all first physical position points in the position set may be directly cleared, pixel coordinates of target pixel points corresponding to all first physical position points in the image coordinate point set may be cleared, and acquisition times corresponding to all first physical position points in the time set may be cleared.
[0144] In other embodiments, time information may be introduced when clearing data, that is, a data obsolete threshold tm_threshold is set, and only the first physical position point whose difference between the current time and the data acquisition time is greater than or equal to the data obsolete threshold tm_threshold is cleared. Specifically, for each first physical position point, the difference between the current time and the acquisition time of the first physical position point is determined; the second physical position point in the position point set is cleared, the pixel coordinates of the target pixel point corresponding to the second physical position point in the image coordinate point set are cleared, and the acquisition time corresponding to the second physical position point in the time set is cleared, and the second physical position point is the first physical position point whose difference is greater than or equal to the preset time threshold.
[0145] That is to say, for a first physical location point, the difference between the current time and the acquisition time of the first physical location point is first calculated. If the difference is greater than or equal to the preset time threshold (i.e., the data obsolete threshold tm_threshold), the first physical location point is determined to be the second physical location point; the second physical location point is cleared from the location point set, the pixel coordinates corresponding to the second physical location point are cleared from the image coordinate point set, and the corresponding acquisition time is cleared from the time set. If the difference is less than the preset time threshold, the relevant data of the first physical location point may not be cleared.
[0146] It is worth pointing out that only clearing the data in the data clearing area whose time difference is greater than or equal to the preset time threshold can reduce the negative impact caused by data false alarms and expanding the data clearing area, and further improve the accuracy of carpet area marking.
[0147] It should be noted that, in the process of clearing data according to whether the difference between the current time and the data acquisition time is greater than or equal to the preset time threshold, when it is determined that the pixel coordinates of the target pixel point to be added to the set already exist in the image coordinate point set, the acquisition time in the time set is updated to the latest time, which can avoid the pixel coordinates in the image coordinate point set from being mistakenly cleared due to the acquisition time being too far away from the current time, thereby ensuring the accuracy of the carpet area marking.
[0148] In the embodiment of the present application, by adding the relevant data of the carpet point to the image coordinate point set, the time set and the position point set according to the status information of the detection point, and clearing the relevant data in the image coordinate point set, the time set and the position point set, the carpet-related data is updated and added in a timely and accurate manner, thereby ensuring the accuracy of the carpet data and further ensuring the accuracy of the carpet area marking.
[0149] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0150] Corresponding to the carpet area marking method described in the above embodiment, Fig.11 The structure block diagram of the carpet area marking device provided in the embodiment of the present application is shown. For the convenience of description, only the part related to the embodiment of the present application is shown.
[0151] Reference Fig.11 , the device comprises:
[0152] The detection data acquisition module 1110 is used to receive the detection data output by the carpet detection module provided in the robot, wherein the detection data includes status information for indicating whether each detection point detected by the carpet detection module is a carpet point;
[0153] The image coordinate point acquisition module 1120 is used to obtain an image coordinate point set according to the detection data, wherein the image coordinate point set includes pixel coordinates of each target pixel point, wherein the target pixel point is a pixel point in the map image corresponding to a first detection point, wherein the first detection point is a detection point whose state information is a first state, and the first state indicates that the detection point is a carpet point;
[0154] An image construction module 1130 is used to construct a first carpet information image according to the image coordinate point set, where the first carpet information image includes discrete target pixel points;
[0155] A conversion module 1140 is used to obtain a second carpet information image by converting discrete target pixel points in the first carpet information image into connected carpet regions;
[0156] The superimposition module 1150 is used to superimpose the second carpet information image and the map image to obtain a target map image, where the target map image includes the carpet area.
[0157] In some possible implementations, the conversion module 1140 is specifically used to: obtain at least one connected region by performing a morphological closing operation on the first carpet information image to perform a filling operation and connect discrete target pixel points; determine the area of each connected region; remove the connected regions whose area is less than or equal to a preset area to obtain the remaining connected regions; perform a morphological dilation operation on the remaining connected regions to obtain the second carpet information image.
[0158] In some possible implementations, the detection data includes the acquisition time of each detection point. The image coordinate point acquisition module 1120 is specifically used to: determine the physical position point of each detection point in the map coordinate system according to the acquisition time of each detection point; for the first detection point, determine the pixel coordinates of the target pixel point corresponding to the physical position point of the first detection point in the map image, add the pixel coordinates of the target pixel point to the image coordinate point set, add the physical position point of the first detection point to the position point set, and add the acquisition time of the first detection point to the time set; if there are at least two consecutive second detection points, construct a data clearing area according to the physical position point of the second detection point; clear the first physical position point in the position point set, clear the pixel coordinates of the target pixel point corresponding to the first physical position point in the image coordinate point set, and clear the acquisition time corresponding to the first physical position point in the time set;
[0159] The second detection point is a detection point whose state information is a second state, the second state represents that the detection point is a non-carpet point, and the first physical location point is a physical location point that falls into the data clearing area.
[0160] In some possible implementations, the image coordinate point acquisition module 1120 is specifically used to: determine whether there are target coordinates in the image coordinate point set that are consistent with the pixel coordinates of the target pixel point; if not, add the pixel coordinates of the target pixel point to the image coordinate point set, add the physical position point of the first detection point to the position point set, and add the acquisition time of the first detection point to the time set; if so, use the physical position point to replace the physical position point corresponding to the old detection point in the position point set, and use the acquisition time of the first detection point to replace the acquisition time corresponding to the old detection point in the time set, and the old detection point is the detection point corresponding to the target coordinates.
[0161] In some possible implementations, the image coordinate point acquisition module 1120 is specifically used to: construct an initial data clearing area according to the physical position point of the second detection point; and expand the initial data clearing area by a preset range to obtain a data clearing area.
[0162] In some possible implementations, the image coordinate point acquisition module 1120 is specifically used to: determine, for each first physical position point, the difference between the current time and the acquisition time of the first physical position point; clear the second physical position point in the position point set, clear the pixel coordinates of the target pixel point corresponding to the second physical position point in the image coordinate point set, and clear the acquisition time corresponding to the second physical position point in the time set, the second physical position point being the first physical position point whose difference is greater than or equal to a preset time threshold.
[0163] In some possible implementations, the image coordinate point acquisition module 1120 is specifically used to: for each detection point, obtain the position and posture of the robot in the map coordinate system according to the acquisition time, and obtain the relative position and posture between the carpet detection module and the robot; determine the physical position point of the detection point in the map coordinate system according to the position and posture and relative position.
[0164] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0165] Fig.12 This is a schematic diagram of the structure of the robot provided in the embodiment of the present application. Fig.12 As shown, the robot 12 of this embodiment includes: at least one processor 120 ( Fig.12Only one is shown in the figure), a memory 121, and a computer program 122 stored in the memory 121 and executable on the at least one processor 120, wherein the processor 120 implements the steps of any of the above-mentioned method embodiments when executing the computer program 122.
[0166] The robot may include, but is not limited to, a processor 120 and a memory 121. Those skilled in the art will appreciate that Fig.12 It is only an example of the robot 12 and does not constitute a limitation of the robot 12. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, carpet detection modules (such as ultrasonic sensors, etc.), etc.
[0167] The processor 120 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0168] In some embodiments, the memory 121 may be an internal storage unit of the robot 12, such as a hard disk or memory of the robot 12. In other embodiments, the memory 121 may also be an external storage device of the robot 12, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the robot 12. Further, the memory 121 may also include both an internal storage unit of the robot 12 and an external storage device. The memory 121 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 121 may also be used to temporarily store data that has been output or is to be output.
[0169] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0170] In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other and are not used to limit the protection scope of this application. The specific working process of the units and modules in the above system can refer to the corresponding process in the above method embodiment, which will not be repeated here.
[0171] An embodiment of the present application also provides a robot, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the computer program.
[0172] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0173] An embodiment of the present application provides a computer program product. When the computer program product runs on a robot, the robot can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0174] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0175] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0176] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0177] In the embodiments provided in the present application, it should be understood that the disclosed devices, robots and methods can be implemented in other ways. For example, the device / robot embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0178] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0179] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A carpet area marking method, characterized in that: include: receiving detection data output by a carpet detection module disposed on the robot, wherein the detection data includes status information for indicating whether each detection point detected by the carpet detection module is a carpet point; According to the detection data, an image coordinate point set is obtained, wherein the image coordinate point set includes pixel coordinates of each target pixel point, wherein the target pixel point is a pixel point in the map image corresponding to a first detection point, wherein the first detection point is a detection point whose state information is a first state, wherein the first state indicates that the detection point is a carpet point; constructing a first carpet information image according to the image coordinate point set, wherein the first carpet information image includes each of the discrete target pixel points; Obtaining a second carpet information image by converting the discrete target pixel points in the first carpet information image into connected carpet areas; The second carpet information image and the map image are superimposed to obtain a target map image, wherein the target map image includes the carpet area.
2. The method according to claim 1, characterized in that The second carpet information image is obtained by converting the discrete target pixel points in the first carpet information image into connected carpet areas, including: By performing a morphological closing operation on the first carpet information image, a filling operation is performed and the discrete target pixel points are connected to obtain at least one connected region; Determining the area of each of the connected regions; Removing the connected regions whose areas are less than or equal to the preset area to obtain the remaining connected regions; A morphological dilation operation is performed on the remaining connected regions to obtain the second carpet information image.
3. The method according to claim 1 or 2, characterized in that The detection data includes the collection time of each detection point; According to the detection data, a set of image coordinate points is obtained, including: Determine the physical location of each detection point in the map coordinate system according to the acquisition time of each detection point; For the first detection point, determine the pixel coordinates of the target pixel point in the map image corresponding to the physical position point of the first detection point, add the pixel coordinates of the target pixel point to the image coordinate point set, add the physical position point of the first detection point to the position point set, and add the acquisition time of the first detection point to the time set; If there are at least two consecutive second detection points, construct a data clearing area according to the physical position points of the second detection points; clear the first physical position point in the position point set, clear the pixel coordinates of the target pixel point corresponding to the first physical position point in the image coordinate point set, and clear the acquisition time corresponding to the first physical position point in the time set; The second detection point is a detection point whose state information is a second state, the second state indicates that the detection point is a non-carpet point, and the first physical location point is the physical location point that falls into the data clearing area.
4. The method according to claim 3, characterized in that Adding the pixel coordinates of the target pixel point to the image coordinate point set, adding the physical position point of the first detection point to the position point set, and adding the acquisition time of the first detection point to the time set, includes: Determine whether there is a target coordinate in the image coordinate point set that is consistent with the pixel coordinate of the target pixel point; If not, adding the pixel coordinates of the target pixel point to the image coordinate point set, adding the physical position point of the first detection point to the position point set, and adding the acquisition time of the first detection point to the time set; If so, use the physical location point to replace the physical location point corresponding to the old detection point in the location point set, and use the collection time of the first detection point to replace the collection time corresponding to the old detection point in the time set, and the old detection point is the detection point corresponding to the target coordinates.
5. The method according to claim 3, characterized in that Constructing a data clearing area according to the physical location of the second detection point includes: constructing an initial data clearing area according to the physical location point of the second detection point; The initial data clearing area is expanded by a preset range to obtain the data clearing area.
6. The method according to claim 3, characterized in that Clearing a first physical position point in the position point set, clearing pixel coordinates of a target pixel point corresponding to the first physical position point in the image coordinate point set, and clearing an acquisition time corresponding to the first physical position point in the time set, including: For each of the first physical location points, determining a difference between a current time and the collection time of the first physical location point; Clear the second physical position point in the position point set, clear the pixel coordinates of the target pixel point corresponding to the second physical position point in the image coordinate point set, and clear the acquisition time corresponding to the second physical position point in the time set, wherein the second physical position point is the first physical position point whose difference is greater than or equal to the preset time threshold.
7. The method according to claim 3, characterized in that Determining the physical position of each detection point in a map coordinate system according to the acquisition time of each detection point includes: For each of the detection points, the posture of the robot in the map coordinate system is obtained according to the acquisition time, and the relative posture between the carpet detection module and the robot is obtained; and the physical position point of the detection point in the map coordinate system is determined according to the posture and the relative position.
8. A carpet area marking device, characterized in that: include: A detection data acquisition module, used to receive detection data output by a carpet detection module provided on the robot, wherein the detection data includes status information for indicating whether each detection point detected by the carpet detection module is a carpet point; An image coordinate point acquisition module, used for obtaining an image coordinate point set according to the detection data, wherein the image coordinate point set includes pixel coordinates of each target pixel point, wherein the target pixel point is a pixel point in the map image corresponding to a first detection point, wherein the first detection point is a detection point whose state information is a first state, wherein the first state indicates that the detection point is a carpet point; An image construction module, configured to construct a first carpet information image according to the image coordinate point set, wherein the first carpet information image includes each of the discrete target pixel points; A conversion module, configured to obtain a second carpet information image by converting the discrete target pixel points in the first carpet information image into connected carpet areas; The superposition module is used to superimpose the second carpet information image and the map image to obtain a target map image, wherein the target map image includes the carpet area.
9. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Ground environment motion planning method based on ultrasonic waves
CN115755881A
Carpet area detection method and device and cleaning robot
CN116098522A
Carpet detection method, carpet detection device, cleaning robot and storage medium
CN117179637A
Map updating method, cleaning method, cleaning robot and storage medium
CN117216080A
Carpet information processing method, cleaning method, cleaning robot and storage medium
CN117312345A