Intelligent analysis method and system for egg phenotype
Patent Information
- Application Number
- CN202610496896.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-15
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-04-15
AI Technical Summary
[0009]本发明的目的在于提供一种禽蛋表型智能分析方法及其系统,以解决现有技术中测量效率低、精度不稳定及检测维度单一等问题
[0053]通过自动参数校准机制,利用少量已知尺寸的蛋品标定系统参数,实现了像素尺寸与实际尺寸的动态映射,提高了对不同成像设备和环境的适应性及测量精度;
Smart Images

Figure CN122368987B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing, computer vision, and agricultural information technology, specifically to a method and system for intelligent analysis of poultry egg phenotypes. Background Technology
[0002] Poultry eggs are an important agricultural product, widely used in poultry breeding and commercial egg production. In poultry breeding, the blunt tip differentiation, egg shape index, and egg weight are crucial indicators affecting hatchability and offspring productivity. In commercial egg production and distribution, the uniformity of egg appearance and morphological characteristics are also important criteria for quality grading. Therefore, accurate and efficient measurement of poultry egg phenotypic parameters is of great significance. Currently, in poultry breeding and egg grading, it is usually necessary to measure phenotypic parameters such as egg morphology and weight, and to screen and evaluate based on relevant indicators. However, current poultry egg phenotypic data acquisition mainly relies on manual measurement or simple image processing methods, which have the following shortcomings:
[0003] (1) Low measurement efficiency: Manual measurement using calipers and balances is cumbersome and labor-intensive, making it difficult to meet the needs of large-scale production;
[0004] (2) Large measurement error: Manual measurement relies on experience, and there are subjective differences in the judgment of blunt end and operation method, resulting in poor data consistency and repeatability;
[0005] (3) Risk of contact: Contact with the egg during manual measurement may cause micro-damage, which may affect the hatching effect or storage performance;
[0006] (4) Insufficient phenotypic information: Existing methods mainly obtain basic parameters such as length, width, and weight, but it is difficult to quantify complex phenotypic features such as egg shape symmetry and roundness.
[0007] (5) Limitations of automation technology: Existing machine vision methods mostly use fixed calibration parameters, lack adaptive calibration mechanisms, and have single detection indicators, making it difficult to achieve complex phenotypic analysis. At the same time, there is a lack of a unified data processing and visualization management platform.
[0008] Therefore, there is an urgent need to provide an intelligent analysis method and system for poultry egg phenotypic characteristics that can achieve automatic calibration, batch processing, and accurate measurement of multidimensional phenotypic parameters, in order to solve the above-mentioned problems existing in the prior art. Summary of the Invention
[0009] The purpose of this invention is to provide a method and system for intelligent analysis of poultry egg phenotypes, in order to solve the problems of low measurement efficiency, unstable accuracy and single detection dimension in the prior art.
[0010] To achieve the above objectives, the present invention provides a method comprising the following steps:
[0011] S1. Obtain at least one image of a calibrated egg product with known actual size and weight; extract the contour of the calibrated egg product image; calculate the global conversion ratio between pixel size and actual size based on the extracted contour and the actual size; calculate the global density parameter based on the actual size, weight and preset geometric model.
[0012] S2. Acquire an image of the egg product to be tested, and extract the contour of the image of the egg product to be tested under the same imaging conditions to obtain the target contour;
[0013] S3. Calculate the pixel size of the egg based on the target contour, and convert it to the actual size using the global conversion ratio; estimate the weight of the egg based on the actual size, the preset geometric model, and the global density parameters;
[0014] S4. Based on the target contour, calculate the blunt tip difference coefficient, which characterizes the end features of the egg, the symmetry index, which characterizes the overall symmetry of the egg, and the deformity index, which characterizes the regularity of the egg surface.
[0015] S5. Based on at least two phenotypic parameters obtained in S3 and S4, calculate the comprehensive score of the egg product using a preset scoring function.
[0016] Furthermore, contour extraction of the calibrated egg image includes:
[0017] Image preprocessing includes grayscale conversion, filtering, and contrast enhancement.
[0018] The preprocessed image is binarized and segmented, and the segmentation results are optimized through morphological operations.
[0019] Candidate contours are extracted from the optimized binary image, and the target egg contours are selected based on preset area and position constraints.
[0020] Furthermore, calculating the global conversion ratio includes:
[0021] Calculate the minimum bounding rectangle of the selected target egg product outline to obtain the pixel-level major axis length and minor axis length;
[0022] Based on the pixel-level major and minor axis lengths and the actual major and minor axis lengths, the conversion ratio based on the major axis and the conversion ratio based on the minor axis are calculated respectively, and the average of the two is taken as the conversion ratio of a single calibration image.
[0023] The average conversion ratio of multiple calibration images is taken to obtain the global conversion ratio.
[0024] Furthermore, the calculation of the global density parameters includes:
[0025] The shape of the egg is approximated as a rotating ellipsoid, and the volume of the egg is calculated based on the actual measured lengths of the major and minor axes.
[0026] Calculate the density of a single calibrated egg based on the actual measured weight and calculated volume.
[0027] The global density parameter is obtained by averaging the densities of multiple calibrated eggs.
[0028] Furthermore, the calculation of the blunt tip difference coefficient includes:
[0029] Determine the preset regions at both ends of the target contour along its major axis;
[0030] Calculate the area of the preset regions at both ends;
[0031] The larger area in each of the two regions is defined as the blunt end, and the difference coefficient of the blunt tip is calculated based on the area ratio of the two regions.
[0032] Furthermore, calculating the symmetry index includes:
[0033] Using the major axis of the target contour as the dividing line, the contour is divided into an upper half and a lower half;
[0034] Calculate the pixel area of the upper and lower halves;
[0035] The symmetry index is calculated based on the ratio of the areas of the upper and lower parts.
[0036] Furthermore, the calculation of the deformity index includes:
[0037] The target contour is fitted with an ellipse to obtain a fitted ellipse;
[0038] Transform the coordinates of the points on the target contour to a normalized coordinate system with the center of the fitted ellipse as the origin;
[0039] Calculate the normalized radial distance from all points on the contour to the center of the fitted ellipse;
[0040] The maximum value of the normalized radial distance is compared with 1, and the excess portion is used as the distortion index.
[0041] Furthermore, based on six indicators—actual long axis, actual short axis, estimated weight, blunt tip difference coefficient, symmetry index, and deformity index—sub-item scores are calculated separately, and a weighted sum is performed to obtain a comprehensive score.
[0042] Furthermore, it also includes statistical analysis step S6: performing descriptive statistical analysis on various phenotypic parameters and comprehensive scores of batch egg products, and generating visualization charts.
[0043] A poultry egg phenotypic intelligent analysis system for implementing the method, comprising:
[0044] The image acquisition module is used to acquire images of calibrated egg products and images of egg products to be tested;
[0045] The parameter calibration module is used to perform the parameter calibration step S1 and calculate the global conversion ratio and global density parameters.
[0046] The image processing and contour extraction module is used for image preprocessing and contour extraction.
[0047] The feature calculation module is used to perform the size and weight estimation step S3 and the morphological feature extraction step S4, and to calculate the actual size, weight, blunt tip difference coefficient, symmetry index and deformity index of the egg.
[0048] The comprehensive scoring module is used to execute the comprehensive scoring step S5 and calculate the comprehensive score of the egg product;
[0049] The interactive interface module provides a graphical user interface, receives user-uploaded images and parameter setting instructions, and displays the analysis results;
[0050] It also includes a batch processing module for automated sequential or parallel processing of multiple egg product images to be tested; and a statistical analysis module for statistical analysis of the batch analysis results.
[0051] The interactive interface module is implemented based on a Web framework and includes at least a parameter calibration interface, a batch detection interface, and a result display interface. The global conversion ratio and global density parameters can be automatically transferred to the batch detection interface after being calculated in the parameter calibration interface.
[0052] Compared with the prior art, the present invention has at least the following beneficial effects:
[0053] By using an automatic parameter calibration mechanism and a small number of eggs of known size to calibrate the system parameters, dynamic mapping between pixel size and actual size was achieved, improving adaptability to different imaging devices and environments and measurement accuracy.
[0054] The non-contact image analysis method completely avoids physical damage to the egg during the measurement process, making it particularly suitable for screening hatching eggs.
[0055] It can extract multidimensional phenotypic indicators, including blunt tip differences, symmetry, and deformity, breaking through the limitation of traditional methods that can only obtain basic dimensions, and significantly improving the richness of detection information and application value;
[0056] It supports automatic processing of batch images, and combined with a cloud system architecture, it significantly improves detection efficiency and can meet the needs of large-scale production scenarios. Attached Figure Description
[0057] Figure 1 This is a schematic diagram of the parameter calibration interface.
[0058] Figure 2 This is a schematic diagram of the batch detection interface.
[0059] Figure 3 This is a schematic diagram of the results display interface.
[0060] Figure 4 This is a schematic diagram of the testing process. Detailed Implementation
[0061] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Those skilled in the art should understand that the following embodiments are for illustrative purposes only and do not constitute any limitation on the scope of protection of the present invention.
[0062] Example 1: Parameter Calibration
[0063] This embodiment describes how to automatically calculate key system parameters using images of poultry eggs with known measurements. Users log in to the cloud platform https: / / iasbreeding.cn / egg / and access the parameter calibration page through the interactive interface. They upload 10 egg images (filenames corresponding to the sample IDs) and an Excel file containing the sample ID, major axis length (mm), minor axis length (mm), and weight (g). The system backend processes each image in the following three steps:
[0064] Step 1: Contour Detection: This step aims to accurately segment the egg region from the original image and obtain the complete egg contour, laying the foundation for subsequent phenotypic parameter calculations. The specific processing flow is as follows:
[0065] 1. Image grayscale conversion and preprocessing: Reading the original color image Converted to grayscale image using the standard ITU-R BT.601 formula. :
[0066]
[0067] To eliminate the effects of uneven illumination, a 3×3 median filter is used for background equalization, removing noise while preserving edge information.
[0068]
[0069] The CLAHE (Contrast-Limited Adaptive Histogram Equalization) algorithm is applied to enhance local contrast. The image is divided into 8×8 pixel tiles, and the histogram cropping threshold for each tile is defined as follows:
[0070]
[0071] in This represents the number of pixels within a tile. For gray levels, This represents the cropping factor. After histogram equalization, each tile is combined into a complete image using bilinear interpolation. For each image patch, the contrast limiting function is:
[0072]
[0073] in The original histogram is cropped, and the portions exceeding the threshold are redistributed evenly across all gray levels. Finally, Gamma correction is performed, using non-linear grayscale transformation to further enhance the contrast in dark areas and suppress overexposure in highlight areas.
[0074]
[0075] 2. Image Binarization Segmentation: The Otsu adaptive thresholding segmentation algorithm is used to automatically calculate the optimal segmentation threshold based on the image's grayscale histogram. The image is divided into two parts: foreground (eggs) and background.
[0076]
[0077] Among them, inter-class variance Defined as:
[0078]
[0079] , These represent the pixel ratios of the foreground and background, respectively. , This corresponds to the grayscale mean. Binary image. We obtain it from the following formula:
[0080]
[0081] 3. Morphological optimization: An elliptical structural element with a size of 18×18 was adopted. Perform morphological operations:
[0082] Closing operation: using struct elements Perform morphological closing operations (dilation followed by erosion) to fill the tiny pores inside the egg and connect the fractured areas:
[0083]
[0084] in This indicates an expansion operation. This indicates a corrosion operation.
[0085] Opening operation: Then, morphological opening operation (erosion followed by dilation) is performed to remove residual small noise in the binary image.
[0086]
[0087] Hole filling: A hole filling algorithm is applied to the morphologically processed binary image to fill the remaining black holes in the egg-shaped region with the foreground color. The iterative process of hole filling can be represented as:
[0088]
[0089] initial For background points on the image boundary, after iteration until convergence, the filling result is:
[0090]
[0091] 4. Contour Extraction and Filtering: From the optimized binary image Extract the outer contours of all connected components to obtain the contour set. For each contour Calculate the following features:
[0092] area Total number of pixels within the outline
[0093] Center of mass :
[0094]
[0095] To eliminate background interference and ensure the extraction of the target egg product, strict screening conditions were set:
[0096] Area constraint: outline area satisfy:
[0097]
[0098] in This represents the total area of the image. The lower limit can eliminate minor noise, while the upper limit can remove excessively large background areas.
[0099] Positional constraint: The centroid of the contour is located within the central 1 / 3 region of the image.
[0100]
[0101] in , These represent the height and width of the image, respectively.
[0102] In the candidate contour set that meets the above conditions Among them, the one with the largest area is selected as the final outline of the egg product:
[0103]
[0104] Step 2: Pixel Size Calculation and Conversion Ratio Calibration: This step aims to calculate the pixel size from the extracted egg outline and, in conjunction with known actual measurements, calibrate the pixel / cm conversion ratio to provide an accurate scale benchmark for subsequent batch analysis.
[0105] 1. Calculation of the minimum bounding rectangle of the contour: For the final contour extracted in step one... Calculate its minimum enclosing rectangle (MER), which completely encloses the outline with the minimum area, and whose direction is consistent with the major axis of the egg. The mathematical definition of the minimum enclosing rectangle is as follows:
[0106] Given a set of contour points The minimum bounding rectangle satisfies:
[0107]
[0108]
[0109] in Indicates the center coordinates as Width is The height is The rotation angle is The bounding rectangle is determined by using the Rotating Calipers algorithm to obtain optimal parameters and thus determine the minimum bounding rectangle: First, the set of contour points is calculated. The convex hull (the smallest convex polygon that completely contains the set of contour points) is used to obtain the sequence of convex polygon vertices arranged in counterclockwise order. Initialize four support lines parallel to the coordinate axes, respectively intersecting with the convex hull at... and The extreme points in the direction are tangent. The support line is rotated synchronously to a direction parallel to each edge of the convex hull. After each rotation, the area of the bounding rectangle in the current direction is calculated. The rectangle with the smallest area is the final minimum bounding rectangle.
[0110] This gives us the pixel dimensions of the egg product:
[0111] Major axis pixel length: Length corresponding to the main axis of the egg product
[0112] Minor axis pixel length: The corresponding length of the egg product along the equatorial direction
[0113] 2. Pixel / cm conversion ratio calculation: For calibration images Obtain the corresponding actual measurement values from the Excel file uploaded by the user:
[0114] Actual major axis length: (Unit: millimeters, mm)
[0115] Actual minor axis length: (Unit: millimeters, mm)
[0116] Calculate the pixel / cm conversion ratio based on the major and minor axes respectively:
[0117] Based on the proportion of the major axis:
[0118] Based on the minor axis:
[0119] These two ratios should theoretically be equal, but due to factors such as image distortion and contour extraction errors, there may be slight differences. Therefore, the average of the two ratios is taken as the conversion ratio for this image.
[0120]
[0121] 3. Global conversion scale calibration: To reduce the impact of random errors in individual images, the global conversion scale calibration is performed on... The average of the conversion ratios of the calibration images is used to obtain the global conversion ratio:
[0122]
[0123] This ratio represents the number of pixels per centimeter (unit: pixels / cm), that is:
[0124]
[0125] Step 3: Calculate global density parameters: Based on the actual measurement values provided in the user's Excel file, calculate the egg density parameters:
[0126] 1. Single sample volume calculation: For the first... Zhang calibrated image, obtain the corresponding actual major axis length from Excel. Actual minor axis length and actual weight If we approximate an egg as a rotating ellipsoid, its volume can be calculated using the following formula:
[0127]
[0128] 2. Single-sample density calculation: Based on the definition of density (mass divided by volume), calculate the density value of the sample:
[0129]
[0130] 3. Global density parameter calculation: For all calibration images that provide valid weight data (number of images is...) The system's global density parameter is obtained by averaging the density sample values.
[0131]
[0132] Through the above three steps, the global size parameters were achieved. With global density parameters The calibration is now complete. This concludes the parameter calibration process for this embodiment.
[0133] Example 2: Batch Testing
[0134] This embodiment describes how to perform batch automatic detection of unknown eggs using the calibrated system parameters after completing the parameter calibration as described in Embodiment 1. Users log in to the cloud platform https: / / iasbreeding.cn / egg / , enter the batch detection page, and upload image files of the eggs to be tested. The shooting environment of the egg images should be consistent with the egg samples used in the parameter calibration in Embodiment 1. Based on the global size parameters calibrated in Embodiment 1... With global density parameters The eggs in each image to be tested are processed and analyzed according to the following steps:
[0135] Step 1: Perform contour detection on each image (same as in Example 1) to obtain the egg contour and its minimum bounding rectangle, and obtain the major axis pixel length. and minor axis pixel length .
[0136] Step Two: This step is based on the egg outline and its minimum bounding rectangle extracted in Step One, and utilizes the global size parameters calibrated in Example One. This process accurately converts image pixel dimensions into actual physical dimensions, providing fundamental data for subsequent weight estimation and phenotypic analysis.
[0137]
[0138] Step 3: This step is based on the actual egg size calculated in Step 2, combined with the global density parameters calibrated in Example 1. The weight of eggs was estimated using an ellipsoidal volume model.
[0139]
[0140] Step Four: Blunt Tip Recognition: Blunt tip recognition is one of the key innovations of this invention. Its core idea is to determine the direction of the larger end of the egg by utilizing the area difference of the first 10% region at both ends of the contour. Based on the contour and minimum bounding rectangle obtained in Example One, the following steps are performed:
[0141] The specific algorithm steps are as follows:
[0142] 1. Let the center of the smallest bounding rectangle of the contour be... Width is The height is The rotation angle is .like If the major axis corresponds to the width direction, then the angle is increased by 90° and the axes are swapped. and This ensures that the major axis always corresponds to the width direction.
[0143] 2. Calculate the sine and cosine of the rotation angle: Construct rotation matrix .
[0144] 3. Subtract the center point from the coordinates of the contour points to obtain the relative coordinates. Left multiplication Obtain the rotated coordinates At this time, the major axis and The axes are parallel.
[0145] 4. Determine the profile after rotation. Range on the axis Make the total width Take the edge ratio Then the left area coordinate range right side area .
[0146] 5. To efficiently calculate the area on both sides, create a sufficiently large mask image, fill the contour, and then for each pixel in the mask, determine its rotation. To determine whether the coordinates fall within the left or right region, count the number of pixels that meet the condition. and .
[0147] 6. When comparing the area values, the larger side is determined by the side with the larger area.
[0148] 7. Coefficient of difference The closer the value is to 1, the more symmetrical the blunt tip is; the larger the value is, the more significant the difference is.
[0149] Step 5: Symmetry Index Calculation: This step is based on the contour that has been rotated to the horizontal of the major axis (similar to the rotated coordinates in blunt tip identification). The specific algorithm is as follows:
[0150] 1. Obtain the rotated contour points coordinate set .
[0151] 2. Statistical analysis separately (Upper part) and The pixel area of the lower half, i.e., the number of pixels falling within the outline of the upper half region. and the number of pixels in the lower half of the region .
[0152] 3. Symmetry index The closer this value is to 1, the more symmetrical the egg is along its long axis.
[0153] Step Six: Deformity Index Calculation: This step involves ellipse fitting based on the original contour (unrotated), and then calculating the degree of bulge using normalized radial distance. The specific algorithm is as follows:
[0154] 1. For the contour point set Perform ellipse fitting to obtain ellipse parameters: center , semi-major shaft semi-short shaft and rotation angle .
[0155] 2. Construct the rotation matrix (Rotate the outline points to the horizontal position of the major axis of the ellipse).
[0156] 3. For each contour point Calculate the relative center coordinates Then multiply by the left Obtain the rotated coordinates .
[0157] 4. Calculate normalized coordinates At this point, the ellipse is mapped to the unit circle.
[0158] 5. Calculate the radial distance of each normalized point. .
[0159] 6. Find the maximum radial distance among all contour points. .
[0160] 7. Deformity Index The larger this value, the more pronounced the local convexity of the contour relative to the fitted ellipse.
[0161] Step 7: Overall Egg Quality Scoring: Based on Egg Shape Index (From step two), weight (From step 3), coefficient of difference (From step four), symmetry index (From step five), Deformity Index (From step six) Calculate the overall score for the egg product based on five key indicators. Each sub-item has a maximum score of 20 points, calculated using an exponential decay function. If an indicator is missing, that sub-item is scored as 0 points.
[0162] 1. Egg-shaped index score Based on egg shape index With the optimal egg shape index Deviation: ,in To preset the optimal egg shape index, the default value is... The closer the shape is to an egg The higher the rating, the better.
[0163] 2. Weight rating Based on estimated weight With optimal weight Deviation: ,in To preset the optimal weight, the default value is... The closer the weight is The higher the rating, the better.
[0164] 3. Difference coefficient score Based on the difference coefficient of blunt tip Deviation from the ideal value of 1: The smaller the difference between the blunt tips ( The closer to 1, the higher the score.
[0165] 4. Symmetry Index Score Based on symmetry index Deviation from the ideal value of 1: The function is in The maximum score of 20 points is achieved at that time, and the score decreases as the symmetry decreases ( (Deviating from 1), the score decays exponentially.
[0166] 5. Deformity Index Score Based on the deformity index : , regular egg The closer the value is to 0, the more obvious the deformity. The larger the value, the lower the score.
[0167] The final overall score is obtained by summing the scores of the five sub-items: , among them , , , , The weights of each sub-item are set (all are 1 by default). Users can adjust the weights of each sub-item on the batch analysis page, and the system will calculate the weighted average score based on the weights.
[0168] Step 8: Statistical Analysis and Visualization: Descriptive statistics and visualization of the results data:
[0169] 1. Extract the numerical columns (major axis, minor axis, weight, and coefficient of variation for blunt apex), and calculate the sample size, mean, median, standard deviation, minimum, maximum, 25th percentile, 75th percentile, range, and coefficient of variation (CV = standard deviation / mean × 100%) for each column. The statistical results are presented in card format.
[0170] 2. Generate histograms and density curves: Plot a histogram for each numerical variable (bins adapt to the sample size) and overlay a kernel density estimation curve.
[0171] 3. Generate box plots: Display the distribution of each variable and outliers.
[0172] 4. Generate a scatter plot matrix to show the correlation between variables and add a linear trend line. Simultaneously calculate and display the Pearson correlation coefficient matrix.
[0173] Example 3: Using an interactive interface to perform intelligent phenotypic analysis on 158 duck eggs
[0174] To complete the intelligent egg phenotyping analysis, log in to the interactive interface at https: / / iasbreeding.cn / egg / and follow these three steps:
[0175] Step 1: Upload 19 calibration images and phenotypic files on the data acquisition interface, and click the "Calculate Parameters" button to complete the global size parameters. With global density parameters calibration ( Figure 1 ).
[0176] Step 2: In the batch inspection interface, input the global dimension parameters output in Step 1. With global density parameters Upload 158 images to be detected, and click the "Start Analysis" button to complete the batch detection. Figure 2 ).
[0177] Step 3: On the results display interface, you can view the calculated major axis, minor axis, weight, blunt tip difference coefficient, symmetry index, deformity index, and overall score. Figure 3 ).
[0178] To verify the measurement accuracy and practical performance of this intelligent analysis system, the accuracy of the system's output results for major axis length, minor axis length, weight, and blunt tip differentiation was tested against manual measurement results. For continuous numerical indicators (major axis length, minor axis length, and weight), the Pearson correlation coefficient was used as the accuracy evaluation index to measure the linear correlation between the system's measured values and manual measurements. For classification indicators (blunt tip differentiation), the accuracy rate was used as the evaluation index to measure the system's recognition accuracy. The test results are shown in the table below:
[0179]
[0180] The system achieves an accuracy rate of over 97% in measuring major axis length, minor axis length, and egg weight, with a major axis length accuracy of 98.98%, a minor axis length accuracy of 98.28%, an egg weight estimation accuracy of 97.54%, and a 100% accuracy rate in identifying the blunt tip direction. In terms of computational efficiency, the system processes all test samples in batches in just 34 seconds, while the traditional method of manual caliper measurement and balance weighing takes an average of 30 minutes to complete the same workload. Compared to manual measurement, this system improves measurement efficiency by approximately 50 times, significantly reducing labor costs and time consumption, and can meet the high-throughput phenotypic data collection needs of large-scale egg production and processing. This intelligent analysis system significantly improves detection efficiency while ensuring high measurement accuracy, demonstrating significant practical application value.
Claims
1. A method for intelligent analysis of poultry egg phenotypic characteristics, characterized in that, Includes the following steps: S1. Obtain at least one image of a calibrated egg product with known actual size and weight, extract the contour of the calibrated egg product image, and calculate the global conversion ratio between the pixel size and the actual size based on the extracted contour and the actual size. Based on the actual size, weight, and preset geometric model, calculate the global density parameters; S2. Acquire an image of the egg product to be tested, and extract the contour of the image of the egg product to be tested under the same imaging conditions to obtain the target contour; S3. Calculate the pixel size of the egg based on the target contour, and convert it to the actual size using the global conversion ratio; Based on the actual dimensions, the preset geometric model, and the global density parameters, the weight of the eggs is estimated. S4. Based on the target contour, calculate the blunt tip difference coefficient, which characterizes the end features of the egg, the symmetry index, which characterizes the overall symmetry of the egg, and the deformity index, which characterizes the regularity of the egg surface. S5. Based on at least two phenotypic parameters obtained in S3 and S4, calculate the comprehensive score of the egg product using a preset scoring function.
2. The intelligent analysis method for poultry egg phenotypic characteristics according to claim 1, characterized in that, Contour extraction of the calibrated egg product image includes: Image preprocessing includes grayscale conversion, filtering, and contrast enhancement. The preprocessed image is binarized and segmented, and the segmentation results are optimized through morphological operations. Candidate contours are extracted from the optimized binary image, and the target egg contours are selected based on preset area and position constraints.
3. The intelligent analysis method for poultry egg phenotypic characteristics according to claim 1, characterized in that, Calculating the global conversion ratio includes: Calculate the minimum bounding rectangle of the selected target egg product outline to obtain the pixel-level major axis length and minor axis length; Based on the pixel-level major and minor axis lengths and the actual major and minor axis lengths, the conversion ratio based on the major axis and the conversion ratio based on the minor axis are calculated respectively, and the average of the two is taken as the conversion ratio of a single calibration image. The average conversion ratio of multiple calibration images is taken to obtain the global conversion ratio.
4. The intelligent analysis method for poultry egg phenotypic characteristics according to claim 1, characterized in that, The calculation of global density parameters includes: The shape of the egg is approximated as a rotating ellipsoid, and the volume of the egg is calculated based on the actual measured lengths of the major and minor axes. Calculate the density of a single calibrated egg based on the actual measured weight and calculated volume. The global density parameter is obtained by averaging the densities of multiple calibrated eggs.
5. The intelligent analysis method for poultry egg phenotypic characteristics according to claim 1, characterized in that, The calculation of the blunt tip difference coefficient includes: Determine the preset regions at both ends of the target contour along its major axis; Calculate the area of the preset regions at both ends; The larger area in each of the two regions is defined as the blunt end, and the difference coefficient of the blunt tip is calculated based on the area ratio of the two regions.
6. The intelligent analysis method for poultry egg phenotypic characteristics according to claim 1, characterized in that, Calculating the symmetry index includes: Using the major axis of the target contour as the dividing line, the contour is divided into an upper half and a lower half; Calculate the pixel area of the upper and lower halves; The symmetry index is calculated based on the ratio of the areas of the upper and lower parts.
7. The method according to claim 1, characterized in that, The calculation of the deformity index includes: The target contour is fitted with an ellipse to obtain a fitted ellipse; Transform the coordinates of the points on the target contour to a normalized coordinate system with the center of the fitted ellipse as the origin; Calculate the normalized radial distance from all points on the contour to the center of the fitted ellipse; The maximum value of the normalized radial distance is compared with 1, and the excess portion is used as the distortion index.
8. The intelligent analysis method for poultry egg phenotypic characteristics according to claim 1, characterized in that, Based on six indicators—actual long axis, actual short axis, estimated weight, blunt tip difference coefficient, symmetry index, and deformity index—the scores for each sub-item are calculated, and then a weighted sum is performed to obtain a comprehensive score.
9. The intelligent analysis method for poultry egg phenotypic characteristics according to claim 1, characterized in that, It also includes statistical analysis step S6: performing descriptive statistical analysis on various phenotypic parameters and comprehensive scores of batch egg products, and generating visual charts.
10. A poultry egg phenotypic intelligent analysis system, used to implement the method as described in any one of claims 1-9, characterized in that, include: The image acquisition module is used to acquire images of calibrated egg products and images of egg products to be tested. The parameter calibration module is used to perform step S1, calculating the global conversion ratio and global density parameters; The image processing and contour extraction module is used for image preprocessing and contour extraction. The feature calculation module is used to perform the size and weight estimation step S3 and the morphological feature extraction step S4, and to calculate the actual size, weight, blunt tip difference coefficient, symmetry index and deformity index of the egg. The comprehensive scoring module is used to execute step S5 and calculate the comprehensive score of the egg products; The interactive interface module provides a graphical user interface, receives user-uploaded images and parameter setting instructions, and displays the analysis results; It also includes a batch processing module for automated processing of multiple egg product images to be tested, either sequentially or in parallel. And a statistical analysis module, used to perform statistical analysis on batch analysis results; The interactive interface module is implemented based on a Web framework and includes at least a parameter calibration interface, a batch detection interface, and a result display interface. The global conversion ratio and global density parameters are automatically transferred to the batch detection interface after being calculated in the parameter calibration interface.
Citation Information
Patent Citations
Breeding egg weight estimation method, device and equipment and storage medium
CN121414819A
Method and device for detecting weight of poultry eggs
CN121788429A