A method and apparatus for cleaning a bathroom

By using image processing and resampling technology in bathroom cleaning devices, stain information can be identified for partial cleaning, solving the problem of excessively long cleaning times in traditional bathrooms and improving the usage rate and experience of bathrooms.

CN117036471BActive Publication Date: 2026-06-05BEIJING CHENPUHAO NEW TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING CHENPUHAO NEW TECH CO LTD
Filing Date
2023-07-04
Publication Date
2026-06-05

Smart Images

  • Figure CN117036471B_ABST
    Figure CN117036471B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of artificial intelligence, and provides a bathroom cleaning method and device, which are used for reducing the time consumption of bathroom cleaning, thereby improving the use rate and use experience of the bathroom. The method comprises the following steps: capturing a first image of a bathroom to be cleaned; determining P first coordinate points in the first image and P second coordinate points in a reference image of the bathroom according to preset P image control information, wherein P is a positive integer; calculating P alignment data corresponding to the P image control information respectively according to the P first coordinate points and the P second coordinate points; performing resampling on the first image according to the P alignment data to obtain a second image; determining stain information in the bathroom according to the reference image and the second image; and performing partial cleaning on the bathroom according to the stain information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a bathroom cleaning method and apparatus. Background Technology

[0002] Bathroom cleaning is a physically demanding job. In recent years, with the maturity and widespread adoption of artificial intelligence (AI) technology, the method of using bathroom cleaning devices (such as robots) to replace manual labor for bathroom cleaning has gradually become more mature.

[0003] In current bathroom cleaning processes, bathroom cleaning devices often rely on pre-set programs to perform a high-standard thorough cleaning (i.e., executing each cleaning step) within a specified time, thereby ensuring the quality of bathroom cleaning. However, the excessive time required to complete a full thorough cleaning leads to reduced bathroom usage and a lower user experience. Summary of the Invention

[0004] This application provides a bathroom cleaning method and apparatus to reduce the time spent on bathroom cleaning, thereby increasing the utilization rate of the bathroom and improving the user experience.

[0005] Firstly, this application also provides a bathroom cleaning method, the method comprising:

[0006] A bathroom cleaning device captures a first image of the bathroom to be cleaned; the device determines P first coordinate points in the first image and P second coordinate points in a reference image of the bathroom based on P preset image control information, where P is a positive integer; the device determines P alignment data corresponding to the P image control information based on the P first and P second coordinate points; the device resamples the first image based on the P alignment data to obtain a second image; the device determines stain information in the bathroom based on the reference and second images; and the device performs partial cleaning of the bathroom based on the stain information.

[0007] This device, used for bathroom cleaning, can calculate the stain information of the bathroom to be cleaned, thus performing targeted cleaning on a portion of the bathroom's total area. Therefore, without compromising cleaning standards, the total area requiring cleaning can be reduced, cleaning time can be decreased, bathroom usage can be increased, and the user experience can be improved. Furthermore, because the image distortion of the bathroom is minimal, it does not require determining pose and position data; resampling can be achieved based on only P alignment data points, thereby improving resampling efficiency.

[0008] In one possible design, the bathroom cleaning device uses a bilinear interpolation algorithm to calculate the offset value of a third coordinate point based on P alignment data; the third coordinate point is any coordinate point in the first image; based on the offset value of each coordinate point in the first image, the first image is resampled to obtain a second image.

[0009] Using this design, the bathroom cleaning device can determine the offset value of each coordinate point based on the alignment data, thereby making the second image obtained by resampling more accurate and thus improving the accuracy of stain information.

[0010] In one possible design, stain information includes the coordinates of the stain and the area of ​​the stain, which is smaller than the area of ​​the bathroom.

