A tableware cleanliness detection method and system based on image processing

By using image processing-based methods to identify and mark stained areas on tableware, and using artificial intelligence identification technology, the problem of low manual detection efficiency is solved, the efficiency and quality of tableware cleanliness detection are improved, and costs are reduced.

CN118505680BActive Publication Date: 2024-09-20GUANGZHOU KUNPENG IOT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410946939.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-09-20
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

In the existing technology, manual detection of tableware cleanliness is inefficient and prone to missed inspections, affecting catering safety.

Method used

Using a method based on image processing, the pixel gray level of the tableware and conveyor belt areas is extracted through preset standard images, and regional growth and grayscale processing are performed to identify stained areas, and an artificial intelligence recognition model is used for identification, eliminating noise areas, and improving Testing efficiency and quality.

Benefits of technology

It improves the efficiency and quality of tableware cleanliness testing, liberates repetitive labor, reduces labor costs, and ensures the accuracy of cleanliness testing in the industrial dishwashing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118505680B
    Figure CN118505680B
Patent Text Reader

Abstract

The present invention relates to the technical field of tableware cleanliness detection, and provides a tableware cleanliness detection method and system based on image processing. The method comprises: dividing a first detection image in a region growing-based manner, eliminating a tableware region and a conveyor belt region in the image, and the remaining region is a suspected stain region, and further distinguishing based on grayscale thresholds based on the characteristics of stains and water stains, identifying whether there are stains, and marking the stains in the image, thereby improving the efficiency and quality of tableware cleanliness detection in an industrial dishwashing process, liberating repetitive labor, and reducing labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of tableware cleanliness detection, and in particular to a tableware cleanliness detection method and system based on image processing. Background Art

[0002] At present, most of the tableware used in the catering industry is recyclable tableware, which is sent to industrial dishwashers for centralized cleaning. The existing technology mostly uses manual inspection to determine whether the tableware is clean, which is not only inefficient but also costly. In the process of long-term inspection of a large number of tableware, it is easy to miss inspections, affecting catering safety. Summary of the invention

[0003] The invention provides a tableware cleanliness detection method based on image processing, which is used to solve the problem of low efficiency of manual tableware cleanliness detection in the prior art.

[0004] A first aspect of the present invention provides a tableware cleanliness detection method based on image processing, comprising:

[0005] Extracting the pixel grayscale of the tableware area based on the preset standard image to obtain a first seed pixel grayscale, and extracting the pixel grayscale of the conveyor belt area based on the preset image to obtain a second seed pixel grayscale;

[0006] Acquire a first detection image at a preset time interval; grayscale the first detection image, and perform region growth according to the grayscale of the first seed pixel and the second seed pixel, respectively obtaining a tableware region corresponding to the grayscale of the first seed pixel and a conveyor belt region corresponding to the grayscale of the second seed pixel; remove the tableware region and the conveyor belt region from the first detection image to obtain a suspected stain region;

[0007] Calculate the first average grayscale value of the tableware area and the second average grayscale value of each discrete suspected stain area, identify the suspected stain area whose second average grayscale value is higher than the first average grayscale value, and obtain the stain area; mark the stain area in the current first detection image and send it to the processing end.

[0008] Optionally, after the step of identifying the suspected stain area where the second average grayscale value is higher than the first average grayscale value and obtaining the stain area, the step further includes:

[0009] Based on the standard appearance of each tableware extracted from the preset image, it is matched with the tableware area where each stain area is located, and it is determined whether the ratio of the standard appearance area of ​​the tableware with the highest matching degree between each stain area and its tableware area is greater than the preset ratio threshold. If not, the corresponding stain area will be removed as noise.

[0010] Optionally, after the step of identifying the suspected stain area where the second average grayscale value is higher than the first average grayscale value and obtaining the stain area, the step further includes:

[0011] The stained areas are identified based on the preset artificial intelligence recognition model, and the unidentified stained areas are eliminated.

[0012] Optionally, also include:

[0013] A second detection image is obtained, grayscaled, and region growing is performed according to the grayscale level of the first seed pixel and the grayscale level of the second seed pixel, so as to obtain a tableware region corresponding to the grayscale level of the first seed pixel and a conveyor belt region corresponding to the grayscale level of the second seed pixel, respectively; the tableware region and the conveyor belt region are eliminated in the second detection image to obtain a foam suspicious region; the density of each foam suspicious region is identified, and if the density exceeds a preset density threshold, the chemical agent residue region in the second detection image is marked and sent to the processing end.

