Egg shell surface cleanliness evaluation method and system

Through color vision technology, the displacement changes of the pixel points of the RGB histogram image of poultry egg shells was analyzed, and the problem of inaccurate evaluation of the surface cleanliness of poultry egg shells in the prior art was solved, and a high-accurate poultry egg cleaning evaluation method was achieved, which was suitable for modern industrial production.

CN120107159APending Publication Date: 2025-06-06PHOENIX FOOD GROUP CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510084902.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing technology lacks scientific and accurate methods to evaluate the cleanliness of the surface of poultry egg shells, resulting in low production efficiency and poor accuracy, which cannot meet the needs of modern industrial production.

Method used

Through color vision technology, the displacement changes of the pixels of the RGB histogram image of the eggshell before and after the cleaning of poultry eggs were studied, and the relationship between the color difference displacement of the eggshell and the degree of cleaning of the polluted poultry eggs was established, and the degree of cleanliness of the eggshell was determined. The specific steps include collecting poultry and egg images, extracting the color of poultry and egg shells before and after cleaning, calculating the average RGB grayscale value of the poultry and egg shell area, and constructing an RGB grayscale histogram to analyze and determine the cleanliness.

Benefits of technology

Quantitative evaluation of the degree of cleaning of poultry eggs was achieved, and the effect of cleaning poultry eggs was detected by water and sodium hypochlorite solution, and the comprehensive judgment accuracy reached more than 96%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107159A_ABST
    Figure CN120107159A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of poultry egg cleaning, and particularly discloses a poultry egg shell surface cleanliness degree evaluation method and system, and the method comprises the following steps: collecting a poultry egg image, extracting the color of a poultry egg shell before and after cleaning, and calculating the average RGB gray value of the area of the poultry egg shell; and constructing an RGB gray histogram, establishing a color difference model, and analyzing and judging the surface cleanliness of the egg shell according to the displacement change of pixel points of the RGB histogram of the egg shell before and after cleaning. According to the method, the colors of the eggshells of the poultry eggs with different pollution degrees before and after cleaning are extracted, the cleanliness degree of poultry egg cleaning is represented according to the displacement changes of the pixel points of the RGB histograms of the eggshells before and after cleaning, and a basis is provided for quantitative evaluation research of the cleanliness degree of the poultry eggs. The evaluation method is used for detecting the poultry egg cleaning effect of water and a sodium hypochlorite solution, and the comprehensive judgment accuracy of the eggshell cleaning degree reaches 96% or above.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of poultry egg cleaning, and in particular relates to a method for evaluating the cleanliness of a poultry egg shell surface. Background Art

[0002] The rectum of poultry is a common passage for excretion and birth. When poultry eggs are laid, they must pass through the rectum for excretion. Therefore, poultry feces, blood spots, dirt, etc. are often attached to the surface of the eggshell, becoming an important carrier of E. coli and various pathogens and viruses, and a major hidden danger to food safety. However, there has been no scientific and accurate measurement and evaluation method for the cleanliness of the eggshell surface at home and abroad. The degree of cleanliness of eggs is generally only roughly divided into qualified and unqualified.

[0003] Since most of the dirt on the eggshell surface is blood, poultry droppings, feathers, dirt, etc., it is generally judged by human subjectivity, which can easily cause visual fatigue, greatly reduce production efficiency and poor accuracy, and is increasingly unable to meet the needs of modern industrial production.

[0004] Based on this, the present invention is proposed. Summary of the invention

[0005] Based on the above reasons, the purpose of the present invention is to provide a method for evaluating the cleanliness of the eggshell surface of poultry eggs, by studying the displacement changes of the pixel points of the RGB histogram of the eggshell before and after the eggs are cleaned through color vision technology, establishing the relationship between the eggshell color difference displacement and the degree of cleaning of the contaminated eggs, and judging the cleanliness of the eggshell.

[0006] The present invention is achieved through the following technical solutions: A method for evaluating the cleanliness of eggshell surfaces, comprising the following steps: Collect images of poultry eggs, extract the eggshell colors before and after cleaning, and calculate the average RGB grayscale value of the eggshell area; An RGB grayscale histogram was constructed and a color difference model was established. The cleanliness of the eggshell surface was determined based on the displacement change analysis of the pixel points of the eggshell RGB histogram before and after cleaning.

[0007] Furthermore, the method for collecting images of poultry eggs is to place the poultry eggs in a single-color background with uniform lighting and no reflection to collect the images.