[0011] In one possible design, the bathroom cleaning device acquires a first preset threshold, which is used to indicate the maximum value of the correlation coefficient set by the user; the bathroom cleaning device divides the second image into N*M cleaning spaces; based on the reference image and the second image of the bathroom, it determines N*M correlation coefficients corresponding to the N*M cleaning spaces; based on the N*M correlation coefficients and the first preset threshold, it determines the coordinate position of the stain as the set of coordinate positions of Q cleaning spaces, and determines the area of ​​the stain as the total area of ​​the Q cleaning spaces, where Q < N*M.

[0012] With this design, the bathroom cleaning device can divide the second image into multiple cleaning spaces and calculate the correlation coefficient for each cleaning space, thereby making the location coordinates and area of ​​the stains more accurate and improving the efficiency of bathroom cleaning.

[0013] In one possible design, the bathroom cleaning device acquires a second preset threshold, which is used to indicate the area set by the user to trigger a full cleaning; when the area of ​​the stain is greater than the second preset threshold, the bathroom cleaning device performs a full cleaning of the bathroom.

[0014] With this design, the bathroom cleaning device can trigger a thorough cleaning of the bathroom in specific scenarios, preventing inadequate cleaning and improving the user experience.

[0015] In one possible design, the alignment data is the correlation coefficient.

[0016] With this design, the alignment data determined by the bathroom cleaning device is more accurate, which makes the resampling of the first image more accurate and improves the efficiency of bathroom cleaning.

[0017] In one possible design, the reference image and the first image are rectangles. When P=4, the four image control information correspond to the coordinates of the four corners of the reference image and the four corners of the first image.

[0018] Secondly, this application provides a bathroom cleaning device, which includes a camera, an image processing module, a cleaning module, and a communication module, wherein:

[0019] A camera is used to capture a first image of the bathroom to be cleaned. An image processing module is used to determine P first coordinate points in the first image and P second coordinate points in a reference image of the bathroom, where P is a positive integer, based on P preset image control information. This image processing module is also used to: determine P alignment data corresponding to the P image control information based on the P first coordinate points and the P second coordinate points; this image processing module is also used to: resample the first image based on the P alignment data to obtain a second image; this image processing module is also used to: determine stain information in the bathroom based on the reference image and the second image; a cleaning module is used to partially clean the bathroom based on the stain information; and a communication module is used to receive and send data. In one possible design, the image processing module specifically uses: a bilinear interpolation algorithm to calculate the offset value of a third coordinate point based on the P alignment data; the third coordinate point is any coordinate point in the first image; and resamples the first image based on the offset value of each coordinate point in the first image to obtain the second image. In one possible design, stain information includes the coordinates of the stain and the area of ​​the stain, which is smaller than the area of ​​the bathroom.

[0020] In one possible design, the communication module is specifically used to: acquire a first preset threshold, which indicates the maximum value of the correlation coefficient set by the user; the image processing module is specifically used to: divide the second image into N*M cleaning spaces; determine N*M correlation coefficients corresponding to the N*M cleaning spaces based on the reference image and the second image of the bathroom; determine the coordinate position of the stain as a set of coordinate positions of Q cleaning spaces based on the N*M correlation coefficients and the first preset threshold, and determine the area of ​​the stain as the total area of ​​the Q cleaning spaces, where Q < N*M. In one possible design, the communication module is specifically used to: acquire a second preset threshold, which indicates the area set by the user to trigger full cleaning; the cleaning module is also used to: perform full cleaning of the bathroom when the area of ​​the stain is greater than the second preset threshold. In one possible design, the alignment data is the correlation coefficient. In one possible design, the reference image and the first image are rectangles, and when P = 4, the four image control information correspond to the coordinate points of the four corners of the reference image and the four corners of the first image.

[0021] Thirdly, this application also provides a bathroom cleaning device, which includes a processing module and a communication module. The processing module is used to capture a first image of the bathroom to be cleaned; determine P alignment data corresponding to P image control information based on a reference image and the first image, where P is a positive integer; each image control information corresponds to a coordinate point in the reference image and a coordinate point in the first image; resample the first image based on the P alignment data to obtain a second image; determine stain information in the bathroom based on the reference image and the second image; the communication module is used to receive and transmit data.