[0014] The second aspect of the present application provides a tableware cleanliness detection system based on image processing, comprising:

[0015] A seed pixel setting module, used to extract the pixel grayscale of the tableware area based on a preset standard image to obtain a first seed pixel grayscale, and to extract the pixel grayscale of the conveyor belt area based on a preset image to obtain a second seed pixel grayscale;

[0016] An image segmentation module is used to obtain a first detection image at a preset time interval; grayscale the first detection image, and perform region growth according to the grayscale level of the first seed pixel and the grayscale level of the second seed pixel, respectively obtaining a tableware region corresponding to the grayscale level of the first seed pixel and a conveyor belt region corresponding to the grayscale level of the second seed pixel; and remove the tableware region and the conveyor belt region from the first detection image to obtain a suspected stain region;

[0017] The tableware cleanliness detection module is used to calculate the first average grayscale value of the tableware area and the second average grayscale value of each discrete suspected stain area, identify the suspected stain area whose second average grayscale value is higher than the first average grayscale value, and obtain the stain area; mark the stain area in the current first detection image and send it to the processing end.

[0018] Optionally, in the tableware cleanliness detection module, after identifying the suspected stain area where the second average gray value is higher than the first average gray value and obtaining the stain area, the module further includes:

[0019] Based on the standard appearance of each tableware extracted from the preset image, it is matched with the tableware area where each stain area is located, and it is determined whether the ratio of the standard appearance area of ​​the tableware with the highest matching degree between each stain area and its tableware area is greater than the preset ratio threshold. If not, the corresponding stain area will be removed as noise.

[0020] Optionally, after the step of identifying the suspected stain area where the second average grayscale value is higher than the first average grayscale value and obtaining the stain area, the step further includes:

[0021] The stained areas are identified based on the preset artificial intelligence recognition model, and the unidentified stained areas are eliminated.

[0022] Optionally, also include:

[0023] The drug residue detection module is used to obtain a second detection image, grayscale the second detection image, and perform regional growth according to the grayscale level of the first seed pixel and the grayscale level of the second seed pixel to obtain the tableware area corresponding to the grayscale level of the first seed pixel and the conveyor belt area corresponding to the grayscale level of the second seed pixel, respectively; eliminate the tableware area and the conveyor belt area in the second detection image to obtain the foam suspicious area; identify the density of each foam suspicious area, and if the density exceeds a preset density threshold, mark the chemical agent residue area in the second detection image and send it to the processing end.

[0024] The third aspect of the present application provides a tableware cleanliness detection method and device based on image processing, the device comprising a processor and a memory:

[0025] The memory is used to store program code and transmit the program code to the processor;

[0026] The processor is used to execute the tableware cleanliness detection method based on image processing as described in any one of the first aspects of the present invention according to the instructions in the program code.

[0027] A fourth aspect of the present application provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute a tableware cleanliness detection method based on image processing as described in any one of the first aspects of the present invention.

[0028] It can be seen from the above technical scheme that the present invention has the following advantages: by dividing the first detection image in a region growing-based manner, the tableware area and the conveyor belt area in the image are eliminated, and the remaining area is the suspected stain area, and based on the characteristics of stains and water stains, further grayscale threshold distinction is performed to identify whether there are stains, and the stains in the image are marked, thereby improving the efficiency and quality of tableware cleanliness detection in the industrial dishwashing process, liberating repetitive labor, and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0030] Figure 1 is a flow chart of a tableware cleanliness detection method based on image processing;

[0031] Figure 2 is a schematic diagram of a first detection image;

[0032] Figure 3 This is a schematic diagram of the standard image appearance of tableware;

[0033] Figure 4 This is a structural diagram of a tableware cleanliness detection system based on image processing. DETAILED DESCRIPTION

[0034] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] The invention provides a tableware cleanliness detection method based on image processing, which is used to solve the problem of low efficiency of manual tableware cleanliness detection in the prior art.

[0036] See also Figure 1 , Figure 1 A first flow chart of a tableware cleanliness detection method based on image processing provided in an embodiment of the present invention.

