WO2023165298A1 - Method and device for determining dirt level of cleaning device, and storage medium - Google Patents

Method and device for determining dirt level of cleaning device, and storage medium Download PDF

Info

Publication number
WO2023165298A1
WO2023165298A1 PCT/CN2023/074515 CN2023074515W WO2023165298A1 WO 2023165298 A1 WO2023165298 A1 WO 2023165298A1 CN 2023074515 W CN2023074515 W CN 2023074515W WO 2023165298 A1 WO2023165298 A1 WO 2023165298A1
Authority
WO
WIPO (PCT)
Prior art keywords
cleaning
area
sub
degree
dirt
Prior art date
Application number
PCT/CN2023/074515
Other languages
French (fr)
Chinese (zh)
Inventor
王文光
郁顺昌
杨盛
Original Assignee
追觅创新科技(苏州)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 追觅创新科技(苏州)有限公司 filed Critical 追觅创新科技(苏州)有限公司
Publication of WO2023165298A1 publication Critical patent/WO2023165298A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Definitions

  • the present application belongs to the field of computer technology, and in particular relates to a method, device and storage medium for determining the degree of dirtiness of cleaning equipment.
  • the method for determining the degree of dirtiness of traditional cleaning equipment includes: comparing the ground environmental parameters of the ground before cleaning with the ground environmental parameters of the ground after cleaning to obtain the absolute value of the difference of the ground environmental parameters; comparing the absolute value with the reference value Compare them to get the detection result of the degree of dirt.
  • the difference value of the ground environment parameters can only indirectly reflect the degree of dirtiness of the cleaning equipment, but cannot directly detect the degree of dirtiness of the cleaning equipment.
  • the technical problems to be solved in this application include the problem that the dirt detection results obtained by traditional dirt detection methods cannot directly reflect the degree of dirt of the cleaning equipment, and the reliability of the obtained dirt detection results is not high.
  • the present application provides a method for determining the degree of dirtiness of cleaning equipment, including:
  • the degree of soiling of the cleaning device is determined based on the pixel values of each sub-area.
  • the cleaning member rotates around a central axis perpendicular to the surface to be cleaned rotate;
  • the region of the cleaning element is divided to obtain at least two sub-regions, including:
  • the area of the cleaning element is divided to obtain the at least two sub-areas.
  • the cleaning element has a circular shape as a whole, and correspondingly, the area of the cleaning element has a circular shape as a whole; the central axis passes through the center of the circle;
  • the area of the cleaning element is divided to obtain the at least two sub-areas, including:
  • the first sub-area is a circle whose radius is the product of the first division coefficient and R
  • the i-th sub-area is the outer circle whose radius is the product of the i-th division coefficient and R minus the radius of the i-1th division
  • the ring obtained by the inner circle of the product of the coefficient and R; the R is the radius of the cleaning part area; the i takes integers from 2 to n in turn, and the n is an integer greater than 1, and the nth division
  • the coefficient is 1.
  • the method further includes:
  • the data description value includes a high-order bit and a low-order bit, and both the high-order bit and the low-order bit are positively correlated with the degree of dirtiness, so
  • the high-order bits are used to describe the number of integer bits of the degree of dirtiness
  • the low-order bits are the first m digits of the integer bits, the low-order bits In the case where the integer is zero, it is the fractional part of the degree of contamination; the m is a positive integer;
  • the use of the data description value to compare different degrees of dirt includes:
  • the degree of dirtiness includes the degree of local dirtiness of different sub-regions; the use of the data description value to compare different degrees of dirtiness includes:
  • different subareas include the same subarea corresponding to different cleaning pieces on the cleaning device; and/or, different subareas corresponding to the same cleaning piece on the cleaning equipment.
  • the determining the degree of dirtiness of the cleaning device based on the pixel value of each sub-region includes:
  • the local dirty degree of each sub-region is determined based on the cumulative sum of pixel values to obtain the dirty degree of the cleaning device; the cumulative sum of pixel values is negatively correlated with the local dirty degree.
  • the method also includes:
  • the dirt level of the cleaning device includes the global dirt level and the local dirt level of each sub-area;
  • the cleaning effect of the cleaning device is determined.
  • the determining the cleaning piece area in the target image includes:
  • Foreground extraction is performed on the target image to obtain the area of the cleaning element.
  • the present application also provides a cleaning device, which includes: a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to realize the cleaning provided by the above aspect Method for determining the degree of soiling of equipment.
  • the present application also provides a computer-readable storage medium, which is characterized in that a program is stored in the storage medium, and when the program is executed by a processor, the method for determining the degree of dirtiness of the cleaning equipment provided in the above aspect is implemented .
  • the technical solution provided by the present application has at least the following advantages: by acquiring the target image of the cleaning piece on the cleaning device; determining the area of the cleaning piece in the target image; dividing the area of the cleaning piece into at least two sub-areas; based on each sub-area
  • the pixel value of the cleaning equipment determines the degree of dirtiness of the cleaning equipment; it can solve the dirt detection results obtained by the traditional dirt detection method, which cannot be directly reflected Reflecting the degree of dirt of the cleaning equipment, the reliability of the obtained dirt detection results is not high; since the target image of the cleaning parts can be collected, it is possible to directly detect the degree of dirt of the cleaning parts and improve the detection of the degree of dirt reliability of the results.
  • the central axis of the cleaning piece in the cleaning piece area is used as the In the center of the area, the division of the cleaning area can make the distribution of dirt in each sub-area basically consistent; it can avoid that when the distribution of dirt in the same sub-area is inconsistent, the degree of local dirt cannot accurately reflect the The problem of the degree of dirt at each position in the sub-region; the accuracy of the determined local degree of dirt can be improved.
  • the local dirty degree of the sub-region is calculated, since the target pixel is a pixel that meets the preset dirty conditions in the sub-region; therefore, it is possible to avoid The influence of pixels other than the target pixel on the degree of local dirt further improves the accuracy of determining the degree of local dirt.
  • the target image may include other interference areas in addition to the cleaning area
  • other interference areas can be eliminated. On the one hand, it can save the analysis of other interference areas. On the other hand, it can also avoid the problem that other interference areas affect the detection result of the degree of dirt of the cleaning parts, thereby improving the reliability of the detection of the degree of dirt.
  • the cleaning efficiency of the cleaning equipment is determined by combining the local and global dirt levels, so that electronic equipment can be analyzed from both local and global perspectives when judging the cleaning effect of the cleaning equipment, thereby improving the reliability of judging the cleaning effect sex.
  • Fig. 1 is a schematic structural diagram of a cleaning device provided by an embodiment of the present application.
  • Fig. 2 is a schematic structural diagram of a system for determining the degree of dirtiness of cleaning equipment provided by an embodiment of the present application;
  • Fig. 3 is a flowchart of a method for determining the degree of dirtiness of cleaning equipment provided by an embodiment of the present application
  • Fig. 4 is a schematic diagram of the cleaning part area obtained by using the foreground extraction algorithm provided by an embodiment of the present application;
  • Fig. 5 is a schematic diagram of the area of the cleaning piece obtained through the segmentation operation provided by an embodiment of the present application.
  • Fig. 6 is a schematic diagram of a sub-region provided by an embodiment of the present application.
  • Fig. 7 is a schematic diagram of the degree of dirt of each cleaning piece provided by an embodiment of the present application.
  • Fig. 8 is a schematic diagram of the degree of dirt and the corresponding data description value provided by an embodiment of the present application.
  • Fig. 9 is a block diagram of a device for determining the degree of dirtiness of cleaning equipment provided by an embodiment of the present application.
  • Fig. 10 is a block diagram of an electronic device provided by an embodiment of the present application.
  • orientation words such as “upper, lower, top, bottom” are generally used for the directions shown in the drawings, or for the parts themselves in the vertical, In terms of vertical or gravitational direction; similarly, for the convenience of understanding and description, “inside and outside” refer to inside and outside relative to the outline of each component itself, but the above orientation words are not used to limit the present application.
  • Fig. 1 is a schematic structural diagram of a cleaning device provided by an embodiment of the present application.
  • the cleaning device may be an electronic device with a cleaning function such as a sweeper, a vacuum cleaner, and a mopping machine. This embodiment does not limit the implementation of the cleaning device.
  • cleaning equipment includes at least: cleaning Component 110 and a controller (not shown in the figure).
  • the cleaning part 110 refers to a part that is in contact with the surface to be cleaned to clean the surface to be cleaned during the cleaning process of the cleaning device.
  • the surface to be cleaned may be a floor, a desktop, a wall, a surface of a solar cell, etc., and the type of the surface to be cleaned is not limited in this embodiment.
  • the cleaning member 110 may be a rag, a brush, and/or a rolling brush, etc., and this embodiment does not limit the implementation of the cleaning member 110 .
  • the number of cleaning parts 110 can be one or at least two. When there are at least two cleaning parts, the types of different cleaning parts are the same or different. This embodiment does not limit the number of cleaning parts 110 .
  • the cleaning element 110 is connected to the cleaning device through a driving element, and the driving element is connected to a controller to drive the cleaning element 110 to move under the control of the controller.
  • the cleaning element 110 rotates around a central axis perpendicular to the surface to be cleaned during operation.
  • the cleaning member 110 is located at the bottom of the cleaning equipment, and takes the central axis perpendicular to the surface to be cleaned as the rotation axis, and rotates around the rotation axis.
  • the degree of dirt on the edges of the concentric circles of the same concentric circle is usually the same.
  • the center of the cleaning part passes the central axis (that is, the center coincides with the central axis) as an example.
  • one end of the cleaning part can also pass the central axis, such as the rotation mode of the brush on the sweeper.
  • the embodiment does not limit the rotation mode of the cleaning element.
  • the cleaning piece 110 is circular as an example for illustration. In actual implementation, the cleaning piece 110 may also be rectangular or irregular in shape. This embodiment does not limit the shape of the cleaning piece 110 .
  • the overall shape is circular means that when the cleaning device remains stationary, the cleaning range formed by the cleaning element 110 is circular. Based on this, there may be uneven burrs on the edge of the cleaning element 110 , but this does not affect the result that the cleaning range is circular.
  • the cleaning element 110 may also rotate around a central axis parallel to the surface to be cleaned during operation. Such as the rotation mode of the roller brush on the washing machine. Similarly, when the cleaning member 110 rotates around the central axis parallel to the surface to be cleaned, the degree of dirt at the edges of the concentric circles of the same concentric circle is usually the same.
  • the cleaning equipment may also include other components required to perform cleaning work, such as: power supply components, communication components, etc., this Embodiments are not listed one by one here.
  • the present embodiment provides a system for determining the degree of dirt, which can collect a target image of a cleaning piece on a cleaning device and analyze the target image, so as to detect the degree of dirt of the cleaning device.
  • the system at least includes a placement frame 210 , an image acquisition component 220 located on the placement frame 210 , and an electronic device 230 connected to the image acquisition component 220 .
  • the placing frame 210 is used for placing one or at least two cleaning devices, so that the cleaning parts on the cleaning devices are located within the collection range of the image collection component 220 .
  • the image acquisition component 220 may be an electronic device with an image acquisition function such as a camera, a camera, and a mobile phone. This embodiment does not limit the implementation of the image acquisition component 220 .
  • the image acquisition component 220 is configured to acquire an image of a target including cleaning parts.
  • the electronic device 230 may be a desktop computer, a tablet computer, a notebook computer, a mobile phone, etc., and the implementation manner of the electronic device 230 is not limited in this embodiment.
  • the electronic device 230 is used to acquire the target image of the cleaning piece on the cleaning device; determine the area of the cleaning piece in the target image; divide the area of the cleaning piece into at least two sub-areas; based on the pixel value of each sub-area Determine how dirty the cleaning equipment is.
  • At least two subregions are divided based on the distribution of dirt on the cleaning element.
  • the degree of dirtiness of the cleaning equipment is determined based on the pixel value of each sub-region by dividing the area of the cleaning piece; the degree of dirtiness of the cleaning piece can be detected directly, and the reliability of the detection result of the degree of dirtiness can be improved. sex.
  • the method for determining the degree of dirtiness of the cleaning equipment will be introduced below.
  • the following embodiments are described by taking the electronic device 230 in the system for determining the degree of contamination shown in FIG. 2 as an example for execution of the method.
  • the method for determining the degree of contamination is not limited to the application in the system for determining the degree of contamination shown in FIG.
  • the collection component 220 and the electronic device 230 are implemented in the same device system, and this embodiment does not limit the application scenarios of the method for determining the degree of contamination.
  • Fig. 3 is a flowchart of a method for determining the degree of dirtiness of cleaning equipment provided by an embodiment of the present application , the method includes at least the following steps:
  • Step 301 acquiring a target image of a cleaning piece on a cleaning device.
  • the target image is obtained by collecting images of the surface of the cleaning piece that is in contact with the surface to be cleaned. In this way, the degree of dirtiness of the cleaning piece can be directly obtained by analyzing the target image.
  • Step 302 determine the area of the cleaning piece in the target image.
  • the target image may include other interference areas in addition to the cleaning area, based on this, in this step, by determining the cleaning area in the target image, other interference areas can be eliminated. On the one hand, it can save analysis of other interference areas On the other hand, it can also avoid the problem that other interference areas affect the detection result of the degree of dirt of the cleaning parts, thereby improving the reliability of the detection of the degree of dirt.
  • determining the area of the cleaning piece in the target image includes: performing foreground extraction on the target image to obtain the area of the cleaning piece.
  • the electronic device uses a foreground extraction algorithm to perform foreground extraction on the target image.
  • the foreground extraction algorithm includes but is not limited to: algorithms based on image segmentation, that is, pixels are divided into background or foreground based on discontinuity and correlation of pixels, such as: edge detection algorithm, or clustering algorithm, etc.; or, based on Compared with algorithms based on image segmentation, the image matting algorithm emphasizes details more, such as: Knockout matting algorithm, or image matting algorithm based on probability statistics, etc. This embodiment does not limit the implementation of the foreground extraction algorithm.
  • the area of the clean part obtained by using the foreground extraction algorithm is shown in FIG. 4 .
  • determining the area of the cleaning element in the target image includes: receiving a segmentation operation on the area of the cleaning element in the target image to obtain the area of the cleaning element.
  • the segmentation operation may be an operation of outlining the edge of the cleaning piece in the target image, or an operation of clicking the edge position of the cleaning piece. This embodiment does not limit the implementation of the segmentation operation.
  • the area of the cleaning piece obtained through the segmentation operation is shown in FIG. 5 .
  • Step 303 divide the area of the cleaning element to obtain at least two sub-areas.
  • the area of the cleaning element is divided based on the distribution law of the degree of dirt during the working process of the cleaning element.
  • the cleaning member shown in Figure 1 rotates around a central axis perpendicular to the surface to be cleaned during the working process. At this time, the distribution of the degree of dirt in the same concentric circle area is consistent. Based on this, yes
  • the area of the cleaning parts is divided to obtain at least two sub-areas, including: taking the central axis of the cleaning parts in the area of the cleaning parts as the center of each sub-area, and dividing the area of the cleaning parts to obtain at least two sub-areas.
  • the cleaning piece is circular as a whole, correspondingly, the area of the cleaning piece is circular as a whole; the central axis passes through the center of the circle. Taking the central axis of the cleaning piece in the cleaning piece area as the center of each sub-area, divide the cleaning piece area into at least two sub-areas, including: take the center of the circle as the center of the sub-area, and divide according to the preset n The coefficient divides the cleaning piece area into n sub-areas.
  • the first sub-area is a circle whose radius is the product of the first division coefficient and R
  • the i-th sub-area is the outer circle whose radius is the product of the i-th division coefficient and R minus the radius of the i-1th division
  • the division coefficient is a value greater than 0 and less than or equal to 1, and the ith division coefficient is positively correlated with the value of i.
  • the first division coefficient as 0.3, and the second division coefficient as 0.7 as an example for illustration refer to FIG. 6 for the obtained at least two sub-regions.
  • the first sub-region 61 is a circle centered on the central axis of the cleaning element and a radius of 0.3R
  • the second sub-region 62 is a circle centered on the central axis of the cleaning element and a radius of 0.7R
  • the third sub-region 63 is the ring obtained by subtracting a circle with a radius of 0.7R from a circle with a radius R taking the central axis of the cleaning element as the center.
  • n 3
  • the first division coefficient is 0.3
  • the second division coefficient is 0.7 as an example.
  • the value of n and the value of the i-th division coefficient are all acceptable. Adjusted based on detection requirements, this embodiment does not limit the values of n and the division coefficient.
  • the cleaning piece is not circular, it can also be divided based on the above-mentioned area division principle, the difference is that R is the minimum distance between the central axis of the cleaning piece and the edge of the cleaning piece; the nth sub-area is no longer a ring , but the area obtained by subtracting the inner circle whose radius is the product of the n-1 division coefficient and R from the figure formed by the edges of the cleaning piece.
  • This embodiment does not limit the shape of the cleaning piece.
  • the area of the cleaning element is divided to obtain at least two sub-areas, including: sequentially dividing the area of the cleaning element into at least two sub-areas in the extension direction of the central axis of the cleaning element in the area of the cleaning element.
  • the at least two sub-regions are divided according to a preset division coefficient, and this embodiment does not limit the value of the division coefficient.
  • Step 304 determining the degree of dirtiness of the cleaning device based on the pixel value of each sub-region.
  • the degree of soiling of the cleaning device includes the degree of local soiling of each sub-area.
  • the degree of dirtiness of the cleaning equipment is determined based on the pixel values of each sub-region, including: determining the cumulative sum of the pixel values of the target pixels in the sub-region; determining the local dirtiness of each sub-region based on the cumulative sum of pixel values, and obtaining the cleaning equipment degree of contamination.
  • the cumulative sum of pixel values is negatively correlated with the degree of local dirtiness.
  • the target pixels are the pixels in the sub-region that meet the preset dirty conditions.
  • the pixel value of the pixel position is negatively correlated with the degree of dirt, that is, the smaller the pixel value, the higher the degree of dirt, for example: the value of a black pixel is 0, at this time, the dirt of the corresponding pixel
  • the pixel value may be a pixel value of a grayscale image, or may be a pixel value of a color image, and this embodiment does not limit the value type of the pixel value.
  • the pixels satisfying the preset dirty condition refer to the pixels whose pixel value is smaller than the pixel threshold.
  • the pixel threshold is determined based on the detection requirements of the degree of dirt. For example, the pixel threshold can be 255, that is, the pixels that are not white are all pixels that meet the preset dirty conditions. Of course, the value of the pixel threshold can also be other values , this embodiment does not limit the value of the pixel threshold.
  • the local dirty degree of each sub-region is determined based on the cumulative sum of pixel values to obtain the dirty degree of the cleaning device, which includes: after the cumulative sum of the pixel values is reciprocated, normalization processing is performed to obtain the dirty degree.
  • r refers to the R pixel value in the color image pixel
  • g refers to the G pixel value in the color image pixel
  • b refers to the G pixel value in the color image pixel
  • sum represents the summation function
  • Area is the total number of pixels in the sub-region
  • Norm represents the normalization function.
  • the manner of accumulating and determining the degree of local dirt based on the accumulation and determination of pixel values may also be the accumulation and reciprocal of the accumulation and sum of pixel values. This embodiment does not limit the calculation method of the degree of local dirt.
  • the degree of soiling of the cleaning device also includes a global degree of soiling of the area of the cleaning element.
  • determining the degree of dirtiness of the cleaning device based on the pixel values of each sub-area includes: determining the global degree of dirtiness of the area of the cleaning element based on the pixel values of the area of the cleaning element.
  • determining the global dirty degree of the cleaning piece area includes: determining the cumulative sum of the pixel values of the target pixels in each sub-area, and determining the summation based on the cumulative sum of the pixel values Determine the overall degree of dirtiness and obtain the degree of dirtiness of the cleaning equipment.
  • the calculation principle of the global dirty degree is the same as the calculation principle of the local dirty degree, which will not be repeated in this embodiment.
  • the cleaning device includes 4 cleaning parts.
  • FIG. 7 After calculating the degree of dirt for each sub-region on each cleaning part, refer to FIG. 7 for the obtained degree of dirt of the cleaning device.
  • the degree of dirt includes the local degree of dirt in each sub-area on each cleaning piece.
  • the global dirty degree of see GlobalScore in Figure 7 for details.
  • the method for determining the degree of dirtiness of the cleaning equipment obtains the target image of the cleaning piece on the cleaning equipment; determines the area of the cleaning piece in the target image; divides the area of the cleaning piece, and obtains at least two based on the pixel value of each sub-area to determine the degree of dirt of the cleaning equipment; it can solve the problem of the dirt detection results obtained by the traditional dirt detection method, which cannot directly reflect the dirt degree of the cleaning equipment.
  • the problem of low reliability since the target image of the cleaning part can be collected, the degree of dirtiness of the cleaning part can be directly detected, and the reliability of the detection result of the degree of dirtiness can be improved.
  • the central axis of the cleaning piece in the cleaning piece area is used as the In the center of the area, the division of the cleaning area can make the distribution of dirt in each sub-area basically consistent; it can avoid that when the distribution of dirt in the same sub-area is inconsistent, the degree of local dirt cannot accurately reflect the The problem of the degree of dirt at each position in the sub-region; the accuracy of the determined local degree of dirt can be improved.
  • the local dirty degree of the sub-region is calculated, since the target pixel is a pixel that meets the preset dirty conditions in the sub-region; therefore, it is possible to avoid The influence of pixels other than the target pixel on the degree of local dirt further improves the accuracy of determining the degree of local dirt.
  • the target image may include other interference areas in addition to the cleaning area
  • other interference areas can be eliminated. On the one hand, it can save the analysis of other interference areas. On the other hand, it can also avoid the influence of other interference areas on the detection results of the degree of dirtiness of the cleaning parts. problems, thereby improving the reliability of dirt level detection.
  • the electronic device may also compare different degrees of dirt to determine the cleaning effect of the cleaning device.
  • comparing different dirt levels includes: comparing local dirt levels of different sub-regions.
  • comparing the local contamination levels of different sub-regions includes: for the same sub-region corresponding to different cleaning components on the cleaning device, comparing the local contamination levels of the sub-regions on different cleaning components.
  • the sorting results obtained according to the order of local dirtiness from large to small are: ⁇ (3Middle, 670.7639), (4Middle, 69.1194), (2Middle, 0.0026 ), (1Middle, 0.0006) ⁇ .
  • comparing the local dirtiness levels of different sub-areas includes: comparing the local dirtiness levels of different sub-areas for different sub-areas corresponding to the same cleaning piece on the cleaning device.
  • different levels of soiling are compared, including: comparing different levels of cleanliness The overall degree of soiling of the parts is compared.
  • this embodiment after determining the degree of dirt of the cleaning device based on the pixel value of each sub-region, that is, after step 304, it also includes: generating a data description value of the degree of dirt; using the data description of the degree of dirt Values are compared for different degrees of soiling to determine how well a cleaning device cleans.
  • the data description value includes high-order bits and low-order bits. Both high-order bits and low-order bits are positively correlated with the degree of dirt.
  • the high-order bits are used to describe the number of integer bits of the degree of dirt. If the bit is not zero, it is the first m digits of the integer, and the low-order bit is the fractional part of the degree of dirtiness when the integer is zero; m is a positive integer.
  • m may be 2, or all integer bits, etc., and the value of m is not limited in this embodiment.
  • electronic equipment can describe the degree of dirtiness from two dimensions.
  • the high-order bit level describes the degree of dirtiness from the dimension of the number of integer bits. The more integer digits, the larger the value.
  • the low-order bit degree describes the degree of dirt from the dimension of the specific value of the fractional part. The larger the decimal part, the larger the value.
  • the local dirtiness degree OutsideScore of the sub-region Outside can be described by the data description values oLevel and oDegree; the local dirtiness of the sub-region Middle
  • the degree MiddleScore can be described by the data description values mLevel and mDegree;
  • the local dirt degree CoreScoree of the sub-region Core can be described by the data description values cLevel and cDegree.
  • the higher-order bit level when comparing the degree of dirtiness, the higher-order bit level can be compared first, and then the lower-order bit degree can be compared when the higher-order bit levels are the same.
  • use the data description value to compare different dirt levels including: comparing the high-order bits corresponding to different dirt levels; when the high-order bits corresponding to different dirt levels are the same, compare The low-order bits corresponding to the degree of dirtiness are compared; in the case of different high-order bits corresponding to different degrees of dirtiness Next, it is determined that higher order bits are more dirty.
  • the original numerical values of the soiling degrees can be compared.
  • the sorting result can be obtained by comparing the high-order bits; and for the same degree of dirtiness of the high-order bits, the sorting result can be obtained by comparing the low-order bits, which can improve the degree of dirtiness. degree of comparative efficiency.
  • the degree of dirtiness includes the local degree of dirtiness of different sub-regions; correspondingly, using the data description value to compare different degrees of dirtiness includes: using the data description value to compare the local degree of dirtiness of different sub-regions Comparison; wherein, the different subareas include the same subarea corresponding to different cleaning pieces on the cleaning device; and/or, different subareas corresponding to the same cleaning piece on the cleaning equipment.
  • the degree of soiling includes the global degree of soiling of different cleaning parts; correspondingly, using the data description value to compare different degrees of soiling includes: using the data description value to compare the global degree of soiling of different cleaning parts Compare.
  • the electronic device may also be based on the degree of local dirt and the degree of global dirt , to determine the cleaning effect of the cleaning equipment.
  • each local degree of dirt is greater than a first threshold and each global degree of dirt is greater than a second threshold, it is determined that the cleaning device has achieved the desired cleaning effect; when at least one degree of local dirt is less than or equal to the first threshold, Or in a case where at least one global degree of dirt is less than or equal to the second threshold, it is determined that the cleaning device does not achieve the desired cleaning effect.
  • the cleaning effect is divided into the expected cleaning effect and the expected cleaning effect as an example.
  • the cleaning effect can also be divided into more levels.
  • the degree of dirt can also adaptively correspond to multiple division thresholds, and this embodiment does not limit the manner of determining the cleaning effect based on the degree of local dirt and the degree of global dirt.
  • the cleaning equipment is determined by combining the local dirty degree and the global dirty degree. Cleaning efficiency enables electronic equipment to analyze from local and global perspectives when judging the cleaning effect of cleaning equipment, thereby improving the reliability of judging the cleaning effect.
  • Fig. 9 is a block diagram of an apparatus for determining a degree of dirtiness of a cleaning device provided by an embodiment of the present application.
  • the device at least includes the following modules: an image acquisition module 910 , an area determination module 920 , an area division module 930 and a dirt determination module 940 .
  • An image acquisition module 910 configured to acquire a target image of the cleaning piece on the cleaning device
  • an area determination module 920 configured to determine the area of the cleaning piece in the target image
  • An area division module 930 configured to perform area division on the area of the cleaning element to obtain at least two sub-areas
  • a dirt determination module 940 configured to determine the degree of dirt of the cleaning device based on the pixel value of each sub-region.
  • the device for determining the degree of dirtiness of the cleaning equipment determines the degree of dirtiness of the cleaning equipment, it only uses the division of the above-mentioned functional modules for illustration.
  • the above function allocation is completed by different functional modules, that is, the internal structure of the device for determining the degree of dirtiness of the cleaning device is divided into different functional modules to complete all or part of the functions described above.
  • the device for determining the degree of dirtiness of the cleaning equipment provided by the above embodiments and the embodiment of the method for determining the degree of dirtiness of the cleaning equipment belong to the same concept, and its specific implementation process is detailed in the method embodiment, and will not be repeated here.
  • Fig. 10 is a block diagram of an electronic device provided by an embodiment of the present application.
  • the device may be the electronic device described in FIG. 1 , and the device includes at least a processor 1001 and a memory 1002 .
  • the processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 1001 can adopt at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) accomplish.
  • the processor 1001 may also include a main processor and a coprocessor, the main processor is a processor for processing data in a wake-up state, and is also called a CPU (Central Processing Unit, central processing unit); the coprocessor is Low-power processor for processing data in standby state.
  • CPU Central Processing Unit
  • the processor 1001 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw the content required to be displayed on the display screen. system.
  • the processor 1001 may further include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is configured to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • Memory 1002 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1001 to realize the cleaning device provided by the method embodiment in this application method for determining the degree of contamination.
  • the external reference calibration device may optionally further include: a peripheral device interface and at least one peripheral device.
  • the processor 1001, the memory 1002, and the peripheral device interface may be connected through a bus or a signal line.
  • Each peripheral device can be connected with the peripheral device interface through a bus, a signal line or a circuit board.
  • peripheral devices include but are not limited to: radio frequency circuits, touch screens, audio circuits, and power supplies.
  • the external reference calibration device may also include fewer or more components, which is not limited in this embodiment.
  • the present application also provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and the program is loaded and executed by a processor to realize the degree of dirtiness of the cleaning equipment in the above method embodiment. Determine the method.
  • the present application also provides a computer product, the computer product includes a computer-readable storage medium, and a program is stored in the computer-readable storage medium, and the program is loaded and executed by a processor to implement the above method embodiments Method for determining the degree of soiling of cleaning equipment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)
  • Cleaning In General (AREA)

