Method and device for adjusting cleaning direction, storage medium and electronic device

By deploying upward-facing image acquisition components on the cleaning equipment, and combining image processing and posture data, the cleaning direction and route of the cleaning equipment can be precisely adjusted, solving the problem of incomplete cleaning and improving cleaning efficiency and user experience.

CN117898641BActive Publication Date: 2026-07-10DREAM INNOVATION TECH (SUZHOU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DREAM INNOVATION TECH (SUZHOU) CO LTD
Filing Date
2022-10-11
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing cleaning equipment sometimes fails to clean certain areas properly due to deviations in the cleaning direction, thus affecting the user experience.

Method used

By deploying image acquisition components with an upward acquisition direction on the cleaning equipment, the boundary information of the spatial area is collected. The cleaning guidance direction is obtained using the image acquisition components, and the cleaning direction of the cleaning equipment is adjusted based on this direction. Combined with the line detection algorithm and attitude data, the cleaning direction and route of the cleaning equipment are accurately determined.

Benefits of technology

It improves the cleaning efficiency of cleaning equipment, reduces the probability of missed areas and collisions with obstacles, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117898641B_ABST
    Figure CN117898641B_ABST
Patent Text Reader

Abstract

The application discloses a cleaning direction adjustment method and device, a storage medium and an electronic device, and comprises the following steps: determining a first projection direction of a cleaning guide direction of a space region where a cleaning device is located in a specified coordinate system; wherein the cleaning guide direction is determined based on information collected by a specified image collection component for a region boundary of the space region; the specified image collection component is arranged on the cleaning device, the included angle between the collection direction and the gravity direction is less than a preset angle, and the collection direction is upward; obtaining a second projection direction of a device orientation of the cleaning device in the specified coordinate system; and adjusting the cleaning direction of the cleaning device based on the angle deviation between the first projection direction and the second projection direction.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the field of communications, and more specifically, to a method and apparatus for adjusting the cleaning direction, a storage medium, and an electronic device. [Background Technology]

[0002] With the development of technology, more and more people are starting to use smart devices for cleaning in their daily lives, such as cleaning equipment. These cleaning devices can move autonomously to different areas to perform cleaning tasks in those areas.

[0003] Existing cleaning equipment cleans rooms according to a preset route. However, in actual use, due to certain circumstances, the cleaning components may deviate from their intended direction, resulting in some areas being missed and thus failing to clean properly, leading to a poor user experience.

[0004] There is currently no effective solution to the problem of incomplete cleaning caused by deviations in the cleaning direction of existing cleaning equipment. [Summary of the Invention]

[0005] The present invention provides a method and apparatus for adjusting the cleaning direction, a storage medium and an electronic device, to at least solve the problem in the prior art that the cleaning direction of the cleaning equipment is deviated, resulting in incomplete cleaning.

[0006] According to one aspect of the present invention, a method for adjusting the cleaning direction is provided, comprising: determining a first projection direction of the cleaning guidance direction of a spatial area where a cleaning device is located in a specified coordinate system; wherein the cleaning guidance direction is determined based on information collected by a specified image acquisition component for the area boundary of the spatial area; the specified image acquisition component is disposed on the cleaning device, the angle between the acquisition direction and the gravity direction is less than a preset angle, and the acquisition direction is upward; acquiring a second projection direction of the device orientation of the cleaning device in the specified coordinate system; and adjusting the cleaning direction of the cleaning device based on the angular deviation between the first projection direction and the second projection direction.

[0007] In an exemplary embodiment, determining the first projection direction of the cleaning guidance direction in a specified coordinate system for a spatial area where the cleaning equipment is located includes: acquiring a first image obtained by the specified image acquisition component acquiring an image of the area boundary of the spatial area; performing edge detection processing on the first image to obtain edge detection points of the first image; performing line extraction processing on the edge detection points using a line detection algorithm to obtain one or more lines corresponding to the first image; and determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the extension direction of the one or more lines.

[0008] In one exemplary embodiment, edge detection processing is performed on the first image to obtain edge detection points of the first image, including: denoising the first image to obtain a denoised first image; and performing edge detection processing on the denoised first image to obtain edge detection points of the first image.

[0009] In an exemplary embodiment, determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the direction of the one or more straight lines includes: determining the straight line with the most edge detection points among the one or more straight lines as the target straight line; and determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the extension direction of the target straight line.

[0010] In an exemplary embodiment, determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the direction of the one or more straight lines includes: classifying the straight lines whose extension direction angle is less than a specified angle threshold into a class, thus obtaining multiple straight line classes; counting the number of edge detection points contained in each straight line class, and determining the straight line class with the most extracted edge detection points as the target straight line class; and determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the extension direction of the target straight line class.

[0011] In one exemplary embodiment, the method further includes: obtaining the cleanliness level of the completed work area; designating areas with a cleanliness level less than a preset threshold as areas to be cleaned; and, if the area to be cleaned is greater than a specified area threshold, determining the first projection direction of the cleaning guidance direction of the space area where the cleaning equipment is located in a specified coordinate system.

[0012] In an exemplary embodiment, after the target device within the space area performs an image scan on the area already cleaned by the cleaning device to determine the cleanliness level of the cleaned area, the method further includes: if the cleanliness level is greater than a preset threshold, sending a prompt message to the target object's mobile terminal, wherein the prompt message is used to prompt the target object whether it needs to determine the first projection direction of the cleaning guidance direction of the space area where the cleaning device is located in a specified coordinate system; and upon receiving a confirmation instruction corresponding to the prompt message, determining the first projection direction of the cleaning guidance direction of the space area where the cleaning device is located in the specified coordinate system.

[0013] In one exemplary embodiment, the method further includes: performing a spatial transformation on the first image to obtain a second image, wherein the spatial transformation is used to make the vertical coordinate axis of the image coordinate system of the second image parallel to the direction of gravity, and the second image is used to determine a first projection direction of the cleaning guidance direction of the spatial area where the cleaning device is located in the specified coordinate system.

[0014] According to another aspect of the present invention, a cleaning direction adjustment device is also provided. The device includes: a determining module, configured to determine a first projection direction of the cleaning guidance direction of the spatial area where the cleaning device is located in a specified coordinate system; wherein the cleaning guidance direction is determined based on information collected by a specified image acquisition component for the area boundary of the spatial area; the specified image acquisition component is disposed on the cleaning device, the angle between the acquisition direction and the gravity direction is less than a preset angle, and the acquisition direction is upward; an acquiring module, configured to acquire a second projection direction of the device orientation of the cleaning device in the specified coordinate system; and an adjusting module, configured to adjust the cleaning direction of the cleaning device based on the angular deviation between the first projection direction and the second projection direction.

[0015] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described cleaning direction adjustment method when running.

[0016] According to another aspect of the present invention, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the cleaning direction adjustment method via the computer program.

[0017] In this embodiment of the invention, an image acquisition component deployed on the cleaning equipment with an upward acquisition direction is used to collect distinguishing boundary information of a spatial area. This results in less environmental interference in the collected information and easier extraction of the area boundaries. Consequently, the images collected for the spatial area can be used to efficiently and accurately determine a specific direction of the spatial area as a cleaning guide direction. This cleaning guide direction is then used to guide the cleaning equipment to adjust its cleaning direction and cleaning route. This makes the adjustment of the cleaning direction and the replanned cleaning route more consistent with the actual obstacle distribution characteristics of the spatial area, reducing missed areas and collisions between the cleaning equipment and obstacles, and improving the user experience. [Attached Image Description]

[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and, together with the description thereof, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0019] Figure 1 This is a hardware structure block diagram of a cleaning device according to an optional cleaning direction adjustment method of an embodiment of the present invention;

[0020] Figure 2 This is a flowchart of an optional cleaning direction adjustment method according to an embodiment of the present invention;

[0021] Figure 3 This is a flowchart illustrating an optional cleaning direction adjustment method according to an embodiment of the present invention;

[0022] Figure 4 This is a structural block diagram of an optional cleaning direction adjustment device according to an embodiment of the present invention.

Detailed Implementation Methods

[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] The method embodiments provided in this invention can be executed in a cleaning device or a similar computing device. Taking operation on a cleaning device as an example, Figure 1 This is a hardware structure block diagram of a cleaning device for adjusting the cleaning direction according to an embodiment of the present invention. For example... Figure 1 As shown, the cleaning equipment may include one or more ( Figure 1Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor (MPU) or a programmable logic device (PLD)) and a memory 104 for storing data are also shown. In one exemplary embodiment, the cleaning device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the cleaning equipment described above. For example, the cleaning equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.

[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the cleaning direction adjustment method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the cleaning equipment via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the cleaning equipment. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0028] This embodiment provides a method for adjusting the cleaning direction. Figure 2 This is a flowchart of a method for adjusting the cleaning direction according to an embodiment of the present invention, the process including the following steps:

[0029] Step S202: Determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in the specified coordinate system; wherein, the cleaning guidance direction is determined based on the information collected by the specified image acquisition component for the area boundary of the spatial area, the specified image acquisition component is deployed on the cleaning equipment, the angle between the acquisition direction and the gravity direction is less than a preset angle, and the acquisition direction is upward.

[0030] The cleaning area can refer to the area that the cleaning equipment cleans, such as the living room or bedroom in a home. The cleaning area can be predefined by the user on the operating interface, or it can be defined by the cleaning equipment based on recognition of door frames, etc. There is no limitation here.

[0031] The area where cleaning equipment operates usually has boundaries. Taking a living room as an example, the area boundary can be represented by the intersection of the four walls and the ceiling; or, it can be represented directly by the four walls. For example, when the area boundary is represented by the intersection of the four walls and the ceiling, the cleaning direction of the space can be determined by any identified intersection line. For example, the direction in which the intersection line extends can be used as the cleaning direction, or the direction perpendicular to the direction in which the intersection line extends can be used as the cleaning direction, etc., without limitation here.

[0032] The designated image acquisition component can be a component deployed on the cleaning equipment to perform image acquisition. The angle between the acquisition direction of the designated image acquisition component and the direction of gravity is less than a preset angle, and the acquisition direction is upward. The designated image acquisition component can be a monocular camera, a binocular camera, etc., and its acquisition direction can have an angle less than a preset angle with the direction of gravity, maintaining an upward acquisition direction (e.g., a top-view camera) to facilitate the acquisition of information above the cleaning equipment. The image acquired by the designated image acquisition component can be monochrome or color. It should be noted that the aforementioned direction of gravity is based on the world coordinate system and is in the same direction as the Z-axis of the world coordinate system. The angle between the acquisition direction and the direction of gravity is less than a preset angle, for example, less than 5 degrees, 10 degrees, etc., and the acquisition direction remains upward.

[0033] Cleaning equipment typically operates in complex environments. Images captured by horizontally positioned cameras often exhibit significant noise, making it difficult to extract a specific direction from the captured images to guide the cleaning equipment's adjustment. This embodiment utilizes an upward-facing image acquisition component on the cleaning equipment to capture the boundary of the spatial area. This minimizes environmental interference in the acquired information, making boundary extraction easier. Consequently, the captured images of the spatial area can be used to efficiently and accurately determine a cleaning guidance direction. This direction then guides the cleaning equipment in adjusting its cleaning direction, making the adjustment process simpler and more convenient.

[0034] The specified coordinate system can be a pre-defined coordinate system. For example, the specified coordinate system can be the equipment coordinate system where the cleaning equipment is located, or a world coordinate system pre-constructed for the cleaning equipment, etc. Taking the specified coordinate system as the world coordinate system as an example, the coordinate transformation relationship between the coordinate system of the specified image acquisition component and the world coordinate system can be used to project the cleaning guidance direction determined based on the specified image acquisition component onto the world coordinate system to obtain the first projection direction in the world coordinate system.

[0035] Step S204: Obtain the second projection direction of the cleaning equipment orientation in the specified coordinate system.

[0036] The orientation of the cleaning equipment can be characterized using its attitude data. This attitude data may include the cleaning equipment's position and its yaw angle in a world coordinate system. The attitude data can be determined based on the cleaning equipment's built-in odometer, gyroscope, front-facing image acquisition unit, etc. The cleaning equipment's orientation can also be transformed to the specified coordinate system to obtain a second projection direction.

[0037] For example, when the specified coordinate system is the world coordinate system, the position and yaw angle of the cleaning equipment in the world coordinate system can be obtained based on the information collected by the odometer, gyroscope, and front-facing image acquisition unit built into the cleaning equipment, as well as the coordinate transformation relationship between the aforementioned sensors and the world coordinate system. Correspondingly, this yaw angle is the second projection direction. If the predetermined yaw angle of the cleaning equipment is not in the specified coordinate system, the yaw angle of the cleaning equipment in the specified coordinate system can be obtained through coordinate transformation relationships, thereby obtaining the second projection direction.

[0038] Step S206: Adjust the cleaning direction of the cleaning device based on the angular deviation between the first projection direction and the second projection direction.

[0039] The first projection direction is determined based on the boundary line, so that the orientation of the first projection direction is the extension direction of the boundary line, while the orientation of the equipment is fixed. This is equivalent to determining a straight line and a ray. The intersection of the straight line and the ray forms two included angles. The smaller included angle can be taken as the angle between the first projection direction and the second projection direction. The cleaning equipment is controlled to adjust its orientation according to the angle towards the first projection direction, thereby realizing the adjustment of the cleaning direction of the cleaning equipment.

[0040] Typically, there may be more than one boundary line identified, and the extension directions of each boundary line may be inconsistent. Consequently, there may also be more than one cleaning guidance direction determined. For example, based on information collected by a designated image acquisition component, two perpendicular boundary lines on the roof may be extracted. In this case, there are two cleaning guidance directions, which are perpendicular to each other. Either cleaning guidance direction can be randomly selected and projected onto a designated coordinate system to obtain a first projection direction, which then guides the cleaning equipment in adjusting its cleaning direction. Alternatively, both cleaning guidance directions can be projected onto the designated coordinate system to obtain two first projection directions. The angles between the second projection direction and the two first projection directions can then be obtained, resulting in four angles. The smallest angle can then be selected as the angular deviation, and the first projection direction corresponding to this smallest angle can be used as the direction to which the cleaning direction is adjusted. The cleaning equipment can then be controlled to adjust its cleaning direction based on this angular deviation.

[0041] Accordingly, in some embodiments, adjusting the cleaning direction of the cleaning device may include: selecting the minimum value of each angle between the first projection direction and the second projection direction, using the minimum value of each angle as an angle deviation; and adjusting the device orientation of the cleaning device to the first projection direction corresponding to the minimum value of each angle based on the angle deviation.

[0042] Of course, any included angle can be selected as the angular deviation, and the orientation of the cleaning equipment can be adjusted to the first projection direction corresponding to the corresponding included angle based on the angular deviation, and so on. The implementation method of adjusting the cleaning direction of the cleaning equipment based on the angular deviation between the first projection direction and the second projection direction is not limited here.

[0043] During the cleaning process, cleaning equipment often encounters obstacles such as non-fixed furniture. After encountering an obstacle, the equipment adjusts its direction of travel or performs edge cleaning. After obstacle avoidance or edge cleaning, it may need to readjust the cleaning direction and plan a new cleaning route. However, this readjustment may lead to missed areas or a cleaning route that does not conform to the obstacle distribution characteristics of the space, increasing the probability of collisions. The solution in this embodiment, which adjusts the cleaning direction, can solve the problem of directional deviation caused by various unforeseen circumstances during cleaning, resulting in missed areas or a cleaning route that does not conform to the obstacle distribution characteristics of the space.

[0044] For example, the extension direction of a wall can be identified by a designated image acquisition component. This extension direction can then be used as a cleaning guide direction. When the cleaning equipment first enters the space or after cleaning along the edge of an obstacle, the cleaning direction can be adjusted based on this guide direction, cleaning in a "bow" shaped pattern. Furthermore, furniture in spaces such as living rooms and bedrooms is typically placed along the boundary of the area, and walls are usually parallel or perpendicular to the boundary. This makes the cleaning direction adjusted according to the method provided in the embodiments of this specification more consistent with the distribution of obstacles within the space, reducing the possibility of collisions between the cleaning equipment and furniture or walls, and improving cleaning efficiency.

[0045] In this embodiment, an image acquisition component with an upward acquisition direction is used to collect distinguishing boundary information of a spatial region. This results in less environmental interference in the acquired information and easier extraction of the region boundaries. Consequently, the images acquired for the spatial region can be used to efficiently and accurately determine a specific direction of the spatial region as a cleaning guide direction. This cleaning guide direction is then used to guide the cleaning equipment to adjust its cleaning direction and cleaning route. This makes the adjustment of the cleaning direction and the replanned cleaning route more consistent with the actual obstacle distribution characteristics of the spatial region, reducing missed areas and collisions between the cleaning equipment and obstacles, and improving the user experience.

[0046] In some embodiments, a first image may be obtained by the designated image acquisition component acquiring an image of the boundary of the spatial region; edge detection processing may be performed on the first image to obtain edge detection points of the first image; a straight line detection algorithm may be used to extract straight lines from the edge detection points to obtain one or more straight lines corresponding to the first image; and the first projection direction of the cleaning guidance direction in the designated coordinate system may be determined based on the extension direction of the one or more straight lines.

[0047] In one exemplary embodiment, edge detection processing is performed on the first image to obtain edge detection points of the first image, including: denoising the first image to obtain a denoised first image; and performing edge detection processing on the denoised first image to obtain edge detection points of the first image.

[0048] We can first perform edge detection processing on the first image to obtain a series of edge detection points. For example, we can perform edge detection processing based on pixel gradients and extract the pixel with the largest pixel gradient as the edge detection point. The edge detection algorithm used here is not limited.

[0049] Optionally, the first image can be denoised first to obtain a denoised first image; then, edge detection processing can be performed on the denoised first image to obtain edge detection points. Due to the influence of the external environment and the characteristics of the image acquisition device itself, the original image acquired by the image acquisition device usually contains a lot of noise, which affects the accuracy of edge detection and line extraction, thus leading to deviations in the detection results. Accordingly, before performing edge detection processing, the first image can be denoised first to obtain more accurate edge detection points. The image denoising algorithm used for denoising is not limited here.

[0050] In an exemplary embodiment, determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the direction of the one or more straight lines includes: determining the straight line with the most edge detection points among the one or more straight lines as the target straight line; and determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the extension direction of the target straight line.

[0051] Line detection algorithms can be used to extract straight lines from the edge detection points. These algorithms can be methods for extracting straight line segments from an image by performing feature extraction. The algorithm can be, for example, the Hough Transform or LSD (Line Segment Detection), and this application is not limited to either. The Hough Transform is a feature detection algorithm widely used in image analysis, computer vision, and digital image processing. It is used to identify features in objects, such as lines. The LSD algorithm performs local analysis on the image to obtain the pixel set of straight lines, then verifies and solves the problem using assumed parameters, merging the pixel set with an error control set to adaptively control the number of false detections.

[0052] The one or more straight lines corresponding to the first image are determined in the coordinate system of the specified image acquisition component. Based on the coordinate system transformation relationship, the extension direction of the one or more straight lines can be transformed to the specified coordinate system. Then, by combining the projection direction of the extension direction of the one or more straight lines in the specified coordinate system, the first projection direction of the cleaning guide direction in the specified coordinate system can be determined.

[0053] By using edge detection and line extraction methods, the boundary lines between walls and ceilings in spaces such as living rooms and bedrooms can be extracted more accurately. This allows for more accurate and simple extraction of specific directions to guide cleaning adjustments, making it easier to guide cleaning equipment along cleaning routes that conform to the distribution characteristics of the space.

[0054] In spaces such as living rooms and bedrooms, the boundary line between the ceiling and the wall is usually the longest. Correspondingly, the line with the most edge detection points is more likely to be the line representing the direction of the wall. Therefore, determining the target line based on the number of edge detection points can extract the boundary of the area more accurately and conveniently.

[0055] For example, the edge detection points of each straight line can be counted, and the straight line with the most edge detection points can be selected as the target straight line, thereby obtaining the extension direction of the target straight line. Correspondingly, the extension direction of the target straight line can be transformed to a specified coordinate system based on coordinate system transformation relationships to obtain the first projection direction of the cleaning guidance direction in the specified coordinate system.

[0056] Optionally, determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the direction of one or more straight lines includes: classifying the straight lines whose extension direction angle is less than a specified angle threshold into one class, thus obtaining multiple straight line classes; counting the number of edge detection points contained in each straight line class, and determining the straight line class with the most extracted edge detection points as the target straight line class; and determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the extension direction of the target straight line class.

[0057] The extension directions of each straight line can be statistically analyzed, and lines with an angle less than a specified angle threshold can be grouped into multiple line classes. The specified angle threshold can be a small value such as 5 degrees or 6 degrees. The number of edge detection points in each line class can be counted, and the line class with the most extracted edge detection points is determined as the target line class. The extension direction of the target line is determined based on the extension directions within the target line class, and then the first projection direction of the cleaning guide direction in the specified coordinate system is determined based on the extension directions of the target line. For example, the average value of the extension directions within the target line class can be taken as the extension direction of the target line. This implementation method can further reduce the impact of small distortions in image acquisition on the extraction of the cleaning guide direction, and further improve the accuracy of the cleaning guide direction extraction.

[0058] In one exemplary embodiment, the method further includes: performing a spatial transformation on the first image to obtain a second image, wherein the spatial transformation is used to make the vertical coordinate axis of the image coordinate system of the second image parallel to the direction of gravity, and the second image is used to determine a first projection direction of the cleaning guidance direction of the spatial area where the cleaning device is located in the specified coordinate system.

[0059] Given that the installation position of the top-view camera of the cleaning equipment may be off-center, or the ground on which the cleaning equipment operates may be tilted, lines that are parallel in actual physical space may intersect in the image captured by the designated image acquisition component, thus affecting the accurate extraction of area boundaries. This embodiment can first perform a spatial transformation on the acquired first image, such as an affine transformation, to obtain a second image. This second image is then used to determine the cleaning guidance direction of the cleaning equipment in a specified coordinate system. An affine transformation is the inverse transformation of the imaging process; in geometry, it refers to a linear transformation of one vector space followed by a translation, transforming it into another vector space. Of course, the spatial transformation is not limited to affine transformations; other spatial transformation methods that can achieve similar effects are also applicable to this embodiment.

[0060] Accordingly, the first image in the above embodiments can be replaced with the second image, and edge detection and line extraction can be performed based on the scheme of the above embodiments to obtain the cleaning guidance direction of the cleaning equipment in the specified coordinate system. This technical solution avoids the problem of inaccurate extraction of the cleaning guidance direction due to the incorrect position of the specified image acquisition component or the tilt of the operating ground.

[0061] Optionally, in other embodiments, when it is determined that the cleaning device is cleaning along the edge of a designated obstacle larger than a preset size, the cleaning direction along the edge of the cleaning device can be adjusted based on the first projection direction and the boundary extension direction of the designated obstacle. The designated obstacle may be a large obstacle such as a wall, cabinet, or bed within a space. Such large obstacles are typically placed along or parallel to walls. When the cleaning device cleans along the edge of such obstacles, the boundary extension direction of the obstacle may not be accurately identified. Further combining the first projection direction with the control of the cleaning direction along the edge of the cleaning device can make the edge cleaning of such obstacles more accurate, reducing collisions or missed areas.

[0062] Optionally, the method further includes: obtaining the cleanliness level of the completed work area; taking areas with a cleanliness level less than a preset threshold as areas to be cleaned; and determining the first projection direction of the cleaning guide direction of the space area where the cleaning equipment is located in a specified coordinate system when the area to be cleaned is greater than a specified area threshold.

[0063] In an exemplary embodiment, the cleanliness level of the completed work area of ​​the cleaning device can be obtained by first scanning the image of the completed work area with a target device within the spatial area, wherein the target device has image recognition capability. The cleaning device can obtain the cleanliness level of the completed work area, designate areas with a cleanliness level less than a preset threshold as areas to be cleaned, and determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning device is located in a specified coordinate system when the area to be cleaned is larger than a specified area threshold.

[0064] During the operation of the cleaning equipment, areas that have already been cleaned may still contain uncleaned areas. The cleaning equipment can scan the cleaned areas using a target device to determine the cleanliness level. If the cleanliness level is less than a preset threshold, this area can be designated as a cleaning zone. The cleaning equipment can then proceed to clean this area. If the area to be cleaned is larger than a specified area threshold, the cleaning equipment can adjust its cleaning direction based on the cleaning guidelines of the surrounding space. It can also plan a "bow"-shaped path based on these guidelines to ensure comprehensive coverage of the area and make the cleaning path more consistent with the spatial distribution, reducing the possibility of collisions during cleaning and improving the user experience.

[0065] Optionally, after the target device within the space area performs an image scan on the area already cleaned by the cleaning equipment to determine the cleanliness level of the cleaned area, the method further includes: if the cleanliness level is greater than a preset threshold, sending a prompt message to the target object's mobile terminal, wherein the prompt message is used to prompt the target object whether it needs to determine the first projection direction of the cleaning guide direction of the space area where the cleaning equipment is located in a specified coordinate system; and upon receiving a confirmation instruction corresponding to the prompt message, determining the first projection direction of the cleaning guide direction of the space area where the cleaning equipment is located in the first coordinate system in the specified coordinate system.

[0066] Understandably, after the cleaning equipment completes its work, the user can judge whether it has met the preset requirements or failed to meet the homeowner's needs. If the homeowner needs to formally entertain guests, they may require a cleaner floor than usual, and a single cleaning by the equipment may not be sufficient. Therefore, to provide a better user experience, after cleaning, the cleaning equipment will send a prompt message to the homeowner's mobile device, asking the homeowner to confirm whether to clean again. If the homeowner confirms to clean again, the projection direction will be determined once more.

[0067] Obviously, the embodiments described above are only some embodiments of the present invention, and not all embodiments. In order to better understand the above method for adjusting the cleaning direction, the above process will be described in conjunction with optional embodiments below, but it is not intended to limit the technical solutions of the embodiments of the present invention.

[0068] This embodiment provides a method for adjusting the cleaning direction, which is a flowchart illustrating an optional method for adjusting the cleaning direction according to an embodiment of the present invention. Figure 3 As shown, the specific steps are as follows:

[0069] Step S302: Acquire an image of the room's ceiling using a top-view camera;

[0070] Step S304: Perform an affine transformation on the acquired image to make the camera imaging plane parallel to the ground;

[0071] Step S306: Denoise the image;

[0072] Step S308: Perform edge detection on the denoised image to obtain a series of edge points;

[0073] Step S310: Extract straight lines based on the Hough transform algorithm, count the points on each line, traverse all lines, count the total number of points in each direction, and thus obtain the direction with the most points;

[0074] Step S312: Determine the direction with the highest total number of points as the cleaning guide direction for the room;

[0075] Step S314: Based on the angle and external parameters of the odometer, transform the room cleaning guidance direction in the robot vacuum's coordinate system to the cleaning guidance direction in the world coordinate system, thereby obtaining the angular deviation between the machine's orientation and the room cleaning guidance direction in the world coordinate system.

[0076] Step S316: Adjust the orientation of the sweeper to match the cleaning guide direction based on the obtained angle deviation, that is, adjust the sweeper's cleaning direction.

[0077] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0078] This embodiment also provides a cleaning direction adjustment device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0079] Figure 4 This is a structural block diagram of an optional cleaning direction adjustment device according to an embodiment of the present invention, the device comprising:

[0080] The determining module 42 is used to determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in a specified coordinate system; wherein, the cleaning guidance direction is determined based on the information collected by the specified image acquisition component for the area boundary of the spatial area, the specified image acquisition component is deployed on the cleaning equipment, the angle between the acquisition direction and the gravity direction is less than a preset angle, and the acquisition direction is upward.

[0081] Acquisition module 44 is used to acquire the second projection direction of the cleaning equipment orientation in the specified coordinate system;

[0082] The adjustment module 46 is used to adjust the cleaning direction on the cleaning device based on the angular deviation between the first projection direction and the second projection direction.

[0083] In this embodiment, an image acquisition component with an upward acquisition direction is used to collect distinguishing boundary information of a spatial region. This results in less environmental interference in the acquired information and easier extraction of the region boundaries. Consequently, the images acquired for the spatial region can be used to efficiently and accurately determine a specific direction of the spatial region as a cleaning guide direction. This cleaning guide direction is then used to guide the cleaning equipment to adjust its cleaning direction and cleaning route. This makes the adjustment of the cleaning direction and the replanned cleaning route more consistent with the actual obstacle distribution characteristics of the spatial region, reducing missed areas and collisions between the cleaning equipment and obstacles, and improving the user experience.

[0084] The determining module 42 is further configured to acquire a first image obtained by the designated image acquisition component for the region boundary of the spatial region; perform edge detection processing on the first image to obtain edge detection points of the first image; perform line extraction processing on the edge detection points using a line detection algorithm to obtain one or more lines corresponding to the first image; and determine the first projection direction of the cleaning guidance direction in the designated coordinate system based on the extension direction of the one or more lines.