[0037] S100, extracting the pixel grayscale of the tableware area based on a preset standard image to obtain a first seed pixel grayscale, and extracting the pixel grayscale of the conveyor belt area based on a preset image to obtain a second seed pixel grayscale;

[0038] It should be noted that between the tableware sorting, high-pressure washing, sterilization and drying areas of the industrial dishwasher, tableware is generally transported by a conveyor belt, and subsequent detection images are obtained during the conveyor belt transportation process leaving the operating area; the preset standard image can be an image of various types of tableware placed on the conveyor belt in various possible postures in advance. In this embodiment, only tableware such as bowls and plates are considered, and the tableware in the preset image is clean tableware without stains. The grayscale pixel points corresponding to the two colors of the tableware and the conveyor belt can be directly selected to obtain the corresponding pixel grayscale level. Although there are only two colors, the tableware color is generally white, and the conveyor belt color is generally blue or green, but due to the actual lighting differences in the assembly line, the same color will also have grayscale gradients due to the brightness gradient in the grayscale image. Therefore, the grayscale level is used as the basis for determining the similarity of pixels. In the preset image, the grayscale level of the pixel is identified. The tableware color and the conveyor belt color are obviously different, and the grayscale level corresponding to the conveyor belt color is greater than the grayscale level corresponding to the tableware color. After identifying the two grayscale levels, the smaller one can be used as the first seed pixel grayscale level, and the larger one can be used as the second seed pixel grayscale level.

[0039] S200, acquiring a first detection image at a preset time interval; graying the first detection image, and performing region growing according to the grayscale of the first seed pixel and the grayscale of the second seed pixel, respectively obtaining a tableware region corresponding to the grayscale of the first seed pixel and a conveyor belt region corresponding to the grayscale of the second seed pixel; removing the tableware region and the conveyor belt region from the first detection image to obtain a suspected stain region;

[0040] It should be noted that in this step, the first detection image is obtained after the high-pressure washing step. Since the industrial dishwasher continuously conveys tableware through the conveyor belt, in order to ensure that the first detection image captured can contain all washed tableware, it is necessary to preset the interval time according to the conveyor belt speed and the actual area size of the captured image. The actual area size of the captured image is divided by the conveyor belt speed to obtain the conveying time. The preset interval time must be less than the conveying time to ensure that each tableware is captured in the first detection image.

[0041] The high-pressure washing process is to wash and separate the stains on the tableware. In order to ensure the washing efficiency, the tableware is stacked and dense in this step, but the tableware can be dispersed through the speed difference between the two conveyor belts during the subsequent conveyor belt transportation process, which is convenient for image capture and detection; please refer to Figure 2 A schematic diagram of a first detection image is shown in FIG. 1 . In the first detection image, multiple tableware are captured at the same time. Therefore, the image needs to be identified and segmented first to exclude non-tableware areas in the image to avoid affecting the recognition accuracy. Figure 2In the figure, 1 is the tableware area, 2 is the conveyor belt area, and 3 is the tableware stain area. The tableware color is significantly different from the conveyor belt color, and the conveyor belt area is relatively wide. To achieve regional segmentation, the present embodiment adopts a regional growing method to perform regional growth according to seed pixels of different regional colors. The tableware area and the conveyor belt area are divided according to the pixel-level similarity criterion in the grayscale image. The two seed pixels are respectively obtained by regional growth to obtain the corresponding tableware area and conveyor belt area. The tableware stain area cannot predict the color, so the seed pixel corresponding to the tableware stain area is not set. In addition, food stains generally do not show the green or blue color of the conveyor belt. The tableware stains must be attached to the tableware area. After the tableware area is divided, the grayscale level of the stain color is different from the grayscale level corresponding to the tableware color. The tableware area will definitely not include the location of the stain.

[0042] The color of the stain is different from the color of the conveyor belt and the color of the tableware. In the image division of region growing, the stain area will not be included in the tableware area or the conveyor belt area. Therefore, the tableware area and the conveyor belt area are eliminated in the first detection image, and the remaining image part is the suspected stain area.

[0043] S300, calculate the first average grayscale value of the tableware area and the second average grayscale value of each discrete suspected stain area, identify the suspected stain area whose second average grayscale value is higher than the first average grayscale value, and obtain the stain area; mark the stain area in the current first detection image and send it to the processing end.