[0022] In one possible design, the processing module is specifically used to: use a bilinear interpolation algorithm to calculate the offset value of a third coordinate point based on P alignment data; the third coordinate point is any coordinate point in the first image; and resample the first image based on the offset value of each coordinate point in the first image to obtain a second image.

[0023] In one possible design, stain information includes the coordinates of the stain and the area of ​​the stain, which is smaller than the area of ​​the bathroom.

[0024] In one possible design, the communication module is specifically used to: obtain a first preset threshold, which is used to indicate the maximum value of the correlation coefficient set by the user; the processing module is specifically used to: divide the second image into N*M cleaning spaces; determine N*M correlation coefficients corresponding to the N*M cleaning spaces based on the reference image of the bathroom and the second image; determine the coordinate position of the stain as a set of coordinate positions of Q cleaning spaces based on the N*M correlation coefficients and the first preset threshold, and determine the area of ​​the stain as the total area of ​​the Q cleaning spaces, where Q < N*M.

[0025] In one possible design, the communication module is specifically used to: acquire a second preset threshold, which is used to indicate the area set by the user to trigger a full cleaning; the processing module is also used to: perform a full cleaning of the bathroom when the area of ​​the stain is greater than the second preset threshold.

[0026] In one possible design, the alignment data is the correlation coefficient.

[0027] In one possible design, the reference image and the first image are rectangles. When P=4, the four image control information correspond to the coordinates of the four corners of the reference image and the four corners of the first image.

[0028] Fourthly, this application also provides an electronic device including a processor for executing a computer program stored in a memory to perform the steps performed by the bathroom cleaning device as described in the first aspect above and any possible design thereof.

[0029] Fifthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the bathroom cleaning device as described in the first aspect above and any possible design thereof.

[0030] In a sixth aspect, this application also provides a computer program product comprising a computer program that, when executed by a processor, performs the steps performed by the bathroom cleaning device as described in the first aspect and any possible design thereof.

[0031] Furthermore, the technical effects brought about by the second to sixth aspects can be found in the description of the first aspect above, and will not be repeated here. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a schematic diagram of the structure of a bathroom cleaning device provided in an embodiment of this application;

[0034] Figure 2 A schematic flowchart illustrating a bathroom cleaning method provided in an embodiment of this application;

[0035] Figure 3 An example diagram of image control information provided in an embodiment of this application;

[0036] Figure 4a An example diagram of a correlation coefficient provided for an embodiment of this application;

[0037] Figure 4b An example diagram of a bathroom stain provided in an embodiment of this application;

[0038] Figure 5 An example diagram of a bathroom cleaning process provided in this application embodiment;

[0039] Figure 6 A schematic diagram of a modular structure of a bathroom cleaning device provided in an embodiment of this application;

[0040] Figure 7 This is a schematic diagram of another bathroom cleaning device provided in an embodiment of this application. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.

[0042] This application provides a traditional bathroom cleaning robot comprising a control module and a cleaning module. During bathroom cleaning, under the control of the control module, the cleaning module executes all the pre-set cleaning steps. In a practical application scenario, assuming a bathroom contains 10 fixtures, and the cleaning robot takes approximately 10 minutes to complete one cleaning cycle, cleaning the entire bathroom would take 1 hour and 40 minutes. This excessive cleaning time significantly impacts bathroom usage. Furthermore, assuming the cleaning robot cleans the bathroom every three hours, and the peak usage period for the bathroom is 9 hours per day, then bathroom usage is affected for 5 hours per day. Therefore, it is evident that traditional bathroom cleaning robots consume excessive time and power during each cleaning cycle, severely reducing the user experience in the bathroom.

[0043] This application provides a bathroom cleaning device to reduce the time spent on bathroom cleaning, thereby increasing the utilization rate of the bathroom and improving the user experience.