Abstract

The present application relates to the technical field of computers, and disclosed thereby are a method and device for determining the dirt level of a cleaning device, and a storage medium. The method comprises: acquiring a target image of a cleaning member on a cleaning device; determining a cleaning member region in the target image; performing region division on the cleaning member region, and obtaining at least two sub-regions; and on the basis of the pixel value of each sub-region, determining the dirt level of the cleaning device. The problems of a dirt measuring result obtained by a conventional dirt detection means not being able to directly reflect the dirt level of a cleaning device and the reliability of the obtained dirt measuring result being low can be solved. Since the target image of the cleaning member can be acquired, direct measuring of the dirt level of the cleaning member can be achieved, and the reliability of the dirt level measuring result is increased.

Description

清洁设备的脏污程度确定方法、设备及存储介质Method, equipment and storage medium for determining the degree of dirtiness of cleaning equipment
本申请要求如下专利申请的优先权:于2022年03月01日提交中国专利局、申请号为202210196525.1、发明名称为“清洁设备的脏污程度确定方法、设备及存储介质”的中国专利申请,上述专利申请的全部内容通过引用结合在本申请中。This application claims the priority of the following patent application: a Chinese patent application submitted to the China Patent Office on March 1, 2022, with the application number 202210196525.1, and the title of the invention is "method, equipment and storage medium for determining the degree of dirtiness of cleaning equipment", The entire contents of the aforementioned patent applications are incorporated by reference in this application.
技术领域technical field
本申请属于计算机技术领域,具体涉及一种清洁设备的脏污程度确定方法、设备及存储介质。The present application belongs to the field of computer technology, and in particular relates to a method, device and storage medium for determining the degree of dirtiness of cleaning equipment.
背景技术Background technique
随着清洁设备工作时长的增加,清洁设备上的清洁件的脏污程度逐渐增大。为了防止清洁件对待清洁表面进行二次污染,通常需要对清洁设备的脏污程度进行检测,以在脏污程度较高时及时地对清洁件进行清洗。As the working hours of the cleaning equipment increase, the degree of dirtiness of the cleaning parts on the cleaning equipment gradually increases. In order to prevent the cleaning parts from secondary pollution on the surface to be cleaned, it is usually necessary to detect the degree of dirt of the cleaning equipment, so as to clean the cleaning parts in time when the degree of dirt is high.
传统清洁设备的脏污程度确定方法,包括:对清洁前地面的地面环境参数和清洁后地面的地面环境参数进行比较,得到地面环境参数的差值的绝对值;将该绝对值与比较基准值进行比较,得到脏污程度的检测结果。The method for determining the degree of dirtiness of traditional cleaning equipment includes: comparing the ground environmental parameters of the ground before cleaning with the ground environmental parameters of the ground after cleaning to obtain the absolute value of the difference of the ground environmental parameters; comparing the absolute value with the reference value Compare them to get the detection result of the degree of dirt.
然而,地面环境参数的差异值只能间接反映清洁设备的脏污程度,而无法直接对清洁设备的脏污程度进行检测。However, the difference value of the ground environment parameters can only indirectly reflect the degree of dirtiness of the cleaning equipment, but cannot directly detect the degree of dirtiness of the cleaning equipment.
发明内容Contents of the invention
本申请所要解决的技术问题包括传统的脏污检测方式得到的脏污检测结果,无法直接反映清洁设备的脏污程度,得到的脏污检测结果的可靠性不高的问题。The technical problems to be solved in this application include the problem that the dirt detection results obtained by traditional dirt detection methods cannot directly reflect the degree of dirt of the cleaning equipment, and the reliability of the obtained dirt detection results is not high.
为解决上述技术问题,本申请提供一种清洁设备的脏污程度确定方法,包括:In order to solve the above technical problems, the present application provides a method for determining the degree of dirtiness of cleaning equipment, including:
获取所述清洁设备上清洁件的目标图像;Acquiring a target image of a cleaning piece on the cleaning device;
确定所述目标图像中的清洁件区域;determining the area of the cleaning element in the target image;
对所述清洁件区域进行区域划分,得到至少两个子区域;Divide the area of the cleaning element to obtain at least two sub-areas;
基于每个子区域的像素值确定所述清洁设备的脏污程度。The degree of soiling of the cleaning device is determined based on the pixel values of each sub-area.
可选地,所述清洁件在工作过程中,绕垂直于待清洁表面的中心轴 旋转;Optionally, during the working process, the cleaning member rotates around a central axis perpendicular to the surface to be cleaned rotate;
所述对所述清洁件区域进行区域划分,得到至少两个子区域,包括:The region of the cleaning element is divided to obtain at least two sub-regions, including:
以所述清洁件区域中所述清洁件的中心轴为各个子区域的中心,对所述清洁件区域进行区域划分,得到所述至少两个子区域。Taking the central axis of the cleaning element in the area of the cleaning element as the center of each sub-area, the area of the cleaning element is divided to obtain the at least two sub-areas.
可选地,所述清洁件整体呈圆形,相应地,所述清洁件区域整体呈圆形;所述中心轴过所述圆形的圆心;Optionally, the cleaning element has a circular shape as a whole, and correspondingly, the area of the cleaning element has a circular shape as a whole; the central axis passes through the center of the circle;
所述以所述清洁件区域中所述清洁件的中心轴为各个子区域的中心,对所述清洁件区域进行区域划分,得到所述至少两个子区域,包括:Taking the central axis of the cleaning element in the cleaning element area as the center of each sub-area, the area of the cleaning element is divided to obtain the at least two sub-areas, including:
以所述圆形的圆心为所述子区域中心,按照预设的n个划分系数将所述清洁件区域划分为n个子区域;Taking the center of the circle as the center of the sub-area, dividing the cleaning element area into n sub-areas according to preset n division coefficients;
其中,第1个子区域是半径为第1个划分系数与R的乘积的圆,第i个子区域是半径为第i个划分系数与R的乘积的外圆减去半径为第i-1个划分系数与R的乘积的内圆得到的圆环;所述R为所述清洁件区域的半径;所述i依次取从2至n的整数,所述n为大于1的整数,第n个划分系数为1。Among them, the first sub-area is a circle whose radius is the product of the first division coefficient and R, and the i-th sub-area is the outer circle whose radius is the product of the i-th division coefficient and R minus the radius of the i-1th division The ring obtained by the inner circle of the product of the coefficient and R; the R is the radius of the cleaning part area; the i takes integers from 2 to n in turn, and the n is an integer greater than 1, and the nth division The coefficient is 1.
可选地,所述基于每个子区域的像素值确定所述清洁设备的脏污程度之后,还包括:Optionally, after determining the degree of dirtiness of the cleaning device based on the pixel value of each sub-region, the method further includes:
生成所述脏污程度的数据描述值;其中,所述数据描述值包括高阶位和低阶位,所述高阶位和所述低阶位均与所述脏污程度呈正相关关系,所述高阶位用于描述所述脏污程度的整数位个数,所述低阶位在所述整数位不为零的情况下为所述整数位的前m位数、所述低阶位在所述整数位为零的情况下为所述脏污程度的小数部分;所述m为正整数;generating a data description value of the degree of dirtiness; wherein, the data description value includes a high-order bit and a low-order bit, and both the high-order bit and the low-order bit are positively correlated with the degree of dirtiness, so The high-order bits are used to describe the number of integer bits of the degree of dirtiness, and the low-order bits are the first m digits of the integer bits, the low-order bits In the case where the integer is zero, it is the fractional part of the degree of contamination; the m is a positive integer;
使用所述脏污程度的数据描述值对不同的脏污程度进行比较,以确定所述清洁设备的清洁效果。Using the data description value of the degree of dirt to compare different degrees of dirt to determine the cleaning effect of the cleaning device.
可选地,所述使用所述数据描述值对不同的脏污程度进行比较,包括:Optionally, the use of the data description value to compare different degrees of dirt includes:
将不同的脏污程度对应的高阶位进行比较;Compare the high-order bits corresponding to different degrees of dirtiness;
在不同的脏污程度对应的高阶位相同的情况下,将不同的脏污程度对应的低阶位进行比较;In the case that the high-order bits corresponding to different dirty degrees are the same, compare the low-order bits corresponding to different dirty degrees;
在不同的脏污程度对应的高阶位不同的情况下,确定高阶位较大的脏污程度较大。 In the case of different high-order bits corresponding to different soiling degrees, it is determined that the soiling degree with a larger high-order bit is larger.
可选地,所述脏污程度包括不同子区域的局部脏污程度;所述使用所述数据描述值对不同的脏污程度进行比较,包括:Optionally, the degree of dirtiness includes the degree of local dirtiness of different sub-regions; the use of the data description value to compare different degrees of dirtiness includes:
使用所述数据描述值对不同的子区域的局部脏污程度进行比较;Using the data description value to compare the local dirtiness of different sub-regions;
其中,不同的子区域包括所述清洁设备上不同清洁件对应的同一子区域;和/或,所述清洁设备上同一清洁件对应的不同子区域。Wherein, different subareas include the same subarea corresponding to different cleaning pieces on the cleaning device; and/or, different subareas corresponding to the same cleaning piece on the cleaning equipment.
可选地,所述基于每个子区域的像素值确定所述清洁设备的脏污程度,包括:Optionally, the determining the degree of dirtiness of the cleaning device based on the pixel value of each sub-region includes:
确定所述子区域内目标像素的像素值累加和,所述目标像素为所述子区域内满足预设脏污条件的像素;determining the cumulative sum of pixel values of target pixels in the sub-area, where the target pixel is a pixel in the sub-area that satisfies a preset dirty condition;
基于所述像素值累加和确定每个子区域的局部脏污程度,得到所述清洁设备的脏污程度;所述像素值累加和与所述局部脏污程度呈负相关关系。The local dirty degree of each sub-region is determined based on the cumulative sum of pixel values to obtain the dirty degree of the cleaning device; the cumulative sum of pixel values is negatively correlated with the local dirty degree.
可选地,所述方法还包括:Optionally, the method also includes:
基于所述清洁件区域的像素值,确定所述清洁件区域的全局脏污程度,所述清洁设备的脏污程度包括所述全局脏污程度和每个子区域的局部脏污程度;Based on the pixel value of the cleaning element area, determine the global dirt level of the cleaning element area, the dirt level of the cleaning device includes the global dirt level and the local dirt level of each sub-area;
基于所述局部脏污程度和所述全局脏污程度,确定所述清洁设备的清洁效果。Based on the local soiling degree and the global soiling degree, the cleaning effect of the cleaning device is determined.
可选地,所述确定所述目标图像中的清洁件区域,包括:Optionally, the determining the cleaning piece area in the target image includes:
对所述目标图像进行前景提取,得到所述清洁件区域。Foreground extraction is performed on the target image to obtain the area of the cleaning element.
另一方面,本申请还提供一种清洁设备,所述清洁设备包括:处理器和存储器;所述存储器中存储有程序,所述程序由所述处理器加载并执行以实现上述方面提供的清洁设备的脏污程度确定方法。On the other hand, the present application also provides a cleaning device, which includes: a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to realize the cleaning provided by the above aspect Method for determining the degree of soiling of equipment.
又一方面,本申请还提供一种计算机可读存储介质,其特征在于,所述存储介质中存储有程序,所述程序被处理器执行时实现上述方面提供的清洁设备的脏污程度确定方法。In another aspect, the present application also provides a computer-readable storage medium, which is characterized in that a program is stored in the storage medium, and when the program is executed by a processor, the method for determining the degree of dirtiness of the cleaning equipment provided in the above aspect is implemented .
本申请提供的技术方案,至少具有以下优点:通过获取清洁设备上清洁件的目标图像;确定目标图像中的清洁件区域;对清洁件区域进行区域划分,得到至少两个子区域;基于每个子区域的像素值确定清洁设备的脏污程度;可以解决传统的脏污检测方式得到的脏污检测结果,无法直接反 映清洁设备的脏污程度,得到的脏污检测结果的可靠性不高的问题;由于可以采集到清洁件的目标图像,可以实现直接对清洁件的脏污程度进行检测,提高脏污程度检测结果的可靠性。The technical solution provided by the present application has at least the following advantages: by acquiring the target image of the cleaning piece on the cleaning device; determining the area of the cleaning piece in the target image; dividing the area of the cleaning piece into at least two sub-areas; based on each sub-area The pixel value of the cleaning equipment determines the degree of dirtiness of the cleaning equipment; it can solve the dirt detection results obtained by the traditional dirt detection method, which cannot be directly reflected Reflecting the degree of dirt of the cleaning equipment, the reliability of the obtained dirt detection results is not high; since the target image of the cleaning parts can be collected, it is possible to directly detect the degree of dirt of the cleaning parts and improve the detection of the degree of dirt reliability of the results.
另外,对于在工作过程中,绕垂直于待清洁表面的中心轴旋转的清洁件,由于同一同心圆区域的脏污程度分布情况一致,因此,以清洁件区域中清洁件的中心轴为各个子区域的中心,对清洁件区域进行区域划分,可以使得得到的每个子区域内部的脏污分布情况基本一致;可以避免同一子区域内脏污分布情况不一致时,得到的局部脏污程度无法准确反映该子区域内各个位置的脏污程度的问题;可以提高确定出的局部脏污程度的准确性。In addition, for the cleaning piece that rotates around the central axis perpendicular to the surface to be cleaned during the working process, since the distribution of the degree of dirt in the same concentric circle area is consistent, the central axis of the cleaning piece in the cleaning piece area is used as the In the center of the area, the division of the cleaning area can make the distribution of dirt in each sub-area basically consistent; it can avoid that when the distribution of dirt in the same sub-area is inconsistent, the degree of local dirt cannot accurately reflect the The problem of the degree of dirt at each position in the sub-region; the accuracy of the determined local degree of dirt can be improved.
另外,通过基于每个子区域内目标像素的像素值累加和,计算该子区域的局部脏污程度,由于目标像素为该子区域内满足预设脏污条件的像素;因此,可以避免子区域内除目标像素之外的其它像素对局部脏污程度的影响,进一步提高确定局部脏污程度的准确性。In addition, based on the cumulative sum of the pixel values of the target pixels in each sub-region, the local dirty degree of the sub-region is calculated, since the target pixel is a pixel that meets the preset dirty conditions in the sub-region; therefore, it is possible to avoid The influence of pixels other than the target pixel on the degree of local dirt further improves the accuracy of determining the degree of local dirt.
另外,由于目标图像中除了包括清洁件区域,还可能包括其它干扰区域,本实施例中通过确定目标图像中的清洁件区域,可以将其它干扰区域剔除,一方面可以节省对其它干扰区域进行分析时消耗的计算资源,另一方面也可以避免其它干扰区域影响清洁件的脏污程度的检测结果的问题,从而提高脏污程度检测的可靠性。In addition, since the target image may include other interference areas in addition to the cleaning area, in this embodiment, by determining the cleaning area in the target image, other interference areas can be eliminated. On the one hand, it can save the analysis of other interference areas. On the other hand, it can also avoid the problem that other interference areas affect the detection result of the degree of dirt of the cleaning parts, thereby improving the reliability of the detection of the degree of dirt.
另外,通过将不同脏污程度转化为数据描述值进行比较,可能无需将脏污程度的各位数值均进行比较,可以提高脏污程度的比较效率。In addition, by converting different degrees of dirt into data description values for comparison, it may not be necessary to compare all values of the degree of dirt, which can improve the comparison efficiency of the degree of dirt.
另外,通过结合局部脏污程度和全局脏污程度来确定清洁设备的清洁效率,使得电子设备在判断清洁设备的清洁效果时,可以从局部和全局两个角度分析,从而提高判断清洁效果的可靠性。In addition, the cleaning efficiency of the cleaning equipment is determined by combining the local and global dirt levels, so that electronic equipment can be analyzed from both local and global perspectives when judging the cleaning effect of the cleaning equipment, thereby improving the reliability of judging the cleaning effect sex.
附图说明Description of drawings
为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the specific embodiments or prior art. Obviously, the accompanying drawings in the following description These are some implementations of the present application. For those skilled in the art, other drawings can also be obtained according to these drawings without creative work.
图1是本申请一个实施例提供的清洁设备的结构示意图;Fig. 1 is a schematic structural diagram of a cleaning device provided by an embodiment of the present application;
图2是本申请一个实施例提供的清洁设备的脏污程度确定系统的结构示意图;Fig. 2 is a schematic structural diagram of a system for determining the degree of dirtiness of cleaning equipment provided by an embodiment of the present application;
图3是本申请一个实施例提供的清洁设备的脏污程度确定方法的流程图;Fig. 3 is a flowchart of a method for determining the degree of dirtiness of cleaning equipment provided by an embodiment of the present application;
图4是本申请一个实施例提供的使用前景提取算法得到的清洁件区域的示意图;Fig. 4 is a schematic diagram of the cleaning part area obtained by using the foreground extraction algorithm provided by an embodiment of the present application;
图5是本申请一个实施例提供的通过分割操作得到的清洁件区域的示意图;Fig. 5 is a schematic diagram of the area of the cleaning piece obtained through the segmentation operation provided by an embodiment of the present application;
图6是本申请一个实施例提供的子区域的示意图;Fig. 6 is a schematic diagram of a sub-region provided by an embodiment of the present application;
图7是本申请一个实施例提供的每个清洁件的脏污程度的示意图;Fig. 7 is a schematic diagram of the degree of dirt of each cleaning piece provided by an embodiment of the present application;
图8是本申请一个实施例提供的脏污程度和对应的数据描述值的示意图;Fig. 8 is a schematic diagram of the degree of dirt and the corresponding data description value provided by an embodiment of the present application;
图9是本申请一个实施例提供的清洁设备的脏污程度确定装置的框图;Fig. 9 is a block diagram of a device for determining the degree of dirtiness of cleaning equipment provided by an embodiment of the present application;
图10是本申请一个实施例提供的电子设备的框图。Fig. 10 is a block diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The technical solutions of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are some of the embodiments of the present application, not all of them. Hereinafter, the present application will be described in detail with reference to the drawings and embodiments. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence.
在本申请中,在未作相反说明的情况下,使用的方位词如“上、下、顶、底”通常是针对附图所示的方向而言的,或者是针对部件本身在竖直、垂直或重力方向上而言的;同样地,为便于理解和描述,“内、外”是指相对于各部件本身的轮廓的内、外,但上述方位词并不用于限制本申请。In this application, unless stated to the contrary, the used orientation words such as "upper, lower, top, bottom" are generally used for the directions shown in the drawings, or for the parts themselves in the vertical, In terms of vertical or gravitational direction; similarly, for the convenience of understanding and description, "inside and outside" refer to inside and outside relative to the outline of each component itself, but the above orientation words are not used to limit the present application.
图1是本申请一个实施例提供的清洁设备的结构示意图,该清洁设备可以为扫地机、吸尘器、拖地机等具有清洁功能的电子设备,本实施例不对清洁设备的实现的方式作限定。如图1所示,清洁设备至少包括:清洁 件110和控制器(图中未示出)。Fig. 1 is a schematic structural diagram of a cleaning device provided by an embodiment of the present application. The cleaning device may be an electronic device with a cleaning function such as a sweeper, a vacuum cleaner, and a mopping machine. This embodiment does not limit the implementation of the cleaning device. As shown in Figure 1, cleaning equipment includes at least: cleaning Component 110 and a controller (not shown in the figure).
清洁件110是指清洁设备执行清洁工作过程中,与待清洁表面接触、以对该待清洁表面进行清洁的部件。其中,待清洁表面可以是地面、桌面、墙面、太阳能电池表面等,本实施例不对待清洁表面的类型作限定。The cleaning part 110 refers to a part that is in contact with the surface to be cleaned to clean the surface to be cleaned during the cleaning process of the cleaning device. Wherein, the surface to be cleaned may be a floor, a desktop, a wall, a surface of a solar cell, etc., and the type of the surface to be cleaned is not limited in this embodiment.
可选地,清洁件110可以为抹布、毛刷、和/或滚刷等,本实施例不对清洁件110的实现方式作限定。另外,清洁件110的数量可以为一个或至少两个,在清洁件为至少两个时,不同清洁件的类型相同或不同,本实施例不对清洁件110的数量作限定。Optionally, the cleaning member 110 may be a rag, a brush, and/or a rolling brush, etc., and this embodiment does not limit the implementation of the cleaning member 110 . In addition, the number of cleaning parts 110 can be one or at least two. When there are at least two cleaning parts, the types of different cleaning parts are the same or different. This embodiment does not limit the number of cleaning parts 110 .
不失一般性地,清洁件110通过驱动件连接至清洁设备,驱动件与控制器相连,以在控制器的控制下驱动清洁件110运动。Without loss of generality, the cleaning element 110 is connected to the cleaning device through a driving element, and the driving element is connected to a controller to drive the cleaning element 110 to move under the control of the controller.
在一个示例中,清洁件110在工作过程中绕垂直于待清洁表面的中心轴旋转。比如:参考图1所示的清洁设备,此时,清洁件110位于清洁设备底部,并以垂直于待清洁表面的中心轴为旋转轴,绕该旋转轴旋转。In one example, the cleaning element 110 rotates around a central axis perpendicular to the surface to be cleaned during operation. For example: referring to the cleaning equipment shown in FIG. 1 , at this time, the cleaning member 110 is located at the bottom of the cleaning equipment, and takes the central axis perpendicular to the surface to be cleaned as the rotation axis, and rotates around the rotation axis.
清洁件110绕垂直于待清洁表面的中心轴旋转时,同一同心圆的同心圆边缘位置上的脏污程度通常一致。When the cleaning member 110 rotates around the central axis perpendicular to the surface to be cleaned, the degree of dirt on the edges of the concentric circles of the same concentric circle is usually the same.
图1中以清洁件的中心过中心轴(即中心与中心轴重合)为例进行说明,在实际实现时,也可以是清洁件的一端过中心轴,如扫地机上毛刷的旋转方式,本实施例不对清洁件的旋转方式作限定。In Figure 1, the center of the cleaning part passes the central axis (that is, the center coincides with the central axis) as an example. In actual implementation, one end of the cleaning part can also pass the central axis, such as the rotation mode of the brush on the sweeper. The embodiment does not limit the rotation mode of the cleaning element.
另外,图1中以清洁件110整体呈圆形为例进行说明,在实际实现时,清洁件110也可以为矩形、或者不规则形状,本实施例不对清洁件110的形状作限定。In addition, in FIG. 1 , the cleaning piece 110 is circular as an example for illustration. In actual implementation, the cleaning piece 110 may also be rectangular or irregular in shape. This embodiment does not limit the shape of the cleaning piece 110 .
其中,“整体呈圆形”是指在清洁设备保持静止的情况下,清洁件110运行后形成的清洁范围呈圆形。基于此,清洁件110的边缘可能存在参差不齐的毛边,但是,这不影响清洁范围呈圆形的结果。Wherein, "the overall shape is circular" means that when the cleaning device remains stationary, the cleaning range formed by the cleaning element 110 is circular. Based on this, there may be uneven burrs on the edge of the cleaning element 110 , but this does not affect the result that the cleaning range is circular.
在其它示例中,清洁件110在工作过程中也可以绕平行于待清洁表面的中心轴旋转。如洗地机上滚刷的旋转方式。同理,清洁件110绕平行于待清洁表面的中心轴旋转时,同一同心圆的同心圆边缘位置上的脏污程度通常一致。In other examples, the cleaning element 110 may also rotate around a central axis parallel to the surface to be cleaned during operation. Such as the rotation mode of the roller brush on the washing machine. Similarly, when the cleaning member 110 rotates around the central axis parallel to the surface to be cleaned, the degree of dirt at the edges of the concentric circles of the same concentric circle is usually the same.
上述清洁设备的结构仅是示意性的,在实际实现时,清洁设备还可以包括执行清洁工作时所需的其它元器件,如:供电组件、通信组件等,本 实施例在此不再一一列举。The structure of the above-mentioned cleaning equipment is only schematic. In actual implementation, the cleaning equipment may also include other components required to perform cleaning work, such as: power supply components, communication components, etc., this Embodiments are not listed one by one here.
可选地,基于上述实施例可知,由于清洁件在工作过程中,脏污情况的分布是存在规律的。基于此,本实施例提供一种脏污程度确定系统,可以采集到清洁设备上清洁件的目标图像,并对该目标图像进行分析,以实现对清洁设备的脏污程度进行检测。Optionally, based on the above embodiments, it can be known that the distribution of the dirt of the cleaning element is regular due to the working process of the cleaning element. Based on this, the present embodiment provides a system for determining the degree of dirt, which can collect a target image of a cleaning piece on a cleaning device and analyze the target image, so as to detect the degree of dirt of the cleaning device.
参考图2所示的脏污程度确定系统,该系统至少包括放置架210、位于放置架210上的图像采集组件220、以及与图像采集组件220相连的电子设备230。Referring to the system for determining the degree of contamination shown in FIG. 2 , the system at least includes a placement frame 210 , an image acquisition component 220 located on the placement frame 210 , and an electronic device 230 connected to the image acquisition component 220 .
放置架210用于放置一个或至少两个清洁设备,以使清洁设备上的清洁件位于图像采集组件220的采集范围内。The placing frame 210 is used for placing one or at least two cleaning devices, so that the cleaning parts on the cleaning devices are located within the collection range of the image collection component 220 .
图像采集组件220可以是摄像头、照相机、手机等具有图像采集功能的电子设备,本实施例不对图像采集组件220的实现方式作限定。The image acquisition component 220 may be an electronic device with an image acquisition function such as a camera, a camera, and a mobile phone. This embodiment does not limit the implementation of the image acquisition component 220 .
本实施例中,图像采集组件220用于采集包括清洁件的目标图像。In this embodiment, the image acquisition component 220 is configured to acquire an image of a target including cleaning parts.
电子设备230可以是台式计算机、平板电脑、笔记本电脑、手机等,本实施例不对电子设备230的实现方式作限定。The electronic device 230 may be a desktop computer, a tablet computer, a notebook computer, a mobile phone, etc., and the implementation manner of the electronic device 230 is not limited in this embodiment.
本实施例中,电子设备230用于获取清洁设备上清洁件的目标图像;确定目标图像中的清洁件区域;对清洁件区域进行区域划分,得到至少两个子区域;基于每个子区域的像素值确定清洁设备的脏污程度。In this embodiment, the electronic device 230 is used to acquire the target image of the cleaning piece on the cleaning device; determine the area of the cleaning piece in the target image; divide the area of the cleaning piece into at least two sub-areas; based on the pixel value of each sub-area Determine how dirty the cleaning equipment is.
至少两个子区域是基于清洁件上脏污分布情况划分的。At least two subregions are divided based on the distribution of dirt on the cleaning element.
本实施例中,通过对清洁件区域进行区域划分,基于每个子区域的像素值确定清洁设备的脏污程度;可以实现直接对清洁件的脏污程度进行检测,提高脏污程度检测结果的可靠性。In this embodiment, the degree of dirtiness of the cleaning equipment is determined based on the pixel value of each sub-region by dividing the area of the cleaning piece; the degree of dirtiness of the cleaning piece can be detected directly, and the reliability of the detection result of the degree of dirtiness can be improved. sex.
下面对该清洁设备的脏污程度确定方法进行介绍。下述实施例以该方法的执行主体为图2所示的脏污程度确定系统中的电子设备230为例进行说明。The method for determining the degree of dirtiness of the cleaning equipment will be introduced below. The following embodiments are described by taking the electronic device 230 in the system for determining the degree of contamination shown in FIG. 2 as an example for execution of the method.
需要补充说明的是,在实际实现时,脏污程度确定方法不限于应用在图2所示的脏污程度确定系统中,也可以应用于不具有放置架210的系统、或者,应用于将图像采集组件220和电子设备230实现在同一设备的系统中,本实施例不对脏污程度确定方法的应用场景作限定。It should be added that, in actual implementation, the method for determining the degree of contamination is not limited to the application in the system for determining the degree of contamination shown in FIG. The collection component 220 and the electronic device 230 are implemented in the same device system, and this embodiment does not limit the application scenarios of the method for determining the degree of contamination.
图3是本申请一个实施例提供的清洁设备的脏污程度确定方法的流程 图,该方法至少包括以下几个步骤:Fig. 3 is a flowchart of a method for determining the degree of dirtiness of cleaning equipment provided by an embodiment of the present application , the method includes at least the following steps:
步骤301,获取清洁设备上清洁件的目标图像。Step 301, acquiring a target image of a cleaning piece on a cleaning device.
具体地,目标图像是对清洁件上与待清洁表面接触的一面进行图像采集得到的。这样,通过对目标图像进行分析,即可直接得到清洁件的脏污程度。Specifically, the target image is obtained by collecting images of the surface of the cleaning piece that is in contact with the surface to be cleaned. In this way, the degree of dirtiness of the cleaning piece can be directly obtained by analyzing the target image.
步骤302,确定目标图像中的清洁件区域。Step 302, determine the area of the cleaning piece in the target image.
由于目标图像中除了包括清洁件区域,还可能包括其它干扰区域,基于此,本步骤中通过确定目标图像中的清洁件区域,可以将其它干扰区域剔除,一方面可以节省对其它干扰区域进行分析时消耗的计算资源,另一方面也可以避免其它干扰区域影响清洁件的脏污程度的检测结果的问题,从而提高脏污程度检测的可靠性。Since the target image may include other interference areas in addition to the cleaning area, based on this, in this step, by determining the cleaning area in the target image, other interference areas can be eliminated. On the one hand, it can save analysis of other interference areas On the other hand, it can also avoid the problem that other interference areas affect the detection result of the degree of dirt of the cleaning parts, thereby improving the reliability of the detection of the degree of dirt.
在一个示例中,确定目标图像中的清洁件区域,包括:对目标图像进行前景提取,得到清洁件区域。In an example, determining the area of the cleaning piece in the target image includes: performing foreground extraction on the target image to obtain the area of the cleaning piece.
电子设备使用前景提取算法对目标图像进行前景提取。其中,前景提取算法包括但不限于:基于图像分割的算法,即,基于像素的不连续性和相关性将像素划分为背景或前景,如:边缘检测算法、或者聚类算法等;或者,基于图像抠图的算法,相对于基于图像分割的算法来说更强调细节,如:Knockout抠图算法、或者基于概率统计的图像抠图算法等,本实施例不对前景提取算法的实现方式作限定。The electronic device uses a foreground extraction algorithm to perform foreground extraction on the target image. Among them, the foreground extraction algorithm includes but is not limited to: algorithms based on image segmentation, that is, pixels are divided into background or foreground based on discontinuity and correlation of pixels, such as: edge detection algorithm, or clustering algorithm, etc.; or, based on Compared with algorithms based on image segmentation, the image matting algorithm emphasizes details more, such as: Knockout matting algorithm, or image matting algorithm based on probability statistics, etc. This embodiment does not limit the implementation of the foreground extraction algorithm.
比如:使用前景提取算法得到的清洁件区域如图4所示。For example: the area of the clean part obtained by using the foreground extraction algorithm is shown in FIG. 4 .
在另一个示例中,确定目标图像中的清洁件区域,包括:在目标图像中接收对清洁件区域的分割操作,得到清洁件区域。分割操作可以是勾勒目标图像中清洁件的边缘的操作,或者是点选清洁件的边缘位置的操作,本实施例不对分割操作的实现方式作限定。In another example, determining the area of the cleaning element in the target image includes: receiving a segmentation operation on the area of the cleaning element in the target image to obtain the area of the cleaning element. The segmentation operation may be an operation of outlining the edge of the cleaning piece in the target image, or an operation of clicking the edge position of the cleaning piece. This embodiment does not limit the implementation of the segmentation operation.
比如:通过分割操作分割得到的清洁件区域如图5所示。For example, the area of the cleaning piece obtained through the segmentation operation is shown in FIG. 5 .
步骤303,对清洁件区域进行区域划分,得到至少两个子区域。Step 303, divide the area of the cleaning element to obtain at least two sub-areas.
本实施例中,基于清洁件工作过程中,脏污程度的分布规律对清洁件区域进行区域划分。In this embodiment, the area of the cleaning element is divided based on the distribution law of the degree of dirt during the working process of the cleaning element.
比如:如图1所示的清洁件在工作过程中,绕垂直于待清洁表面的中心轴旋转。此时,同一同心圆区域的脏污程度分布情况一致。基于此,对 清洁件区域进行区域划分,得到至少两个子区域,包括:以清洁件区域中清洁件的中心轴为各个子区域的中心,对清洁件区域进行区域划分,得到至少两个子区域。For example: the cleaning member shown in Figure 1 rotates around a central axis perpendicular to the surface to be cleaned during the working process. At this time, the distribution of the degree of dirt in the same concentric circle area is consistent. Based on this, yes The area of the cleaning parts is divided to obtain at least two sub-areas, including: taking the central axis of the cleaning parts in the area of the cleaning parts as the center of each sub-area, and dividing the area of the cleaning parts to obtain at least two sub-areas.
假设清洁件整体呈圆形,相应地,清洁件区域整体呈圆形;中心轴过圆形的圆心。以清洁件区域中清洁件的中心轴为各个子区域的中心,对清洁件区域进行区域划分,得到至少两个子区域,包括:以圆形的圆心为子区域中心,按照预设的n个划分系数将清洁件区域划分为n个子区域。Assuming that the cleaning piece is circular as a whole, correspondingly, the area of the cleaning piece is circular as a whole; the central axis passes through the center of the circle. Taking the central axis of the cleaning piece in the cleaning piece area as the center of each sub-area, divide the cleaning piece area into at least two sub-areas, including: take the center of the circle as the center of the sub-area, and divide according to the preset n The coefficient divides the cleaning piece area into n sub-areas.
其中,第1个子区域是半径为第1个划分系数与R的乘积的圆,第i个子区域是半径为第i个划分系数与R的乘积的外圆减去半径为第i-1个划分系数与R的乘积的内圆得到的圆环;R为清洁件区域的半径;i依次取从2至n的整数,n为大于1的整数,第n个划分系数为1。划分系数为大于0小于或等于1的数值,且第i个划分系数与i的取值呈正相关关系。Among them, the first sub-area is a circle whose radius is the product of the first division coefficient and R, and the i-th sub-area is the outer circle whose radius is the product of the i-th division coefficient and R minus the radius of the i-1th division The ring obtained by the inner circle of the product of the coefficient and R; R is the radius of the cleaning piece area; i takes integers from 2 to n in turn, n is an integer greater than 1, and the nth division coefficient is 1. The division coefficient is a value greater than 0 and less than or equal to 1, and the ith division coefficient is positively correlated with the value of i.
以n为3、第1个划分系数为0.3、第2个划分系数为0.7为例进行说明,得到的至少两个子区域参考图6。根据图6可知,第1个子区域61为以清洁件的中心轴为圆心,以0.3R为半径的圆;第2个子区域62为以清洁件的中心轴为圆心,以0.7R为半径的圆减去第1个子区域61得到的圆环;第3个子区域63为以清洁件的中心轴为圆心,以R为半径的圆减去以0.7R为半径的圆得到的圆环。Taking n as 3, the first division coefficient as 0.3, and the second division coefficient as 0.7 as an example for illustration, refer to FIG. 6 for the obtained at least two sub-regions. According to Fig. 6, it can be seen that the first sub-region 61 is a circle centered on the central axis of the cleaning element and a radius of 0.3R; the second sub-region 62 is a circle centered on the central axis of the cleaning element and a radius of 0.7R The ring obtained by subtracting the first sub-region 61; the third sub-region 63 is the ring obtained by subtracting a circle with a radius of 0.7R from a circle with a radius R taking the central axis of the cleaning element as the center.
图6中以n为3、第1个划分系数为0.3、第2个划分系数为0.7为例进行说明,在实际实现时,n的取值、以及第i个划分系数的取值均是可以基于检测需求调整的,本实施例不对n和划分系数的取值作限定。In Figure 6, n is 3, the first division coefficient is 0.3, and the second division coefficient is 0.7 as an example. In actual implementation, the value of n and the value of the i-th division coefficient are all acceptable. Adjusted based on detection requirements, this embodiment does not limit the values of n and the division coefficient.
在清洁件不为圆形的情况下,也可以基于上述区域划分原理划分,区别在于R为清洁件的中心轴与清洁件的边缘之间的最小距离;第n个子区域不再是一个圆环,而是清洁件的边缘构成的图形减去半径为第n-1个划分系数与R的乘积的内圆得到的区域,本实施例不对清洁件的形状作限定。In the case that the cleaning piece is not circular, it can also be divided based on the above-mentioned area division principle, the difference is that R is the minimum distance between the central axis of the cleaning piece and the edge of the cleaning piece; the nth sub-area is no longer a ring , but the area obtained by subtracting the inner circle whose radius is the product of the n-1 division coefficient and R from the figure formed by the edges of the cleaning piece. This embodiment does not limit the shape of the cleaning piece.
同理,在清洁件绕平行于待清洁表面的中心轴旋转的情况下,同一同心圆区域的脏污程度分布情况一致。基于此,对清洁件区域进行区域划分,得到至少两个子区域,包括:在清洁件区域中清洁件的中心轴延伸方向上,依次将清洁件区域划分为至少两个子区域。至少两个子区域的按照预设的划分系数划分,本实施例不对划分系数的取值作限定。 Similarly, when the cleaning element rotates around the central axis parallel to the surface to be cleaned, the distribution of the degree of dirt in the same concentric circle area is consistent. Based on this, the area of the cleaning element is divided to obtain at least two sub-areas, including: sequentially dividing the area of the cleaning element into at least two sub-areas in the extension direction of the central axis of the cleaning element in the area of the cleaning element. The at least two sub-regions are divided according to a preset division coefficient, and this embodiment does not limit the value of the division coefficient.
步骤304,基于每个子区域的像素值确定清洁设备的脏污程度。Step 304, determining the degree of dirtiness of the cleaning device based on the pixel value of each sub-region.
在一个示例中,清洁设备的脏污程度包括每个子区域的局部脏污程度。此时,基于每个子区域的像素值确定清洁设备的脏污程度,包括:确定子区域内目标像素的像素值累加和;基于像素值累加和确定每个子区域的局部脏污程度,得到清洁设备的脏污程度。其中,像素值累加和与局部脏污程度呈负相关关系。In one example, the degree of soiling of the cleaning device includes the degree of local soiling of each sub-area. At this time, the degree of dirtiness of the cleaning equipment is determined based on the pixel values of each sub-region, including: determining the cumulative sum of the pixel values of the target pixels in the sub-region; determining the local dirtiness of each sub-region based on the cumulative sum of pixel values, and obtaining the cleaning equipment degree of contamination. Among them, the cumulative sum of pixel values is negatively correlated with the degree of local dirtiness.
目标像素为子区域内满足预设脏污条件的像素。对于某个像素位置,该像素位置的像素值与脏污程度呈负相关关系,即,像素值越小,脏污程度越高,比如:黑色像素值为0,此时,对应像素位置的脏污程度较高。其中,像素值可以为灰度图的像素值,或者也可以是彩图的像素值,本实施例不对像素值的取值类型作限定。基于此,满足预设脏污条件的像素是指像素值小于像素阈值的像素。像素阈值基于脏污程度的检测需求确定,比如:像素阈值可以为255,即,不是白色的像素均为满足预设脏污条件的像素,当然,也可以像素阈值的取值也可以是其它数值,本实施例不对像素阈值的取值作限定。The target pixels are the pixels in the sub-region that meet the preset dirty conditions. For a certain pixel position, the pixel value of the pixel position is negatively correlated with the degree of dirt, that is, the smaller the pixel value, the higher the degree of dirt, for example: the value of a black pixel is 0, at this time, the dirt of the corresponding pixel The degree of pollution is high. Wherein, the pixel value may be a pixel value of a grayscale image, or may be a pixel value of a color image, and this embodiment does not limit the value type of the pixel value. Based on this, the pixels satisfying the preset dirty condition refer to the pixels whose pixel value is smaller than the pixel threshold. The pixel threshold is determined based on the detection requirements of the degree of dirt. For example, the pixel threshold can be 255, that is, the pixels that are not white are all pixels that meet the preset dirty conditions. Of course, the value of the pixel threshold can also be other values , this embodiment does not limit the value of the pixel threshold.
示意性地,基于像素值累加和确定每个子区域的局部脏污程度,得到清洁设备的脏污程度,包括:对像素值的累加和取倒数后,进行归一化处理,得到脏污程度。具体地,上述过程可通过下式表示:
Dv=Norm(Sum(255/sum(r+g+b))/Area)
Schematically, the local dirty degree of each sub-region is determined based on the cumulative sum of pixel values to obtain the dirty degree of the cleaning device, which includes: after the cumulative sum of the pixel values is reciprocated, normalization processing is performed to obtain the dirty degree. Specifically, the above process can be expressed by the following formula:
Dv=Norm(Sum(255/sum(r+g+b))/Area)
其中,r是指彩色图像素中R像素值,g是指彩色图像素中G像素值,b是指彩色图像素中G像素值;sum表示求和函数;Area为子区域内像素总数;Norm表示归一化函数。Among them, r refers to the R pixel value in the color image pixel, g refers to the G pixel value in the color image pixel, b refers to the G pixel value in the color image pixel; sum represents the summation function; Area is the total number of pixels in the sub-region; Norm Represents the normalization function.
在实际实现时,基于像素值累加和确定局部脏污程度的方式,也可以是对像素值的累加和取倒数,本实施例不对局部脏污程度的计算方式作限定。In actual implementation, the manner of accumulating and determining the degree of local dirt based on the accumulation and determination of pixel values may also be the accumulation and reciprocal of the accumulation and sum of pixel values. This embodiment does not limit the calculation method of the degree of local dirt.
在另一个示例中,清洁设备的脏污程度还包括清洁件区域的全局脏污程度。此时,基于每个子区域的像素值确定清洁设备的脏污程度,包括:基于清洁件区域的像素值,确定清洁件区域的全局脏污程度。In another example, the degree of soiling of the cleaning device also includes a global degree of soiling of the area of the cleaning element. At this time, determining the degree of dirtiness of the cleaning device based on the pixel values of each sub-area includes: determining the global degree of dirtiness of the area of the cleaning element based on the pixel values of the area of the cleaning element.
其中,基于清洁件区域的像素值,确定清洁件区域的全局脏污程度,包括:确定各个子区域内目标像素的像素值累加和,基于像素值累加和确 定全局脏污程度,得到清洁设备的脏污程度。此时,全局脏污程度的计算原理与局部脏污程度的计算原理相同,本实施例在此不再赘述。Wherein, based on the pixel value of the cleaning piece area, determining the global dirty degree of the cleaning piece area includes: determining the cumulative sum of the pixel values of the target pixels in each sub-area, and determining the summation based on the cumulative sum of the pixel values Determine the overall degree of dirtiness and obtain the degree of dirtiness of the cleaning equipment. At this time, the calculation principle of the global dirty degree is the same as the calculation principle of the local dirty degree, which will not be repeated in this embodiment.
比如:清洁设备包括4个清洁件,对每个清洁件上的每个子区域分别计算脏污程度后,得到的清洁设备的脏污程度参考图7。根据图7可知,脏污程度包括每个清洁件上每个子区域的局部脏污程度,具体参见图7中子区域Outside的OutsideScore、子区域Middle的MiddleScore、和子区域Core的CoreScore,和清洁件整体的全局脏污程度,具体参见图7中的GlobalScore。For example, the cleaning device includes 4 cleaning parts. After calculating the degree of dirt for each sub-region on each cleaning part, refer to FIG. 7 for the obtained degree of dirt of the cleaning device. According to Figure 7, it can be seen that the degree of dirt includes the local degree of dirt in each sub-area on each cleaning piece. For details, refer to the OutsideScore of the sub-area Outside, the MiddleScore of the sub-area Middle, and the CoreScore of the sub-area Core in Figure 7, and the overall cleaning piece The global dirty degree of , see GlobalScore in Figure 7 for details.
综上所述,本实施例提供的清洁设备的脏污程度确定方法,通过获取清洁设备上清洁件的目标图像;确定目标图像中的清洁件区域;对清洁件区域进行区域划分,得到至少两个子区域;基于每个子区域的像素值确定清洁设备的脏污程度;可以解决传统的脏污检测方式得到的脏污检测结果,无法直接反映清洁设备的脏污程度,得到的脏污检测结果的可靠性不高的问题;由于可以采集到清洁件的目标图像,可以实现直接对清洁件的脏污程度进行检测,提高脏污程度检测结果的可靠性。To sum up, the method for determining the degree of dirtiness of the cleaning equipment provided in this embodiment obtains the target image of the cleaning piece on the cleaning equipment; determines the area of the cleaning piece in the target image; divides the area of the cleaning piece, and obtains at least two based on the pixel value of each sub-area to determine the degree of dirt of the cleaning equipment; it can solve the problem of the dirt detection results obtained by the traditional dirt detection method, which cannot directly reflect the dirt degree of the cleaning equipment. The problem of low reliability; since the target image of the cleaning part can be collected, the degree of dirtiness of the cleaning part can be directly detected, and the reliability of the detection result of the degree of dirtiness can be improved.
另外,对于在工作过程中,绕垂直于待清洁表面的中心轴旋转的清洁件,由于同一同心圆区域的脏污程度分布情况一致,因此,以清洁件区域中清洁件的中心轴为各个子区域的中心,对清洁件区域进行区域划分,可以使得得到的每个子区域内部的脏污分布情况基本一致;可以避免同一子区域内脏污分布情况不一致时,得到的局部脏污程度无法准确反映该子区域内各个位置的脏污程度的问题;可以提高确定出的局部脏污程度的准确性。In addition, for the cleaning piece that rotates around the central axis perpendicular to the surface to be cleaned during the working process, since the distribution of the degree of dirt in the same concentric circle area is consistent, the central axis of the cleaning piece in the cleaning piece area is used as the In the center of the area, the division of the cleaning area can make the distribution of dirt in each sub-area basically consistent; it can avoid that when the distribution of dirt in the same sub-area is inconsistent, the degree of local dirt cannot accurately reflect the The problem of the degree of dirt at each position in the sub-region; the accuracy of the determined local degree of dirt can be improved.
另外,通过基于每个子区域内目标像素的像素值累加和,计算该子区域的局部脏污程度,由于目标像素为该子区域内满足预设脏污条件的像素;因此,可以避免子区域内除目标像素之外的其它像素对局部脏污程度的影响,进一步提高确定局部脏污程度的准确性。In addition, based on the cumulative sum of the pixel values of the target pixels in each sub-region, the local dirty degree of the sub-region is calculated, since the target pixel is a pixel that meets the preset dirty conditions in the sub-region; therefore, it is possible to avoid The influence of pixels other than the target pixel on the degree of local dirt further improves the accuracy of determining the degree of local dirt.
另外,由于目标图像中除了包括清洁件区域,还可能包括其它干扰区域,本实施例中通过确定目标图像中的清洁件区域,可以将其它干扰区域剔除,一方面可以节省对其它干扰区域进行分析时消耗的计算资源,另一方面也可以避免其它干扰区域影响清洁件的脏污程度的检测结果的 问题,从而提高脏污程度检测的可靠性。In addition, since the target image may include other interference areas in addition to the cleaning area, in this embodiment, by determining the cleaning area in the target image, other interference areas can be eliminated. On the one hand, it can save the analysis of other interference areas. On the other hand, it can also avoid the influence of other interference areas on the detection results of the degree of dirtiness of the cleaning parts. problems, thereby improving the reliability of dirt level detection.
可选地,基于上述实施例,确定出脏污程度后,即在步骤304之后,电子设备还可以将不同的脏污程度进行比较,以确定清洁设备的清洁效果。Optionally, based on the above embodiment, after the degree of dirt is determined, that is, after step 304, the electronic device may also compare different degrees of dirt to determine the cleaning effect of the cleaning device.
由于脏污程度越高,说明清洁件将待清洁表面的大部分灰尘吸收,清洁件的清洁效果越好。基于此,脏污程度与清洁效果呈正相关关系。即,脏污程度越高清洁效果越好。Since the higher the degree of dirt, it means that the cleaning piece absorbs most of the dust on the surface to be cleaned, and the cleaning effect of the cleaning piece is better. Based on this, there is a positive correlation between the degree of soiling and the cleaning effect. That is, the higher the degree of soiling, the better the cleaning effect.
在一个示例中,将不同的脏污程度进行比较,包括:将不同子区域的局部脏污程度进行比较。In an example, comparing different dirt levels includes: comparing local dirt levels of different sub-regions.
可选地,将不同子区域的局部脏污程度进行比较,包括:对于所述清洁设备上不同清洁件对应的同一子区域,将不同清洁件上所述子区域的局部脏污程度进行比较。Optionally, comparing the local contamination levels of different sub-regions includes: for the same sub-region corresponding to different cleaning components on the cleaning device, comparing the local contamination levels of the sub-regions on different cleaning components.
比如:对于图7所示4个清洁件,对于4个清洁件的同一子区域Outside的局部脏污程度OutsideScore进行比较,按照局部脏污程度由大到小的顺序后得到的排序结果为:{(3Outside,4420.9926),(4Outside,1582.896),(2Outside,0.0382),(1Outside,0.0008)}。For example: for the 4 cleaning pieces shown in Figure 7, compare the local dirtiness OutsideScore of the same sub-area Outside of the 4 cleaning pieces, and the sorting result obtained after the order of the local dirtiness from large to small is: { (3Outside, 4420.9926), (4Outside, 1582.896), (2Outside, 0.0382), (1Outside, 0.0008)}.
对于4个清洁件的同一子区域Middle的MiddleScore进行比较,按照局部脏污程度由大到小的顺序后得到的排序结果为:{(3Middle,670.7639),(4Middle,69.1194),(2Middle,0.0026),(1Middle,0.0006)}。For the comparison of the MiddleScore of the same sub-area Middle of the 4 clean parts, the sorting results obtained according to the order of local dirtiness from large to small are: {(3Middle, 670.7639), (4Middle, 69.1194), (2Middle, 0.0026 ), (1Middle, 0.0006)}.
对于4个清洁件的同一子区域Core的CoreScore进行比较,按照局部脏污程度由大到小的顺序后得到的排序结果为:{(3Core,0.0935),(4Core,0.0002),(2Core,0.0001),(1Core,0.0)}。For the comparison of the CoreScore of the same sub-area of the 4 clean parts, the sorting results obtained according to the order of local dirtiness from large to small are: {(3Core, 0.0935), (4Core, 0.0002), (2Core, 0.0001 ), (1Core, 0.0)}.
和/或,将不同子区域的局部脏污程度进行比较,包括:对于所述清洁设备上同一清洁件对应的不同子区域,将不同子区域的局部脏污程度进行比较。And/or, comparing the local dirtiness levels of different sub-areas includes: comparing the local dirtiness levels of different sub-areas for different sub-areas corresponding to the same cleaning piece on the cleaning device.
比如:对于图7所示的第3个清洁件,对该清洁件的子区域Core、Middle和Outside的局部脏污程度进行比较,按照局部脏污程度由大到小的顺序后得到的排序结果为:{(3Outside,4420.9926),(3Middle,670.7639),(3Core,0.0935)}。For example: for the third cleaning piece shown in Figure 7, compare the local dirtiness of the sub-areas Core, Middle, and Outside of the cleaning piece, and sort the results according to the order of local dirtiness from large to small For: {(3Outside, 4420.9926), (3Middle, 670.7639), (3Core, 0.0935)}.
在另一个示例中,将不同的脏污程度进行比较,包括:将不同清洁 件的全局脏污程度进行比较。In another example, different levels of soiling are compared, including: comparing different levels of cleanliness The overall degree of soiling of the parts is compared.
比如:对于图7所示的4个清洁件,对于4个清洁件的全局脏污程度GlobalScore进行比较,按照全局脏污程度由大到小的顺序后得到的排序结果为:{(3Global,2523.0202),(4Global,834.9248),(2Global,0.0205),(1Global,0.0006)}。For example: for the 4 cleaning pieces shown in Figure 7, compare the GlobalScore of the global dirtiness of the 4 cleaning pieces, and the sorting result obtained after the order of the global dirtiness from large to small is: {(3Global, 2523.0202 ), (4Global, 834.9248), (2Global, 0.0205), (1Global, 0.0006)}.
在上述实施例中,在不同的脏污程度数值的位数较多的情况下,电子设备需要对比的位数较多,这样,会导致脏污程度的比较效率较低的问题。In the above-mentioned embodiment, when there are many digits of the numerical values of different soiling degrees, the electronic device needs to compare more digits, which will lead to the problem of low comparison efficiency of soiling degrees.
基于上述技术问题,在本实施例中,基于每个子区域的像素值确定清洁设备的脏污程度之后,即步骤304之后还包括:生成脏污程度的数据描述值;使用脏污程度的数据描述值对不同的脏污程度进行比较,以确定清洁设备的清洁效果。Based on the above technical problems, in this embodiment, after determining the degree of dirt of the cleaning device based on the pixel value of each sub-region, that is, after step 304, it also includes: generating a data description value of the degree of dirt; using the data description of the degree of dirt Values are compared for different degrees of soiling to determine how well a cleaning device cleans.
其中,数据描述值包括高阶位和低阶位,高阶位和低阶位均与脏污程度呈正相关关系,高阶位用于描述脏污程度的整数位个数,低阶位在整数位不为零的情况下为整数位的前m位数、低阶位在整数位为零的情况下为脏污程度的小数部分;m为正整数。比如:m可以为2,或者为全部整数位等,本实施例不对m的取值作限定。这样,电子设备可以将脏污程度从两个维度来描述。具体地,高阶位level从整数位的个数的维度描述脏污程度。整数位越多,说明数值越大。低阶位degree从小数部分具体数值的维度描述脏污程度。小数部分越大,说明数值越大。Among them, the data description value includes high-order bits and low-order bits. Both high-order bits and low-order bits are positively correlated with the degree of dirt. The high-order bits are used to describe the number of integer bits of the degree of dirt. If the bit is not zero, it is the first m digits of the integer, and the low-order bit is the fractional part of the degree of dirtiness when the integer is zero; m is a positive integer. For example, m may be 2, or all integer bits, etc., and the value of m is not limited in this embodiment. In this way, electronic equipment can describe the degree of dirtiness from two dimensions. Specifically, the high-order bit level describes the degree of dirtiness from the dimension of the number of integer bits. The more integer digits, the larger the value. The low-order bit degree describes the degree of dirt from the dimension of the specific value of the fractional part. The larger the decimal part, the larger the value.
比如:将脏污程度转化为数据描述值后,参考图8所示,根据图8可知,子区域Outside的局部脏污程度OutsideScore可以通过数据描述值oLevel和oDegree描述;子区域Middle的局部脏污程度MiddleScore可以通过数据描述值mLevel和mDegree描述;子区域Core的局部脏污程度CoreScoree可以通过数据描述值cLevel和cDegree描述。For example: After converting the degree of dirtiness into a data description value, refer to Figure 8. According to Figure 8, the local dirtiness degree OutsideScore of the sub-region Outside can be described by the data description values oLevel and oDegree; the local dirtiness of the sub-region Middle The degree MiddleScore can be described by the data description values mLevel and mDegree; the local dirt degree CoreScoree of the sub-region Core can be described by the data description values cLevel and cDegree.
基于上述原理,在进行脏污程度的比较时,可以先比较高阶位level,在高阶位level相同时,再比较低阶位degree。具体地,使用数据描述值对不同的脏污程度进行比较,包括:将不同的脏污程度对应的高阶位进行比较;在不同的脏污程度对应的高阶位相同的情况下,将不同的脏污程度对应的低阶位进行比较;在不同的脏污程度对应的高阶位不同的情况 下,确定高阶位较大的脏污程度较大。Based on the above principle, when comparing the degree of dirtiness, the higher-order bit level can be compared first, and then the lower-order bit degree can be compared when the higher-order bit levels are the same. Specifically, use the data description value to compare different dirt levels, including: comparing the high-order bits corresponding to different dirt levels; when the high-order bits corresponding to different dirt levels are the same, compare The low-order bits corresponding to the degree of dirtiness are compared; in the case of different high-order bits corresponding to different degrees of dirtiness Next, it is determined that higher order bits are more dirty.
在不同的脏污程度对应的低阶位相同的情况下,可以将脏污程度的原始数值进行比较。In the case that the low-order bits corresponding to different soiling degrees are the same, the original numerical values of the soiling degrees can be compared.
这样,对于整数位不同的脏污程度,可以通过比较高阶位即可得到排序结果;而对于高阶位相同的脏污程度,可以通过比较低阶位即可得到排序结果,可以提高脏污程度的比较效率。In this way, for different degrees of dirtiness of integer bits, the sorting result can be obtained by comparing the high-order bits; and for the same degree of dirtiness of the high-order bits, the sorting result can be obtained by comparing the low-order bits, which can improve the degree of dirtiness. degree of comparative efficiency.
在一个示例中,脏污程度包括不同子区域的局部脏污程度;相应地,使用数据描述值对不同的脏污程度进行比较,包括:使用数据描述值对不同子区域的局部脏污程度进行比较;其中,不同的子区域包括清洁设备上不同清洁件对应的同一子区域;和/或,清洁设备上同一清洁件对应的不同子区域。In one example, the degree of dirtiness includes the local degree of dirtiness of different sub-regions; correspondingly, using the data description value to compare different degrees of dirtiness includes: using the data description value to compare the local degree of dirtiness of different sub-regions Comparison; wherein, the different subareas include the same subarea corresponding to different cleaning pieces on the cleaning device; and/or, different subareas corresponding to the same cleaning piece on the cleaning equipment.
在另一个示例中,脏污程度包括不同清洁件的全局脏污程度;相应地,使用数据描述值对不同的脏污程度进行比较,包括:使用数据描述值对不同清洁件的全局脏污程度进行比较。In another example, the degree of soiling includes the global degree of soiling of different cleaning parts; correspondingly, using the data description value to compare different degrees of soiling includes: using the data description value to compare the global degree of soiling of different cleaning parts Compare.
本实施例中,通过将不同脏污程度转化为数据描述值进行比较,可能无需将脏污程度的各位数值均进行比较,可以提高脏污程度的比较效率。In this embodiment, by converting different degrees of dirt into data description values for comparison, it may not be necessary to compare all values of the degrees of dirt, which can improve the comparison efficiency of the degrees of dirt.
可选地,基于上述实施例,在脏污程度包括各个子区域的局部脏污程度和每个清洁件的全局脏污程度的情况下,电子设备还可以基于局部脏污程度和全局脏污程度,确定清洁设备的清洁效果。Optionally, based on the above-mentioned embodiments, in the case that the degree of dirt includes the local degree of dirt of each sub-region and the global degree of dirt of each cleaning piece, the electronic device may also be based on the degree of local dirt and the degree of global dirt , to determine the cleaning effect of the cleaning equipment.
具体地,在各个局部脏污程度大于第一阈值、且各个全局脏污程度大于第二阈值的情况下,确定清洁设备达到期望清洁效果;在至少一个局部脏污程度小于或等于第一阈值、或者至少一个全局脏污程度小于或等于第二阈值的情况下,确定清洁设备未达到期望清洁效果。Specifically, when each local degree of dirt is greater than a first threshold and each global degree of dirt is greater than a second threshold, it is determined that the cleaning device has achieved the desired cleaning effect; when at least one degree of local dirt is less than or equal to the first threshold, Or in a case where at least one global degree of dirt is less than or equal to the second threshold, it is determined that the cleaning device does not achieve the desired cleaning effect.
本实施例中,以清洁效果划分为达到期望清洁效果和未达到期望清洁效果为例进行说明,在实际实现时,清洁效果也可以划分为更多的等级,相应地,局部脏污程度和全局脏污程度也可以适应性地对应多个划分阈值,本实施例不对基于局部脏污程度和全局脏污程度确定清洁效果的方式作限定。In this embodiment, the cleaning effect is divided into the expected cleaning effect and the expected cleaning effect as an example. In actual implementation, the cleaning effect can also be divided into more levels. The degree of dirt can also adaptively correspond to multiple division thresholds, and this embodiment does not limit the manner of determining the cleaning effect based on the degree of local dirt and the degree of global dirt.
本实施例通过结合局部脏污程度和全局脏污程度来确定清洁设备的 清洁效率,使得电子设备在判断清洁设备的清洁效果时,可以从局部和全局两个角度分析,从而提高判断清洁效果的可靠性。In this embodiment, the cleaning equipment is determined by combining the local dirty degree and the global dirty degree. Cleaning efficiency enables electronic equipment to analyze from local and global perspectives when judging the cleaning effect of cleaning equipment, thereby improving the reliability of judging the cleaning effect.
图9是本申请一个实施例提供的清洁设备的脏污程度确定装置的框图。该装置至少包括以下几个模块:图像获取模块910、区域确定模块920、区域划分模块930和脏污确定模块940。Fig. 9 is a block diagram of an apparatus for determining a degree of dirtiness of a cleaning device provided by an embodiment of the present application. The device at least includes the following modules: an image acquisition module 910 , an area determination module 920 , an area division module 930 and a dirt determination module 940 .
图像获取模块910,用于获取所述清洁设备上清洁件的目标图像;An image acquisition module 910, configured to acquire a target image of the cleaning piece on the cleaning device;
区域确定模块920,用于确定所述目标图像中的清洁件区域;an area determination module 920, configured to determine the area of the cleaning piece in the target image;
区域划分模块930,用于对所述清洁件区域进行区域划分,得到至少两个子区域;An area division module 930, configured to perform area division on the area of the cleaning element to obtain at least two sub-areas;
脏污确定模块940,用于基于每个子区域的像素值确定所述清洁设备的脏污程度。A dirt determination module 940, configured to determine the degree of dirt of the cleaning device based on the pixel value of each sub-region.
相关细节参考上述实施例。Relevant details refer to the above-mentioned examples.
需要说明的是:上述实施例中提供的清洁设备的脏污程度确定装置在进行清洁设备的脏污程度确定时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将清洁设备的脏污程度确定装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的清洁设备的脏污程度确定装置与清洁设备的脏污程度确定方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the device for determining the degree of dirtiness of the cleaning equipment provided in the above embodiments determines the degree of dirtiness of the cleaning equipment, it only uses the division of the above-mentioned functional modules for illustration. The above function allocation is completed by different functional modules, that is, the internal structure of the device for determining the degree of dirtiness of the cleaning device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for determining the degree of dirtiness of the cleaning equipment provided by the above embodiments and the embodiment of the method for determining the degree of dirtiness of the cleaning equipment belong to the same concept, and its specific implementation process is detailed in the method embodiment, and will not be repeated here.
图10是本申请一个实施例提供的电子设备的框图。该设备可以是图1所述的电子设备,该设备至少包括处理器1001和存储器1002。Fig. 10 is a block diagram of an electronic device provided by an embodiment of the present application. The device may be the electronic device described in FIG. 1 , and the device includes at least a processor 1001 and a memory 1002 .
处理器1001可以包括一个或多个处理核心,比如:4核心处理器、8核心处理器等。处理器1001可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1001也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1001可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘 制。一些实施例中,处理器1001还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1001 can adopt at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) accomplish. The processor 1001 may also include a main processor and a coprocessor, the main processor is a processor for processing data in a wake-up state, and is also called a CPU (Central Processing Unit, central processing unit); the coprocessor is Low-power processor for processing data in standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw the content required to be displayed on the display screen. system. In some embodiments, the processor 1001 may further include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is configured to process computing operations related to machine learning.
存储器1002可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1002还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1002中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器1001所执行以实现本申请中方法实施例提供的清洁设备的脏污程度确定方法。Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1001 to realize the cleaning device provided by the method embodiment in this application method for determining the degree of contamination.
在一些实施例中,外参标定设备还可选包括有:外围设备接口和至少一个外围设备。处理器1001、存储器1002和外围设备接口之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口相连。示意性地,外围设备包括但不限于:射频电路、触摸显示屏、音频电路、和电源等。In some embodiments, the external reference calibration device may optionally further include: a peripheral device interface and at least one peripheral device. The processor 1001, the memory 1002, and the peripheral device interface may be connected through a bus or a signal line. Each peripheral device can be connected with the peripheral device interface through a bus, a signal line or a circuit board. Schematically, peripheral devices include but are not limited to: radio frequency circuits, touch screens, audio circuits, and power supplies.
当然,外参标定设备还可以包括更少或更多的组件,本实施例对此不作限定。Of course, the external reference calibration device may also include fewer or more components, which is not limited in this embodiment.
可选地,本申请还提供有一种计算机可读存储介质,所述计算机可读存储介质中存储有程序,所述程序由处理器加载并执行以实现上述方法实施例的清洁设备的脏污程度确定方法。Optionally, the present application also provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and the program is loaded and executed by a processor to realize the degree of dirtiness of the cleaning equipment in the above method embodiment. Determine the method.
可选地,本申请还提供有一种计算机产品,该计算机产品包括计算机可读存储介质,所述计算机可读存储介质中存储有程序,所述程序由处理器加载并执行以实现上述方法实施例的清洁设备的脏污程度确定方法。Optionally, the present application also provides a computer product, the computer product includes a computer-readable storage medium, and a program is stored in the computer-readable storage medium, and the program is loaded and executed by a processor to implement the above method embodiments Method for determining the degree of soiling of cleaning equipment.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, should be considered as within the scope of this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several implementation modes of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as limiting the scope of the patent for the invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.
显然,上述所描述的实施例仅仅是本申请一部分的实施例,而不是全 部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,可以做出其它不同形式的变化或变动,都应当属于本申请保护的范围。 Apparently, the embodiments described above are only part of the embodiments of the present application, rather than all Example of the section. Based on the embodiments in this application, those skilled in the art may make other changes or changes in different forms without creative work, which shall fall within the scope of protection of this application.