[0085] In an exemplary embodiment, the determining module 42 is further configured to perform denoising processing on the first image to obtain a denoised first image; and to perform edge detection processing on the denoised first image to obtain edge detection points of the first image.

[0086] We can first perform edge detection processing on the first image to obtain a series of edge detection points. For example, we can perform edge detection processing based on pixel gradients and extract the pixel with the largest pixel gradient as the edge detection point. The edge detection algorithm used here is not limited.

[0087] Optionally, the first image can be denoised first to obtain a denoised first image; then, edge detection processing can be performed on the denoised first image to obtain edge detection points. Due to the influence of the external environment and the characteristics of the image acquisition device itself, the original image acquired by the image acquisition device usually contains a lot of noise, which affects the accuracy of edge detection and line extraction, thus leading to deviations in the detection results. Accordingly, before performing edge detection processing, the first image can be denoised first to obtain more accurate edge detection points. The image denoising algorithm used for denoising is not limited here.

[0088] Optionally, the determining module 42 is further configured to determine the line with the most edge detection points among the one or more lines as the target line; and determine the first projection direction of the cleaning guidance direction in the specified coordinate system based on the extension direction of the target line.

[0089] Optionally, the determining module 42 is further configured to classify the lines among the one or more lines whose extension direction angle is less than a specified angle threshold as a class, thereby obtaining multiple line classes; count the number of edge detection points contained in each line class, and determine the line class with the most extracted edge detection points as the target line class; and determine the first projection direction of the cleaning guidance direction in the specified coordinate system based on the extension direction of the target line class.