[0044] The following is based on Figure 1 Taking a bathroom cleaning device 100 as an example, its structure is described below. The bathroom cleaning device 100 includes a camera 110, an image processing module 120, a cleaning module 130, and a communication module 140. The camera 110 can send captured images to the image processing module 120 and also receive shooting instructions from the image processing module 120; the image processing module 120 can receive and send data through the communication module 140; the image processing module 120 can send data to the cleaning module 130 or receive cleaning responses from the cleaning module 130. It should be understood that this bathroom cleaning device can be part of a bathroom cleaning robot, or the bathroom cleaning device can be a bathroom cleaning robot itself.

[0045] Optionally, the camera 110 corresponding to the bathroom cleaning device 100 can be installed on the robotic arm of the bathroom cleaning robot; the image processing module 120 corresponding to the bathroom cleaning device 100 can store one or more computer programs to complete the preset algorithm; the cleaning module 130 can refer to the configuration of traditional cleaning tools, and this application does not impose any restrictions; the communication module 140 can realize the interaction between the user and the bathroom cleaning device.

[0046] The bathroom cleaning method provided in the embodiments of this application will be described below with reference to the accompanying drawings. Figure 2 A bathroom cleaning method provided in this application embodiment may include the following steps:

[0047] S201: The bathroom cleaning device captures a first image of the bathroom to be cleaned. It should be understood that step S201 can be implemented using the aforementioned camera 110. For example, the bathroom cleaning device can use a camera on the robotic arm of a cleaning robot to capture a first image of the bathroom to be cleaned.

[0048] Optionally, the methods for triggering the bathroom cleaning device to capture the first image include, but are not limited to, the following three:

[0049] Method 1: The bathroom cleaning device can take the first image at preset time points. For example, the bathroom cleaning device can take the first image at 10:00 AM, 3:00 PM, and 8:00 PM every day.

[0050] Method 2: The bathroom cleaning device can take the first image after a preset fixed time period following the last cleaning. For example, assuming the last cleaning time was 9:00 AM and the preset fixed time period is three hours, the bathroom cleaning device will take the first image at exactly 12:00 PM.

[0051] Method 3: The camera 110 of the bathroom cleaning device can capture a first image after receiving a shooting command from the image processing module 120. For example, if the image processing module 120 detects that the first image does not meet preset conditions, it sends a shooting command to the camera 110 to re-capture and update the first image. Alternatively, after receiving a shooting command through the communication module 104, the image processing module 120 forwards the shooting command to the camera 110 to capture the first image.

[0052] By employing the aforementioned methods, bathroom cleaning devices can stagger the time for bathroom cleaning from the working hours of bathroom users, thereby increasing the utilization rate of the bathroom.

[0053] In one possible design, the bathroom cleaning device can also capture a reference image of the bathroom.

[0054] Optionally, the first image may be captured at the same time as the reference image. For example, the bathroom cleaning device may capture the reference image before performing the action shown in step S201.

[0055] Optionally, the bathroom cleaning device can also perform a thorough cleaning of the bathroom before taking the reference image. This ensures the bathroom is in optimal cleanliness, resulting in a more accurate reference image.

[0056] Optionally, the first image is taken from the same location as the reference image.

[0057] S202: The bathroom cleaning device determines P alignment data points based on P first coordinate points in the first image and P second coordinate points in the reference image of the bathroom, where P is a positive integer. It should be understood that step S202 can be implemented by the aforementioned image processing module 120.

[0058] Optionally, the alignment data is Spearman correlation coefficient (or simply correlation coefficient).

[0059] Optionally, the bathroom cleaning device can determine the aforementioned P first coordinate points and P second coordinate points based on P preset image control information (or image control points). For example, the image control information can be reference points selected in advance based on image information.

[0060] For example, for any one of the P image control information, the bathroom cleaning device can perform the following steps one and two:

[0061] Step 1: The bathroom cleaning device determines the coordinate point A{x1, y1} in the reference image corresponding to the image control information; the bathroom cleaning device determines the coordinate point B{x2, y2} in the first image corresponding to the image control information. It should be understood that coordinate point A is any one of the aforementioned P second coordinate points, and coordinate point B is any one of the aforementioned P first coordinate points.

[0062] Step 2: The bathroom cleaning device determines the correlation coefficient corresponding to the image control information based on coordinate points A and B.

[0063] The formula for calculating the correlation coefficient is:

[0064]

[0065] Wherein, the Greek letter ρ represents the correlation coefficient, cov(X,Y) is the covariance of X and Y, D(X) is the variance of X, and D(Y) is the variance of Y.

[0066] It should be understood that the correlation coefficient can be used to evaluate the correlation between two statistical variables. That is, the higher the correlation coefficient, the stronger the correlation between coordinate point A and coordinate point B, and vice versa.

[0067] Accordingly, the bathroom cleaning device can perform the aforementioned steps one and two for each of the P image control information to determine P alignment data.

[0068] In one possible design, the reference image and the first image are rectangles. When P=4, the four image control information correspond to the coordinates of the four corners of the reference image and the four corners of the first image.

[0069] like Figure 3 As shown, (1) is an example of a reference image, and (2) is an example of a captured image; the four image control information correspond to coordinate points 1-1, 1-2, 1-3 and 1-4 in (1), and coordinate points 2-1, 2-2, 2-3 and 2-4 in (2); among them, coordinate point 1-1 and coordinate point 2-1 form a set of image control information, coordinate point 1-2 and coordinate point 2-2 form a set of image control information, coordinate point 1-3 and coordinate point 2-3 form a set of image control information, and coordinate point 1-4 and coordinate point 2-4 form a set of image control information.

[0070] It should be noted that the larger the value of P, the more image control information is available, and the more alignment data is obtained, resulting in a more accurate resampling result for the first image.

[0071] In one possible design, before performing the action shown in step S202, the bathroom cleaning device may also perform image enhancement and filtering on the first image, and use the processed image for subsequent operations.

[0072] S203: The bathroom cleaning device resamples the first image based on P alignment data to obtain a second image. It should be understood that step S203 can be implemented by the aforementioned image processing module 120.

[0073] Optionally, the resampling method can be any of the following: nearest neighbor interpolation, bilinear interpolation, and bicubic interpolation; this application does not limit the method.

[0074] In one possible design, the bathroom cleaning device employs a bilinear interpolation algorithm to calculate the offset value of a third coordinate point based on P alignment data. The third coordinate point can be any coordinate point in the first image. The bathroom cleaning device resamples the first image based on the offset value of each coordinate point in the first image to obtain a second image. It should be understood that the set of third coordinate points may include the aforementioned P first coordinate points, and this application does not limit this.

[0075] For example, the bathroom cleaning device calculates the alignment data of each coordinate point in the first image based on the aforementioned P alignment data; the bathroom cleaning device resamples the first image using bilinear interpolation based on the alignment data of each coordinate point in the first image to obtain the second image.

[0076] By employing the actions described in steps S202 and S203, the bathroom cleaning device can resample the acquired first image to obtain a second image, thereby achieving the purpose of aligning the image and correcting image distortion, and correcting the imaging difference between the first image and the reference image caused by positioning and posture errors during the shooting process.

[0077] S204: The bathroom cleaning device determines stain information in the bathroom based on the reference image and the second image. It should be understood that step S204 can be implemented by the aforementioned image processing module 120.

[0078] In one possible design, stain information includes the coordinates of the stain and the area of ​​the stain, which is smaller than the area of ​​the bathroom.

[0079] Optionally, the bathroom cleaning device acquires a first preset threshold, which is used to indicate the maximum value of the correlation coefficient set by the user.