[0008] Furthermore, the specific calculation method for calculating the average RGB grayscale value of the eggshell area is to separate the collected egg image from the background, detect the boundary range of the egg, and calculate the number of pixels occupied by the egg area. The algorithm for the average grayscale value is: , where f(x, y) and g(x, y) are the grayscale values ​​of the pixels at f(x, y) of the grayscale image before and after processing, respectively, t is the threshold, 0 is black, and 255 is white.

[0009] Furthermore, the grayscale histogram is established by constructing an egg histogram based on the number of pixels at each grayscale level from 0 to 255 in accordance with the R, G, B three-component mode.

[0010] Preferably, the grayscale histogram quality is adjusted by equalization and / or normalization processing.

[0011] The present invention also provides an evaluation system for the cleanliness of eggshell surfaces, comprising: An acquisition module is used to acquire images of poultry eggs, extract the eggshell colors before and after cleaning, and calculate the average RGB grayscale value of the eggshell area; The processing module constructs an RGB grayscale histogram, establishes a color difference model, and determines the cleanliness of the eggshell surface based on the displacement change analysis of the pixel points of the eggshell RGB histogram before and after cleaning.

[0012] The present invention has the following beneficial effects: The present invention extracts the color of eggshells of poultry eggs with different degrees of contamination before and after cleaning, and characterizes the cleanliness of poultry eggs according to the displacement change of the pixel points of the eggshell RGB histogram before and after cleaning, providing a basis for the quantitative evaluation of the cleanliness of poultry eggs. The evaluation method is used to detect the effect of water and sodium hypochlorite solution on cleaning poultry eggs, and the comprehensive judgment accuracy of the cleanliness of the eggshell reaches more than 96%. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 Schematic diagram of the eggshell surface cleanliness evaluation system used in Example 1; In the figure: 1 is a processing module, 2 is an image acquisition card, and 3 is a test box; Figure 2 The RGB color difference change of the clean eggs before and after being washed with sodium hypochlorite solution in Example 2; Figure 3 This is the RGB histogram of the clean eggs in Example 2 before being washed with sodium hypochlorite solution; Figure 4 This is the RGB histogram of the clean eggs in Example 2 after being washed with sodium hypochlorite solution. DETAILED DESCRIPTION

[0014] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments.It should be understood that these descriptions are exemplary only, and are not intended to limit the scope of the present invention.In addition, in the following description, the description of known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.Unspecified conditions in the embodiments are carried out according to the conditions of normal conditions or manufacturer recommendations.Reagents used or instruments that do not specify manufacturers are conventional products that can be purchased and obtained commercially.

[0015] The present invention uses the RGB model system to obtain a variety of colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. This standard almost includes all colors that can be perceived by human vision.

[0016] The first embodiment of the present invention provides a method for evaluating the cleanliness of eggshell surfaces, comprising the following steps: Step 1: Collect images of poultry eggs, extract the eggshell colors before and after cleaning, and calculate the average RGB grayscale value of the eggshell area.

[0017] Specifically, the embodiment of the present invention uses a machine vision system composed of a CCD camera, an image acquisition card and a camera room. The light box is a closed lighting control box with four 20W fluorescent lamps on the top and four corners to provide uniform lighting. The tray background is a non-reflective single-color material, which makes it easier to distinguish the target object from the background, thereby completing the collection of poultry egg images.

[0018] Specifically, this embodiment separates the collected egg image from the background, detects the boundary range of the egg, and calculates the number of pixels occupied by the egg area. The algorithm for the average gray value is: , where f(x,y) and g(x, y) are the grayscale values ​​of the pixels at f(x, y) of the grayscale image before and after processing, respectively, t is the threshold, 0 is black, and 255 is white.

[0019] Specifically, the general imaging system only has a certain brightness response range, and the ratio of the maximum brightness to the minimum brightness is called contrast. The image obtained by the camera is a series of dynamically changing images, which are generally different from the effect of static shooting. The contrast is not high or contains different degrees of noise. In order to obtain the ideal separation effect, the acquired image must be adjusted after a series of image adjustments before valid data can be extracted. Image adjustment can be selected to perform inversion processing within a certain threshold. Since the color characteristics of the pollutant and the eggshell itself are somewhat different, the dirt and the eggshell will present different colors. The color of the dirt generally tends to be white, and the grayscale value is low (the color number is also inverted under inversion conditions); the color of clean poultry eggs is more uniform. After the image is binarized (select a certain threshold) to remove the background color and enhance the contrast of the eggshell color, the contamination area of ​​the pollutant on the eggshell can be clearly seen; the proportion of the area of ​​the pollutant to the area of ​​the entire egg can be calculated by superposition of pixels, and the average grayscale value (RGB) before and after cleaning can be calculated.