Claims (15)

  1. 一种清洁设备的脏污程度确定方法,其特征在于,所述方法包括:A method for determining the degree of contamination of cleaning equipment, characterized in that the method comprises:
    获取所述清洁设备上清洁件的目标图像;Acquiring a target image of a cleaning piece on the cleaning device;
    确定所述目标图像中的清洁件区域;determining the area of the cleaning element in the target image;
    对所述清洁件区域进行区域划分,得到至少两个子区域;Divide the area of the cleaning element to obtain at least two sub-areas;
    基于每个子区域的像素值确定所述清洁设备的脏污程度。The degree of soiling of the cleaning device is determined based on the pixel values of each sub-area.
  2. 根据权利要求1所述的方法,其特征在于,所述清洁件在工作过程中,绕垂直于待清洁表面的中心轴旋转;The method according to claim 1, wherein the cleaning member rotates around a central axis perpendicular to the surface to be cleaned during operation;
    所述对所述清洁件区域进行区域划分,得到至少两个子区域,包括:The region of the cleaning element is divided to obtain at least two sub-regions, including:
    以所述清洁件区域中所述清洁件的中心轴为各个子区域的中心,对所述清洁件区域进行区域划分,得到所述至少两个子区域。Taking the central axis of the cleaning element in the area of the cleaning element as the center of each sub-area, the area of the cleaning element is divided to obtain the at least two sub-areas.
  3. 根据权利要求2所述的方法,其特征在于,所述以所述清洁件区域中所述清洁件的中心轴为各个子区域的中心,对所述清洁件区域进行区域划分,得到所述至少两个子区域,包括:The method according to claim 2, characterized in that, taking the central axis of the cleaning element in the cleaning element area as the center of each sub-area, the area of the cleaning element is divided into regions to obtain the at least Two sub-areas, including:
    在所述清洁件区域中所述清洁件的中心轴延伸方向上,依次将所述清洁件区域划分为至少两个子区域;其中,至少两个子区域的按照预设的划分系数划分。In the extension direction of the central axis of the cleaning element in the cleaning element area, the cleaning element area is sequentially divided into at least two sub-areas; wherein the at least two sub-areas are divided according to a preset division factor.
  4. 根据权利要求2或3所述的方法,其特征在于,所述清洁件整体呈圆形,相应地,所述清洁件区域整体呈圆形;所述中心轴过所述圆形的圆心;The method according to claim 2 or 3, characterized in that, the overall shape of the cleaning element is circular, and correspondingly, the area of the cleaning element is overall circular; the central axis passes through the center of the circle;
    所述以所述清洁件区域中所述清洁件的中心轴为各个子区域的中心,对所述清洁件区域进行区域划分,得到所述至少两个子区域,包括:Taking the central axis of the cleaning element in the cleaning element area as the center of each sub-area, the area of the cleaning element is divided to obtain the at least two sub-areas, including:
    以所述圆形的圆心为所述子区域中心,按照预设的n个划分系数将所述清洁件区域划分为n个子区域;Taking the center of the circle as the center of the sub-area, dividing the cleaning element area into n sub-areas according to preset n division coefficients;
    其中,第1个子区域是半径为第1个划分系数与R的乘积的圆,第i个子区域是半径为第i个划分系数与R的乘积的外圆减去半径为第i-1个划分系数与R的乘积的内圆得到的圆环;所述R为所述清洁件区域的半径;所述i依次取从2至n的整数,所述n为大于1的整数,第n个划分系数为1。Among them, the first sub-area is a circle whose radius is the product of the first division coefficient and R, and the i-th sub-area is the outer circle whose radius is the product of the i-th division coefficient and R minus the radius of the i-1th division The ring obtained by the inner circle of the product of the coefficient and R; the R is the radius of the cleaning part area; the i takes integers from 2 to n in turn, and the n is an integer greater than 1, and the nth division The coefficient is 1.
  5. 根据权利要求2或3所述的方法,其特征在于,所述清洁件整体不为圆形;The method according to claim 2 or 3, characterized in that, the overall cleaning piece is not circular;
    所述以所述清洁件区域中所述清洁件的中心轴为各个子区域的中 心,对所述清洁件区域进行区域划分,得到所述至少两个子区域,包括:The central axis of the cleaning piece in the cleaning piece area is the center of each sub-area At the center, the area of the cleaning element is divided into areas to obtain the at least two sub-areas, including:
    以所述清洁件区域中所述清洁件的中心轴为各个子区域的中心,按照预设的n个划分系数将所述清洁件区域划分为n个子区域;Taking the central axis of the cleaning piece in the cleaning piece area as the center of each sub-area, divide the cleaning piece area into n sub-areas according to preset n division coefficients;
    其中,第1个子区域是半径为第1个划分系数与R的乘积的圆;第i个子区域是半径为第i个划分系数与R的乘积的外圆减去半径为第i-1个划分系数与R的乘积的内圆得到的圆环;第n个子区域是所述清洁件的边缘构成的图形减去半径为第n-1个划分系数与R的乘积的内圆得到的区域;R为所述清洁件的中心轴与所述清洁件的边缘之间的最小距离;所述i依次取从2至n-1的正整数。Among them, the first sub-area is a circle whose radius is the product of the first division coefficient and R; the i-th sub-area is the outer circle whose radius is the product of the i-th division coefficient and R minus the radius of the i-1th division The ring obtained by the inner circle of the product of the coefficient and R; the nth sub-region is the area obtained by subtracting the inner circle of the product of the n-1 division coefficient and R from the figure formed by the edge of the cleaning piece; R is the minimum distance between the central axis of the cleaning piece and the edge of the cleaning piece; the i takes a positive integer from 2 to n-1 in sequence.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述基于每个子区域的像素值确定所述清洁设备的脏污程度之后,还包括:The method according to any one of claims 1-5, wherein after determining the degree of dirtiness of the cleaning device based on the pixel value of each sub-area, further comprising:
    生成所述脏污程度的数据描述值;其中,所述数据描述值包括高阶位和低阶位,所述高阶位和所述低阶位均与所述脏污程度呈正相关关系,所述高阶位用于描述所述脏污程度的整数位个数,所述低阶位在所述整数位不为零的情况下为所述整数位的前m位数、所述低阶位在所述整数位为零的情况下为所述脏污程度的小数部分;所述m为正整数;generating a data description value of the degree of dirtiness; wherein, the data description value includes a high-order bit and a low-order bit, and both the high-order bit and the low-order bit are positively correlated with the degree of dirtiness, so The high-order bits are used to describe the number of integer bits of the degree of dirtiness, and the low-order bits are the first m digits of the integer bits, the low-order bits In the case where the integer is zero, it is the fractional part of the degree of contamination; the m is a positive integer;
    使用所述脏污程度的数据描述值对不同的脏污程度进行比较,以确定所述清洁设备的清洁效果。Using the data description value of the degree of dirt to compare different degrees of dirt to determine the cleaning effect of the cleaning device.
  7. 根据权利要求6所述的方法,其特征在于,所述使用所述数据描述值对不同的脏污程度进行比较,包括:The method according to claim 6, wherein said comparing different degrees of dirt by using said data description value comprises:
    将不同的脏污程度对应的高阶位进行比较;Compare the high-order bits corresponding to different degrees of dirtiness;
    在不同的脏污程度对应的高阶位相同的情况下,将不同的脏污程度对应的低阶位进行比较;In the case that the high-order bits corresponding to different dirty degrees are the same, compare the low-order bits corresponding to different dirty degrees;
    在不同的脏污程度对应的高阶位不同的情况下,确定高阶位较大的脏污程度较大。In the case of different high-order bits corresponding to different soiling degrees, it is determined that the soiling degree with a larger high-order bit is larger.
  8. 根据权利要求6所述的方法,其特征在于,所述脏污程度包括不同子区域的局部脏污程度;所述使用所述数据描述值对不同的脏污程度进行比较,包括:The method according to claim 6, wherein the degree of dirtiness includes local dirtiness levels of different sub-regions; and comparing different dirtiness levels using the data description value includes:
    使用所述数据描述值对不同的子区域的局部脏污程度进行比较;Using the data description value to compare the local dirtiness of different sub-regions;
    其中,不同的子区域包括所述清洁设备上不同清洁件对应的同一子 区域;和/或,所述清洁设备上同一清洁件对应的不同子区域。Wherein, different subregions include the same subregion corresponding to different cleaning parts on the cleaning equipment. area; and/or, different sub-areas corresponding to the same cleaning piece on the cleaning device.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述基于每个子区域的像素值确定所述清洁设备的脏污程度,包括:The method according to any one of claims 1-8, wherein the determining the degree of dirtiness of the cleaning device based on the pixel value of each sub-area comprises:
    确定所述子区域内目标像素的像素值累加和,所述目标像素为所述子区域内满足预设脏污条件的像素;determining the cumulative sum of pixel values of target pixels in the sub-area, where the target pixel is a pixel in the sub-area that satisfies a preset dirty condition;
    基于所述像素值累加和确定每个子区域的局部脏污程度,得到所述清洁设备的脏污程度;所述像素值累加和与所述局部脏污程度呈负相关关系。The local dirty degree of each sub-region is determined based on the cumulative sum of pixel values to obtain the dirty degree of the cleaning device; the cumulative sum of pixel values is negatively correlated with the local dirty degree.
  10. 根据权利要求9所述的方法,其特征在于,所述基于所述像素值累加和确定每个子区域的局部脏污程度,包括:The method according to claim 9, wherein said accumulating and determining the local dirtiness of each sub-region based on said pixel value comprises:
    对所述子区域内的像素值累加和取倒数,并进行归一化处理,作为所述子区域的局部脏污程度。The pixel values in the sub-area are accumulated and reciprocated, and normalized, as the local dirtiness of the sub-area.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-10, further comprising:
    基于所述清洁件区域的像素值,确定所述清洁件区域的全局脏污程度,所述清洁设备的脏污程度包括所述全局脏污程度和每个子区域的局部脏污程度;Based on the pixel value of the cleaning element area, determine the global dirt level of the cleaning element area, the dirt level of the cleaning device includes the global dirt level and the local dirt level of each sub-area;
    基于所述局部脏污程度和所述全局脏污程度,确定所述清洁设备的清洁效果。Based on the local soiling degree and the global soiling degree, the cleaning effect of the cleaning device is determined.
  12. 根据权利要求11所述的方法,其特征在于,所述基于所述局部脏污程度和所述全局脏污程度,确定所述清洁设备的清洁效果,包括:The method according to claim 11, wherein the determining the cleaning effect of the cleaning equipment based on the local dirtiness level and the global dirtiness level comprises:
    在各个局部脏污程度大于第一阈值、且各个全局脏污程度大于第二阈值的情况下,确定清洁设备达到期望清洁效果;When each local degree of dirt is greater than a first threshold and each global degree of dirt is greater than a second threshold, it is determined that the cleaning device achieves a desired cleaning effect;
    在至少一个局部脏污程度小于或等于第一阈值、或者至少一个全局脏污程度小于或等于第二阈值的情况下,确定清洁设备未达到期望清洁效果。When at least one local degree of dirt is less than or equal to the first threshold, or at least one global degree of dirt is less than or equal to the second threshold, it is determined that the cleaning device does not achieve the desired cleaning effect.
  13. 根据权利要求1所述的方法,其特征在于,所述确定所述目标图像中的清洁件区域,包括:The method according to claim 1, wherein said determining the area of the cleaning element in the target image comprises:
    对所述目标图像进行前景提取,得到所述清洁件区域。Foreground extraction is performed on the target image to obtain the area of the cleaning element.
  14. 一种电子设备,其特征在于,所述电子设备包括处理器和与所述 处理相连的存储器,所述存储器中存储有程序,所述处理器执行所述程序时用于实现如权利要求1至13任一所述的清洁设备的脏污程度确定方法。An electronic device, characterized in that the electronic device includes a processor and the A memory is connected to the processing, and a program is stored in the memory, and when the processor executes the program, it is used to realize the method for determining the degree of dirtiness of the cleaning equipment according to any one of claims 1 to 13.
  15. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有程序,所述程序被处理器执行时用于实现如权利要求1至13任一所述的清洁设备的脏污程度确定方法。 A computer-readable storage medium, characterized in that a program is stored in the storage medium, and when the program is executed by a processor, it is used to determine the degree of dirtiness of the cleaning device according to any one of claims 1 to 13 method.