[0080] For example, the bathroom cleaning device can interact with the user through the communication module 140 to obtain a first preset threshold; the communication module 140 can also forward the first preset threshold to the image processing module 120.

[0081] Optionally, the bathroom cleaning device divides the second image into N*M cleaning spaces; the bathroom cleaning device determines N*M correlation coefficients corresponding to the N*M cleaning spaces based on the reference image and the second image of the bathroom; the bathroom cleaning device determines the coordinate position of the stain as a set of coordinate positions of Q cleaning spaces based on the N*M correlation coefficients and a first preset threshold, and determines the area of ​​the stain as the total area of ​​the Q cleaning spaces, where Q < N*M.

[0082] For example, assuming M=N=32, the bathroom cleaning device divides the second image into 32*32 cleaning spaces; the bathroom cleaning device can also divide the reference image into 32*32 reference spaces; for each cleaning space, the bathroom cleaning device determines the correlation coefficient of that cleaning space based on that cleaning space and its corresponding reference space, such as... Figure 4a As shown, the correlation coefficient for each cleaning space is calculated using the aforementioned method; the bathroom cleaning device performs binarization segmentation on the Q correlation coefficients. Assuming the first preset threshold is 0.5, the bathroom cleaning device can determine Q ( Figure 4a The study identified 25 clean spaces with a correlation coefficient less than 0.5, and statistically determined the set of coordinates of these Q clean spaces, representing the location coordinates of the stains. Figure 4b The location coordinates of the shaded area shown); the bathroom cleaning device can also calculate the total area of ​​Q cleaning spaces, which is the area of ​​the stain ( Figure 4b (The area of ​​the shaded region shown).

[0083] S205: The bathroom cleaning device performs partial cleaning of the bathroom based on the stain information. It should be understood that step S205 can be achieved through the aforementioned cleaning module 130.

[0084] Optionally, after completing a partial cleaning, the bathroom cleaning device can send a response message indicating that the cleaning task has been partially completed.

[0085] For example, after completing part of the cleaning, the cleaning module 130 in the bathroom cleaning device can send a response message to the image processing module 120; correspondingly, the image processing module 120 in the bathroom cleaning device can interact with the user and forward the response message.

[0086] In one possible design, the bathroom cleaning device triggers a full cleaning of the bathroom when the area of ​​the stain meets a certain preset condition.

[0087] Optionally, the bathroom cleaning device can send a response message indicating that the cleaning task has been completed after a thorough cleaning is finished.

[0088] Optionally, the methods for triggering a full cleaning provided in this application embodiment include, but are not limited to, the following two:

[0089] Method A: The bathroom cleaning device obtains a second preset threshold, which is used to indicate the area set by the user to trigger a full cleaning; when the area of ​​the stain is greater than the second preset threshold, the bathroom cleaning device performs a full cleaning of the bathroom.

[0090] For example, assuming the second preset threshold is 1.5 square meters, when the area of ​​the stain is greater than 1.5 square meters, the bathroom cleaning device will perform a comprehensive cleaning of the bathroom.

[0091] Method B: The bathroom cleaning device obtains a third preset threshold, which is used to indicate the area ratio set by the user to trigger a full cleaning; when the area of ​​the stain accounts for more than the proportion of the total area of ​​the bathroom, the bathroom cleaning device performs a full cleaning of the bathroom.

[0092] For example, assuming the third preset threshold is 20%, when the total area of ​​the bathroom is 8 square meters and the area of ​​the stain is 2 square meters, the area of ​​the stain accounts for 25% of the total area of ​​the bathroom, and the bathroom cleaning device performs a comprehensive cleaning of the bathroom.

[0093] Using the aforementioned bathroom cleaning method, the bathroom cleaning device can calculate the stain information of the bathroom to be cleaned, thereby performing targeted partial cleaning. Since the stained area is only a small portion of the bathroom for most of the time after a full cleaning, the aforementioned method can reduce the total area to be cleaned without lowering the cleaning standards, thus reducing the time spent on bathroom cleaning, increasing the utilization rate of the bathroom, and improving the user experience.

[0094] based on Figure 2 The present application also provides an example diagram of bathroom cleaning, in conjunction with the embodiments shown. Figure 5 This example describes the steps involved in bathroom cleaning:

[0095] Step 1: Take an image A of the bathroom to be cleaned using a camera. The actions shown in Step 1 can be referred to in the aforementioned Step S201, and will not be repeated here.

[0096] Step 2: Perform image enhancement and filtering on image A.

[0097] Step 3: Calculate multiple alignment data based on the reference image of the bathroom and the processed image A. The actions shown in Steps 2 and 3 can be referred to in the aforementioned Step S202, and will not be repeated here.

[0098] Step 4: Resample image A based on multiple alignment data to obtain image B. The actions shown in step 4 can be referred to in step S203 above, and will not be repeated here.

[0099] Step 5: Divide image B into multiple cleaning spaces; calculate the correlation coefficient for each cleaning space based on the reference image of the bathroom and image B.

[0100] Step 6: Determine the correlation coefficient matrix based on the correlation coefficients of each of the aforementioned clean spaces.

[0101] Step 7: Perform binarization segmentation based on the correlation coefficient threshold and the correlation coefficient matrix to determine the set of clean spaces included in the stain. It should be understood that the correlation coefficient threshold is the first preset threshold in step S204 above.

[0102] Step 8: Determine the location and area of ​​the stain based on the stain. The actions shown in steps 5 to 8 can be referred to in step S204 above, and will not be repeated here.

[0103] Based on the same concept as the above-described authentication method, this application also provides another bathroom cleaning device for implementing the above-described method performed by the bathroom cleaning device.

[0104] Figure 6 The diagram shown is a modular structure schematic of a bathroom cleaning device provided in an embodiment of this application.

[0105] The processing module 601 can be used to execute the actions shown in S201 to S205 and other processing actions of the bathroom cleaning device described in this application, while the communication module 602 can be used to receive and send data and other communication actions of the bathroom cleaning device described in this application. The specific actions and functions performed will not be detailed here, but can be referred to the description in the foregoing method embodiment section.

[0106] Figure 7 A schematic diagram of the structure of a bathroom cleaning device provided in an embodiment of this application is shown.

[0107] The electronic device in this embodiment may include a processor 701. The processor 701 is the control center of the bathroom cleaning device, and can connect to various parts of the device via various interfaces and lines. It executes instructions stored in a memory 702 and retrieves data stored in the memory 702. Optionally, the processor 701 may include one or more processing units. The processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip; in some embodiments, they may be implemented separately on independent chips.

[0108] The processor 701 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps performed by the bathroom cleaning device disclosed in the embodiments of this application can be directly executed by the hardware processor, or executed by a combination of hardware and software modules within the processor.

[0109] In this embodiment of the application, the memory 702 stores instructions that can be executed by at least one processor 701. By executing the instructions stored in the memory 702, the at least one processor 701 can be used to perform the aforementioned communication process performed by the bathroom cleaning device.

[0110] Memory 702, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 702 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 702 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 702 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0111] In this embodiment, the network device may further include a communication interface 703 through which the bathroom cleaning device can transmit data. For example, if the bathroom cleaning device is a server, the communication interface 703 can be used to obtain information about multiple container network interface (CNI) plugins configured by the user.