[0090] Alternatively, the extension directions of each line can be statistically analyzed, and lines with an angle less than a specified angle threshold can be grouped into multiple line classes. The specified angle threshold can be a small value such as 5 degrees or 6 degrees. The number of edge detection points in each line class can be counted, and the line class with the most extracted edge detection points can be determined as the target line class. The extension direction of the target line is determined based on the extension directions within the target line class, and then the first projection direction of the cleaning guide direction in the specified coordinate system is determined based on the extension directions of the target line. For example, the average value of the extension directions within the target line class can be taken as the extension direction of the target line. This implementation method can further reduce the impact of small distortions in image acquisition on the extraction of the cleaning guide direction, and further improve the accuracy of the cleaning guide direction extraction.

[0091] In an exemplary embodiment, the determining module 42 is further configured to perform a spatial transformation on the first image to obtain a second image, wherein the spatial transformation is used to make the vertical coordinate axis of the image coordinate system of the second image parallel to the direction of gravity, and the second image is used to determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in the specified coordinate system. Through the above technical solution, the problem of inaccurate extraction of the cleaning guidance direction due to the incorrect position of the specified image acquisition component or the tilt of the operating ground can be avoided.

[0092] In an exemplary embodiment, the determining module 42 is further configured to obtain the cleanliness level of the completed work area; to designate areas with a cleanliness level less than a preset threshold as areas to be cleaned; and, if the area to be cleaned is greater than a specified area threshold, to determine the first projection direction of the cleaning guidance direction of the space area where the cleaning equipment is located in a specified coordinate system.