[0044] It should be noted that in the aforementioned steps, only pixels with similar characteristics will be divided into the same area by regional growth, and in addition to the real stains in the suspected stain area, there will be water stains on the tableware due to passing through the high-pressure washing area. These water stains will reflect light and will have a higher brightness in the first detection image. In the corresponding grayscale image, the grayscale of the area corresponding to the water stains is also classified into the suspected stain area because of the large difference between the grayscale level of the first seed pixel and the grayscale level of the second seed pixel. In the first detection image, the grayscale values ​​from small to large are: water stain pixel point < tableware pixel point < conveyor belt pixel point < stain pixel point; therefore, the average grayscale value of the tableware area can be calculated as the threshold for distinction, and the grayscale value of the tableware area can be used as the threshold for distinction. The grayscale average value is obtained by summing up the grayscale values ​​of all pixels in an area and dividing it by the number of pixels. When the second average grayscale value of the suspected stain area is higher than the first average grayscale value, it means that the color of the suspected stain area is brighter than that of the tableware area, which is consistent with the characteristics of tableware stains. When the second average grayscale value of the suspected stain area is lower than the first average grayscale value, it means that the color of the suspected stain area is simpler than that of the tableware area, which is consistent with the reflective characteristics of water stains. After the identified stain area is marked in the first detection image, it can be sent to the processing end, which can be a robot arm screening device or other further processing modules. The processing end can put the tableware that is indeed not cleaned clean back to the high-pressure washing area for re-cleaning to ensure the cleaning quality.

[0045] In this embodiment, the first detection image is divided by a region growing-based method, and the tableware area and conveyor belt area in the image are eliminated. The remaining area is the suspected stain area, and based on the characteristics of stains and water stains, further grayscale threshold distinction is performed to identify whether there are stains, and the stains in the image are marked, thereby improving the efficiency and quality of tableware cleanliness detection in the industrial dishwashing process, freeing up repetitive labor, and reducing labor costs.

[0046] The above is a detailed description of the first embodiment of a tableware cleanliness detection method based on image processing provided by the present application. The following is a detailed description of the second embodiment of a tableware cleanliness detection method based on image processing provided by the present application.

[0047] In this embodiment, a tableware cleanliness detection method based on image processing is further provided. In the aforementioned step S300, after identifying a suspected stain area whose second average gray value is higher than the first average gray value and obtaining the stain area, the method further includes:

[0048] Based on the standard appearance of each tableware extracted from the preset image, the standard appearance of each tableware is matched with the tableware area where each stain area is located, and it is determined whether the ratio of the standard appearance area of ​​the tableware with the highest matching degree between each stain area and the tableware area where it is located is greater than a preset ratio threshold. If not, the corresponding stain area is removed as noise;

[0049] It should be noted that the shapes of tableware such as bowls, plates, and condiment dishes can be obtained by rotating the plane. In the preset image taken horizontally, there are only two shapes of tableware of this structure placed in the grayscale image, see Figure 3 Schematic diagram of the appearance of the standard image of tableware, where 1 is a square or inverted tableware with the bottom or top surface completely in contact with the conveyor belt, and 2 is a side-placed tableware with the side of the tableware in contact with the conveyor belt. Each type of tableware is placed on the conveyor belt according to two placement methods and then a preset standard image is taken; the standard image shooting in this step does not need to consider the light and dark brightness gradient of the actual assembly line, and the area recognition can be directly performed in two colors in the standard image, and the image segmentation of the preset standard image can be performed using a threshold-based or clustering-based method to obtain a standard appearance image of each tableware. In subsequent detection images, the tableware appears in the form of the standard appearance image; because the placement of the tableware on the conveyor belt is not artificially spaced, but randomly distributed after free falling, the tableware may be in contact with each other. In the case of a piece of tableware, a shape composed of multiple tableware areas bonded together is presented in the grayscale image, which interferes with individual discrimination. Therefore, the area of ​​the separate tableware area where the stain area is located can be identified based on the standard shape of the tableware. Although the overall shape of multiple tableware cannot be determined, the edge of the area is smooth and conforms to the standard shape of the tableware. The curvature of the edge of each tableware is different in each placement mode. The area of ​​the tableware where each stain is located in the image can be determined by matching degree identification. First, the edge of the overall tableware area is matched with the standard shape of each tableware. After identifying the standard shape of the matching edge, the standard shape corresponding to the location of the stain area is determined, and then the corresponding area is obtained. The area can be calculated by calculating the total number of pixels;