[0112] Optional, can be made by Figure 7 The processor 701 (or processor 701 and memory 702) shown implements Figure 6The communication module 602 shown, and / or, is implemented by the communication interface 703. Figure 6 The processing module 601 shown.

[0113] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium that can store instructions, which, when executed on a computer, cause the computer to perform the operation steps provided in the above-described method embodiments. This computer-readable storage medium may be... Figure 7 The memory 702 shown.

[0114] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0115] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0116] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0117] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.

[0118] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A bathroom cleaning method, characterized in that, The method includes: Take the first image of the bathroom to be cleaned; Based on P preset image control information, P first coordinate points in the first image and P second coordinate points in the reference image of the bathroom are determined, where P is a positive integer; the reference image is an image of the bathroom in a clean state. Based on the P first coordinate points and the P second coordinate points, calculate the P alignment data corresponding to the P image control information; wherein, the alignment data is a correlation coefficient used to evaluate the correlation between two statistical variables; Based on the P alignment data, the first image is resampled to obtain the second image; A first preset threshold is obtained through user interaction, and the first preset threshold is used to indicate the maximum value of the correlation coefficient set by the user; Divide the second image into N M clean spaces; Based on the reference image of the bathroom and the second image, determine the N. N corresponding to M clean spaces M correlation coefficients; According to the N Based on M correlation coefficients and the first preset threshold, the coordinate positions of the stain in the bathroom are determined to be the set of coordinate positions of Q cleaning spaces, and the area of ​​the stain is determined to be the total area of ​​the Q cleaning spaces, where Q < N. M; Based on the stain information corresponding to the bathroom fixtures, the bathroom fixtures are partially cleaned; the stain information includes the coordinates of the stain and the area of ​​the stain, and the area of ​​the stain is smaller than the area of ​​the bathroom fixtures. The step of resampling the first image based on the P alignment data to obtain the second image includes: A bilinear interpolation algorithm is used to calculate the offset value of the third coordinate point based on the P alignment data; the third coordinate point is any coordinate point in the first image; The first image is resampled based on the offset value of each coordinate point in the first image to obtain the second image.