[0020] Step 2: Construct an RGB grayscale histogram, establish a color difference model, and determine the cleanliness of the eggshell surface based on the displacement change analysis of the eggshell RGB histogram pixels before and after cleaning.

[0021] Specifically, the grayscale histogram is established by constructing a poultry egg histogram based on the number of pixels at each grayscale level from 0 to 255 according to the R, G, and B three-component mode; establishing a grayscale histogram is an important means to analyze the grayscale distribution of an image. Using the image grayscale histogram, the pixel brightness distribution in the image can be intuitively seen. Further, the image quality can be adjusted through histogram equalization, normalization processing, etc.

[0022] Specifically, the cleanliness of the eggshell surface is determined based on the displacement change analysis of the pixel points of the eggshell RGB histogram before and after cleaning. In fact, this is because the histogram of the egg image is constructed based on the number of pixels at each grayscale level from 0 (black) to 255 (white). After the eggs are cleaned, the egg color and the background color can be clearly separated in the RGB grayscale mode, but the brightness distribution changes of each color component cannot be distinguished. Therefore, the histograms of each RGB component of the eggs before and after cleaning are introduced. It can be found from the histogram that the indication intensity of the poultry egg target is much greater than the indication intensity of the background. There is a long and narrow valley value between the two peaks of the poultry egg target and the background. In the R component mode, the background pixels are concentrated at around 50, and the poultry egg targets are concentrated between 150 and 200. A valley value between the two peaks can be selected as the segmentation threshold to segment the poultry egg image. After testing the segmentation effect of most poultry egg images, it can be found that for poultry egg images, whether they contain noise or shadows, the effect of using the indication value for segmentation is significant. After segmentation, the entire area of ​​the egg can be calculated by substituting it into the formula through program processing. On the R and B component graphs, the pixel value displayed on the green background is around 50, and the R component pixels are concentrated between 150 and 200. There is an obvious color shift in the R component value around 150 before and after cleaning. After cleaning, the pixels are mainly distributed after 150. There is a certain overlap between the G component value and the background color pixels. This is because the background color of the eggs is green. The B component is mainly distributed between 100 and 200. The color shift is large before and after cleaning, and the darker dirt on the surface of the eggshell is cleaned off, exposing the entire white eggshell, which enhances the brightness of the eggshell.

[0023] The second embodiment of the present invention provides an evaluation system for the cleanliness of egg shell surfaces, comprising: The acquisition module is used to acquire images of poultry eggs, extract the eggshell colors of the poultry eggs before and after cleaning, and calculate the average RGB grayscale value of the eggshell area.

[0024] Specifically, it includes an image acquisition card and a test box composed of a CCD camera, a camera room, etc. The test box is a closed light control box with four 20W fluorescent lamps on the top and four corners to provide uniform lighting; the tray background is a non-reflective single-color material, which makes it easier to distinguish the target object from the background, thereby completing the collection of egg images.

[0025] The processing module constructs an RGB grayscale histogram, establishes a color difference model, and determines the cleanliness of the eggshell surface based on the displacement change analysis of the pixel points of the eggshell RGB histogram before and after cleaning.

[0026] Specifically, before collecting images, MATLAB R2007 software was used to compile a collection detection program. The software system was a self-developed poultry egg image processing system compiled under the Visual C++ environment. The collected poultry egg images were preprocessed through this program to obtain the average RGB grayscale value of the eggshell area, and the egg area was calculated based on the grayscale value, a grayscale histogram was established, and image processing was performed.

[0027] Example 1 Verification Experiment like Figure 1 As shown, the evaluation system consists of 3 test boxes and 2 image acquisition cards to form an acquisition module, which acquires egg images, transmits the acquired egg images to a processing module, processes and analyzes the images, obtains the average RGB grayscale value of the eggshell area, and performs data analysis.

[0028] In order to test the reliability of the evaluation method of the surface cleanliness of poultry eggshells, chicken and duck egg samples were selected for testing. 20 severely contaminated chicken eggs and duck eggs were selected and numbered. Sodium hypochlorite disinfectant was prepared into a solution with a concentration of 450 mg / L, the temperature was 35°C, and the pH was adjusted to about 10. After cleaning, disinfection and drying, it was packed into sterile bags. For imaging processing, each egg was imaged three times, and the chicken egg / duck egg was rotated 120 degrees manually for each shot. The digital calculation and visualization software (MATLAB 2007) was used to analyze the RGB average grayscale value of the chicken egg / duck egg before and after cleaning, and the RGB color difference displacement was calculated by the formula. Since the egg shell of the chicken egg / duck egg itself (dust, feces, feathers, bloodstains) has color unevenness, it brings difficulties to sampling. Therefore, this experiment focuses on the color change of the same egg before and after cleaning, and takes the average value. The results are shown in Tables 1 and 2.