[0093] In an exemplary embodiment, the cleanliness level of the completed work area of ​​the cleaning device can be obtained by first scanning the image of the completed work area with a target device within the spatial area, wherein the target device has image recognition capability. The cleaning device can obtain the cleanliness level of the completed work area, designate areas with a cleanliness level less than a preset threshold as areas to be cleaned, and determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning device is located in a specified coordinate system when the area to be cleaned is larger than a specified area threshold.

[0094] During the operation of the cleaning equipment, areas that have already been cleaned may still contain uncleaned areas. The cleaning equipment can scan the cleaned areas using a target device to determine the cleanliness level. If the cleanliness level is less than a preset threshold, this area can be designated as a cleaning zone. The cleaning equipment can then proceed to clean this area. If the area to be cleaned is larger than a specified area threshold, the cleaning equipment can adjust its cleaning direction based on the cleaning guidelines of the surrounding space. It can also plan a "bow"-shaped path based on these guidelines to ensure comprehensive coverage of the area and make the cleaning path more consistent with the spatial distribution, reducing the possibility of collisions during cleaning and improving the user experience.

[0095] Optionally, the determining module 42 is further configured to perform image scanning on the area already cleaned by the cleaning equipment through the target device within the spatial area to determine the cleanliness level of the cleaned area, and then, if the cleanliness level is greater than a preset threshold, send a prompt message to the mobile terminal of the target object, wherein the prompt message is used to prompt the target object whether it needs to determine the first projection direction of the cleaning guide direction of the spatial area where the cleaning equipment is located in a specified coordinate system; and upon receiving a confirmation instruction corresponding to the prompt message, determine the first projection direction of the cleaning guide direction of the spatial area where the cleaning equipment is located in the first coordinate system specified in the first coordinate system.