[0050] In the process of acquiring the first detection image and converting the grayscale image, noise may inevitably occur. Noise points may appear in the grayscale image of the first detection image, resulting in abnormal grayscale values ​​of sporadic pixels, thereby causing a very small stain area to appear due to the noise. Therefore, in this embodiment, these noise areas can be identified according to the area ratio and distinguished by a preset ratio threshold. The reference noise removal model is specifically as follows:

[0051] ;

[0052] in, is the area of ​​the nth stain region, is the area of ​​the tableware where the nth stain area is located, is the ratio threshold; this ratio threshold is set according to the empirical value, and when the tableware is tilted or placed flat, the tableware area and the stain area will change in the same proportion, so the ratio threshold is universal.

[0053] Furthermore, in the aforementioned step S300, after identifying the suspected stain area whose second average gray value is higher than the first average gray value and obtaining the stain area, the method further includes:

[0054] Identify the stained area based on the preset artificial intelligence recognition model and remove the unidentified stained area;

[0055] It should be noted that, in this embodiment, a convolutional neural network model can be used to form an artificial intelligence recognition model. The artificial intelligence recognition model is pre-trained with a large number of stain images appearing on tableware. By extracting and identifying the features of the stain area, it is determined whether the stain area screened in the aforementioned step S300 actually has stains; if the type of stain cannot be identified by the artificial intelligence recognition model, it is not a stain, and the stain area is misjudged and can be removed;

[0056] In this embodiment, the RK3588 chip can be used in conjunction with the artificial intelligence recognition model, and after the stain area is identified, the corresponding stain area image is input into the artificial intelligence recognition model for cyclic training to improve the model recognition accuracy and enrich the database; the image processing in the above steps can divide the tableware area, reduce the size of the image that needs to be identified by the artificial intelligence recognition model, and improve efficiency.

[0057] Furthermore, each tableware area is matched based on the standard appearance diagram of the tableware. If the maximum matching degree is less than the matching degree threshold, the incomplete tableware is marked and sent to the quality inspector. By identifying the edge matching degree of the tableware area, the tableware corresponding to the tableware area and the tableware placement form are judged. If the maximum matching degree is less than the matching degree threshold, it means that the actual tableware shape corresponding to the tableware area may be damaged, and the tableware is not complete. Even if it is cleaned, it cannot be put back into use. Therefore, the incomplete tableware can be marked and sent to the processing end for prompting.

[0058] Furthermore, it also includes: acquiring a second detection image, graying the second detection image, and performing region growth according to the grayscale level of the first seed pixel and the grayscale level of the second seed pixel, respectively obtaining a tableware area corresponding to the grayscale level of the first seed pixel and a conveyor belt area corresponding to the grayscale level of the second seed pixel; eliminating the tableware area and the conveyor belt area in the second detection image to obtain a foam suspicious area; identifying the density of each foam suspicious area, and if the density exceeds a preset density threshold, marking the chemical agent residue area in the second detection image and sending it to the processing end.

[0059] It should be noted that after high-pressure washing of tableware stains, it is necessary to immerse and disinfect the tableware with chemicals, then perform high-pressure washing, and finally dry it. In order to ensure the safety of tableware, the chemicals must be rinsed clean by high-pressure washing to avoid residues on the tableware that affect food safety after drying. Therefore, the second detection image is taken at the conveyor belt after the second high-pressure washing. Chemicals are mostly presented in the form of foam on the tableware, and even if there is no foam during the soaking and disinfection process, foam will be generated after the agent is rinsed. The second detection image will capture tableware, conveyor belts, foam and water stains, and the most notable feature of the foam is dense The bubbles reflect light, while the non-reflective parts are mostly white, which is close to the color of the tableware. After the image area is divided, the remaining suspicious foam areas are multiple discrete areas. The places where the aggregation density of these discrete areas is high can be regarded as areas where a large number of bubble reflections of foam are concentrated, which can be identified as chemical residues. If it is water stain reflection, it is a large area connected. The area of ​​the suspicious foam area is large, but it is only regarded as one area with a small density. Therefore, it is regarded as water stains, not as chemical residues. That is, the density in this embodiment is the number of suspicious foam areas divided by the image area, and the density threshold is set according to the experience value.