[0029] Table 1 Average gray value of eggshell surface (n=3) .

[0030] From Table 1, it can be concluded that the range of changes in the RGB average grayscale values ​​of the contaminated eggshells before and after cleaning. Before the eggs were cleaned, the average value of the R component was between 25.3825-30.4516, the average grayscale value of the G component was between 26.3471-30.8649, and the average grayscale value of the B component was between 23.7517-28.7621. After cleaning, the average grayscale value of the R component was between 25.3917-30.8673, the average grayscale value of the G component was between 26.7564-31.0647, and the average grayscale value of the B component was between 24.8972-30.4572. The difference in the average grayscale change of the R component was between 0.0092-1.2204, the difference in the average grayscale change of the G component was between 0.0611-2.5993, and the average grayscale value of the B component was between 0.3371-3.0001. The average gray value of the B component changes the most before and after cleaning, followed by the G component, and the R component changes the least. Therefore, it can be seen that the average gray value of the eggshell RGB is generally increasing. The color of the eggshell after cleaning is more uniform and the surface is shiny. This is related to the dirt on the surface of the eggshell being cleaned.

[0031] Table 2 Average gray value of duck egg shell surface (n=3) .

[0032] From Table 2, we can see the change in the average grayscale value of the RGB of the contaminated duck egg shell before and after cleaning. Before the duck eggs were cleaned, the average value of the R component was between 20.5327-27.8536, and the maximum color difference displacement value after cleaning was about 1.0276. The average grayscale value of the G component was between 20.1314-28.7372, and the maximum color difference displacement value was about 2.5564. The average grayscale value of the B component was between 20.03590-27.5648, and the maximum color difference displacement value was about 6.0634. It can also be seen from the table that the low average grayscale value of RGB before cleaning indicates that there is more dirt on the surface of the duck eggs, and the color of the dirt tends to be black (between the grayscale value of 0-255). The average grayscale value of the R component of the eggshell after cleaning is between 20.6672-28.0571, the average grayscale value of the G component is between 20.2317-29.5601, and the average grayscale value of the B component is between 21.2340-28.6531. The average grayscale values ​​of the R component, G component, and B component are generally smaller than the RGB average grayscale value of the eggshell before and after cleaning. This may be related to the color of the duck egg itself. Most duck egg shells tend to be dark (white shell eggs), and the color brightness is smaller than that of eggs. Compared with eggs, the RGB components are larger than eggs in terms of the difference in the average grayscale values ​​of the colors, which also shows that most of the dirt on the surface of the duck eggs has been removed. This experiment proves that the average grayscale value of the RGB of the duck eggshell increases after the duck egg is cleaned. This is because the dirt on the eggshell is removed and the grayscale value of each component of the eggshell increases. It can be inferred that there is a positive relationship between the cleaning effect of the dirt on the surface of the duck egg shell and the average grayscale value of the color RGB.

[0033] The above experiments prove that the average gray value of the RGB color of the eggshell of the poultry eggs cleaned with sodium hypochlorite disinfectant shifts toward the direction of the large (white) number, which indicates that the overall color of the eggshell becomes brighter and the outside of the eggshell is cleaned more cleanly. The evaluation method of the present invention evaluates the cleanliness of poultry eggs by quantifying the color change of the eggshell surface of the poultry eggs. It has been verified that the evaluation method is highly feasible and the results are accurate.

[0034] Example 2 Comparative test of washing eggs with water and adding sodium hypochlorite The solution with a sodium hypochlorite concentration of 450 mg / L was prepared, the cleaning temperature was 35°C, and the pH was adjusted to about 10. After the eggs were washed, disinfected and dried, they were placed in sterile bags. The imaging results of the eggs before and after washing under the CCD light source are shown in Figure 1. Figure 2 , the RGB histogram of eggs before washing is shown in Figure 3 , the RGB histogram of eggs after washing is shown in Figure 4 .

[0035] from Figure 2It is found that the clean eggs treated with sodium hypochlorite have a relatively uniform color on the surface of the eggshell in each RGB visual mode, and no other contaminants can be seen. Compared with before cleaning, no significant changes can be found after cleaning. Figure 3-4 It can be seen from the histogram that there is a long and narrow valley between the two peaks of the egg target and the background. There are almost no other impurity pixels in the middle. In the R component mode, the background pixels are concentrated around 100, the egg targets are concentrated between 150-200, and the background color grayscale values ​​are concentrated around 50. The eggshell color is relatively simple.