[0096] Understandably, after the cleaning equipment completes its work, the user can judge whether it has met the preset requirements or failed to meet the homeowner's needs. If the homeowner needs to formally entertain guests, they may require a cleaner floor than usual, and a single cleaning by the equipment may not be sufficient. Therefore, to provide a better user experience, after cleaning, the cleaning equipment will send a prompt message to the homeowner's mobile device, asking the homeowner to confirm whether to clean again. If the homeowner confirms to clean again, the projection direction will be determined once more.

[0097] The above solution enables the system to receive user instructions to clean a specific area again when the user has special needs, such as the need to clean that area once more.

[0098] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0099] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0100] S1, determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in the specified coordinate system; wherein, the cleaning guidance direction is determined based on the information collected by the specified image acquisition component for the area boundary of the spatial area, the specified image acquisition component is deployed on the cleaning equipment, the angle between the acquisition direction and the gravity direction is less than a preset angle, and the acquisition direction is upward;

[0101] S2, Obtain the second projection direction of the cleaning equipment orientation in the specified coordinate system;

[0102] S3, based on the angular deviation between the first projection direction and the second projection direction, adjust the cleaning direction of the cleaning device.

[0103] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0104] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0105] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0106] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0107] S1, determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in the specified coordinate system; wherein, the cleaning guidance direction is determined based on the information collected by the specified image acquisition component for the area boundary of the spatial area, the specified image acquisition component is deployed on the cleaning equipment, the angle between the acquisition direction and the gravity direction is less than a preset angle, and the acquisition direction is upward;

