Image recognition-based evaluation method, device and system for cleaning effect of sanitary wares
Patent Information
- Application Number
- CN202611081923.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-07-21
AI Technical Summary
[0003]1)与实际污渍的化学组成不一致:墨水的理化性质与真实使用场景中的污渍(如油脂、尿液、固体残渣、复合污渍等)差异显著,附着力、润湿性、扩散性及光学反射特性均不同,导致冲洗去除行为与实际污渍脱节,评价结果难以客观映射到真实清洁效果
[0013]根据本申请所提供的实施方案,获取卫生洁具清洁前、后的灰度图像,并将其分别与表征洁净状态的参考灰度图像进行配准与差异化分析,对应生成第一差异图像和第二差异图像;进一步根据两幅差异图像确定用于评价清洁效果的标记区域,并确定该标记区域内的清洁效果。由此,该方法以洁净状态参考灰度图像作为客观评价基准,能够更准确地反映卫生洁具表面与洁净状态之间的真实接近程度,有效抑制因水渍、反光、阴影及环境光照变化等非污渍因素引发的灰度波动,降低误判风险。同时,通过聚焦于标记区域进行评价,在减少冗余计算量的基础上,使评估结果更具针对性和直观性,从而实现对卫生洁具清洁效果的高效、准确评价。
Smart Images