[0036] Table 3 shows the change in the average grayscale of the RGB color components of the eggshell of the egg cleaned with sodium hypochlorite solution. It can be seen from the table that the average grayscale value of the R component before the egg is cleaned is between 24.3256-31.9647, the average grayscale value of the G component is between 24.5688-30.9877, and the average grayscale value of the B component is between 21.7546-29.8863. Overall, the RGB values ​​are relatively large compared to the dirty eggs, which is because the selected egg samples are relatively clean. After cleaning, the average grayscale value of the RGB of the egg does not change much, the maximum change of the average grayscale value of the R component is 0.3222, and the minimum is 0.0016. The maximum value of the G component is about 0.9950, and the change of the B component is about 0.8011. The RGB color difference displacement of the eggshell after cleaning moves in the direction of increasing the color value as a whole, but the overall change is not too large. Compared with the three RGB color difference displacements, the change value of the B component is relatively large, followed by the other components. After cleaning the eggshell surface with sodium hypochlorite solution, some trace dust and fine dirt on the eggshell surface are removed. Since the proportion of dust in the pixels captured by the CCD light source is not very large, the color of the eggshell is restored to its unique color after cleaning, and the color difference displacement does not change much before and after cleaning.

[0037] Table 3 Average gray value of RGB color components of clean egg shells by sodium hypochlorite solution .

[0038] Table 4 shows the change in the average grayscale of the RGB of the eggshell of a clean egg before and after water washing. A large number of samples were taken to study the change in the chromatic aberration displacement of the egg before and after water washing. As can be seen from the table, before the egg was washed, the average grayscale value of the R component varied between 26.1513-30.7513, the average grayscale value of the G component varied between 24.3711-32.0217, and the average grayscale value of the B component varied between 23.1560-30.2745. After the egg was washed, the maximum change in the average grayscale value of the R component was about 0.1527, the G component was about 0.4207, and the B component changed to about 0.7424. The average grayscale value of the eggshell RGB was larger than that of the contaminated egg before washing. This is because the primary selected material is a clean egg without the interference of other colors, which generally reflects the color characteristics of the clean egg itself. The subtle changes in these grayscale values ​​before and after washing may be related to the dust on the eggshell.

[0039] Table 4 Average gray value of RGB color components of clean egg shells .

[0040] In summary, fresh eggs were washed in different ways using water and sodium hypochlorite solution, and the changes in the color difference displacement of the eggshells before and after washing with the two washing methods were studied using the evaluation method of the present invention. It can be seen that the evaluation method of the present invention can accurately judge the cleanliness of poultry eggs, and the comprehensive judgment accuracy of the cleanliness of the eggshells reaches more than 96%.

[0041] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for evaluating the cleanliness of eggshell surfaces, characterized in that: The following steps are involved: Collect images of poultry eggs, extract the eggshell colors before and after cleaning, and calculate the average RGB grayscale value of the eggshell area; An RGB grayscale histogram was constructed and a color difference model was established. The cleanliness of the eggshell surface was determined based on the displacement change analysis of the pixel points of the eggshell RGB histogram before and after cleaning.

2. The evaluation method according to claim 1, characterized in that: The method for collecting images of poultry eggs is to place the poultry eggs in a single-color background with uniform lighting and no reflection to collect images.

3. The evaluation method according to claim 1, characterized in that: The specific calculation method for calculating the average RGB grayscale value of the eggshell area is to separate the collected egg image from the background, detect the boundary range of the egg, and calculate the number of pixels occupied by the egg area. The algorithm for the average grayscale value is: , where f(x,y) and g(x, y) are the grayscale values ​​of the pixels at f(x, y) of the grayscale image before and after processing, respectively, t is the threshold, 0 is black, and 255 is white.

4. The evaluation method according to claim 1, characterized in that: The grayscale histogram is established by constructing an egg histogram based on the number of pixels at each grayscale level from 0 to 255 according to the R, G, B three-component mode.

5. The evaluation method according to claim 1, characterized in that: Adjust the grayscale histogram quality by equalization and / or normalization.

6. A system for evaluating the cleanliness of eggshell surfaces, characterized in that: Include: An acquisition module is used to acquire images of poultry eggs, extract the eggshell colors before and after cleaning, and calculate the average RGB grayscale value of the eggshell area; The processing module constructs an RGB grayscale histogram, establishes a color difference model, and determines the cleanliness of the eggshell surface based on the displacement change analysis of the pixel points of the eggshell RGB histogram before and after cleaning.