A method for nondestructive detection of meat spots in eggs based on magnetic resonance imaging technology
By combining nuclear magnetic resonance imaging technology with machine learning algorithms, the problem of efficient and non-destructive detection of meat spots in eggs has been solved for poultry and egg companies. This has enabled high-precision non-destructive detection, reduced detection costs, and improved the recognition rate.
Patent Information
- Application Number
- CN202411865506.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-12-17
AI Technical Summary
In the current technology, poultry and egg enterprises find it difficult to achieve efficient, non-destructive and accurate detection of meat spots in eggs. Manual detection is labor-intensive and inefficient, while existing equipment is costly and easily affected by external factors, making it impossible to apply on a large scale.
By combining magnetic resonance imaging (MRI) with machine learning algorithms, the relaxation signal intensity of different components inside an egg is identified, enabling non-destructive detection of meat spots inside the egg, locating the meat spots and improving detection accuracy.
It enables non-destructive detection of meat spots inside eggs with a recognition rate of over 90%, reduces detection costs, allows eggs to continue incubation, and provides a high-precision method for egg quality detection.
Smart Images

Figure HDA0005195467020000011
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of poultry egg detection, in particular to a non-destructive detection method for chicken egg meat spots based on nuclear magnetic resonance imaging technology. BACKGROUND
[0002] Chicken egg blood spots are blood spots or blood clots in the yolk and albumen, and meat spots refer to pink to brown meat-like tissues of different color shades in the yolk and albumen. The presence of blood spots and meat spots affects the quality of chicken eggs, and in turn affects the purchasing desire of consumers and the sales price of chicken eggs, causing potential economic losses to poultry enterprises.
[0003] For the detection of chicken egg meat spots, poultry enterprises currently mainly rely on manual sorting, which is labor-intensive, low-efficiency, and cannot guarantee the detection accuracy. Moreover, the detection requires breaking the eggs, and the broken eggs cannot be sold or hatched, so this method is not suitable for large-scale batch application.
[0004] Non-destructive detection is the development direction of poultry egg detection, and the combination of advanced image processing technology and automated detection equipment can significantly improve the efficiency and accuracy of poultry egg detection.
[0005] In recent years, detection methods based on image feature acquisition and machine learning have been preliminarily studied. The prior art has developed a multi-view stereo vision (MVS) system, which uses strong light transmission to obtain egg images, and has developed an algorithm to detect egg blood spots. However, this method is easily affected by external factors, such as egg surface dirt, which can interfere with the egg image, leading to misjudgment. In addition, changes in temperature, humidity, and other factors can also affect the performance of the image sensor, leading to misjudgment.
[0006] Spectral technology and hyperspectral imaging (HIS) have rapidly developed in the field of non-destructive detection in recent years. The prior art has developed a handheld spectrometer, optical fiber, and halogen lamp to form a visible-near infrared (Vis-NIR) system for detecting blood spots in brown-shelled eggs. Both methods are limited to laboratory scale and cannot achieve the processing speed required for commercial application. Moreover, the detection instruments are expensive and have high maintenance costs, making it difficult to popularize to small and medium-sized enterprises or ordinary farms. Moreover, current research only focuses on the detection of blood spot eggs, ignoring the detection of meat spot eggs.
[0007] Magnetic Resonance Imaging (MRI) is a non-destructive testing technology, which uses static magnetic field and radio frequency magnetic field to make tissue imaging, belongs to water proton imaging, uses the change of water proton surrounding electron spin direction by external magnetic field to produce proton imaging. In the imaging process, clear images with high contrast can be obtained without electron radiation and contrast agent. MRI technology can directly display the layer images of the scanned object in coronal plane, sagittal plane, transverse plane and other directions, with high resolution and clear image and detail display. Only the effect of static magnetic field and radio frequency magnetic field on water proton affects the image, and it is not easy to be affected by external factors. There is no related report on the application of magnetic resonance technology to the detection of egg blood or meat spots. SUMMARY
[0008] The present application aims at the technical problems existing in the prior art, and provides a non-destructive detection method for egg meat spots based on nuclear magnetic resonance imaging technology.
[0009] The method uses MRI technology to non-destructively detect meat spots in eggs, and different components inside the egg show different relaxation signal intensities in MRI scanning, so that egg yolk, egg white and meat spots and other substances can be clearly identified, non-destructive detection of meat spots with a diameter of 2mm or more in eggs and positioning of the meat spot occurrence position are realized, the detection accuracy is improved, the internal information of the egg can be obtained without breaking the egg, the egg can continue to be incubated, the detection cost is reduced, and the method has significant practical guiding value for egg quality improvement and egg breeding. In order to achieve the purpose of the present application, the technical scheme provided by the present application is as follows:
[0010] A non-destructive detection method for egg blood and meat spots based on nuclear magnetic resonance imaging technology, comprising the following steps:
[0011] (1) Creating an egg sample set: including dividing egg samples into a training set and a test set, the training set is used for model training, and the test set is used for evaluating the prediction accuracy of the model.
[0012] Select 60 arbitrary varieties of unfertilized eggs as training set samples; select 51 unfertilized eggs as test samples; the color of the eggshell includes white, pink and brown;
[0013] Making egg yolk meat spot model: use a knife to cut all the blunt ends of the eggshell, if there is a natural meat spot in the egg, measure the size of the meat spot with a scale; if there is no natural meat spot in the egg, take 3-4 egg yolks, combine the egg yolk liquid into one eggshell, simulate a whole egg yolk environment, and put small pieces of round breast meat with a diameter of 4mm, 3mm, 2mm and 1mm into the eggshell, and seal the membrane with a sealing film;
[0014] Making egg white meat spot model: eggshell blunt end open needle hole size hole, with syringe oblique insertion to egg white, with needle slowly stabbed into meat sample, without sealing.
[0015] (2) Collecting chicken egg image sample data:
[0016] Collecting chicken egg image sample data includes: using high magnetic field nuclear magnetic scanning and performing nuclear magnetic resonance imaging, using head and neck joint coil for nuclear magnetic scanning, using multi-element parameter acquisition mode to collect chicken egg internal image sample data, and outputting the collected image sample data in the form of DICOM file.
[0017] The field strength of the high magnetic field nuclear magnetic scanning is 3.0T.
[0018] The main parameters involved include: window width / window level (WW / WL), repetition time (TR), echo time (TE), slice thickness / slice distance (Thk / p), field of view (FOV), number of slices (Slices), voxel size, etc.
[0019] Preferably, the window width / window level (WW / WL) is 337 / 152; the repetition time (TR) is 1300ms, the echo time (TE) is 246.96ms; the slice thickness / slice distance (Thk / p) is 1mm / 0.6mm; the field of view (FOV) is 300.0mm*212.0mm; the number of slices (Slices) is 166 layers, and the voxel size is 0.59*0.59*1mm.
[0020] (3) Batch processing the DICOM file of the obtained chicken egg image sample data
[0021] The DICOM file of the obtained chicken egg image sample data is batch processed, specifically including:
[0022] Using 3D slicer tool to convert the DICOM file of the chicken egg image into pictures layer by layer to obtain the cross-sectional image of the chicken egg image sample; using 3D Slider tool to obtain the summary output folder containing the DICOM file converted into images frame by frame; in the collected chicken egg image sample, the egg white is a white image, the foreign matter in the egg white is black, the egg yolk is a black image, and the foreign matter in the egg yolk is grayish white; in the egg white, there is a band-shaped or mass-shaped tissue (i.e. the tie) at both ends of the egg yolk, and the tie itself is white, which appears gray and black on the image.
[0023] Then, using ImageJ tool to cut the chicken egg sample image into single images to obtain the cross-sectional image, which is convenient for subsequent image analysis.
[0024] (4) Feature extraction of chicken egg meat spot image sample
[0025] Including: using ImageJ tool to open the picture to be determined, and selecting Image-Type-8bit in the toolbar to convert the egg image sample into an 8-bit image by using a linear scaling algorithm;
[0026] Selecting Image-Duplicate in the toolbar to copy three original images, which are sequentially numbered as samples a, b and c. Selecting Image-Type-8bit in the toolbar to convert the three image samples into 8-bit images in the RGB color space, thereby preparing for subsequent processing;
[0027] Selecting Process-Filiters-Gaussian Blur in the toolbar to perform Gaussian blur algorithm processing on the image sample b, and setting the sigma value to be fixed at 4;
[0028] Using subtraction operation to subtract the Gaussian-blurred image sample b from the image sample a, and performing multiplication operation on the subtraction result, with the enhancement value being fixed at 20, to obtain the internal contour feature image of the egg internal image sample;
[0029] Performing addition operation on the obtained egg internal contour feature image and the image sample c to obtain an egg image sample with the internal contour being enhanced, and performing 8-bit operation on the sample to facilitate automatic recognition of the egg internal region.
[0030] (5) Recognition and modeling of meat spots and ligament regions
[0031] Including: importing the obtained 8-bit image sample into the Trainable Weka Segmentation platform, inputting into the Weka algorithm, and using Gaussian blur, Hessian matrix, sobel filter, Gaussian difference and membrane projection to collect feature data;
[0032] Using Create new class to create a new class, the default number of classes of the plug-in is two, the class is increased to n by this operation, n depends on the number of regions to be classified, and the name of the new class is changed in the "Settings" dialog box; creating a Model: sequentially selecting part of the albumen meat spot, yolk meat spot feature images to be classified in class 2 and class 3, respectively, and selecting normal eggshell, egg white, egg white, ligament and other background region feature images and classifying them in class 1.
[0033] In order to improve the accuracy of meat spot identification under MRI scanning, two models can be selected to create, wherein Model 1: select part of the ligament feature image and classify it into class 2, select normal eggshell, egg white, egg white, meat spot and the like as background area feature image and classify it into class 1; Model 2: select part of egg white meat spot, yolk meat spot and ligament feature image in turn and classify them into class 2, class 3 and class 4 respectively, and select normal eggshell, egg white, egg white and the like as background area feature image and classify them into class 1.
[0034] The training process is activated using Train classifier, at least two classes are ensured, according to the format expected by Weka classifier, the features of the input image will be extracted and converted into a set of floating point value vectors. The running time depends on the size of the image, the number of functions and the number of cores of the computer running Fiji, and the feature calculation is completed in a fully multithreaded manner.
[0035] Create and display the generated image using Create result. This image is equivalent to the current overlay layer (with 8-bit color of the same class color), and each pixel is set to the index value of the most likely class (0, 1, 2...).
[0036] Save the current classifier for subsequent use using Save classifier. Save the current tracking information to a data file using Save data, which can be processed later using plugins or Weka Explorer itself, which saves the feature vectors derived from the pixels belonging to each trace to an ARFF file in a user-selected location.
[0037] In order to ensure the accuracy of the classifier result, Load data can be used to constantly expand the training set and repeat the training. The more detailed and rich the training set is, the more accurate the trained classifier result will be.
[0038] Load the classifier saved in the previous step using Load classifier. The plugin will check and adjust the selected features using the properties of this new classifier, and the classifier file is in standard Weka format (.model). Load data from the same or other images or previous traces on the stack using Load data (Weka format), and similarly, the plugin will check and enforce consistency between the loaded data and the current image, features and classes, and the input file format is standard Weka format: ARFF.
[0039] Click Create result to generate a result image and save it to a folder.
[0040] (6) Meat spot area identification
[0041] Convert to 8-bit image, click Process-Binary-Convert to Mask in the toolbar, generate binary image for analysis;
[0042] Click Process-Binary-Fill Holes in the toolbar to fill the gaps in the image, which is convenient for calculation;
[0043] Click Image-Adjust-Threshold in the toolbar, adjust the threshold range through the slider, and select the meat spot area;
[0044] Click Analyze-Analyze Particles in the toolbar to perform automatic analysis, count foreign matters and individual area statistics, and export the results;
[0045] In the statistical results, according to the comparison between the actual size of the meat spot and the image, the area within 22-37 pixels is determined as a meat spot egg, and the rest is determined as a normal egg; optionally, the Model 1 and Model 2 results are subjected to difference operation, the Model 1 result below 50 pixels is removed, all negative differences are removed, and the difference between 0-200 pixels is screened out, which is determined as existing meat spot. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 : Comparison chart of MRI technology and CT technology scanning results. DETAILED DESCRIPTION
[0047] The above has carried out detailed introduction to the present application, the principle and implementation mode of the present application are described in the specification by applying specific examples, but the embodiment is only used to help understanding the present application, and should not be understood as limiting the present application.
[0048] Example 1: meat spot detection of eggs by using 3.0T MRI
[0049] 60 eggs were used as training set samples, among which 6 meat spot eggs were set, and 11 eggs were determined as meat spot eggs after 3.0T MRI scanning;
[0050] Break the eggs for verification, 6 real meat spot eggs are all detected, and 5 normal eggs are determined as meat spot eggs.
[0051] The total recognition rate of the training set sample (the number of recognized normal eggs / the total number of eggs) is 91.6%.
[0052] Using 51 eggs as test set samples, after 3.0T MRI scanning, 9 eggs were judged as meat spot eggs; breaking the eggs for verification, 4 true meat spot eggs were all detected, and 5 normal eggs were judged as meat spot eggs.
[0053] The total recognition rate of the test sample (the number of recognized normal eggs / the total number of eggs) is 90.1%.
[0054] According to the experimental results, the present application can batch identify meat spot eggs, and the minimum size of meat spot identified is 2mm, which meets the highest limit required by GB / T 39438-2020 "Packaged Eggs".
[0055] Comparative Example 1: Traditional manual detection method
[0056] The traditional manual detection method for detecting meat spots in eggs mainly relies on human eye observation and experience judgment, which is easily affected by human factors, and lacks data recording and tracking, and cannot perform comprehensive quality control.
[0057] In addition, the manual detection method is complicated to operate, and needs to break the eggs for detection, and the broken eggs cannot be sold as whole eggs, especially for breeding eggs, the broken eggs lose the condition of hatching.
[0058] Manual detection also faces challenges such as high labor cost, long training period and safety risk, which limits the large-scale application of manual detection method.
[0059] Comparative Example 2: CT scanning for detecting meat spots in eggs
[0060] CT imaging is to use X-ray beam to scan the object to be observed. In medicine, X-ray is used to perform tomography on a certain part of the human body to obtain a cross-sectional or three-dimensional image of the human body. It can provide complete three-dimensional information of the human body being examined, and can clearly visualize organs and structures.
[0061] CT belongs to density imaging, which uses the density difference of the internal structure of the target to be measured. The density difference leads to different X-ray absorption rates, and the image of the density difference produced by post-processing. Therefore, CT can only distinguish tissues with density difference, and has low resolution for soft tissues.
[0062] Because the density of the internal material of the egg is very close, the CT scanning effect is very poor. And because CT is an imaging method using ionizing radiation, the X-ray has a certain teratogenic risk, which may have adverse effects on the hatching of breeding eggs.
[0063] In this experiment, CT computer tomography, 1.5T low-field strength magnetic resonance technology and 3.0T high-field strength magnetic resonance technology were used to scan the internal structure of the eggs, and the scanning results are shown in Figure 1 . Figure 1In the figure, a represents the image obtained by CT scan; b represents the image obtained by 1.5T low field strength magnetic resonance technology; and c represents the image obtained by 3.0T high field strength magnetic resonance technology.
[0064] It can be known that, since the density of the internal material of the egg is very small, the egg foreign matter cannot be detected by CT. Figure 1 It can be known that, since the density of the internal material of the egg is very small, the egg foreign matter cannot be detected by CT.
[0065] Technical effects of the present application:
[0066] (1) The present application first realizes nondestructive detection of meat spots in eggs by using MRI technology. Different components in the egg show different relaxation signal intensities in MRI scanning, and the egg yolk, egg white and meat spots can be clearly identified. The internal information of the egg can be obtained without breaking the shell, and the egg can continue to be incubated, which reduces the detection cost and provides a new method and idea for egg quality detection.
[0067] (2) The present application realizes nondestructive detection of meat spots with a diameter of more than 2mm in the egg by using 3T MRI combined with machine learning random forest algorithm. According to the relative position of the meat spot and the yolk and the shell in the image, the position of the meat spot can be accurately located. The recognition success rate of the present application is more than 90%, which is significantly improved compared with the traditional detection method.
[0068] (3) The present application has the characteristics of high precision and nondestructive detection. Using the high-precision nondestructive blood meat spot detection technology, the egg quality can be improved to a great extent, which has significant practical guiding value for egg chicken breeding.
[0069] The above description is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled persons in the technical field, some improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A non-destructive detection method for blood spots in eggs based on the technology of nuclear magnetic resonance imaging, characterized in that, The detection method comprises the following steps: (1) Creating an egg sample set: divide the egg samples into a training set and a test set, the training set is used for model training, and the test set is used for evaluating the prediction accuracy of the model; (2) Collecting egg image sample data: high-field nuclear magnetic scanning is adopted to perform nuclear magnetic resonance imaging, and multivariate parameter acquisition mode is adopted to collect internal image sample data of the egg, and the collected image sample data is output in the form of a DICOM file; (3) Batch processing the DICOM file of the obtained egg image sample data: using the 3Dslicer tool, the DICOM file of the egg image is converted into a picture layer by layer to obtain a cross-sectional image of the egg image sample; using the 3D Slider tool, a summary output folder containing the DICOM file converted into an image frame by frame is obtained; in the collected egg image sample, the egg white is a white image, the foreign matter in the egg white is black, the egg yolk is a black image, and the foreign matter in the egg yolk is grayish white; in the egg white, there is a strip-shaped or clump-shaped tissue at both ends of the egg yolk, which is the ligament, and the ligament is white; Based on the ImageJ tool, the collective egg image is cut into a single image to obtain a cross-sectional image, and the ImageJ tool is used to cut the egg sample image into a single image; (4) Feature extraction of egg meat spot image sample: open the image to be tested using the ImageJ tool, select Image-Type-8bit in the tool bar, and convert the egg image sample into an 8-bit image using a linear scaling algorithm; (5) Identification and modeling of meat spot and ligament area: import the obtained 8-bit image sample into the Trainable WekaSegmentation platform, input into the Weka algorithm, and use Gaussian blur, Hessian matrix, sobel filter, Gaussian difference and membrane projection to collect feature data; (6) Meat spot area identification: convert the result obtained in step (5) into an 8-bit image, generate a binary image for analysis, and determine the meat spot in the egg.
2. The non-destructive testing method of claim 1, wherein: Step (1) creating an egg sample set, comprising: Select 60 arbitrary varieties of unfertilized eggs as training set samples; select 51 unfertilized eggs as test samples; the color of the eggshell includes white, pink and brown; Making a yolk meat spot model: use a knife to cut the blunt end of the eggshell completely, if there is a natural meat spot in the egg, measure the size of the meat spot with a scale; if there is no natural meat spot in the egg, take 3-4 egg yolks, combine the egg yolk liquid into one eggshell, simulate a full egg yolk environment, and put small pieces of round meat with a diameter of 4mm, 3mm, 2mm and 1mm into it, and seal it with a sealing film. Making an egg white meat spot model: make a needle hole of a certain size on the blunt end of the eggshell, insert the syringe obliquely into the egg white, and gently prick the meat sample with the needle without sealing.
3. The non-destructive testing method of claim 1, wherein: Step (2) collects the image sample data of the egg, including: using 3.0T high magnetic field nuclear magnetic scanning and performing nuclear magnetic resonance imaging, using the head and neck joint coil to perform nuclear magnetic scanning, using a multi-parameter acquisition mode to collect the image sample data of the inside of the egg, and outputting the collected image sample data in a DICOM file; the parameters involved include: window width / window level (WW / WL), repetition time (TR), echo time (TE), slice thickness / slice distance (Thk / p), field of view (FOV), number of slices (Slices), and voxel size.
4. The non-destructive testing method of claim 1, wherein: Step (4) feature extraction of the egg meat spot image sample, including: opening the image to be tested by using the ImageJ tool, selecting Image-Type-8bit in the toolbar, and converting the egg image sample into an 8-bit image by using a linear scaling algorithm; duplicating the original image by selecting Image-Duplicate in the toolbar, and sequentially numbering the three images as samples a, b, and c; and converting the RGB color space of the three image samples to 8-bit by selecting Image-Type-8bit in the toolbar; processing image sample b by using a Gaussian blur algorithm by selecting Process-Filiters-Gaussian Blur in the toolbar, and setting the sigma value to be fixed at 4; performing subtraction operation on image sample a and the Gaussian blurred image sample b, and performing multiplication operation on the subtraction operation result, with the enhancement value being fixed at 20, to obtain the internal contour feature image of the egg internal image sample; performing addition operation on the obtained egg internal contour feature image and image sample c to obtain an egg image sample with enhanced internal contour, and performing 8-bit operation on the sample to facilitate automatic recognition of the egg internal area.
5. The non-destructive testing method of claim 1, wherein: Step (5) identification and modeling of the meat spot and the band region, further including the following operations: Create a new class by using Create new class, the default number of classes of the plug-in is two, the class is increased to n by this operation, n depends on the number of classes to be classified, and the name of the new class is changed in the "Settings" dialog box; Create Model: select part of the albumen meat spot, egg yolk meat spot feature images in sequence and classify them into class 2 and class 3 respectively, select normal eggshell, egg white, egg white, band and other background area feature images and classify them into class 1; Or create two models, wherein Model 1: select part of the band feature image and classify it into class 2, and select normal eggshell, egg white, egg white, meat spot and other background area feature images and classify them into class 1; Model 2: select part of the albumen meat spot, egg yolk meat spot, band feature images in sequence and classify them into class 2, class 3 and class 4 respectively, and select normal eggshell, egg white, egg white and other background area feature images and classify them into class 1; Activate the training process by using Train classifier; create and display the generated image by using Create result; Store the current classifier by using Save classifier; Load the classifier saved in the last step using Load classifier; Generate the result image and save it in the folder.
6. The non-destructive testing method of claim 5, wherein: Step (6) meat spot area identification, including: Convert the result obtained in step (5) to an 8-bit image, click Process-Binary-Convert toMask in the toolbar, generate a binary image for analysis; Click Process-Binary-Fill Holes in the toolbar to fill the gaps in the image, making it easier to calculate; Click Image-Adjust-Threshold in the toolbar, adjust the threshold range through the slider, and select the meat spot area; Click Analyze Particles in the toolbar to automatically analyze, count foreign matter, and individually calculate the area, and export the results; When creating 1 Model, in the statistical results, according to the actual size of the meat spot and the image comparison, the area within 22-37 pixels is determined as a meat spot egg, and the rest is determined as a normal egg; When creating 2 Models, difference operation is performed on the results of Model 1 and Model 2, Model 1 results below 50 pixels are removed, all negative differences are removed, and the difference between 0-200 pixels is screened out, which is determined as existing meat spots.
7. The non-destructive testing method of claim 3, wherein: Window width / window level (WW / WL): 337 / 152; repetition time (TR): 1300 ms, echo time (TE): 246.96 ms; slice thickness / slice gap (Thk / p): 1 mm / 0.6 mm; field of view (FOV): 300.0 mm*212.0 mm; number of slices (Slices): 166 layers; voxel size: 0.59*0.59*1 mm.
Citation Information
Patent Citations
Identification system and method of intravascular plaque
CN105389810A
Quick caviar quality detection method based on low-field nuclear magnetic resonance technology
CN106018453A