[0060] The above is a detailed description of a tableware cleanliness detection method based on image processing provided in the first aspect of the present application. The following is a detailed description of an embodiment of a tableware cleanliness detection system based on image processing provided in the second aspect of the present application.

[0061] See also Figure 4 , Figure 4 This is a structural diagram of a tableware cleanliness detection system based on image processing. This embodiment provides a tableware cleanliness detection system based on image processing, including:

[0062] A seed pixel setting module 10 is used to extract the pixel grayscale of the tableware area based on a preset standard image to obtain a first seed pixel grayscale, and to extract the pixel grayscale of the conveyor belt area based on a preset image to obtain a second seed pixel grayscale;

[0063] The image segmentation module 20 is used to obtain a first detection image at a preset time interval; grayscale the first detection image, and perform region growth according to the grayscale of the first seed pixel and the grayscale of the second seed pixel, respectively obtaining a tableware region corresponding to the grayscale of the first seed pixel and a conveyor belt region corresponding to the grayscale of the second seed pixel; remove the tableware region and the conveyor belt region from the first detection image to obtain a suspected stain region;

[0064] The tableware cleanliness detection module 30 is used to calculate the first average grayscale value of the tableware area and the second average grayscale value of each discrete suspected stain area, identify the suspected stain area whose second average grayscale value is higher than the first average grayscale value, and obtain the stain area; mark the stain area in the current first detection image and send it to the processing end.

[0065] Furthermore, in the tableware cleanliness detection module 30, after identifying the suspected stain area where the second average gray value is higher than the first average gray value and obtaining the stain area, the following is further included:

[0066] Based on the standard appearance of each tableware extracted from the preset image, it is matched with the tableware area where each stain area is located, and it is determined whether the ratio of the standard appearance area of ​​the tableware with the highest matching degree between each stain area and its tableware area is greater than the preset ratio threshold. If not, the corresponding stain area will be removed as noise.

[0067] Furthermore, in the tableware cleanliness detection module 30, after identifying the suspected stain area where the second average gray value is higher than the first average gray value and obtaining the stain area, the following is further included:

[0068] The stained areas are identified based on the preset artificial intelligence recognition model, and the unidentified stained areas are eliminated.

[0069] Furthermore, it also includes:

[0070] The drug residue detection module 50 is used to obtain a second detection image, grayscale the second detection image, and perform region growth according to the grayscale level of the first seed pixel and the grayscale level of the second seed pixel to obtain a tableware area corresponding to the grayscale level of the first seed pixel and a conveyor belt area corresponding to the grayscale level of the second seed pixel, respectively; eliminate the tableware area and the conveyor belt area in the second detection image to obtain a foam suspicious area; identify the density of each foam suspicious area, and if the density exceeds a preset density threshold, mark the chemical agent residue area in the second detection image and send it to the processing end.

[0071] The third aspect of the present application also provides a tableware cleanliness detection method device based on image processing, including a processor and a memory: the memory is used to store program code and transmit the program code to the processor; the processor is used to execute the above-mentioned tableware cleanliness detection method based on image processing according to the instructions in the program code.

[0072] A fourth aspect of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store program codes, and the program codes are used to execute the above-mentioned tableware cleanliness detection method based on image processing.

[0073] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0074] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0075] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0076] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0077] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0078] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A tableware cleanliness detection method based on image processing, characterized in that include: Extracting the pixel grayscale of the tableware area based on the preset standard image to obtain a first seed pixel grayscale, and extracting the pixel grayscale of the conveyor belt area based on the preset standard image to obtain a second seed pixel grayscale; Acquire a first detection image at a preset time interval; grayscale the first detection image, and perform region growth according to the grayscale of the first seed pixel and the second seed pixel, respectively obtaining a tableware region corresponding to the grayscale of the first seed pixel and a conveyor belt region corresponding to the grayscale of the second seed pixel; remove the tableware region and the conveyor belt region from the first detection image to obtain a suspected stain region; Calculate the first average grayscale value of the tableware area and the second average grayscale value of each discrete suspected stain area, identify the suspected stain area whose second average grayscale value is higher than the first average grayscale value, and obtain the stain area; mark the stain area in the current first detection image and send it to the processing end; A second detection image is obtained, grayscaled, and region growing is performed according to the grayscale level of the first seed pixel and the grayscale level of the second seed pixel, so as to obtain a tableware region corresponding to the grayscale level of the first seed pixel and a conveyor belt region corresponding to the grayscale level of the second seed pixel, respectively; the tableware region and the conveyor belt region are eliminated in the second detection image to obtain a foam suspicious region; the density of each foam suspicious region is identified, and if the density exceeds a preset density threshold, the chemical agent residue region in the second detection image is marked and sent to the processing end.