2. The method as described in claim 1, characterized in that, The method further includes: Obtain a second preset threshold, which is used to indicate the area set by the user to trigger full cleaning; When the area of ​​the stain is greater than the second preset threshold, the bathroom is thoroughly cleaned.

3. The method as described in claim 1 or 2, characterized in that, The reference image and the first image are rectangular. When P=4, the four image control information correspond to the coordinate points of the four corners of the reference image and the coordinate points of the four corners of the first image.

4. A bathroom cleaning device, characterized in that, The device includes: A camera used to capture the first image of the bathroom to be cleaned; The image processing module is used to determine P first coordinate points in the first image and P second coordinate points in the reference image of the bathroom, where P is a positive integer, based on P preset image control information; the reference image is an image of the bathroom in a clean state. The image processing module is further configured to: determine P alignment data corresponding to the P image control information based on the P first coordinate points and the P second coordinate points; wherein the alignment data is a correlation coefficient used to evaluate the correlation between two statistical variables; The image processing module is further configured to: resample the first image based on the P alignment data to obtain a second image; The communication module is used to receive and send data; The communication module is specifically used to: obtain a first preset threshold through user interaction, wherein the first preset threshold is used to indicate the maximum value of the correlation coefficient set by the user; The image processing module is further configured to: divide the second image into N M clean spaces; determine N based on the reference image of the bathroom and the second image. N corresponding to M clean spaces M correlation coefficients; based on the N Based on M correlation coefficients and the first preset threshold, the coordinate positions of the stain in the bathroom are determined to be the set of coordinate positions of Q cleaning spaces, and the area of ​​the stain is determined to be the total area of ​​the Q cleaning spaces, where Q < N. M; A cleaning module is used to partially clean the bathroom fixtures based on stain information corresponding to the fixtures; the stain information includes the coordinates of the stain and the area of ​​the stain, wherein the area of ​​the stain is smaller than the area of ​​the bathroom fixtures. Specifically, the image processing module is used to: calculate the offset value of a third coordinate point based on the P alignment data using a bilinear interpolation algorithm; the third coordinate point is any coordinate point in the first image; and resample the first image based on the offset value of each coordinate point in the first image to obtain a second image.

5. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method of any one of claims 1-3 according to the obtained program instructions.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-3.