PCT/CN2023/074515 2022-03-01 2023-02-06 Method and device for determining dirt level of cleaning device, and storage medium WO2023165298A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210196525.1 2022-03-01
CN202210196525.1A CN116739961A (en) 2022-03-01 2022-03-01 Method, device and storage medium for determining dirt degree of cleaning device

Publications (1)

Publication Number Publication Date
WO2023165298A1 true WO2023165298A1 (en) 2023-09-07

Family

ID=87883024

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/074515 WO2023165298A1 (en) 2022-03-01 2023-02-06 Method and device for determining dirt level of cleaning device, and storage medium

Country Status (2)

Country Link
CN (1) CN116739961A (en)
WO (1) WO2023165298A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111789538A (en) * 2020-07-07 2020-10-20 追创科技(苏州)有限公司 Method and device for determining degree of soiling of cleaning mechanism, and storage medium
CN113026294A (en) * 2019-12-24 2021-06-25 青岛海尔洗衣机有限公司 Self-cleaning method for washing equipment
CN115399697A (en) * 2022-08-19 2022-11-29 追觅创新科技(苏州)有限公司 Self-cleaning method and device for cleaning equipment, storage medium and electronic device
CN115486756A (en) * 2022-09-09 2022-12-20 添可智能科技有限公司 Cleaning equipment self-cleaning method, cleaning equipment and base station
CN115500750A (en) * 2022-09-09 2022-12-23 添可智能科技有限公司 Self-cleaning and water injection method of sewage tank, cleaning equipment and base station

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113026294A (en) * 2019-12-24 2021-06-25 青岛海尔洗衣机有限公司 Self-cleaning method for washing equipment
CN111789538A (en) * 2020-07-07 2020-10-20 追创科技(苏州)有限公司 Method and device for determining degree of soiling of cleaning mechanism, and storage medium
CN115399697A (en) * 2022-08-19 2022-11-29 追觅创新科技(苏州)有限公司 Self-cleaning method and device for cleaning equipment, storage medium and electronic device
CN115486756A (en) * 2022-09-09 2022-12-20 添可智能科技有限公司 Cleaning equipment self-cleaning method, cleaning equipment and base station
CN115500750A (en) * 2022-09-09 2022-12-23 添可智能科技有限公司 Self-cleaning and water injection method of sewage tank, cleaning equipment and base station