[0108] S2, Obtain the second projection direction of the cleaning equipment orientation in the specified coordinate system;

[0109] S3, based on the angular deviation between the first projection direction and the second projection direction, adjust the cleaning direction of the cleaning device.

[0110] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0111] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0112] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0113] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for adjusting the cleaning direction, characterized in that, include: The first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in a specified coordinate system is determined; wherein, the cleaning guidance direction is determined based on the information collected by a specified image acquisition component for the area boundary of the spatial area; the specified image acquisition component is deployed on the cleaning equipment, the angle between the acquisition direction and the gravity direction is less than a preset angle, and the acquisition direction is upward; Obtain the second projection direction of the cleaning equipment's orientation in the specified coordinate system; The cleaning direction of the cleaning device is adjusted based on the angular deviation between the first projection direction and the second projection direction.

2. The method according to claim 1, characterized in that, Determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in the specified coordinate system, including: Acquire a first image obtained by the specified image acquisition component acquiring an image of the region boundary of the spatial area; Edge detection processing is performed on the first image to obtain the edge detection points of the first image; The edge detection points are processed by a line detection algorithm to extract lines, thereby obtaining one or more lines corresponding to the first image. The first projection direction of the cleaning guide direction in the specified coordinate system is determined based on the extension direction of the one or more straight lines.