2. The tableware cleanliness detection method based on image processing according to claim 1, characterized in that: After identifying the suspected stain area where the second average gray value is higher than the first average gray value and obtaining the stain area, the method further includes: Based on the preset standard image, the standard appearance of each tableware is extracted and matched with the tableware area where each stain area is located. It is determined whether the ratio of the standard appearance area of ​​the tableware with the highest matching degree between each stain area and its tableware area is greater than the preset ratio threshold. If not, the corresponding stain area is removed as noise.

3. The tableware cleanliness detection method based on image processing according to claim 2, characterized in that: After identifying the suspected stain area where the second average gray value is higher than the first average gray value and obtaining the stain area, the method further includes: The stained areas are identified based on the preset artificial intelligence recognition model, and the unidentified stained areas are eliminated.

4. A tableware cleanliness detection system based on image processing, characterized in that: include: A seed pixel setting module, used to extract the pixel grayscale of the tableware area based on the preset standard image to obtain a first seed pixel grayscale, and to extract the pixel grayscale of the conveyor belt area based on the preset standard image to obtain a second seed pixel grayscale; An image segmentation module is used to obtain a first detection image at a preset time interval; grayscale the first detection image, and perform region growth according to the grayscale level of the first seed pixel and the grayscale level of the second seed pixel, respectively obtaining a tableware region corresponding to the grayscale level of the first seed pixel and a conveyor belt region corresponding to the grayscale level of the second seed pixel; and remove the tableware region and the conveyor belt region from the first detection image to obtain a suspected stain region; The tableware cleanliness detection module is used to calculate the first average grayscale value of the tableware area and the second average grayscale value of each discrete suspected stain area, identify the suspected stain area whose second average grayscale value is higher than the first average grayscale value, and obtain the stain area; mark the stain area in the current first detection image and send it to the processing end; The drug residue detection module is used to obtain a second detection image, grayscale the second detection image, and perform regional growth according to the grayscale level of the first seed pixel and the grayscale level of the second seed pixel to obtain the tableware area corresponding to the grayscale level of the first seed pixel and the conveyor belt area corresponding to the grayscale level of the second seed pixel, respectively; eliminate the tableware area and the conveyor belt area in the second detection image to obtain the foam suspicious area; identify the density of each foam suspicious area, and if the density exceeds a preset density threshold, mark the chemical agent residue area in the second detection image and send it to the processing end.

5. The tableware cleanliness detection system based on image processing according to claim 4, characterized in that: In the tableware cleanliness detection module, after identifying the suspected stain area where the second average gray value is higher than the first average gray value and obtaining the stain area, the module further includes: Based on the preset standard image, the standard appearance of each tableware is extracted and matched with the tableware area where each stain area is located. It is determined whether the ratio of the standard appearance area of ​​the tableware with the highest matching degree between each stain area and its tableware area is greater than the preset ratio threshold. If not, the corresponding stain area is removed as noise.

6. The tableware cleanliness detection system based on image processing according to claim 5, characterized in that: After identifying the suspected stain area where the second average gray value is higher than the first average gray value and obtaining the stain area, the method further includes: The stained areas are identified based on the preset artificial intelligence recognition model, and the unidentified stained areas are eliminated.

7. A tableware cleanliness detection device based on image processing, characterized in that: The device comprises a processor and a memory: The memory is used to store program codes and transmit the program codes to the processor; The processor is used to execute the tableware cleanliness detection method based on image processing as described in any one of claims 1 to 3 according to the instructions in the program code.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the tableware cleanliness detection method based on image processing as described in any one of claims 1 to 3.

Citation Information

Cited By

  • Method and system for detecting residual stains after tableware disinfection based on deep learning

    CN122336416A