Figure CN122597833B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and more specifically to methods, apparatus, systems, media, and procedures for evaluating the cleaning effect of sanitary ware based on image recognition. Background Technology
[0002] The cleaning effectiveness of sanitary ware directly impacts users' hygiene and health. Therefore, evaluating the cleaning effectiveness of sanitary ware has always been a crucial issue in the industry. Traditional evaluation methods often employ the ink line method (also known as the ink stain method): one or more standard ink lines are pre-applied inside the sanitary ware, and the length or area of the remaining ink lines after rinsing reflects the cleaning effectiveness. However, this method has the following limitations:
[0003] 1) The chemical composition of the ink is inconsistent with that of the actual stains: The physical and chemical properties of the ink are significantly different from those of stains in real-world use scenarios (such as grease, urine, solid residues, and complex stains). The ink's adhesion, wettability, diffusion, and optical reflection characteristics are all different, which leads to a disconnect between the rinsing and removal behavior and the actual stains. As a result, the evaluation results are difficult to objectively reflect the actual cleaning effect.
[0004] 2) It can only represent the average removal level of the marked area and is difficult to reflect the whole: The ink line method only generates a measurable signal in the local area where the line is drawn, and cannot cover complex curved surfaces and hidden parts such as the inner wall, edge, and water trap of sanitary ware; moreover, the linear marking has limited sensitivity to local water flow distribution and surface morphology, and is difficult to reflect the cleaning differences and weak points in the overall spatial distribution.
[0005] 3) The operation is cumbersome and highly dependent on the process: Each test requires redrawing the lines, which is affected by factors such as the thickness, length, position of the ink lines, ambient lighting, and shooting posture. The repeatability and standardization are insufficient, which is not conducive to batch and long-term stable evaluation.
[0006] Therefore, it is necessary to optimize the evaluation scheme for the cleaning effect of sanitary ware in order to improve the objectivity and repeatability of the evaluation scheme. Summary of the Invention
[0007] In view of the above problems, this application provides a method, apparatus, system, medium and procedure for evaluating the cleaning effect of sanitary ware based on image recognition.
[0008] According to an embodiment of the first aspect of this application, an image recognition-based method for evaluating the cleaning effect of sanitary ware is provided, comprising: acquiring a first grayscale image of the sanitary ware before cleaning and a second grayscale image of the sanitary ware after cleaning; registering the first grayscale image and the second grayscale image with a reference grayscale image of the sanitary ware respectively to obtain a first grayscale registered image and a second grayscale registered image, wherein the reference grayscale image is a grayscale image used to characterize the sanitary ware as being in a clean state; performing differential processing on the first grayscale registered image and the reference grayscale image to obtain a first differential image, and performing differential processing on the second grayscale registered image and the reference grayscale image to obtain a second differential image; determining a marked area for evaluating the cleaning effect of the sanitary ware based on the first differential image and the second differential image; and determining the cleaning effect of the sanitary ware based on the grayscale difference between the first differential image and the second differential image for the marked area.
[0009] According to an embodiment of the second aspect of this application, an image recognition-based device for evaluating the cleaning effect of sanitary ware is provided, comprising: an acquisition module for acquiring a first grayscale image of the sanitary ware before cleaning and a second grayscale image of the sanitary ware after cleaning; a registration module for registering the first grayscale image and the second grayscale image with a reference grayscale image of the sanitary ware, respectively, to obtain a first grayscale registration image and a second grayscale registration image, wherein the reference grayscale image is a grayscale image used to characterize the sanitary ware as being in a clean state; a differentiation processing module for performing differentiation processing on the first grayscale registration image and the reference grayscale image to obtain a first difference image, and performing differentiation processing on the second grayscale registration image and the reference grayscale image to obtain a second difference image; a first determination module for determining a marked area for evaluating the cleaning effect of the sanitary ware based on the first difference image and the second difference image; and a second determination module for determining the cleaning effect of the sanitary ware based on the grayscale difference between the first difference image and the second difference image for the marked area.
[0010] According to an embodiment of the third aspect of this application, an image recognition-based system for evaluating the cleaning effect of sanitary ware is provided, comprising: an image acquisition device for acquiring a first image of the sanitary ware before cleaning and a second image of the sanitary ware after cleaning, wherein the first image is used to obtain a first grayscale image after preprocessing, and the second image is used to obtain a second grayscale image after preprocessing; and a computing device including one or more processors and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the evaluation method described above.
[0011] According to an embodiment of the fourth aspect of this application, a computer-readable storage medium is also provided, on which a computer program or instructions are stored, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described method.
[0012] According to an embodiment of the fifth aspect of this application, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0013] According to the implementation scheme provided in this application, grayscale images of sanitary ware before and after cleaning are obtained, and these images are registered and differentially analyzed with reference grayscale images representing the cleanliness state, respectively, to generate a first difference image and a second difference image. Furthermore, based on the two difference images, a marked area for evaluating the cleaning effect is determined, and the cleaning effect within this marked area is determined. Therefore, this method uses a reference grayscale image of the cleanliness state as an objective evaluation benchmark, which can more accurately reflect the true approximation between the sanitary ware surface and its cleanliness state, effectively suppressing grayscale fluctuations caused by non-stain factors such as water stains, reflections, shadows, and changes in ambient light, thus reducing the risk of misjudgment. Simultaneously, by focusing the evaluation on the marked area, redundant computation is reduced, making the evaluation results more targeted and intuitive, thereby achieving an efficient and accurate evaluation of the cleaning effect of sanitary ware. Attached Figure Description
[0014] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0015] Figure 1 The diagram illustrates an application scenario of an image recognition-based method for evaluating the cleaning effect of sanitary ware according to an embodiment of this application.
[0016] Figure 2 A flowchart is shown for an image recognition-based method for evaluating the cleaning effect of sanitary ware according to an embodiment of this application;
[0017] Figure 3 Images of sanitary ware taken before cleaning, after cleaning, and in a clean state are shown.
[0018] Figure 4 A flowchart illustrating a method for obtaining a first grayscale registered image and a second grayscale registered image through image registration according to an embodiment of this application is shown.
[0019] Figure 5 A first difference image of a toilet according to an embodiment of the present application is shown, wherein (a) is the first difference image and (b) shows the first significant difference region;
[0020] Figure 6A second difference image of a toilet according to an embodiment of this application is shown, wherein (a) is a second difference image and (b) shows a second significant difference region;
[0021] Figure 7 A flowchart illustrating a method for determining a region to be marked according to an embodiment of this application is shown;
[0022] Figure 8 Images of sanitary ware taken at different times during the rinsing process according to embodiments of this application are shown;
[0023] Figure 9 The embodiments of this application show the cleanliness variation curves for different stain types at different rinsing times;
[0024] Figure 10 This application illustrates a method for obtaining a reference grayscale image according to an embodiment of the present application;
[0025] Figure 11 A structural block diagram of an image recognition-based sanitary ware cleaning effect evaluation device according to an embodiment of this application is shown;
[0026] Figure 12 A block diagram of a computing device suitable for implementing an image recognition-based method for evaluating the cleaning effect of sanitary ware, according to an embodiment of this application, is shown. Detailed Implementation
[0027] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0029] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0030] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0031] Given that methods such as the ink line method for evaluating the cleaning effect of sanitary ware have drawbacks, including the inability to objectively reflect the true cleaning effect, the fact that the evaluation results only represent the removal level of the marked area and fail to reflect the overall cleaning differences and weak points, the cumbersome operation, and poor repeatability due to the influence of ink line size and position, environmental conditions, etc., this application provides a sanitary ware cleaning effect evaluation system based on image recognition. Through image acquisition and processing technology, it differentiates and compares images before and after cleaning, avoiding the chemical and spatial representativeness biases and cumbersome operation problems of the ink line method, and can form an objective, repeatable, and gradeable cleaning effect evaluation standard.
[0032] Specifically, embodiments of this application provide an image recognition-based method for evaluating the cleaning effect of sanitary ware, comprising: acquiring a first grayscale image of the sanitary ware before cleaning and a second grayscale image of the sanitary ware after cleaning; registering the first grayscale image and the second grayscale image with a reference grayscale image of the sanitary ware, respectively, to obtain a first grayscale registered image and a second grayscale registered image, wherein the reference grayscale image is used to characterize the sanitary ware as being in a clean state; performing differential processing on the first grayscale registered image and the reference grayscale image to obtain a first differential image, and performing differential processing on the second grayscale registered image and the reference grayscale image to obtain a second differential image; determining a marked area for evaluating the cleaning effect of the sanitary ware based on the first differential image and the second differential image; and determining the cleaning effect of the sanitary ware based on the grayscale difference between the first differential image and the second differential image for the marked area.
[0033] Figure 1 The diagram illustrates an application scenario of an image recognition-based method for evaluating the cleaning effect of sanitary ware according to an embodiment of this application.
[0034] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first image acquisition device 101, a second image acquisition device 102, a third image acquisition device 103, a network 104, and a computing device 105. The network 104 serves as a medium for providing a communication link between the first image acquisition device 101, the second image acquisition device 102, the third image acquisition device 103, and the computing device 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0035] Users can interact with the computing device 105 using the first image acquisition device 101, the second image acquisition device 102, and the third image acquisition device 103 to receive or send messages, etc. The first image acquisition device 101, the second image acquisition device 102, and the third image acquisition device 103 may each include an industrial camera, an adjustable bracket, and a light source compensation device, used to acquire images before and after cleaning sanitary ware. However, they are not limited to these; they can also be smartphones, tablets, etc., whose image resolution meets the acquisition requirements (e.g., resolution not less than 12MP).
[0036] The computing device 105 can be a server or terminal device that provides various services, such as a mobile phone, a portable computer, or a desktop computer. For example, it can process images acquired by the user using the first image acquisition device 101, the second image acquisition device 102, and the third image acquisition device 103, and can feed back the processing results to the terminal device or the image acquisition device.
[0037] It should be noted that the image recognition-based method for evaluating the cleaning effect of sanitary ware provided in this application embodiment can generally be executed by the computing device 105. Correspondingly, the image recognition-based device for evaluating the cleaning effect of sanitary ware provided in this application embodiment can generally be housed within the computing device 105. It should be understood that... Figure 1 The number of image acquisition devices, networks, and computing devices shown is merely illustrative. Depending on implementation needs, any number of image acquisition devices, networks, and computing devices can be included.
[0038] The following will be based on Figure 1 The described scene, through Figures 2-10 The image recognition-based method for evaluating the cleaning effect of sanitary ware according to embodiments of this application will be described in detail.
[0039] Figure 2 A flowchart is shown of an image recognition-based method for evaluating the cleaning effect of sanitary ware according to an embodiment of this application.
[0040] like Figure 2 As shown, the image recognition-based method for evaluating the cleaning effect of sanitary ware in this embodiment includes operations S210 to S250.
[0041] In operation S210, a first grayscale image of the sanitary ware before cleaning and a second grayscale image after cleaning are acquired.
[0042] In operation S220, the first grayscale image and the second grayscale image are registered with the reference grayscale image of the sanitary ware respectively to obtain the first grayscale registered image and the second grayscale registered image. The reference grayscale image is used to characterize that the sanitary ware is in a clean state.
[0043] In operation S230, the first grayscale registered image and the reference grayscale image are subjected to differential processing to obtain the first differential image, and the second grayscale registered image and the reference grayscale image are subjected to differential processing to obtain the second differential image.
[0044] In operation S240, a marked area for evaluating the cleaning effect of sanitary ware is determined based on the first difference image and the second difference image.
[0045] In operation S250, for the marked area, the cleaning effect of the sanitary ware is determined based on the grayscale difference between the first difference image and the second difference image.
[0046] According to some embodiments of this application, sanitary ware refers to fixed sanitary appliances with a cleanable solid surface used for human excretion, washing, or indoor hygiene maintenance. Its materials can be sanitary ceramics, enamel, glass, metal, plastic, or composite materials, and the surface can be glazed or treated with other functional coatings, without limitation on color and shape. In particular, it refers to appliances with a surface to be cleaned, suitable for before-and-after imaging comparison, including but not limited to: toilet-type sanitary ware, such as toilets, squat toilets, urinals, and smart toilets (including models with washing / drying functions); washing-type sanitary ware, such as washbasins / washbasins, mop sinks, washing tubs, and laboratory / medical handwashing basins; bathing-type sanitary ware, such as bathtubs and shower trays (shower trays / shower room basins); and other fixed sanitary ware related to hygiene with an imaging surface such as a cavity / inner wall / edge.
[0047] To match the image acquisition and processing scheme of this application, preferred sanitary ware may have at least one of the following characteristics: having an area for repeated framing such as an inner wall, edge, or curved surface, or having an observable part such as a water trap / drainage channel, so as to perform image registration and grayscale difference calculation before and after cleaning. Disposable or non-fixed cleaning tools (such as rags, mops, brushes), wearable or portable personal care products (such as portable toilet bags), furniture and decorative surfaces not directly related to hygiene are not within the scope of the sanitary ware defined in this application.
[0048] According to some embodiments of this application, since the main difference between these sanitary wares and the stains on them, such as limescale and fecal residue, and the sanitary ware in the image is the difference in brightness / grayscale, grayscale images are used as the analysis object. Compared with color images, since color information is removed, it is not only helpful to eliminate the misjudgment of changes in water stains, reflections, shadows, etc. caused by changes in light angle, but also to improve image processing efficiency and achieve efficient evaluation of the cleaning effect of sanitary ware.
[0049] According to the evaluation method provided in this application, grayscale images of sanitary ware before and after cleaning are first acquired, and then registered and differentiated with a reference grayscale image representing the cleanliness state, respectively, to generate a first difference image and a second difference image. Further, based on the two difference images, a marked area for evaluating the cleaning effect is determined, and the cleaning effect within that marked area is also determined. Therefore, this method uses a reference grayscale image of the cleanliness state as an objective evaluation benchmark, which can more accurately reflect the true degree of closeness between the sanitary ware surface and the cleanliness state, effectively suppressing grayscale fluctuations caused by non-stain factors such as water stains, reflections, shadows, and changes in ambient light, thus reducing the risk of misjudgment. Simultaneously, by focusing the evaluation on the marked area, redundant computation is reduced, making the evaluation results more targeted and intuitive, thereby achieving an efficient and accurate evaluation of the cleaning effect of sanitary ware.
[0050] According to some embodiments of this application, in operation S210, acquiring a first grayscale image of the sanitary ware before cleaning and a second grayscale image after cleaning may include:
[0051] A first image of the sanitary ware before cleaning and a second image after cleaning were captured by taking pictures; the first and second images were then converted to grayscale to obtain a first grayscale image and a second grayscale image.
[0052] In some examples, to ensure temporal and spatial consistency between the first and second images, thereby enabling more accurate comparative analysis, the first and second images of the sanitary ware can be acquired under the same environmental settings (e.g., the same lighting) and image acquisition location.
[0053] According to some embodiments of this application, taking a toilet as an example, a first image (or a first grayscale image) and a second image (or a second grayscale image) cover key feature regions related to the cleaning effect evaluation of the toilet. These key feature regions include at least one of the following areas: the inner wall of the toilet, the edge of the toilet, the flushing area, etc. For toilets with a water tank structure, it may further include areas such as the water tank and the water tank connection area. Thus, edge contour features, grayscale distribution features, and local texture features can be extracted using these key feature regions. For example, Figure 3 Images illustrating sanitary ware before cleaning, after cleaning, and in a clean state are shown, such as... Figure 3 As shown, the acquired images include the inner wall of the toilet, the edge of the toilet, and the water trap area, with suitable clarity and lighting stability.
[0054] In some examples, edge contour features are used to identify the fixed structural boundaries of sanitary ware; taking toilets as an example, edge contour features may include the edge curve of the toilet bowl, the inner wall contour, and the location of connecting corners. Gray-scale distribution features are used to characterize the brightness variations of different areas of the surface to reflect the degree of stain adhesion and the brightness recovery after cleaning. Local texture features are used to distinguish the texture differences between stained and clean areas, improving the accuracy of stain identification. In the subsequent image registration process, the extracted edge contour features and / or local texture features can be used as a reference to determine the positional offset relationship of image registration through feature matching, ensuring that the two images are compared in the same spatial coordinate system.
[0055] According to some embodiments of this application, the first grayscale image, the second grayscale image, and the reference grayscale image each include key feature regions for extracting edge contour features and local texture features. Figure 4 A flowchart illustrating a method for obtaining a first grayscale registered image and a second grayscale registered image through image registration according to an embodiment of this application is shown, as follows: Figure 4 As shown, in operation S220, the first grayscale image and the second grayscale image are registered with the reference grayscale image of the sanitary ware respectively to obtain the first grayscale registered image and the second grayscale registered image, including sub-operations S221 to S223.
[0056] In sub-operation S221, a template region containing key feature points is selected in the reference grayscale image of the sanitary ware. The key feature points include pixel positions corresponding to edge contour features and / or local texture features.
[0057] In some embodiments, the selection of key feature points can be achieved by edge detection or local grayscale difference to screen candidate feature points in the key feature region; the candidate feature point with the smallest matching error in the sliding search is selected as the key feature point, i.e., the final registration reference point. The screened candidate feature points can be, for example, locations where the grayscale gradient is greater than a preset gradient, corresponding to edge contour features (e.g., toilet bowl edge contour, inner wall arc boundary, etc.); regions with significant local texture changes can be, for example, locations where the curvature change is greater than a preset area, corresponding to local texture features (e.g., stain edges, structural corners, etc.).
[0058] Thus, the template region containing these key feature points has the advantages of significant grayscale changes, stable structure and high repeatability, which helps to improve the image registration accuracy in the subsequent image registration process, improve the consistency and repeatability of evaluation results under different batch image acquisition conditions, and thus achieve standardized quantitative evaluation of the cleaning effect of sanitary ware.
[0059] In some embodiments, one or more key feature points can be selected. One key feature point can correspond to one template region, and multiple key feature points can correspond to one or more template regions. In this case, the multiple key feature points and template regions may have a one-to-one correspondence or may not have a one-to-one correspondence. In addition, there is no particular limitation on the size of the template region, which can be selected according to actual needs, such as 100*100, etc. The selected template is, for example, (301:400, 201:300), where 301:400 represents the image row coordinate range, and 201:300 represents the image column coordinate range.
[0060] In sub-operation S222, the first grayscale image and the second grayscale image are used as the images to be registered, respectively. Based on a window of the same size as the template region, a sliding search is performed on the images to be registered to determine the target region that matches the template region.
[0061] In some embodiments, the target region is the location region of the window where the grayscale difference between the window and the template region is minimized. In this case, for multiple template regions, the template region with the smallest grayscale difference can be used as the final registration reference region, and the location region of the window with the smallest grayscale difference during sliding search based on this template region can be used as the target region.
[0062] In some more specific embodiments, the grayscale difference between the window and the template region can be represented by the sum of the absolute grayscale differences between them. That is, the region corresponding to the window is determined as the target region when the sum of the absolute grayscale differences between the window and the template region is minimized. The target region determined in this way can be used as the basis for calculating the subsequent translation deviation. This has the advantage of low computational cost and is more suitable for use when the environmental settings and image acquisition positions are highly consistent. Of course, it is not limited to this; for example, normalized cross-correlation or the sum of squared differences can also be used to characterize the grayscale difference.
[0063] In sub-operation S223, the image to be registered is translated according to the translation deviation between the template region and the target region to obtain a grayscale registration image, wherein the grayscale registration image corresponding to the first grayscale image is the first grayscale registration image, and the grayscale registration image corresponding to the second grayscale image is the second grayscale registration image.
[0064] For example, if the template region's position coordinates in the original reference grayscale image are (301, 201), and the target region's position coordinates in the image to be registered, determined through a sliding search, are (u, v), then the translation offset can be determined as x = 301 - u and y = 201 - v, which serve as the translation offset between the image to be registered and the reference grayscale image. The final registration is then completed by image translation based on these translation offsets.
[0065] Therefore, based on the aforementioned sub-operations 221-223, image registration is performed using a template region containing key feature points. This avoids direct matching in areas with drastic stain changes, reduces the impact of stain morphology on the registration result, ensures the stability and robustness of image matching, and improves image alignment accuracy under different shooting angles and lighting conditions. This results in more precise image registration, ensuring that subsequent grayscale difference analysis is performed in the same spatial location, thus improving the accuracy and repeatability of cleaning effect evaluation. Furthermore, when lighting and shooting angles are relatively stable and the images primarily exhibit translational changes, template matching using the sliding window method can achieve pixel-level accuracy, providing a solid foundation for the accuracy of subsequent cleaning effect evaluation.
[0066] According to some embodiments of this application, in operation S230, differential processing is performed on the first grayscale registration image and the reference grayscale image to obtain a first differential image, and differential processing is performed on the second grayscale registration image and the reference grayscale image to obtain a second differential image, including:
[0067] For the first grayscale registration image, the absolute values of the differences between the grayscale values at multiple pixel locations and the corresponding grayscale values at the same pixel locations in the reference grayscale image are determined to generate a first difference image; and,
[0068] For the second grayscale registration image, the absolute value of the difference between the grayscale values of multiple pixel positions and the corresponding grayscale values of the reference grayscale image is determined, and a second difference image is generated.
[0069] For example, if the grayscale value of a pixel in the reference grayscale image is 120, and the corresponding pixel in the first grayscale registration image has a grayscale value of 50, then the absolute difference at that pixel location is |120-50| = 70. Thus, a first difference image is generated based on the absolute difference values of different pixel locations. Similarly, if the grayscale value of a corresponding pixel in the second grayscale registration image is 100, then the absolute difference at that pixel location is |120-100| = 20. A second difference image is generated based on the absolute difference values of different pixel locations.
[0070] Understandably, the greater the grayscale difference between a region and the first grayscale registered image and the reference grayscale image, the higher the degree of staining in the corresponding region before cleaning; the smaller the grayscale difference between a region and the second grayscale registered image and the reference grayscale image, the closer the corresponding region is to a clean state after cleaning, and the better the stain removal effect.
[0071] To further facilitate understanding, Figure 3 Taking the toilet shown as an example, after grayscale conversion, image registration, and differential processing, a differential image is obtained. Figure 5The image shows a first difference image of a toilet according to an embodiment of this application, wherein (a) is the first difference image and (b) shows the first significant difference region. Figure 6 A second difference image of a toilet according to an embodiment of this application is shown, wherein (a) is the second difference image and (b) shows the second significant difference region. Figure 5 As shown in Figure (a), before cleaning, apart from the reflective area around the toilet rim, the stains were mainly distributed on the inner wall of the toilet bowl, such as... Figure 6 As shown in Figure (a), after cleaning, some stains remain in the trap of the toilet compared to when it is clean.
[0072] Thus, by introducing a reference grayscale image for differential processing to obtain a first differential image and a second differential image, on the one hand, since the grayscale image of the clean state is used as a common benchmark for differential analysis, it is possible to determine the extent to which the cleaned state is closer to the clean state than before cleaning, thereby more accurately characterizing the degree of stain removal. On the other hand, it can also effectively reduce the impact of environmental changes and local shadows, i.e., shooting conditions, on the evaluation of cleaning effect, thereby more accurately reflecting the removal of stains on the surface of sanitary ware. Furthermore, based on the first and second differential images, it is possible to more accurately extract the marked areas for subsequent evaluation steps. These marked areas, as core areas, are often directly related to the area of stain residue and the cleaning effect, thereby enabling a more accurate evaluation of the cleaning effect of sanitary ware.
[0073] However, evaluating the cleaning effect by directly comparing the grayscale differences between the first and second grayscale registered images has several drawbacks. First, it only reflects changes between the images before and after cleaning, but it's difficult to accurately determine whether these changes bring the images closer to a clean state. For example, water stains, reflections, shadow changes, or localized brightness changes may occur after cleaning, all of which cause grayscale differences in the images before and after cleaning. However, these differences do not necessarily equate to the removal of stains. Consequently, changes in lighting, shooting errors, or residual water marks after cleaning can easily be misjudged as cleaning effectiveness, leading to inaccurate assessments of the cleaning effect on sanitary ware. Second, this method often requires a comprehensive comparison of the grayscale differences between the first and second grayscale registered images, making it difficult to select representative marked areas for targeted and more accurate evaluation of stained areas, as is done in this application.
[0074] According to some embodiments of this application, in order to avoid the result deviation caused by evaluating the cleaning effect of sanitary ware based on different evaluation ranges before and after cleaning, this application preferably uses the union of the significantly different areas before and after cleaning as the statistical evaluation area, i.e. the marked area. This can ensure the consistency of the evaluation before and after cleaning, better quantify the cleaning effect, and reduce the subjective error caused by manually selecting the evaluation area.
[0075] Specifically, Figure 7 A flowchart illustrating a method for determining a marked region according to an embodiment of this application is shown, as follows: Figure 7 As shown, in operation S240, the operation of determining the marked area may include sub-operations S241 to S245.
[0076] In sub-operation S241, a first binary mask is generated based on the pixel positions in the first difference image where the gray value is greater than a first preset threshold.
[0077] In sub-operation S242, connected component filtering is performed on the first binary mask to remove isolated noise regions whose connected component area is less than a preset area threshold, thus obtaining the first significantly different region.
[0078] In sub-operation S243, a second binary mask is generated based on the pixel positions in the second difference image where the gray value is greater than a second preset threshold.
[0079] In sub-operation S244, connected component filtering is performed on the second binary mask to remove isolated noise regions whose connected component area is smaller than a preset area threshold, thus obtaining the second significantly different region.
[0080] In sub-operation S245, the union of the first and second significantly different regions is used as the marked region for evaluating the cleaning effect of sanitary ware.
[0081] According to some embodiments of this application, the first preset threshold and the second preset threshold can be the same or different, and can be set based on experimental experience, for example, 30, 45, etc., or can be adaptively determined using quantiles based on the grayscale distribution of the first difference image and the second difference image. Connectivity filtering can use 8-neighborhood connectivity to better adapt to irregular stain morphology; the preset area threshold can be selected according to experimental or actual needs.
[0082] Based on this, instead of using all pixels exceeding the threshold in the first and second difference images as the final evaluation region, connected component filtering can remove small isolated noise regions, thereby better eliminating some noise effects such as light and water droplets, which is conducive to a more accurate evaluation of the cleaning effect based on the marked region.
[0083] To further facilitate understanding, such as Figure 5 As shown in Figure (b), the visualization reveals the first region of significant difference, as... Figure 6 Figure (b) visualizes the second significant difference region. It's important to understand that the color markings in the visualization are merely for verification purposes to confirm whether the marked areas cover the main stain variation areas; the actual subsequent quantitative calculations are based on the grayscale differences within the marked areas. Thus, by using threshold segmentation, connected component denoising, and union processing of significant differences, human error can be reduced, ensuring the consistency of the evaluation area.
[0084] Of course, this is not the only option. In other embodiments, the grayscale difference between the first and second difference images can be calculated based on the grayscale distributions determined by the first and second significant difference regions, without using the unionized labeled regions. This simplifies the processing while sacrificing some accuracy.
[0085] According to some embodiments of this application, in operation S250, for the marked area, determining the cleaning effect of the sanitary ware based on the grayscale difference between the first difference image and the second difference image includes:
[0086] Within the marked area, the first average gray value of the first difference image and the second average gray value of the second difference image are calculated respectively; the rate of change of the second average gray value relative to the first average gray value is calculated to obtain the cleaning efficiency used to characterize the cleaning effect of sanitary ware.
[0087] For example, if the first average gray value of the first difference image within the marked area is 15, and the second average gray value of the second difference image within the marked area is 6, then the cleaning efficiency within that marked area is calculated as follows:
[0088] .
[0089] This indicates that the cleaning removed 60% of the stains. It can be understood that the first and second average gray values can be calculated using an arithmetic mean; however, this calculation is not an average of all pixels in the first and second difference images, but only of the gray values of the pixels within the marked area.
[0090] According to some embodiments of this application, the absolute difference between the second average gray value and the first average gray value can also be calculated, i.e., ΔD = D_before - D_after, where ΔD represents the absolute removal amount (or cleanliness), D_before is the first average gray value of the first difference image, and D_after is the second average gray value of the second difference image. A larger absolute removal amount and cleaning efficiency indicate a more significant reduction in the difference before and after cleaning, and a better cleaning effect.
[0091] Thus, a quantitative evaluation method based on absolute removal volume and cleaning efficiency can provide an objective standard to quantify cleaning effectiveness, consistent with the subjective judgment of the human eye. Furthermore, compared to human judgment, because the human eye has a non-linear perception of changes in grayscale, it can easily identify and assess cleaning effectiveness when there are large differences in grayscale, while smaller differences are not easily perceived by the human eye. However, the quantitative evaluation method of this application can more accurately identify minute differences in grayscale, thereby providing a more objective and accurate assessment of the cleaning effect of sanitary ware.
[0092] According to some embodiments of this application, the evaluation method of this application may further include: determining an evaluation level for characterizing the cleaning effect of sanitary ware based on the cleaning efficiency used to characterize the cleaning effect of sanitary ware and the mapping relationship between the preset cleaning efficiency and the standard evaluation level.
[0093] For example, the cleaning effect of sanitary ware can be divided into four standard evaluation levels: excellent, good, average, and poor. The mapping relationship between specific cleaning efficiency and standard evaluation level can be preset as follows: excellent: cleaning efficiency > 85%; good: 70% < cleaning efficiency ≤ 85%; average: 50% < cleaning efficiency ≤ 70%; poor: cleaning efficiency ≤ 50%. In this way, by defining the cleaning effect numerically and then classifying it, a quantitative and standardized evaluation of the cleaning effect is achieved.
[0094] To further verify the stability of the evaluation method for the cleaning effect of sanitary ware provided in this application, tests were conducted on different types of stains based on the aforementioned operations of obtaining, registering, differentiating, determining the marked area, and determining the cleaning effect (i.e., operations S210 to S240).
[0095] Figure 8 The illustration shows images of sanitary ware collected at different times during the rinsing process according to an embodiment of this application. Images taken before rinsing, at the start of rinsing, and during rinsing are converted to grayscale and used as the first grayscale image. An image taken after rinsing is completed is converted to grayscale and used as the second grayscale image. Based on the reference grayscale image, the first and second grayscale images are registered and differentiated, followed by threshold segmentation and connected component denoising. Both the first and second preset thresholds are set to 45. A first binary mask and a second binary mask are generated to determine the marked region. Within the marked region, the difference between the first average grayscale value of the first differentiated image and the second average grayscale value of the second differentiated image is used as the cleanliness level. The cleanliness level at the completion of rinsing is defined as 0.
[0096] Figure 9 The present application illustrates the cleanliness variation curves of different stain types at different rinsing times, as shown in the embodiments of this application. Figure 9The test results shown indicate that the evaluation method provided in this application can handle complex stains and stably obtain cleanliness data that conforms to human visual perception under different conditions, and can still obtain cleanliness data that conforms to human visual perception even when dealing with complex stains.
[0097] Furthermore, the cleaning effect evaluation system of this application is not only suitable for evaluating the cleaning effect of routine stains, but also capable of accurately assessing the impact of different types of stains (such as solids, oil stains, urine stains, etc.) on the surface of sanitary ware. Through quantitative grayscale difference analysis, the system can automatically identify different stain areas and perform targeted cleaning effect analysis. This function provides strong data support for optimizing the cleaning process of sanitary ware, especially performing excellently when dealing with stubborn and irregular stains.
[0098] According to some embodiments of this application, Figure 10 This application illustrates a method for obtaining a reference grayscale image, such as... Figure 10 As shown, the reference grayscale image is obtained through the following operations S1010 to S1020:
[0099] After performing multiple cleanings and allowing the sanitary ware to drain in operation S1010, for the last cleaning, the operations of acquiring, registering, differentiating, and determining the marked area are performed (i.e., operations S210 to S240). The operations of acquiring, registering, differentiating, and determining the marked area are the same as those described above and will not be repeated here.
[0100] In operation S1020, for the marked area, if the grayscale difference between the first difference image and the second difference image meets the preset conditions, the first grayscale image or the second grayscale image is used as the reference grayscale image.
[0101] For example, after the sanitary ware has been thoroughly cleaned and allowed to drain, for the last cleaning, two images are taken in the same environment and at the same image acquisition location. After grayscale processing, they are used as the first grayscale image and the second grayscale image, respectively. After registration, differentiation processing, and determination of the marked area, if the difference between the first average grayscale value and the second average grayscale value within the marked area is less than or equal to a third preset threshold (e.g., 10), the sanitary ware can be considered to be in a clean state. At this time, the first grayscale image or the second grayscale image can be used as the reference grayscale image.
[0102] Based on the above-mentioned image recognition-based method for evaluating the cleaning effect of sanitary ware, this application also provides an image recognition-based device for evaluating the cleaning effect of sanitary ware. The following will be combined with... Figure 11 The device is described in detail.
[0103] Figure 11 A structural block diagram of an image recognition-based sanitary ware cleaning effect evaluation device according to an embodiment of this application is shown. Figure 11 As shown, the evaluation device 1100 of this embodiment includes an acquisition module 1110, a registration module 1120, a differentiation processing module 1130, a first determination module 1140, and a second determination module 1150.
[0104] The acquisition module 1110 is used to acquire a first grayscale image of the sanitary ware before cleaning and a second grayscale image after cleaning. In one embodiment, the acquisition module 1110 can be used to perform the operation S210 described above, which will not be repeated here.
[0105] The registration module 1120 is used to register the first grayscale image and the second grayscale image with a reference grayscale image of the sanitary ware, respectively, to obtain a first grayscale registered image and a second grayscale registered image. The reference grayscale image is a grayscale image used to characterize the sanitary ware as being in a clean state. In one embodiment, the registration module 1120 can be used to perform the operation S220 described above, which will not be repeated here.
[0106] The differentiation processing module 1130 is used to perform differentiation processing on the first grayscale registered image and the reference grayscale image to obtain a first difference image, and to perform differentiation processing on the second grayscale registered image and the reference grayscale image to obtain a second difference image. In one embodiment, the differentiation processing module 1130 can be used to perform the operation S230 described above, which will not be repeated here.
[0107] The first determining module 1140 is used to determine a marked area for evaluating the cleaning effect of sanitary ware based on a first difference image and a second difference image. In one embodiment, the first determining module 1140 may be used to perform the operation S240 described above, which will not be repeated here.
[0108] The second determining module 1150 is used to determine the cleaning effect of the sanitary ware based on the grayscale difference between the first difference image and the second difference image for the marked area. In one embodiment, the second determining module 1150 can be used to perform the operation S250 described above, which will not be repeated here.
[0109] According to embodiments of this application, the first grayscale image, the second grayscale image, and the reference grayscale image each include key feature regions for extracting edge contour features and local texture features. The registration module 1120 may further include a selection submodule, a sliding search submodule, and a translation transformation submodule. The selection submodule is used to select a template region containing key feature points in the reference grayscale image of the sanitary ware. The key feature points include pixel positions corresponding to edge contour features and / or local texture features. The sliding search submodule is used to perform a sliding search on the images to be registered, using the first grayscale image and the second grayscale image as the images to be registered, based on a window of the same size as the template region, to determine a target region that matches the template region. The translation transformation submodule is used to perform a translation transformation on the images to be registered according to the translation deviation between the template region and the target region to obtain grayscale registered images, wherein the grayscale registered image corresponding to the first grayscale image is the first grayscale registered image, and the grayscale registered image corresponding to the second grayscale image is the second grayscale registered image.
[0110] According to embodiments of this application, the differentiation processing module 1130 may include a first differentiation processing submodule and a second differentiation processing submodule. The first differentiation processing submodule is used to determine, for the first grayscale registered image, the absolute differences between the grayscale values at multiple pixel locations and the corresponding grayscale values at the same pixel locations in a reference grayscale image, thereby generating a first differentiation image. The second differentiation processing submodule is used to determine, for the second grayscale registered image, the absolute differences between the grayscale values at multiple pixel locations and the corresponding grayscale values at the same pixel locations in a reference grayscale image, thereby generating a second differentiation image.
[0111] According to embodiments of this application, the first determining module 1140 may include a first generation submodule, a first connected component filtering submodule, a second generation submodule, a second connected component filtering submodule, and a union submodule. The first generation submodule generates a first binary mask based on the pixel positions in the first difference image where the grayscale value is greater than a first preset threshold. The first connected component filtering submodule performs connected component filtering on the first binary mask to remove isolated noise regions with connected component areas smaller than a preset area threshold, obtaining a first significant difference region. The second generation submodule generates a second binary mask based on the pixel positions in the second difference image where the grayscale value is greater than a second preset threshold. The second connected component filtering submodule performs connected component filtering on the second binary mask to remove isolated noise regions with connected component areas smaller than a preset area threshold, obtaining a second significant difference region. The union submodule uses the union of the first and second significant difference regions as a marker region for evaluating the cleaning effect of sanitary ware.
[0112] According to an embodiment of this application, the second determining module 1150 may include a first calculation submodule and a second calculation submodule. The first calculation submodule is used to calculate, within the marked area, a first average gray value of the first difference image and a second average gray value of the second difference image, respectively. The second calculation submodule is used to calculate the rate of change of the second average gray value relative to the first average gray value, to obtain a cleaning efficiency characterizing the cleaning effect of the sanitary ware.
[0113] According to an embodiment of this application, the evaluation device 1100 of this application may include an evaluation level determination module, which is used to determine an evaluation level for characterizing the cleaning effect of sanitary ware based on the cleaning efficiency used to characterize the cleaning effect of sanitary ware and the mapping relationship between the preset cleaning efficiency and the standard evaluation level.
[0114] According to embodiments of this application, any multiple modules among the acquisition module 1110, registration module 1120, differentiation processing module 1130, first determination module 1140, and second determination module 1150 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the acquisition module 1110, registration module 1120, differentiation processing module 1130, first determination module 1140, and second determination module 1150 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the acquisition module 1110, registration module 1120, differentiation processing module 1130, first determination module 1140 and second determination module 1150 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0115] This application also provides an image recognition-based system for evaluating the cleaning effect of sanitary ware. The evaluation system of this application may include an image acquisition device and a computing device.
[0116] The image acquisition device is used to acquire a first image of the sanitary ware before cleaning and a second image after cleaning. The first image is used to obtain a first grayscale image after preprocessing, and the second image is used to obtain a second grayscale image after preprocessing. It can be the first image acquisition device 101, the second image acquisition device 102, and the third image acquisition device 103 as described above, and can respectively include an industrial camera, an adjustable bracket, and a light source compensation device to ensure the consistency of the environmental settings and image acquisition positions for image acquisition before and after cleaning.
[0117] The industrial camera has a resolution of no less than 12MP. An adjustable bracket is used to ensure the stability of image acquisition and avoid image quality problems caused by equipment vibration or positional deviation. The light source compensation device can be a standard light source with a color temperature of 5500K±5% built into the image acquisition device. The light intensity is adjusted to 500-1000 lux, and through dynamic compensation control, it solves the impact of ambient light changes on image quality and ensures the stability of image brightness.
[0118] The computing device may include one or more processors and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the evaluation method described above.
[0119] Figure 12 A block diagram of a computing device suitable for implementing an image recognition-based method for evaluating the cleaning effect of sanitary ware, according to an embodiment of this application, is shown.
[0120] like Figure 12 As shown, a computing device according to an embodiment of this application includes a processor 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM 1202) or a program loaded from a storage portion 1208 into a random access memory (RAM 1203). The processor 1201 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)). The processor 1201 may also include onboard memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0121] RAM 1203 stores various programs and data required for the operation of the computing device. Processor 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Processor 1201 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 1202 and / or RAM 1203. It should be noted that the programs may also be stored in one or more memories other than ROM 1202 and RAM 1203. Processor 1201 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0122] According to embodiments of this application, the computing device may further include an input / output (I / O) interface 1205, which is also connected to a bus 1204. The computing device may also include one or more of the following components connected to the input / output (I / O) interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the input / output (I / O) interface 1205 as needed. A removable medium 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1210 as needed so that computer programs read from it can be installed into the storage section 1208 as needed.
[0123] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0124] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 1202 and / or RAM 1203 and / or one or more memories other than ROM 1202 and RAM 1203 described above.
[0125] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the image recognition-based method for evaluating the cleaning effect of sanitary ware provided in the embodiments of this application.
[0126] When the computer program is executed by the processor 1201, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0127] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1209, and / or installed from the removable medium 1211. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0128] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from the removable medium 1211. When the computer program is executed by the processor 1201, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0129] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider). According to embodiments of this application, the runtime environment of the program code is not limited to a specific operating platform or development environment, including but not limited to image processing libraries or tools based on the aforementioned programming languages (including but not limited to Image Processing Toolbox, OpenCV, etc.).
[0130] In some more specific embodiments, the computer program of this application can be developed based on the Matlab platform, utilizing its image processing toolbox to perform image grayscale conversion, feature point registration, and grayscale difference calculation, and output cleaning efficiency and evaluation level. Combined with the hardware system, this computer program achieves full automation from image reading and processing to result output.
[0131] In summary, this application provides a method, apparatus, system medium, and program product for evaluating the cleaning effect of sanitary ware based on image recognition, which has the following beneficial effects:
[0132] (1) Strong standardization, repeatability, and objectivity: Traditional methods for evaluating the cleaning effect of sanitary ware usually rely on manual visual assessment or measurement of physical indicators (such as ink line length), which have many limitations. Specifically, traditional methods usually require the use of ink line measurement to measure the ink line length after flushing, which is a complex and highly subjective process. Since the change in ink line length depends on manual operation and usage conditions, the results are often difficult to standardize and are greatly affected by environmental factors (such as water quality and temperature). Therefore, this method cannot achieve efficient and consistent quantitative evaluation. The innovation of this application lies in that it does not require the use of ink lines or simulated feces, but directly obtains the surface cleanliness of sanitary ware through image acquisition, and combines image processing algorithms to objectively and accurately quantify the cleaning effect. This method is not only simple and convenient to operate, but also has a wide range of applications and can be widely used in the evaluation of the cleaning effect of various sanitary ware.
[0133] (2) Avoiding the limitations of the ink line method, this method can handle irregular stains and color differences: The traditional ink line method quantifies the cleaning effect by measuring the length of the ink line inside the toilet bowl. However, the ink line often appears as dotted, patchy, or irregular stains after rinsing, making it difficult to accurately judge the cleaning effect through simple length measurement. In addition, the color depth of the ink line cannot be reflected by the length to show the difference in cleaning effect. Because the ink line method cannot handle these complex stain forms and color changes, its quantitative evaluation capability is low. In contrast, this application can directly calculate the grayscale difference between images before and after cleaning through image processing, which can accurately quantify the cleaning effect of the sanitary ware surface and is not affected by the stain form and color change. Through the quantified grayscale difference, this application can provide a scientific and fair evaluation of the cleaning effect under any circumstances, and is more applicable to sanitary ware with different cleaning conditions.
[0134] (3) Applicable to different cleaning requirements, including high-altitude and cold regions and public places: This application has significant scene adaptability, especially showing unique advantages in different environments such as high-altitude and cold regions with low cleaning requirements and public places with high cleaning requirements. Due to environmental limitations, the requirements for cleaning sanitary ware in high-altitude and cold regions are usually low. Traditional cleaning effect assessment methods often cannot achieve efficient standardized assessment because stains are relatively fixed and difficult to remove in these areas, and assessors may not be able to make accurate judgments based on the length of the ink line. However, this application, by quantifying cleaning efficiency, can objectively reflect the actual cleaning effect of sanitary ware even in environments with low cleaning requirements, avoiding errors caused by subjective judgment. On the other hand, in public places, the requirements for the cleaning effect of sanitary ware are usually high, and frequent use makes the implementation of cleaning standards challenging. Traditional methods cannot quantify and classify the implementation of cleaning standards, making it difficult to strictly manage cleaning quality. This application, through a systematic and standardized quantitative assessment method, enables the assessment of cleaning effect to be accurate to each area, providing a scientific and quantitative basis for the cleaning management of sanitary ware in public places, thereby enabling effective cleaning quality control in different scenarios.
[0135] (4) Facilitates subsequent data analysis and improvement: This application not only provides quantitative data on the cleaning effect of sanitary ware, but also records detailed data of each step in the cleaning process, which facilitates subsequent analysis and improvement. By accumulating a large amount of cleaning data, targeted improvement suggestions can be provided for the cleaning of different sanitary ware.
[0136] (5) Locating stubborn stains and promoting the optimization of sanitary ware design: This application, by marking the differences in cleaning effect of different parts of sanitary ware, ensures that the analysis of cleaning effect is not limited to the surface. The system can accurately locate the degree of cleanliness of different areas on the surface of sanitary ware, thereby accurately identifying stubborn stains or areas that are difficult to clean. Through this marking, the shape, surface coating, or drainage design of sanitary ware can be optimized based on data-driven feedback, reducing cleaning difficulty and improving the overall cleanliness and ease of cleaning of sanitary ware. This step not only provides a scientific basis for evaluating the cleaning effect of sanitary ware, but also promotes the innovation and optimization of sanitary ware design, thereby improving the market competitiveness of sanitary ware products.
[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0138] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
[0139] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. A method for evaluating the cleaning effect of sanitary ware based on image recognition, characterized in that, include: Acquire a first grayscale image of the sanitary ware before cleaning and a second grayscale image after cleaning; The first grayscale image and the second grayscale image are registered with the reference grayscale image of the sanitary ware to obtain a first grayscale registered image and a second grayscale registered image. The reference grayscale image is used to characterize that the sanitary ware is in a clean state. The process involves performing differential processing on the first grayscale registered image and the reference grayscale image to obtain a first differential image, and performing differential processing on the second grayscale registered image and the reference grayscale image to obtain a second differential image. Specifically, this includes: for the first grayscale registered image, determining the absolute difference between the grayscale values at multiple pixel locations and the corresponding grayscale values at the corresponding pixel locations in the reference grayscale image to generate the first differential image; and for the second grayscale registered image, determining the absolute difference between the grayscale values at multiple pixel locations and the corresponding grayscale values at the corresponding pixel locations in the reference grayscale image to generate the second differential image. Determining a marked region for evaluating the cleaning effect of sanitary ware based on the first difference image and the second difference image specifically includes: generating a first binary mask based on the pixel positions in the first difference image where the gray value is greater than a first preset threshold; performing connected component filtering on the first binary mask to remove isolated noise regions with connected component areas smaller than a preset area threshold to obtain a first significant difference region; generating a second binary mask based on the pixel positions in the second difference image where the gray value is greater than a second preset threshold; performing connected component filtering on the second binary mask to remove isolated noise regions with connected component areas smaller than a preset area threshold to obtain a second significant difference region; and using the union of the first significant difference region and the second significant difference region as the marked region for evaluating the cleaning effect of sanitary ware. For the marked area, the cleaning effect of the sanitary ware is determined based on the grayscale difference between the first difference image and the second difference image.
2. The evaluation method according to claim 1, characterized in that, The first grayscale image, the second grayscale image, and the reference grayscale image each include key feature regions for extracting edge contour features and local texture features; The step of registering the first grayscale image and the second grayscale image with the reference grayscale image of the sanitary ware respectively to obtain the first grayscale registered image and the second grayscale registered image includes: In the reference grayscale image of the sanitary ware, a template region containing key feature points is selected, wherein the key feature points include pixel positions corresponding to the edge contour features and / or local texture features; Using the first grayscale image and the second grayscale image as the images to be registered, respectively, a sliding search is performed on the images to be registered based on a window of the same size as the template region to determine the target region that matches the template region; Based on the translational deviation between the template region and the target region, the image to be registered is translated to obtain a grayscale registered image, wherein the grayscale registered image corresponding to the first grayscale image is the first grayscale registered image, and the grayscale registered image corresponding to the second grayscale image is the second grayscale registered image.
3. The evaluation method according to claim 2, characterized in that, The target area is the location area corresponding to the window when the grayscale difference between the window and the template area is minimized.
4. The evaluation method according to claim 1, characterized in that, For the marked area, the cleaning effect of the sanitary ware is determined based on the grayscale difference between the first difference image and the second difference image, including: Within the marked area, the first average gray value of the first difference image and the second average gray value of the second difference image are calculated respectively. The rate of change of the second average gray value relative to the first average gray value is calculated to obtain the cleaning efficiency used to characterize the cleaning effect of sanitary ware.
5. The evaluation method according to claim 4, characterized in that, The evaluation method also includes: The evaluation level for characterizing the cleaning effect of the sanitary ware is determined based on the mapping relationship between the cleaning efficiency used to characterize the cleaning effect of the sanitary ware and the preset cleaning efficiency and the standard evaluation level.
6. The evaluation method according to claim 1, characterized in that, The reference grayscale image was obtained in the following way: After the sanitary ware is washed multiple times and allowed to drain, the operations of acquiring, registering, differentiating, determining the marked area, and determining the cleaning effect of the sanitary ware are performed for the last wash. If the grayscale difference between the first difference image and the second difference image meets a preset condition, the first grayscale image or the second grayscale image is used as the reference grayscale image.
7. A device for evaluating the cleaning effect of sanitary ware based on image recognition, characterized in that, include: The acquisition module is used to acquire a first grayscale image of the sanitary ware before cleaning and a second grayscale image after cleaning; The registration module is used to register the first grayscale image and the second grayscale image with the reference grayscale image of the sanitary ware, respectively, to obtain a first grayscale registration image and a second grayscale registration image, wherein the reference grayscale image is a grayscale image used to characterize the sanitary ware as being in a clean state; A differentiation processing module is used to perform differentiation processing on the first grayscale registered image and the reference grayscale image to obtain a first difference image, and to perform differentiation processing on the second grayscale registered image and the reference grayscale image to obtain a second difference image. The differentiation processing module includes a first differentiation processing submodule and a second differentiation processing submodule. The first differentiation processing submodule is used to determine, for the first grayscale registered image, the absolute difference between the grayscale values at multiple pixel positions and the corresponding grayscale values at the corresponding pixel positions in the reference grayscale image, and generate the first difference image. The second differentiation processing submodule is used to determine, for the second grayscale registered image, the absolute difference between the grayscale values at multiple pixel positions and the corresponding grayscale values at the corresponding pixel positions in the reference grayscale image, and generate the second difference image. The first determining module is used to determine a marked region for evaluating the cleaning effect of sanitary ware based on the first difference image and the second difference image. The first determining module includes a first generation submodule, a first connected component filtering submodule, a second generation submodule, a second connected component filtering submodule, and a union submodule. The first generation submodule is used to generate a first binary mask based on the pixel positions in the first difference image where the gray value is greater than a first preset threshold. The first connected component filtering submodule is used to perform connected component filtering on the first binary mask to remove isolated noise regions with connected component areas smaller than a preset area threshold, thereby obtaining the first significantly different region. The second generation submodule is used to generate a second binary mask based on the pixel positions in the second difference image where the gray value is greater than a second preset threshold; the second connected component filtering submodule is used to perform connected component filtering on the second binary mask to remove isolated noise regions with connected component areas smaller than a preset area threshold, thereby obtaining a second significant difference region; the union submodule is used to use the union of the first significant difference region and the second significant difference region as a marker region for evaluating the cleaning effect of sanitary ware. as well as, The second determining module is used to determine the cleaning effect of the sanitary ware based on the grayscale difference between the first difference image and the second difference image for the marked area.
8. A system for evaluating the cleaning effect of sanitary ware based on image recognition, characterized in that, The evaluation system includes: An image acquisition device is used to acquire a first image of a sanitary ware before cleaning and a second image after cleaning. The first image is used to obtain a first grayscale image after preprocessing, and the second image is used to obtain a second grayscale image after preprocessing. A computing device includes one or more processors and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the evaluation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for automatic detection and cleaning of dirt based on intelligent closestool
CN106894481A
Tunnel lighting lamp cleaning effect monitoring method based on image comparison
CN112215145A
Defect detection method and device for paper packaging box, electronic equipment and storage medium
CN117058112A
Terahertz image registration method fusing morphological features
CN120163855A