3. The method according to claim 2, characterized in that, Edge detection processing is performed on the first image to obtain edge detection points of the first image, including: The first image is denoised to obtain a denoised first image; Edge detection processing is performed on the first image after denoising to obtain the edge detection points of the first image.

4. The method according to claim 2, characterized in that, Determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the direction of one or more straight lines includes: The line with the most edge detection points among the one or more straight lines is determined as the target line; The first projection direction of the cleaning guide direction in the specified coordinate system is determined based on the extension direction of the target straight line.

5. The method according to claim 2, characterized in that, Determining the first projection direction of the cleaning guidance direction in the specified coordinate system based on the direction of one or more straight lines includes: Among the one or more straight lines, those whose extension direction angle is less than a specified angle threshold are classified into one category, resulting in multiple straight line categories; The number of edge detection points contained in each line class is counted, and the line class with the most extracted edge detection points is determined as the target line class; The first projection direction of the cleaning guidance direction in the specified coordinate system is determined based on the extension direction of the target straight line class.

6. The method according to claim 1, characterized in that, The method further includes: Determine the cleanliness level of the completed work area; Areas with a cleanliness level below a preset threshold are designated as areas to be cleaned. If the area to be cleaned is larger than a specified area threshold, the first projection direction of the cleaning guide direction of the space where the cleaning equipment is located is determined in the specified coordinate system.

7. The method according to claim 2, characterized in that, The method further includes: A spatial transformation is performed on the first image to obtain a second image, wherein the spatial transformation is used to make the vertical coordinate axis of the image coordinate system of the second image parallel to the direction of gravity, and the second image is used to determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in the specified coordinate system.

8. The method according to claim 1, characterized in that, Adjusting the cleaning direction of the cleaning device based on the angular deviation between the first projection direction and the second projection direction includes: The minimum value of each angle between the first projection direction and the second projection direction is selected, and the minimum value of each angle is taken as the angle deviation. Based on the angular deviation, the orientation of the cleaning equipment is adjusted to the first projection direction corresponding to the minimum value of each included angle.

9. The method according to claim 1, characterized in that, After determining the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in the specified coordinate system, the method further includes: When it is determined that the cleaning equipment is targeting a specified obstacle with a size larger than a preset size value along its edge, the cleaning direction along the edge of the cleaning equipment is adjusted based on the first projection direction and the boundary extension direction of the specified obstacle.

10. A cleaning direction adjustment device, characterized in that, include: A determining module is used to determine the first projection direction of the cleaning guidance direction of the spatial area where the cleaning equipment is located in a specified coordinate system; wherein, the cleaning guidance direction is determined based on the information collected by a specified image acquisition component for the area boundary of the spatial area; the specified image acquisition component is deployed on the cleaning equipment, the angle between the acquisition direction and the gravity direction is less than a preset angle, and the acquisition direction is upward; The acquisition module is used to acquire the second projection direction of the cleaning equipment orientation in the specified coordinate system; The adjustment module is used to adjust the cleaning direction of the cleaning device based on the angular deviation between the first projection direction and the second projection direction.

11. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 9 when it is run.

12. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 9.