An intelligent monitoring method for an egg processing assembly line
By applying thermal excitation to the surface of eggs and using infrared thermography and geometric morphology analysis, the problem of crack monitoring on egg processing lines has been solved, achieving efficient and accurate crack detection and automated processing.
Patent Information
- Application Number
- CN202511613116.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-06
AI Technical Summary
Existing technologies are insufficient to effectively monitor and distinguish between minor cracks and natural spots on the surface of eggs, leading to a risk of quality degradation and contamination of eggs on the processing line.
By applying instantaneous thermal excitation to the surface of an egg, an infrared thermogram is obtained and processed using a Laplace field. Combining temperature differences and geometric features, threshold segmentation and connected component analysis are used to identify and distinguish between cracked and non-cracked regions.
This technology enables highly efficient and automated monitoring of egg cracks in egg processing lines, improving detection accuracy, preventing quality degradation and contamination caused by cracks, and enhancing processing efficiency.
Smart Images

Figure CN121068694B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to an intelligent monitoring method for an egg processing pipeline. BACKGROUND
[0002] Eggs are rich in high-quality protein, lecithin, vitamins, and minerals, and other nutrients needed by the human body. The balanced nutritional composition of eggs makes them an important part of the daily diet of the general public, and plays an important role in promoting human development, enhancing immunity, and maintaining the health of the nervous system.
[0003] The eggshell of an egg is a fragile calcium structure, and various factors can cause cracks in the eggshell during the supply chain from the farm to the table. For example, the physiological conditions of the hens that lay the eggs, such as age, health status, or insufficient calcium intake, can cause the eggshell structure to be weak or uneven in thickness, making it easy to produce cracked eggs at the time of production. During manual or automated collection and grading, collisions or extrusions between eggs, or between eggs and equipment or container walls, can also cause cracks in the eggshell.
[0004] The eggshell is a natural barrier against external microorganisms such as Salmonella or Escherichia coli, and cracks that may exist in the eggshell destroy this barrier, making the egg more susceptible to spoilage. Cracks can accelerate the evaporation of water and the loss of carbon dioxide inside the egg, causing the egg white to become watery and even the yolk to break, shortening the shelf life and freshness of the egg. In addition to affecting the quality of individual eggs, cracks that may exist in the eggshell are more likely to break and contaminate other eggs on the processing line, so it is necessary to monitor the cracks in the eggs on the egg processing pipeline. SUMMARY
[0005] To monitor the cracks in the eggs on the egg processing pipeline, the present application provides an intelligent monitoring method for an egg processing pipeline, comprising: after applying a transient thermal excitation to the surface of a to-be-detected egg, obtaining a first infrared thermal image of the surface of the to-be-detected egg, and obtaining a second infrared thermal image of the surface of the to-be-detected egg after a preset time period; taking the Laplacian field of the second infrared thermal image as a first feature map, and determining a second feature map based on the temperature difference between the first infrared thermal image and the second infrared thermal image and the current environmental temperature; fusing the first feature map and the second feature map to obtain a thermal anomaly map, and performing threshold segmentation and connected component analysis on the thermal anomaly map to obtain a plurality of candidate abnormal regions on the surface of the egg; the thermal anomaly map is used to improve the contrast between the features of cracks and non-cracks; based on the geometric morphological features of the candidate abnormal regions, a crack compliance value of the candidate abnormal regions is determined, and whether the to-be-detected egg has a crack is monitored according to the crack compliance value; the crack compliance value is used to distinguish between linear cracks and natural spots.
[0006] In this way, the cracks of the eggs in the egg processing pipeline can be monitored.
[0007] Optionally, the second feature map is determined according to a temperature difference between the first infrared thermal image and the second infrared thermal image and a current environment temperature, including: obtaining a first temperature value of a pixel point in the first infrared thermal image and a second temperature value of the same pixel point in the second infrared thermal image; obtaining the current environment temperature, and determining a normalized cooling rate of the pixel point according to a first difference between the first temperature value and the second temperature value and a second difference between the second temperature value and the current environment temperature, to obtain the second feature map determined by the normalized cooling rates of different pixel points.
[0008] In this way, the second feature map can reflect the characteristics of different surface position points of the egg to be detected in the temperature drop rate, so as to realize the monitoring of the cracks of the egg to be detected according to the difference in the temperature drop rate between the cracks and the eggshell area.
[0009] Optionally, the first feature map and the second feature map are fused to obtain a thermal anomaly map, including: obtaining an exponential amplification value of a pixel value of a pixel point in the second feature map, and multiplying the exponential amplification value of the pixel value of the same pixel point in the second feature map with the pixel value of the pixel point in the first feature map to obtain the pixel value of the pixel point in the thermal anomaly map, to obtain the pixel values of all position pixel points in the thermal anomaly map.
[0010] Optionally, the thermal anomaly map is subjected to threshold segmentation and connected domain analysis to obtain a plurality of candidate abnormal regions on the surface of the egg, including: performing binary segmentation on the thermal anomaly map by using an Otsu threshold segmentation algorithm to obtain a binary image; performing connected domain analysis on the binary image, and taking a plurality of independent connected regions obtained after the analysis as a plurality of candidate abnormal regions.
[0011] Optionally, the crack conformity value of the candidate abnormal region is determined by the following method, including: determining a stretch degree evaluation value and a slimness evaluation value of the candidate abnormal region, and taking the product of the stretch degree evaluation value and the slimness evaluation value as the crack conformity value of the candidate abnormal region; wherein the stretch degree evaluation value is used to represent the length of the shape of the candidate abnormal region; and the slimness evaluation value is used to represent the tree or line degree of the candidate abnormal region.
[0012] Optionally, the stretch degree evaluation value of the candidate abnormal region is determined by the following method: according to the coordinates of all pixel points in the candidate abnormal region, a coordinate covariance matrix is constructed, and the principal eigenvalue and the secondary eigenvalue of the coordinate covariance matrix are determined; the secondary eigenvalue is added by a predetermined positive number to obtain a sum value, and the ratio of the principal eigenvalue to the sum value is taken as the stretch degree evaluation value of the candidate abnormal region.
[0013] Optionally, the fineness evaluation value of the candidate abnormal region is determined by: determining a pixel area of the candidate abnormal region, and determining a major axis length of the candidate abnormal region; taking a square of the major axis length of the candidate abnormal region as a first parameter value, and taking a ratio of the pixel area of the candidate abnormal region to the first parameter value as a second parameter value, and taking an inverse of an exponential operation result of a natural exponential function on the second parameter value as the fineness evaluation value.
[0014] Optionally, the crack conformity value of the candidate abnormal region is determined by: , C is the crack conformity value of the candidate abnormal region, L is a length of a minimum circumscribed rectangle of the candidate abnormal region, is a pixel area of all pixel points in the candidate abnormal region, is a pixel area of the minimum circumscribed rectangle of the candidate abnormal region.
[0015] In this way, since the cracks possibly existing on the surface of the egg are different from the natural spots in the dispersion of the shape, the calculation formula of the crack conformity value of the candidate abnormal region can give a higher crack conformity value to the candidate abnormal region actually belonging to the crack.
[0016] Optionally, the method for monitoring whether the egg to be detected has a crack according to the crack conformity value comprises: in a case where the crack conformity value of at least one candidate abnormal region is greater than or equal to a preset threshold value, determining that the egg to be detected has a crack, and outputting the candidate abnormal region with the crack conformity value greater than or equal to the preset threshold value as a crack region; or in a case where the crack conformity values of all candidate abnormal regions are less than the preset threshold value, determining that the egg to be detected does not have a crack.
[0017] In this way, the automatic monitoring of whether the egg in the egg processing pipeline has a crack can be realized.
[0018] Optionally, the method further comprises: in a case where it is determined that the egg to be detected has a crack, outputting a crack alarm signal, or controlling a sorting device to reject the egg to be detected from the processing pipeline.
[0019] In this way, the automatic processing of the egg with a crack defect can be realized, and the processing efficiency of the egg in the egg processing pipeline can be improved.
[0020] The technical scheme provided by the embodiment of the present application can have the following beneficial effects: after a transient thermal excitation is applied to the surface of the to-be-detected egg, a first infrared thermal image of the surface of the to-be-detected egg is acquired, and a second infrared thermal image of the surface of the to-be-detected egg after a preset time length is acquired, which can combine the differences in temperature drop characteristics of the intact eggshell and the possible existing cracks, amplify the differences in characteristics of the intact eggshell and the possible existing cracks in the to-be-detected egg, fuse the first feature map and the second feature map to obtain a thermal anomaly map, and more significantly present the possible crack area in the thermal anomaly map, perform threshold segmentation and connected domain analysis on the thermal anomaly map, and acquire a plurality of candidate abnormal areas on the surface of the egg, which can more accurately determine whether the to-be-detected egg actually has a crack, and realize monitoring of the eggs in the egg processing pipeline.
[0021] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 is a schematic diagram of a surface grayscale image of a to-be-detected egg with a slight crack;
[0023] Figure 2 is a flowchart of an intelligent monitoring method for an egg processing pipeline according to an exemplary embodiment;
[0024] Figure 3 is a schematic diagram of a thermal anomaly map of a to-be-detected egg;
[0025] Figure 4 is a schematic diagram of a crack defect detection result of a to-be-detected egg. DETAILED DESCRIPTION
[0026] First, the application scenario of the embodiment of the present application is briefly introduced. In the application scenario of the present application, whether the egg surface has a crack defect can be determined by using the surface image of the egg. However, for the slight crack that may exist on the surface of the egg, it may be difficult to effectively detect by using the surface image of the egg, and therefore it is difficult to accurately monitor whether the egg on the egg processing pipeline has a crack.
[0027] As shown in Figure 1 , in the grayscale image of the surface RGB image of the egg with a slight crack, the slight crack existing therein cannot be effectively found, and the surface of the egg may have some natural mottling, so that it is difficult to effectively determine whether there is a crack defect by directly using the grayscale image of the RGB image of the egg.
[0028] To solve the above technical problems, the embodiment of the present application provides an intelligent monitoring method for an egg processing pipeline, Figure 2is a flow chart of an intelligent monitoring method for an egg processing flow line according to an exemplary embodiment, as shown in Figure 2 The method comprises the following steps.
[0029] In step S101, after applying a transient thermal excitation to the surface of the egg to be detected, a first infrared thermal image of the surface of the egg to be detected is obtained, and a second infrared thermal image of the surface of the egg to be detected after a preset time is obtained.
[0030] The transient thermal excitation applied to the surface of the egg to be detected can be, for example, irradiation of the egg to be detected by a xenon flash lamp, or heating of the surface of the egg to be detected by a pulse heating lamp, so that the surface of the egg to be detected is uniformly raised by a preset temperature relative to the ambient temperature, facilitating analysis of the temperature distribution and temperature drop of the surface of the egg to be detected in the subsequent process.
[0031] The duration and power of the transient thermal excitation applied to the surface of the egg to be detected can be set according to actual needs to effectively increase the surface temperature of the eggshell of the egg to be detected, and to avoid the influence of the temperature of the transient thermal excitation on the quality of the egg, which will not be described here.
[0032] At the moment when the transient thermal excitation is applied to the surface of the egg to be detected, the first infrared thermal image of the surface of the egg to be detected can be obtained by using an infrared image sensor; after a preset time at the end of the application of the transient thermal excitation to the surface of the egg to be detected, the second infrared thermal image of the surface of the egg to be detected can be obtained, which can reflect the temperature distribution of the surface of the egg to be detected after cooling from the application of the thermal pulse excitation, and can cooperate with the first infrared image to reflect the temperature change of the surface of the egg to be detected within the preset time.
[0033] At a preset time after the end of the application of the transient thermal excitation to the surface of the egg to be detected, the temperature change of different regions of the surface of the egg to be detected is more obvious, so that the second infrared thermal image can better reflect the temperature distribution difference of the surface of the egg at any position.
[0034] The preset time can be positively correlated with the energy represented by the application of the transient thermal excitation to the surface of the egg to be detected, and the preset time can be, for example, between 5 and 10 seconds.
[0035] For the normal eggshell region and the possible cracks on the surface of the egg to be detected, the thermal conductivity of the eggshell is higher than that of air, and the filling part at the crack is air, so that there is a difference between the temperature values on both sides of the crack and the temperature value at the crack.
[0036] The pixel value of the pixel point in the first thermal image and the second thermal image can represent the temperature value of the surface position point of the eggshell of the to-be-detected egg. The greater the temperature value of the surface position point of the eggshell of the to-be-detected egg is, the greater the pixel value of the corresponding pixel point in the first thermal image or the second thermal image is.
[0037] Because the heat conduction efficiency of the eggshell and the heat conduction efficiency of the air are different, the temperature drop rate of the normal eggshell is different from the temperature drop rate of the crack. Therefore, the first infrared thermal image and the second infrared thermal image of the eggshell of the to-be-detected egg can provide a good data source for crack detection of the to-be-detected egg.
[0038] The first infrared thermal image and the second infrared thermal image in the embodiment of the application correspond to the same surface region of the same to-be-detected egg. Specifically, the first infrared thermal image and the second infrared thermal image of the same surface region of the same to-be-detected egg can be obtained by time matching and position matching of the to-be-detected egg. The process of obtaining the first infrared thermal image and the second infrared thermal image of the same surface region of the same to-be-detected egg is not repeated here. The process of obtaining the first infrared thermal image and the second infrared thermal image of the same surface region of the same to-be-detected egg can be implemented by referring to the process of image matching in the prior art.
[0039] In step S102, the Laplacian field of the second infrared thermal image is taken as the first feature map, and the second feature map is determined according to the temperature difference between the first infrared thermal image and the second infrared thermal image and the current environment temperature.
[0040] The second infrared thermal image is processed using the Laplacian operator to obtain the Laplacian field of the second infrared thermal image. For example, the second infrared thermal image can be convolved using a Laplacian convolution kernel, and the image obtained after the convolution operation is taken as the Laplacian field. The obtained Laplacian field can reflect the difference degree of the temperature value of the pixel point in the second infrared thermal image relative to other pixel points around it.
[0041] The obtained first feature map can reflect the crack region that may exist on the surface of the to-be-detected egg in terms of the consistency of the temperature value. The temperature difference between the first infrared thermal image and the second infrared thermal image can reflect the temperature drop rate of the surface position point of the to-be-detected egg within a preset time length. The temperature drop rate of the eggshell part of the to-be-detected egg is different from that of the possible crack part. Therefore, the temperature difference between the first infrared thermal image and the second infrared thermal image can facilitate the difference between the eggshell and the crack of the egg.
[0042] In one embodiment, the second feature map is determined according to the temperature difference between the first infrared thermal image and the second infrared thermal image and the current environment temperature, including: obtaining a first temperature value of a pixel point in the first infrared thermal image, and a second temperature value of the same pixel point in the second infrared thermal image; obtaining the current environment temperature, and determining a normalized cooling rate of the pixel point according to a first difference value between the first temperature value and the second temperature value, and a second difference value between the second temperature value and the current environment temperature, to obtain the second feature map determined by the normalized cooling rates of different pixel points.
[0043] The first difference value between the first temperature value and the second temperature value can reflect the temperature drop of the same position point on the surface of the egg to be detected within a preset time length after the end of the thermal pulse excitation.
[0044] The current environment temperature refers to a pixel value corresponding to the current environment temperature value, which can be determined according to the temperature value and a preset corresponding relationship calibrated in advance, and the preset corresponding relationship is used to represent the corresponding relationship between the temperature value and the pixel value in the infrared thermal image.
[0045] The first infrared thermal image and the second infrared thermal image are obtained after the egg is subjected to pulse thermal excitation, so the pixel value of the pixel point in the first infrared thermal image is greater than the pixel value of the same pixel point in the second infrared thermal image, and the pixel value corresponding to the environment temperature value is less than or equal to the pixel value of the pixel point in the first infrared thermal image and the second infrared thermal image.
[0046] The second difference value between the second temperature value and the current environment temperature can realize the normalization processing of the first difference value between the first temperature value and the second temperature value.
[0047] Because the cracks and non-crack parts in the eggshell of the egg to be detected are different in thermal conductivity, the cracks and non-crack parts in the eggshell of the egg to be detected are different in temperature drop rate, so according to the obtained first infrared thermal image and the second infrared thermal image, the first difference values corresponding to the crack pixel points and the non-crack pixel points in the eggshell are different, so the feature of the cracks and non-crack parts in the eggshell of the egg to be detected can be distinguished from the perspective of the temperature drop rate.
[0048] For example, for a target pixel point in the first infrared thermal image, the target pixel point is any pixel point in the first infrared thermal image; the pixel value of the pixel point at the same position in the second feature map can be , wherein, is the pixel value of the target pixel point in the first infrared thermal image, is the pixel value of the pixel point at the same position of the target pixel point in the second infrared thermal image, is the environment temperature value, and a is a preset positive number used to avoid zero in the denominator.
[0049] The preset positive number can be a smaller positive number relative to the pixel value in the infrared thermal image, for example, can be a positive number of 0.1 or 0.2, etc.
[0050] In step S103, the first feature map and the second feature map are fused to obtain a thermal anomaly map, and the thermal anomaly map is threshold segmented and connected domain analyzed to obtain a plurality of candidate abnormal regions on the surface of the egg.
[0051] The pixel value of the pixel point in the first feature map reflects the difference in temperature value at the same moment between the surface position point of the egg to be detected and other surrounding surface position points; the pixel value of the pixel point in the second feature map reflects the difference in temperature drop rate of the surface position point of the egg to be detected, and the normal eggshell and the crack on the surface of the egg to be detected have differences in thermal conductivity, which can be reflected in the temperature difference and the temperature drop rate of the surrounding position points. Therefore, the first feature map and the second feature map are fused to obtain a thermal anomaly map, and the thermal anomaly map can be used to improve the contrast between the features of the crack and the features of the non-crack.
[0052] The thermal anomaly map is obtained by fusing the first feature image and the second feature image. In the obtained thermal anomaly map, the difference between the pixel value of the pixel point actually corresponding to the crack of the egg to be detected and the pixel value of the pixel point actually corresponding to the non-crack of the egg to be detected is enlarged, so that the contrast between the features of the crack and the features of the non-crack is improved.
[0053] In the actual determination of the thermal anomaly map, a higher pixel value can be determined in the thermal anomaly image for a pixel point with a higher probability of actually belonging to a crack pixel point, and a lower pixel value can be determined in the thermal anomaly image for a pixel point with a lower probability of actually belonging to a crack pixel point, so as to enhance the features of the crack and suppress the features of the non-crack in the thermal anomaly map.
[0054] In one embodiment, the first feature map and the second feature map are fused to obtain a thermal anomaly map, including: obtaining an exponential amplification value of the pixel value of the pixel point in the second feature map, multiplying the exponential amplification value of the pixel value of the same pixel point in the second feature map with the pixel value of the pixel point in the first feature map to obtain the pixel value of the pixel point in the thermal anomaly map, so as to obtain the pixel value of the pixel point at all positions in the thermal anomaly map.
[0055] The exponential amplification value of the pixel value of the pixel point in the second feature map can realize the exponential amplification of the pixel value of the pixel point in the second feature map. Compared with the difference of the pixel values of different pixel points in the second feature map, the difference of the exponential amplification values of the pixel values of different pixel points in the second feature map is greater, and the difference is mainly manifested as whether the pixel point belongs to the crack pixel point on the surface of the detected egg. Therefore, the exponential amplification value of the pixel value of the pixel point in the second feature map can further expand the difference between the crack pixel point and the non-crack pixel point on the surface of the detected egg.
[0056] Multiplying the exponential amplification value of the pixel value of the same pixel point in the second feature map by the pixel value of the pixel point in the first feature map can simultaneously consider the temperature difference of the detected egg from other surrounding points and the difference in temperature drop rate. The pixel value of the pixel point in the obtained thermal anomaly map can better represent the probability that the pixel point belongs to the crack on the eggshell surface of the detected egg.
[0057] For example, , M is the pixel value of a pixel point in the thermal anomaly map, W is the pixel value of the same pixel point in the second feature map image at the same position, S is the pixel value of the same pixel point in the first feature map image at the same position, and P is a coefficient for exponential amplification of W. For example, P can be between 1.2 and 1.5.
[0058] In one embodiment, threshold segmentation and connected component analysis are performed on the thermal anomaly map to obtain a plurality of candidate abnormal regions on the egg surface, including: performing binary segmentation on the thermal anomaly map using the Otsu threshold segmentation algorithm to obtain a binary image; performing connected component analysis on the binary image, and taking a plurality of independent connected regions obtained after the analysis as a plurality of candidate abnormal regions.
[0059] In order to facilitate the user to more intuitively view the thermal anomaly map, the pixel value of the pixel point in the thermal anomaly map can be normalized to the range of 0-255 before threshold segmentation and connected component analysis are performed on the thermal anomaly map.
[0060] The Otsu threshold segmentation algorithm can adaptively determine the best segmentation threshold for segmenting the thermal anomaly map, so as to perform binary segmentation on the thermal anomaly map using the determined best segmentation threshold to obtain a binary image.
[0061] The pixel points actually belonging to the normal eggshell in the detected egg can be zeroed in the obtained binary image, so as to avoid that the pixel points not actually belonging to the crack participate in the subsequent geometric feature analysis process.
[0062] The binarized image is subjected to connected domain analysis, and a plurality of independent connected regions can be obtained, and each connected region includes a plurality of non-zero pixel points adjacent in position in the binarized image. Since the cracks possibly existing in the egg are usually continuous, the plurality of connected regions obtained are taken as a plurality of candidate abnormal regions, so as to avoid the interference of the isolated pixel points possibly existing in the binarized image.
[0063] In step S104, a crack conformity value of the candidate abnormal region is determined based on the geometric feature of the candidate abnormal region, and the crack conformity value is used to monitor whether the egg to be detected has cracks.
[0064] In addition to the normal eggshell and cracks, the surface of the egg to be detected can also have natural spots with a thickness different from that of the normal eggshell. These natural spots are not actually cracks, but the temperature drop characteristics of the natural spots can be different from those of the normal eggshell, and the obtained thermal anomaly map can also be determined to have a higher pixel value, so that some candidate abnormal regions corresponding to the natural spots can exist in all candidate abnormal regions.
[0065] The natural spots possibly existing on the surface of the egg to be detected usually appear as circular or mass-like regions, while the cracks possibly existing on the surface of the egg to be detected usually appear as more elongated line structures or tree structures. Therefore, the geometric feature of the candidate abnormal region can be used to further screen the candidate abnormal regions actually corresponding to the crack regions from all candidate abnormal regions.
[0066] Since the natural spots possibly existing on the surface of the egg to be detected are different from the cracks possibly existing on the surface of the egg to be detected in geometric feature, the candidate abnormal region with a geometric feature more consistent with the feature of the crack can be determined to have a higher crack conformity value, and the candidate abnormal region with a geometric feature more consistent with the feature of the natural spot can be determined to have a lower crack conformity value, so that the crack conformity value can be used to distinguish the linear crack from the natural spot.
[0067] The thermal anomaly map is obtained by fusing the obtained first feature map and second feature map, and the thermal anomaly map can effectively avoid the influence of a part of the natural spots possibly existing on the surface of the egg to be detected. In combination with the geometric feature of the candidate abnormal region, the interference of the natural spots of the egg to be detected on the crack detection result can be better avoided.
[0068] In one embodiment, the crack conformity value of the candidate abnormal region is determined by: determining a stretch degree evaluation value and a thinness evaluation value of the candidate abnormal region, and taking the product of the stretch degree evaluation value and the thinness evaluation value as the crack conformity value of the candidate abnormal region; wherein the stretch degree evaluation value is used to represent the length-to-width ratio of the shape of the candidate abnormal region; and the thinness evaluation value is used to represent the tree-like or line-like degree of the candidate abnormal region.
[0069] The crack region that may exist on the surface of the eggshell of the egg is usually a curved line or a scattered tree, and the natural spot that may exist on the surface of the eggshell of the egg is usually a circle or an ellipse. Therefore, compared with the natural spot that may exist on the surface of the eggshell of the egg, the length-to-width ratio of the candidate abnormal region that actually belongs to the crack region is higher, and the tree-like or line-like degree of the candidate abnormal region that actually belongs to the crack region is higher.
[0070] Taking the product of the stretch degree evaluation value and the thinness evaluation value as the crack conformity value of the candidate abnormal region can determine a higher crack conformity value for the candidate abnormal region that actually belongs to the crack region, and a lower crack conformity value for the candidate abnormal region that actually belongs to the natural spot.
[0071] In one embodiment, the stretch degree evaluation value of the candidate abnormal region is determined by: constructing a coordinate covariance matrix according to the coordinates of all pixel points in the candidate abnormal region, and determining the principal eigenvalue and the secondary eigenvalue of the coordinate covariance matrix; adding the secondary eigenvalue to a preset positive number to obtain a sum value, and taking the ratio of the principal eigenvalue to the sum value as the stretch degree evaluation value of the candidate abnormal region.
[0072] Compared with the more aggregated natural spot that may exist on the eggshell surface of the egg to be detected, the crack region that may exist on the eggshell surface is more scattered, so that the candidate abnormal region actually corresponding to the crack region has a higher dispersion degree on the horizontal axis and the vertical axis.
[0073] Because the candidate abnormal region actually corresponding to the crack region has a higher dispersion degree on the horizontal axis and the vertical axis, the coordinate covariance matrix of the candidate abnormal region actually corresponding to the crack region has different characteristics from the coordinate covariance matrix of the candidate abnormal region actually corresponding to the natural spot.
[0074] For example, the difference between the principal eigenvalue and the secondary eigenvalue of the coordinate covariance matrix corresponding to the crack region is larger, while the principal eigenvalue and the secondary eigenvalue of the coordinate covariance matrix corresponding to the natural spot are closer, and the principal eigenvalue is greater than or equal to the secondary eigenvalue. Therefore, by adding the secondary eigenvalue to a preset positive number to obtain a sum value, and taking the ratio of the principal eigenvalue to the sum value as the stretch degree evaluation value of the candidate abnormal region, a higher stretch degree evaluation value can be given to the candidate abnormal region that actually belongs to the crack region.
[0075] The coordinate covariance matrix of the candidate abnormal region comprises the following elements: a dispersion degree value of the coordinates of the pixel points in the candidate abnormal region in the horizontal direction; a dispersion degree value of the coordinates of the pixel points in the candidate abnormal region in the vertical direction; and a correlation degree value of the horizontal coordinates and the vertical coordinates of the pixel points in the candidate abnormal region.
[0076] The dispersion degree value of the coordinates of the pixel points in the candidate abnormal region in the horizontal direction is equal to the covariance of the horizontal coordinates of different pixel points in the candidate abnormal region; the dispersion degree value of the coordinates of the pixel points in the candidate abnormal region in the vertical direction is equal to the covariance of the vertical coordinates of different pixel points in the candidate abnormal region; and the correlation degree value of the horizontal coordinates and the vertical coordinates of the pixel points in the candidate abnormal region is equal to the covariance between the horizontal coordinates and the vertical coordinates of the pixel points in the candidate abnormal region.
[0077] In one embodiment, the thinness evaluation value of the candidate abnormal region is determined by the following manner: determining the pixel area of the candidate abnormal region, and determining the major axis length of the candidate abnormal region; taking the square of the major axis length of the candidate abnormal region as a first parameter value, and taking the ratio of the pixel area of the candidate abnormal region to the first parameter value as a second parameter value, and taking the reciprocal of the exponential operation result of the natural exponential function on the second parameter value as the thinness evaluation value.
[0078] Natural spots existing on the surface of an eggshell are generally circular, and cracks existing on the surface of an eggshell are generally linear or scattered tree-shaped, so that in a rectangular region circumscribed around a candidate abnormal region actually corresponding to a natural spot, the number of pixel points belonging to the candidate abnormal region accounts for a higher proportion; in a rectangular region circumscribed around a candidate abnormal region actually corresponding to a crack, the number of pixel points with a pixel value of 0 accounts for a higher proportion.
[0079] Taking the square of the major axis length of the candidate abnormal region as a first parameter value, and taking the ratio of the pixel area of the candidate abnormal region to the first parameter value as a second parameter value, the square of the major axis length of the candidate abnormal region is necessarily greater than or equal to the pixel area of the candidate abnormal region, so that the second parameter value is greater than 0 and less than or equal to 1.
[0080] The first parameter value is the square of the major axis length of the candidate abnormal region, so that the dimension of the first parameter value is consistent with the dimension of the pixel area, and taking the ratio of the pixel area of the candidate abnormal region to the first parameter value as a second parameter value can realize the dimensionless processing of the pixel area.
[0081] Since the number of pixel points belonging to the candidate abnormal region accounts for a higher proportion in the rectangular region circumscribed around the candidate abnormal region actually corresponding to the natural spot, the first parameter value of the candidate abnormal region actually corresponding to the natural spot is closer to the pixel area of the candidate abnormal region, and therefore, the second parameter value of the candidate abnormal region actually corresponding to the natural spot is larger, and the reciprocal of the exponential operation result of the natural exponential function on the second parameter value is taken as the fineness evaluation value, which can give the candidate abnormal region actually corresponding to the natural spot a lower fineness evaluation value.
[0082] In one embodiment, the crack conformity value of the candidate abnormal region is determined in the following manner: , C is the crack conformity value of the candidate abnormal region, L is the length of the minimum circumscribed rectangle of the candidate abnormal region, A1 is the pixel area of all pixel points in the candidate abnormal region, and A2 is the pixel area of the minimum circumscribed rectangle of the candidate abnormal region.
[0083] Compared with the natural spot that may exist on the surface of the egg to be detected, the crack that may exist on the surface of the egg to be detected usually has a larger span on the eggshell surface, so that the length of the minimum circumscribed rectangle of the candidate abnormal region actually corresponding to the crack is larger.
[0084] The crack that may exist on the surface of the egg to be detected is usually a more dispersed polyline or tree structure, so that the candidate abnormal region corresponding to the crack of the egg to be detected usually includes more non-crack pixel points, and therefore, the difference between the pixel area of the candidate abnormal region actually belonging to the crack and the pixel area of the minimum circumscribed rectangle of the candidate abnormal region is larger.
[0085] Through the crack conformity value of the candidate abnormal region, the candidate abnormal region actually belonging to the crack is smaller, and L corresponding to the candidate abnormal region actually belonging to the crack is larger, so that the crack conformity value C of the candidate abnormal region actually belonging to the crack is larger, and the crack conformity value can effectively distinguish between the linear crack and the natural spot.
[0086] Figure 3 is a schematic diagram of a thermal anomaly image of an egg to be detected in an embodiment of the present application, as Figure 3 shown, compared with the surface gray image of the egg to be detected, the thermal anomaly image can better present the slight crack existing on the surface of the egg, and the surface of the egg may exist some natural spots with a thickness different from that of the normal eggshell, so that in addition to the crack that may exist, the thermal anomaly image may also exist some circular natural spots, and therefore, the difference in shape characteristics between the natural spot and the crack can be used to avoid the influence of the natural spot on the detection result.
[0087] Figure 4is a schematic diagram of a crack defect detection result of a to-be-detected egg, and after threshold segmentation and threshold connected domain analysis are performed on the thermal anomaly map as shown in Figure 4 The threshold segmentation and threshold connected domain analysis are performed on the thermal anomaly map, a plurality of candidate anomaly regions are obtained, and the crack conformity values of the candidate anomaly regions are determined to distinguish the natural mottling and the crack defects in all the candidate anomaly regions and mark the natural mottling and the crack defects by using different colors and linear marking boxes.
[0088] In one embodiment, the crack conformity value is used to monitor whether the to-be-detected egg has a crack, including: in a case where the crack conformity value of at least one candidate anomaly region is greater than or equal to a preset threshold, determining that the to-be-detected egg has a crack, and outputting the candidate anomaly region with the crack conformity value greater than or equal to the preset threshold as a crack region; or in a case where the crack conformity values of all the candidate anomaly regions are less than the preset threshold, determining that the to-be-detected egg does not have a crack.
[0089] In the case where the crack conformity value of at least one candidate anomaly region is greater than or equal to the preset threshold, it indicates that the surface of the to-be-detected egg has at least one actual crack region, and the determination that the to-be-detected egg has a crack can facilitate timely processing of the to-be-detected egg with a crack.
[0090] The candidate anomaly region with the crack conformity value greater than or equal to the preset threshold is output as the crack region, which can determine the degree of the crack in the to-be-detected egg according to the area belonging to the crack region, for example, the to-be-detected egg can be automatically classified according to the proportion of the crack region in the entire to-be-detected egg or the number of crack regions.
[0091] In the case where the crack conformity values of all the candidate anomaly regions are less than the preset threshold, it indicates that the obtained candidate anomaly regions actually do not belong to cracks, and the determination that the to-be-detected egg does not have a crack can facilitate detection of other to-be-detected items of the egg without a crack, thereby realizing subsequent processing steps such as code spraying and packaging of the egg without a defect.
[0092] In one embodiment, in the case where it is determined that the to-be-detected egg has a crack, a crack alarm signal can be output, or a sorting device can be controlled to remove the to-be-detected egg from a processing line.
[0093] In the case where it is determined that the to-be-detected egg has a crack, the crack alarm signal can be output to facilitate the user to discover the crack defect of the egg in time, and the sorting device can be controlled to remove the to-be-detected egg from the processing line, so as to ensure that the removed egg does not have a crack defect, realize automatic processing of the egg with a crack defect in the egg processing line, and ensure the quality of the eggs produced by the egg processing line.
[0094] It is to be understood that the application is not limited to the precise construction already described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof.
Claims
1. An intelligent monitoring method for an egg processing line, characterized in that, The method comprises the following steps: applying a transient thermal excitation to the surface of the egg to be detected, obtaining a first infrared thermal image of the surface of the egg to be detected, and obtaining a second infrared thermal image of the surface of the egg to be detected after a preset time; the Laplace field of the second infrared thermal image is taken as a first feature map, and the second feature map is determined according to the temperature difference between the first infrared thermal image and the second infrared thermal image and the current environmental temperature: the first temperature value of the pixel point in the first infrared thermal image is obtained, and the second temperature value of the same pixel point in the second infrared thermal image is obtained; the current environmental temperature is obtained, the first difference value of the first temperature value and the second temperature value, and the second difference value of the second temperature value and the current environmental temperature are determined, the normalized cooling rate of the pixel point is determined, and the second feature map determined by the normalized cooling rate of different pixel points is obtained; the first feature map and the second feature map are fused to obtain a thermal anomaly map: the exponential amplification value of the pixel value of the pixel point in the second feature map is obtained, the exponential amplification value of the pixel value of the same pixel point in the second feature map is multiplied by the pixel value of the pixel point in the first feature map, and the pixel value of the pixel point in the thermal anomaly map is obtained, so as to obtain the pixel value of all pixel points at all positions in the thermal anomaly map, and the thermal anomaly map is threshold segmented and connected domain analyzed to obtain a plurality of candidate abnormal regions on the surface of the egg; the thermal anomaly map is used to improve the contrast between the characteristics of cracks and the characteristics of non-cracks; based on the geometric morphological features of the candidate abnormal regions, the crack compliance value of the candidate abnormal regions is determined, and whether the egg to be detected has cracks is monitored according to the crack compliance value; the crack compliance value is used to distinguish linear cracks from natural spots.
2. The intelligent monitoring method for an egg processing line according to claim 1, characterized in that, threshold segmentation and connected domain analysis are performed on the thermal anomaly map to obtain a plurality of candidate abnormal regions on the surface of the egg, comprising: the thermal anomaly map is binarized by using Otsu threshold segmentation algorithm to obtain a binary image; the binary image is analyzed by connected domain analysis, and a plurality of independent connected regions obtained after analysis are taken as a plurality of candidate abnormal regions.
3. The intelligent monitoring method for an egg processing line according to claim 1, wherein, The crack compliance value of the candidate abnormal region is determined by the following method, comprising: determining the stretch degree evaluation value and the slimness evaluation value of the candidate abnormal region, and taking the product of the stretch degree evaluation value and the slimness evaluation value as the crack compliance value of the candidate abnormal region; wherein, the stretch degree evaluation value is used to represent the length of the shape of the candidate abnormal region; the slimness evaluation value is used to represent the tree or linear degree of the candidate abnormal region.
4. The intelligent monitoring method for an egg processing line according to claim 3, wherein, The stretch degree evaluation value of the candidate abnormal region is determined by the following method: according to the coordinates of all pixel points in the candidate abnormal region, a coordinate covariance matrix is constructed, and the principal eigenvalue and the secondary eigenvalue of the coordinate covariance matrix are determined; the sum of the secondary eigenvalue and a preset positive number is obtained, and the ratio of the principal eigenvalue to the sum is taken as the stretch degree evaluation value of the candidate abnormal region.
5. The intelligent monitoring method for an egg processing line according to claim 3, wherein, The slimness evaluation value of the candidate abnormal region is determined by the following method: the pixel area of the candidate abnormal region is determined, and the major axis length of the candidate abnormal region is determined; The square of the major axis length of the candidate abnormal region is taken as a first parameter value, and a ratio of a pixel area of the candidate abnormal region to the first parameter value is taken as a second parameter value, and an inverse of an exponential operation result of a natural exponential function on the second parameter value is taken as the fineness evaluation value.
6. The intelligent monitoring method for an egg processing line according to claim 1, wherein, The crack conformity value of the candidate abnormal region is determined by the following manner: C is a crack conformity value of the candidate abnormal region, L is a length of a minimum circumscribed rectangle of the candidate abnormal region, is a pixel area of all pixel points in the candidate abnormal region, is a pixel area of the minimum circumscribed rectangle of the candidate abnormal region.
7. The intelligent monitoring method for an egg processing line according to claim 1, wherein, The crack conformity value is monitored to determine whether the egg to be detected has a crack, comprising: In a case where the crack conformity value of at least one candidate abnormal region is greater than or equal to a preset threshold value, it is determined that the egg to be detected has a crack, and the candidate abnormal region whose crack conformity value is greater than or equal to the preset threshold value is output as a crack region; Or, in a case where the crack conformity values of all candidate abnormal regions are less than the preset threshold value, it is determined that the egg to be detected does not have a crack.
8. The intelligent monitoring method for an egg processing line according to claim 7, characterized in that, The method further comprises: In a case where it is determined that the egg to be detected has a crack, a crack alarm signal is output, or a sorting device is controlled to reject the egg to be detected from a processing assembly line.
Citation Information
Patent Citations
Characterization of cannabis cultivars based on terpene synthase gene profiles
CA3188481A1
Insulation equipment detection method and device, electronic equipment and storage medium
CN114359139A