Also Published As

Publication number Publication date
CN116739961A (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN110766679B (en) Lens contamination detection method and device and terminal equipment
Zhang et al. Guided mesh normal filtering
US20200005468A1 (en) Method and system of event-driven object segmentation for image processing
Žunić et al. A Hu moment invariant as a shape circularity measure
JP5693729B2 (en) Method for detecting an arbitrary number of touches from a multi-touch device
Pei et al. D-FCM: Density based fuzzy c-means clustering algorithm with application in medical image segmentation
CN105518590A (en) System and method for improved processing of touch sensor data
CN110622214B (en) Rapid progressive method for space-time video segmentation based on super-voxels
CN114359412B (en) Automatic calibration method and system for external parameters of camera facing to building digital twins
WO2023138365A1 (en) Method for controlling cleaning device, and device and storage medium
CN112014413A (en) Mobile phone glass cover plate window area defect detection method based on machine vision
CN105049706A (en) Image processing method and terminal
TW202117506A (en) Electronic apparatus and object information recognition method by using touch data thereof
WO2023165298A1 (en) Method and device for determining dirt level of cleaning device, and storage medium
CN116188379A (en) Edge defect detection method, device, electronic equipment and storage medium
CN115294527A (en) Subway tunnel damage detection method based on computer vision
CN113034387B (en) Image denoising method, device, equipment and medium
Sanny et al. Energy-efficient median filter on FPGA
US20190258325A1 (en) Mid-air finger pointing detection for device interaction
WO2024016686A1 (en) Corner detection method and apparatus
CN112001933A (en) Image capturing method, device, equipment and medium
Li et al. Transition region-based single-object image segmentation
CN109165648B (en) Image processing method, image processing device and mobile terminal
CN116579997A (en) Wafer crack detection method and device, electronic equipment and storage medium
Xiong et al. Fpga implementation of blob recognition

Legal Events

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

Ref document number: 23762699

Country of ref document: EP

Kind code of ref document: A1