Method and system for evaluating eggshell surface color quality based on color reflection
Through multimodal collaborative cleaning and multispectral imaging technology, combined with computer feature extraction and machine learning models, the subjectivity and low precision problems of traditional artificial visual evaluation are solved, and the accurate and objective evaluation of eggshell color quality is achieved, which improves detection efficiency and industrial intelligence level.
Patent Information
- Application Number
- CN202411901200.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-23
AI Technical Summary
In the prior art, the surface color quality detection of eggshell surface mainly relies on artificial visual evaluation, and has serious defects such as strong subjectivity, low accuracy, and the inability to achieve rapid continuous detection, which affects egg grading and pricing, and restricts the intelligent development of the egg industry.
The color reflection-based evaluation method is adopted to clean the eggshell surface through a multimodal collaborative cleaning system on the surface of the eggshell, and the spectral reflection data is captured using a multi-spectral imaging system. Computer equipment performs feature extraction and dimensionality reduction. Combined with the trained eggshell color quality evaluation model, the accurate and objective evaluation of the color quality of the eggshell surface is achieved.
It has achieved accurate, objective and comprehensive evaluation of eggshell color quality, improved detection accuracy and efficiency, reduced manual intervention, provided a technological and standardized solution, and promoted the intelligent development of the egg industry.
Smart Images

Figure CN119832318A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of agricultural product quality detection, and in particular to a method and system for evaluating eggshell surface color quality based on color reflection. Background Art
[0002] Against the backdrop of the increasing importance of global agricultural production and food safety, agricultural product quality testing technology has become an important technology in modern agriculture and food processing industries. With the continuous growth of the world's population and the improvement of food safety awareness, the demand for high-quality and high-standard agricultural products is increasing. As an important source of animal protein, eggs not only occupy an important position in the global dietary structure, but their quality is directly related to consumers' health and nutritional intake. As one of the key indicators for judging egg quality, the surface color of the eggshell not only reflects the health status and breeding environment of laying hens, but also indirectly reveals the freshness, nutritional value and hygiene level of the production process of eggs.
[0003] At present, the detection of eggshell surface color quality mainly relies on the traditional manual visual evaluation method. The inspectors observe the color, gloss and uniformity of the eggshell with the naked eye and make quality evaluations based on personal experience and subjective judgment. This method has many defects, such as inconsistent detection standards, uneven personnel quality, judgment results highly dependent on personal experience, low detection efficiency, and difficulty in accurate quantification.
[0004] Since the traditional method mainly relies on manual visual judgment, it has serious defects such as strong subjectivity, low precision, and inability to achieve rapid and continuous detection. This evaluation method not only affects egg grading and pricing, but also restricts the intelligent development of the egg industry. The current industry urgently needs an objective and accurate eggshell color quality evaluation technology. Summary of the invention
[0005] In view of this, an object of an embodiment of the present invention is to provide a method and system for evaluating the color quality of an eggshell surface based on color reflection, so as to solve at least one of the above-mentioned technical problems.
[0006] To achieve the above object, in a first aspect, an embodiment of the present invention provides a method for evaluating the color quality of an eggshell surface based on color reflection, which comprises the following steps:
[0007] cleaning the eggshell surface by using the eggshell surface multimodal collaborative cleaning system to obtain a cleaned eggshell surface;
[0008] A multispectral imaging system is used to capture the spectral characteristics of the cleaned eggshell surface to obtain spectral reflectance data of the cleaned eggshell surface;
[0009] The computer device performs feature extraction and dimension reduction on the spectral reflectance data of the eggshell surface to obtain a multi-dimensional eggshell color feature vector;
[0010] The computer device obtains the eggshell surface color quality grade according to the multi-dimensional eggshell color feature vector and the trained eggshell color quality assessment model.
[0011] In a second aspect, an embodiment of the present invention provides a system for evaluating the color quality of an eggshell surface based on color reflection, comprising:
[0012] An eggshell surface multimodal collaborative cleaning system is used to clean the eggshell surface to obtain a cleaned eggshell surface;
[0013] A multispectral imaging system is used to capture the spectral characteristics of the eggshell surface after cleaning and obtain spectral reflectance data of the eggshell surface after cleaning;
[0014] The computer device is used to extract features and reduce the dimensionality of the spectral reflectance data of the eggshell surface to obtain a multi-dimensional eggshell color feature vector; and obtain the eggshell surface color quality grade according to the multi-dimensional eggshell color feature vector and a trained eggshell color quality assessment model.
[0015] The above technical solution has the following beneficial effects:
[0016] The present invention realizes accurate, objective and comprehensive evaluation of eggshell surface color quality through a multimodal collaborative method. The multimodal collaborative cleaning system ensures standardized pretreatment of the eggshell surface and eliminates interference from external pollution factors; the multispectral imaging system can capture microscopic spectral features that are difficult to detect with traditional single spectrum, and provides more detailed and comprehensive spectral reflectance data; the computer equipment adopts advanced feature extraction and dimensionality reduction technology, which can quickly and accurately extract key color feature vectors from complex spectral data, and realize intelligent and quantitative rating of color quality through pre-trained machine learning models. This system not only improves the accuracy and efficiency of eggshell color quality assessment, but also provides a scientific and standardized solution for egg quality control in agricultural production. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a flow chart of a method for evaluating eggshell surface color quality based on color reflection according to an embodiment of the present invention;
[0019] Figure 2is a functional block diagram of a multimodal collaborative cleaning system for eggshell surfaces according to an embodiment of the present invention;
[0020] Figure 3 is a functional block diagram of a multispectral imaging system according to an embodiment of the present invention;
[0021] Figure 4 is a specific flow chart of step S20 of an embodiment of the present invention;
[0022] Figure 5 is a specific flow chart of step S30 of an embodiment of the present invention;
[0023] Figure 6 is a flow chart of another method for evaluating eggshell surface color quality based on color reflection according to an embodiment of the present invention;
[0024] Figure 7 is a specific flow chart of step S70 of an embodiment of the present invention;
[0025] Figure 8 is a functional block diagram of a system for evaluating eggshell surface color quality based on color reflection according to an embodiment of the present invention;
[0026] Fig. 9 is a functional block diagram of a computer-readable storage medium according to an embodiment of the present invention;
[0027] Fig.10 It is a functional block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] The embodiment of the present invention provides a method and system for evaluating the color quality of eggshell surface based on color reflection, which realizes quantitative, objective and efficient evaluation of eggshell color through multispectral imaging, precise spectral reflectance measurement and deep learning algorithm, which is conducive to improving detection accuracy, realizing automatic detection and reducing manual intervention. The technical solution of the embodiment of the present invention can be used in many fields such as egg production line quality control, agricultural intelligent sorting system, egg export quality control and agricultural product e-commerce platform quality evaluation.
[0030] Embodiment 1
[0031] like Figure 1As shown, an embodiment of the present invention provides a method for evaluating the color quality of eggshell surface based on color reflection, which comprises the following steps:
[0032] S10: Cleaning the eggshell surface by the eggshell surface multimodal collaborative cleaning system to obtain a cleaned eggshell surface.
[0033] In this step, the eggshell surface multimodal collaborative cleaning system is a device that integrates multiple cleaning technologies. The system may include but is not limited to an ultrasonic cleaning module, an airflow dust removal module, and a photocatalyst purification module. During the specific operation, the airflow dust removal module is first used to blow away the loose dust particles on the eggshell surface, the airflow pressure is controlled at 0.2-0.5MPa, and the nozzle is kept at a distance of 5-10cm from the eggshell surface; then the ultrasonic cleaning module is started, and an ultrasonic oscillation with a frequency of 40-45kHz is used, supplemented by a mild detergent solution to remove stubborn stains on the eggshell surface; finally, the photocatalyst purification module is used for surface disinfection and deep cleaning, and the photocatalyst wavelength is selected within the range of 365-420nm, which can effectively remove microorganisms and residual pollutants. The working principle of the photocatalyst purification module is based on photocatalytic oxidation technology. The photocatalyst purification module is mainly composed of an efficient photocatalyst material (titanium dioxide nanomaterial) and a specific wavelength light source. When the light of 365-420nm wavelength is irradiated to the surface coated with the photocatalyst material, the photocatalyst is activated to produce highly oxidizing active free radicals. These active free radicals have strong redox ability and can quickly degrade organic pollutants, microorganisms and protein residues on the eggshell surface, achieving deep disinfection and purification. The photocatalyst purification module can not only effectively remove microorganisms such as bacteria and fungi, but also decompose organic stains such as grease and protein adsorbed on the eggshell surface.
[0034] S20: using a multispectral imaging system to capture spectral features of the cleaned eggshell surface, and obtaining spectral reflectance data of the cleaned eggshell surface.
[0035] In this step, the multispectral imaging system can use high-precision spectral acquisition equipment, including a high-resolution CCD camera, a tunable spectrometer (Tunable Filter) and a light source. When the multispectral imaging system is working, a wavelength range of 400-1000nm is selected, and the spectrum is scanned with a step interval of 10nm. The light source adopts a standard D65 light source to ensure the uniformity of illumination and the stability of color temperature. The CCD camera adopts a 16-bit grayscale depth, a pixel resolution of not less than 2048×2048, a shutter speed controlled at 1 / 500-1 / 1000 seconds, and a spectral resolution better than 5nm. The cleaned eggshell surface is captured with multi-angle and multi-wavelength spectral features to obtain high-precision spectral reflectance data including visible light and near-infrared spectra.
[0036] A tunable spectrometer is an optical device that can continuously or discretely adjust wavelength selection. It has wavelength selectivity and can accurately select light in a specific wavelength range to achieve one-by-one or continuous scanning of spectra of different wavelengths, thereby improving the accuracy and flexibility of spectral acquisition. In terms of spectral resolution, the tunable spectrometer can achieve high-precision spectral resolution, improve the resolution of spectral information by controlling the wavelength bandwidth, while reducing spectral noise and enhancing the quality of spectral signals. In addition, as the core optical component of the multi-spectral imaging system, the tunable spectrometer can work with the CCD camera and light source to build a complete spectral imaging system, thereby achieving accurate spectral feature extraction of the sample.
[0037] The spectral reflectance data of the cleaned eggshell surface is a set of multi-dimensional, high-precision optical information, including: reflection spectrum intensity, spectral curve, wavelength-reflectance correspondence, angle-reflectance correlation data, etc. For example, in the wavelength range of 400-1000nm, an accurate reflectance value is recorded every 10nm, forming a spectral reflectance data sequence containing 61 data points. These data not only reflect the color characteristics of the eggshell surface, but also contain information on the microscopic surface structure, the physical composition of the eggshell, and the optical properties of the eggshell. The physical composition of the eggshell refers to its material composition and microstructural characteristics. Specifically, it includes the chemical composition of the eggshell (calcium carbonate, protein, etc.), the microstructure of the surface (surface roughness and porosity), and the density and thickness changes of the eggshell. The optical properties of the eggshell refer to its interaction with light, mainly including the reflection, absorption and transmission characteristics of light, the difference in reflectance of light of different wavelengths, and the degree of scattering and diffuse reflection of light by the surface. For example, for a brown eggshell, its spectral reflectance data has a low reflectance (15-20%) in the blue light region (about 450nm), a moderate reflectance (40-50%) in the green light region (about 550nm), and a high reflectance (60-70%) in the red light region (about 650nm). By analyzing these data, the optical properties of the eggshell surface can be accurately quantified, including color uniformity, saturation, brightness and other indicators.
[0038] S30: Using a computer device to perform feature extraction and dimensionality reduction on the spectral reflectance data of the eggshell surface to obtain a multi-dimensional eggshell color feature vector.
[0039] In this step, the computer equipment uses artificial intelligence algorithms to extract features and reduce the dimension of spectral reflectance data. First, the principal component analysis (PCA) algorithm is used to reduce the dimension of the spectral reflectance data, retaining more than 95% of the information entropy; then the convolutional neural network (CNN) and the long short-term memory network (LSTM) are combined to extract color features and construct an eggshell color feature vector containing multi-dimensional information such as spectral features, reflectivity distribution, and optical properties. During the feature extraction process, the spectral data is normalized, and through multi-layer neural network learning and conversion, a feature vector with a dimension of 32-64 is finally generated.
[0040] S40: A computer device obtains an eggshell surface color quality grade according to the multi-dimensional eggshell color feature vector and the trained eggshell color quality assessment model.
[0041] In this step, the computer equipment calls the pre-trained eggshell color quality assessment model, which is trained by transfer learning and / or ensemble learning method based on a large-scale eggshell sample data set. The model input is the multidimensional eggshell color feature vector generated by step S30, and support vector machine (Support Vector Machine) or random forest (Random Forest) integrated algorithm is adopted for classification. The eggshell color quality assessment model can predefine the following five color quality grades: excellent (A grade), good (B grade), medium (C grade), general (D grade) and unqualified (E grade). According to the distance and similarity between the eggshell color feature vector and each grade sample, the color quality grade of the eggshell surface is finally output, and a confidence score is given.
[0042] The embodiment of the present invention realizes intelligent, precise and objective detection of eggshell color quality through the organic integration of a multimodal collaborative cleaning system for the eggshell surface, multispectral imaging technology, intelligent feature extraction and dimensionality reduction algorithm, and a machine learning evaluation model. The multimodal cleaning system ensures high-quality pretreatment of the eggshell surface and eliminates the influence of interference factors; the multispectral imaging technology can capture the subtle features of microscopic color changes on the eggshell surface; the artificial intelligence algorithm converts massive spectral data into highly concentrated color feature vectors through complex feature extraction and dimensionality reduction processing; the evaluation model based on large-scale sample training realizes the automation, standardization and precise grading of eggshell color quality. This technical path not only improves the detection efficiency and shortens the manual detection cycle from several minutes to seconds, but also reduces the interference of human subjective factors and improves the objectivity and accuracy of eggshell color quality evaluation.
[0043] Embodiment 2
[0044] like Figure 2 As shown, the eggshell surface multimodal collaborative cleaning system specifically includes:
[0045] A directional airflow cleaning module, wherein the directional airflow cleaning module has adjustable airflow parameters, wherein the airflow parameters include an airflow injection angle and an airflow pressure;
[0046] An electrostatic adsorption cleaning module, which is composed of an electrostatic fiber cloth installed at the end of a robotic arm, and adsorbs particles within a target particle size range on the surface of the eggshell through a preset electrostatic field strength;
[0047] An optical detection feedback module, the optical detection feedback module includes an industrial camera and an image processing module, the industrial camera is used to capture the clean area image of the eggshell surface in real time, the image processing module is used to quantify the cleaning effect according to the clean area image to obtain real-time feedback data, the real-time feedback data includes at least one cleaning quality parameter of particle residual area percentage, particle size distribution, surface dust density and cleaning uniformity index;
[0048] The control module is used to adjust the airflow parameters of the directional airflow cleaning module and the electrostatic strength of the electrostatic adsorption cleaning module according to the real-time feedback data of the optical detection feedback module.
[0049] Specifically, the directional airflow cleaning module is a precision airflow control device consisting of a high-precision air pump, an adjustable nozzle and a pressure sensor. The various components are closely connected through pipelines and control systems to form a complete airflow cleaning system. The function of the high-precision air pump is to generate a stable and controllable airflow to provide a power source for the cleaning process. The pressure sensor monitors the airflow pressure in real time to ensure the stability and accuracy of the cleaning process and prevent abnormal air pressure from damaging the eggshell surface. The airflow parameters of the directional airflow cleaning module include the injection angle and airflow pressure. The injection angle can be precisely adjusted within the range of 0-90 degrees, and the airflow pressure range is 0.1-0.6MPa. The nozzle is made of aviation-grade polymer materials and has airflow uniformity and precise guidance. The nozzle angle adjustment mechanism driven by the servo motor can achieve precise airflow cleaning of different areas on the eggshell surface, effectively removing loose particles and slightly attached stains on the surface.
[0050] Specifically, the electrostatic adsorption cleaning module uses high-tech electrostatic fiber cloth as the cleaning medium. The fiber cloth is interwoven with nano-scale conductive fibers and has good electrostatic adsorption efficiency. The fiber cloth is installed at the end of a six-degree-of-freedom robotic arm, which can achieve 360-degree all-round proximity to the eggshell surface. The electrostatic field intensity can be precisely controlled within the range of 1-10kV / cm, specifically for directional adsorption of particles in the particle size range of 1-100 microns. The surface of the electrostatic fiber cloth has a gradient electrostatic field distribution, which can effectively capture particles of different polarities and sizes, ensuring the comprehensiveness and accuracy of the eggshell surface cleaning.
[0051] Specifically, the optical detection feedback module is a highly intelligent image analysis system. The industrial camera uses a 20-megapixel color CCD sensor with a frame rate of up to 200fps and a spectral response range covering visible light and near-infrared spectra. The image processing module uses a deep learning algorithm with a built-in convolutional neural network and image segmentation model, which can extract and analyze the clean image of the eggshell surface in real time. The system can accurately calculate the percentage of residual particle area (accuracy better than 0.1%), particle size distribution (recognition accuracy 1 micron), surface dust density (resolution 0.01g / cm 2 ) and cleaning uniformity index (coefficient of variation < 5%) and other cleaning quality parameters.
[0052] In some embodiments, the process of obtaining the percentage of residual particle area specifically includes: first, capturing a high-resolution image of the eggshell surface through an industrial camera, and performing image preprocessing including denoising, contrast enhancement, and color standardization. Subsequently, image segmentation algorithms such as threshold segmentation, edge detection, or machine learning semantic segmentation are used to accurately identify and extract particle areas, and these extracted particle areas will be used for subsequent area calculations, size analysis, and cleaning quality assessments. The specific image segmentation algorithm distinguishes particles from the eggshell background based on features such as color, texture, and brightness, and calculates the ratio of the total area of particle pixels to the total area of the eggshell surface image, and finally converts it into a percentage accurate to two decimal places. The entire process requires pre-setting the threshold parameters for particle recognition, including color threshold, grayscale contrast threshold, minimum particle recognition area, and shape feature threshold, to ensure the accuracy and consistency of the image segmentation algorithm, thereby improving the reliability of particle area extraction.
[0053] In some embodiments, the particle size distribution acquisition process specifically includes: performing fine geometric measurements based on particle identification. Using morphological processing algorithms, contour extraction and area measurement are performed on each independent particle. Through precise calculations at the pixel level, the area of each particle is converted into the actual physical size. According to the preset size classification standard (e.g., small <0.1mm 2 , small 0.1-0.5mm 2 , medium 0.5-2mm2 , large > 2mm 2 ), automatically classifies the particles. Generates a detailed size distribution histogram showing the number and percentage of particles in each size class. The algorithm can also provide additional information on particle shape characteristics, such as circularity, aspect ratio, and other supplementary information.
[0054] In some embodiments, the surface dust density acquisition process specifically includes: first, performing background correction and color normalization of the image to eliminate the impact of uneven lighting. Using a speckle detection algorithm, such as a speckle enhancement filter, a speckle detection convolution kernel, etc., to accurately locate and extract dust particles. Screen each detected particle to eliminate noise and artifacts. Determine valid dust particles through area and shape features at the pixel level. Count the number of particles within a preset standard reference area (e.g., 1 square centimeter) and calculate the dust density. The speckle detection algorithm can simultaneously output additional information such as the number of particles and average size to provide comprehensive dust distribution characteristics.
[0055] In some embodiments, the cleaning uniformity index acquisition process specifically includes: in the image preprocessing stage, a high-resolution image of the eggshell surface is acquired by an image acquisition device. After the image is acquired, necessary preprocessing is performed, including removing image noise, adjusting contrast, standardizing image brightness and color, etc., to ensure the image quality and consistency of subsequent analysis. In the grid division stage, the preprocessed image is divided into equally spaced and equal-sized grids. The purpose of grid division is to evenly divide the entire eggshell surface into multiple areas, each grid area is the same size. The fineness of the grid division (i.e., the grid size and number) needs to be reasonably set according to the specific analysis requirements and image resolution. In the particle analysis stage, particle residual feature extraction is performed independently in each grid area. This stage mainly uses image processing algorithms to identify and analyze the particles in each grid, and extract key feature parameters, including particle coverage (the proportion of particle area to grid area), average grayscale (reflecting the depth of particles), and the number of particles. These feature parameters will serve as the basic data for uniformity evaluation. In the statistical quantification stage, statistical methods such as coefficient of variation (CV) are used to quantitatively analyze the particle feature parameters of different grid areas. The coefficient of variation quantifies the degree of dispersion of parameters in different regions by calculating the ratio of the standard deviation to the mean. Based on these statistical indicators, a cleaning uniformity index is constructed. The closer the value is to 0, the more uniform the cleaning degree is. In the visualization and evaluation stage, a heat map is drawn to intuitively display the uneven cleaning areas on the eggshell surface in combination with the spatial distribution characteristics of the particles. At the same time, the confidence interval of the difference between regions is calculated, which not only provides a more accurate uniformity assessment, but also enhances the statistical reliability of the results. Through visualization and confidence interval analysis, the cleaning uniformity can be understood more intuitively and accurately. In the result output stage, the above analysis is combined to output a clear uniformity index and a detailed evaluation report. The report includes uniformity index value, heat map, confidence interval analysis, etc.
[0056] Specifically, the control module is the intelligent dispatching center of the entire cleaning system, using an industrial-grade embedded processor and real-time operating system. It receives data from the optical detection feedback module in real time through a closed-loop feedback control strategy, and intelligently adjusts the injection angle and airflow pressure of the directional airflow cleaning module, as well as the electrostatic field strength of the electrostatic adsorption cleaning module according to a preset algorithm. The control algorithm is based on fuzzy control and adaptive learning algorithms, which can respond quickly (response time <50ms) and accurately adjust cleaning parameters to ensure that the eggshell surface is always in the best cleaning state.
[0057] The advantages of the above technical solutions of the embodiments of the present invention are: the directional airflow cleaning module solves the problem of unevenness of traditional single airflow cleaning, and realizes precise cleaning of different areas of the eggshell surface through adjustable airflow angle and pressure, effectively removing loose particles and slightly attached stains; secondly, the electrostatic adsorption cleaning module adopts nano-scale electrostatic fiber cloth, which solves the technical bottleneck of traditional mechanical cleaning methods that are difficult to remove tiny particles, and can accurately capture particles in the size range of 1-100 microns, thereby improving the depth and thoroughness of cleaning; furthermore, the optical detection feedback module introduces high-precision industrial imaging and deep learning image analysis technology, realizes quantitative and visual evaluation of the cleaning quality of the eggshell surface, and key parameters such as the percentage of residual area of particles and size distribution can be accurately measured, and the detection accuracy reaches the submicron level; finally, the intelligent control module realizes real-time dynamic adjustment of cleaning parameters through closed-loop feedback and adaptive learning algorithms, which not only greatly improves the cleaning efficiency, shortens the cycle of traditional manual cleaning from minutes to seconds, but also reduces the interference of human subjective factors.
[0058] Embodiment 3
[0059] like Figure 3 As shown, in one embodiment, the multispectral imaging system includes:
[0060] A light source module, comprising a multi-wavelength light source and an incident angle adjustment mechanism, wherein the light source module is installed above the sample stage and maintains a preset fixed distance from the eggshell surface, and the multi-wavelength light source adjusts the incident angle through the incident angle adjustment mechanism to ensure that the emitted light of a specified wavelength can evenly cover the eggshell surface;
[0061] Imaging optical components, using zoom lenses to adjust focal length and field of view parameters;
[0062] A spectrometer is used to decompose the composite spectrum reflected from the eggshell surface into monochromatic spectra of different wavelength channels corresponding to the blue light channel, the green light channel and the red light channel based on the principle of prism or grating; the reflected composite spectrum is the spectral feature of the incident spectrum after being reflected from the eggshell surface;
[0063] The image sensor is specifically used to receive the monochromatic spectrum decomposed by the spectrometer, convert the optical signal corresponding to the monochromatic spectrum into digital image data, and record the spectral reflection data of the cleaned eggshell surface at each incident angle and each wavelength channel.
[0064] In the present embodiment, the light source module is the excitation source of the multi-spectral imaging system, which is composed of a high-precision multi-wavelength LED array, including light sources of three wavelength channels of blue light (460-480nm), green light (520-540nm) and red light (620-640nm). The incident angle adjustment mechanism adopts a two-dimensional adjustment platform driven by a precision stepping motor, which can accurately control the incident angle of the light source within the range of 0-75 degrees, and the angle adjustment accuracy reaches 0.1 degrees. The module is mounted on a specially designed sample stage bracket, and a constant working distance of 100±2mm is ensured to be maintained with the eggshell surface by a precision optical bracket. The design of the multi-wavelength light source can simulate the spectral characteristics of the eggshell surface under different lighting conditions, providing multi-dimensional spectral excitation for subsequent precise imaging.
[0065] In this embodiment, the imaging optical component uses an industrial-grade high-resolution zoom lens with a variable aperture of 1:1.4-1:22 and a continuous zoom range of 10-200mm. The lens uses a multi-layer anti-reflective optical coating, which can effectively suppress optical stray and chromatic aberration, ensuring the clarity and color reproduction of the image at different magnifications. The focal length and field of view parameters can be adjusted dynamically in real time, and the minimum resolution can reach 2 microns / pixel, ensuring accurate capture of tiny structures and particles on the eggshell surface. The lens is equipped with autofocus and image stabilization functions, which can quickly adapt to small height changes on the eggshell surface.
[0066] In this embodiment, the spectrometer adopts high-precision diffraction grating spectroscopic technology, which is composed of precision-machined quartz prisms and gratings, and can accurately decompose the composite spectrum into three wavelength channels of blue, green and red. The spectral decomposition accuracy is better than 1nm, and the optical transmittance is greater than 95%. Based on the Bragg diffraction principle, the spectrometer can accurately extract the reflection spectrum characteristics of the eggshell surface at different wavelengths. By comparing the spectral data of different wavelength channels, the microstructure, stain distribution and cleanliness of the eggshell surface can be effectively distinguished, providing multi-dimensional spectral information for image analysis.
[0067] In this embodiment, the image sensor adopts back-illuminated CMOS technology, with 20 million effective pixels, global shutter and high dynamic range characteristics. The sensor quantum efficiency exceeds 85% in the three wavelength channels of blue, green and red, and the signal-to-noise ratio is greater than 50dB. At each wavelength channel and incident angle, the sensor can capture up to 16 bits of spectral reflectance data to achieve accurate digital recording of the microscopic cleanliness status of the eggshell surface. The data acquisition system is equipped with a high-speed data interface and a real-time image processing unit, which can complete the acquisition and preliminary analysis of a single multi-spectral image within 50ms.
[0068] The multi-wavelength light source and adjustable incident angle mechanism of the light source module of the embodiment of the present invention enable the system to simulate different lighting conditions and incident angles, effectively reveal the hidden features of the microstructure and cleaning state of the eggshell surface, and overcome the technical bottleneck that the traditional single light source is difficult to capture subtle stains and surface defects. The high-precision variable focal length and field of view parameters of the zoom imaging optical component, combined with the high quantum efficiency and wide dynamic range of the back-illuminated CMOS image sensor, realize the accurate capture and quantitative analysis of 1-100 micron scale particles on the eggshell surface, and the image resolution can reach submicron level. Based on precision optical decomposition technology, the spectrometer can accurately decompose the reflection spectrum into three wavelength channels of blue, green and red. Through the cross-comparison and in-depth analysis of multi-spectral data, it can not only accurately quantify the cleaning effect, but also reconstruct the spectral evolution process before and after the eggshell surface is cleaned. The system improves the intelligent level of eggshell cleaning quality assessment, and transforms the traditional qualitative detection that relies on manual experience into quantitative analysis based on spectral big data.
[0069] Embodiment 4
[0070] like Figure 4 As shown, step S20 specifically includes the following steps:
[0071] S201: Initialize and calibrate the parameters of the multi-spectral imaging system, including setting the wavelength range of the light source module, adjusting the intensity of the multi-wavelength light source, confirming the accuracy of the incident angle adjustment mechanism, calibrating the focal length and field of view of the imaging optical component, detecting the spectral decomposition accuracy of the spectrometer, and calibrating the sensitivity and signal-to-noise ratio of the image sensor.
[0072] Specifically, system parameter initialization and calibration are key links to ensure the accuracy of multi-spectral imaging. During the initialization process, a professional spectrum calibrator is first used to accurately calibrate the multi-wavelength light source. The wavelength range is set to blue light (460-480nm), green light (520-540nm) and red light (620-640nm), and the light source intensity is accurately adjusted to 100±5mA through an adjustable current control module. The incident angle adjustment mechanism uses a high-precision stepper motor with an angle adjustment accuracy of up to 0.1 degrees, and a laser interferometer is used for angle calibration. The focal length and field of view of the imaging optical components are calibrated at multiple points using a standard calibration plate to ensure the linearity and consistency of the imaging system. The spectral decomposition accuracy of the spectrometer is detected using a high-precision spectral standard source with a resolution better than 1nm. The sensitivity and signal-to-noise ratio of the image sensor are tested for dynamic range and quantum efficiency using professional image quality evaluation software to ensure that the signal-to-noise ratio of each wavelength channel is greater than 50dB.
[0073] S202: Position and fix the pretreated eggshell sample in the center of the sample table, use a sample fixing clamp to press and limit the eggshell sample, ensure that the surface of the eggshell sample is flat and without shaking, and the surface of the eggshell sample is perpendicular to the optical axis of the imaging optical component or the angle deviation is controlled within ±5 to 10 degrees, and by adjusting the height and tilt angle of the sample table, the surface of the eggshell sample is geometrically aligned with the incident light of the light source module and the optical axis of the imaging optical component.
[0074] Specifically, sample positioning and fixation are the basis for ensuring imaging quality. An eggshell sample fixing fixture is used, which is precisely positioned by a precision CNC robotic arm. The fixture uses a flexible silicone gasket, which can evenly apply pressure and effectively suppress sample shaking, and the fixing pressure is controlled between 50-100N. The electric adjustment table is used to achieve micron-level precise positioning of the sample stage in the vertical and horizontal directions. A laser alignment system is used to ensure the perpendicularity between the eggshell surface and the optical axis of the optical system, and the alignment accuracy is better than 0.1 degrees. The sample stage is equipped with a multi-degree-of-freedom adjustment mechanism, which can accurately control the angle between the sample surface and the incident light to achieve the best geometric alignment of the optical system. By using a sample fixing fixture, the pretreated eggshell sample is pressed and limited to the center of the sample stage, which can ensure that the sample surface is flat and shake-free. The vertical configuration of the eggshell sample surface and the optical axis of the imaging optical component can reduce geometric distortion, ensure imaging uniformity, reduce the complexity of the optical system, and improve measurement accuracy. With this configuration, perspective distortion can be minimized to obtain more accurate spectral information. The goal of adjusting the sample stage height and tilt angle is to establish an ideal optical configuration so that the incident angle of the light source can evenly cover the eggshell surface and the imaging optical components can capture the most complete surface features with minimal distortion. Through careful adjustment, a relatively optimized geometric position can be found to achieve the best spectral reflection signal intensity and signal-to-noise ratio.
[0075] S203: According to the preset multiple incident angles, the incident angle of the light source module is adjusted in sequence. At each incident angle, light of a specified wavelength, including blue light, green light and red light, is emitted to the surface of the eggshell through a multi-wavelength light source. The distance between the light source module and the surface of the eggshell is maintained at a preset distance.
[0076] Specifically, the incident angle scan uses a preset angle sequence, including six angle points of 0°, 15°, 30°, 45°, 60° and 75°. At each angle, the multi-wavelength light source emits blue, green and red wavelengths of light in sequence according to a predetermined timing and intensity. The irradiation time of each wavelength is 50ms, and the distance between the light source and the eggshell surface is fixed at 100±2mm. Angle adjustment is achieved through a rotating platform controlled by a precision motor to ensure that the light source evenly covers the eggshell surface and minimize the impact of changes in the incident angle on spectral acquisition.
[0077] S204: When the light of the specified wavelength emitted by the light source module irradiates the eggshell surface, the zoom lens built into the imaging optical component collects and focuses the composite spectrum reflected from the eggshell surface, and the zoom lens achieves imaging of the spectral reflection characteristics of the eggshell surface by adjusting the focal length and field of view parameters, capturing the spectral reflection details of the eggshell surface at a microscopic scale. The imaging optical component is opposite to the light source module, forming a preset angle.
[0078] Specifically, the imaging optical component forms an angle of about 45 degrees with the light source module, and uses an industrial-grade zoom lens with a focal length range of 10-200mm, which can be adjusted dynamically in real time. When the specified wavelength of light irradiates the eggshell surface, the zoom lens captures the reflected composite spectrum through automatic focus and aperture adjustment functions. The lens is equipped with a multi-layer anti-reflective optical coating to effectively suppress optical stray light. The minimum resolution can reach 2 microns / pixel, which can accurately capture the spectral reflection details of the eggshell surface at a microscopic scale.
[0079] S205: The collected composite spectrum is processed by a spectrometer installed between the imaging optical component and the image sensor. The spectrometer decomposes the composite spectrum into independent monochromatic spectra including blue light, green light and red light based on the principle of prism or grating. The image sensor converts the optical signal corresponding to the decomposed monochromatic spectrum into digital image data for recording the reflected spectrum intensity information under each incident angle and wavelength channel.
[0080] Specifically, the spectrometer uses a combination of high-precision quartz prisms and diffraction gratings to accurately decompose the composite spectrum into three wavelength channels: blue, green, and red. The spectral decomposition accuracy is better than 1nm, and the optical transmittance is greater than 95%. The back-illuminated CMOS image sensor has 20 million effective pixels, and the quantum efficiency is more than 85% in the three wavelength channels. The sensor uses global shutter technology, which can complete the high-speed acquisition and data conversion of a single multi-spectral image within 50ms, and record the precise reflection spectrum intensity information at each incident angle and wavelength channel.
[0081] S206: Integrate the reflection spectrum intensity data at each incident angle and each wavelength channel to construct a three-dimensional spectrum data matrix including incident angles, wavelength channels and reflection spectrum intensity values, wherein the three-dimensional spectrum data matrix is a standardized representation of the eggshell surface spectral reflectance data.
[0082] Specifically, the data processing uses a specially developed multi-dimensional spectral data processing algorithm to organize the reflected spectral intensity data under different incident angles and wavelength channels into a three-dimensional data matrix. The matrix dimensions are: incident angle (6) × wavelength channel (3) × reflected spectral intensity. Standardized processing technology is used to eliminate the systematic error of the optical system and construct a standard representation of eggshell surface spectral reflectance data with high comparability and repeatability. The data matrix can be directly used for subsequent machine learning and image analysis.
[0083] Specifically, the light source module and the imaging optical component are arranged at an angle of 45°, and the optical axis of the imaging optical component forms an angle of 45° with the incident light; the wavelength range of the light source module is 400-700nm; the multiple incident angles of the light source module include: 0°, 15°, 30°, 45°, 60°, 75°; the distance between the light source module and the eggshell surface is maintained at 5-10cm; the image sensor includes: a CCD image sensor or a CMOS image sensor; the three-dimensional spectral data matrix includes: incident angle information, wavelength channel information, and corresponding reflection spectrum intensity values.
[0084] The method of the embodiment of the present invention overcomes the limitations of traditional single wavelength and fixed angle imaging. Through the precise scanning of multi-wavelength light sources (blue, green, and red) at different incident angles, it can reveal the hidden features of the microstructure and cleaning status of the eggshell surface in an all-round and multi-dimensional manner, thereby improving the detection sensitivity of stains and surface defects. The optical system design includes a high-precision incident angle adjustment mechanism, a zoom lens, and a spectrometer, which enable the system to capture submicron-scale spectral reflection details and achieve accurate analysis of 1-100 micron particles on the eggshell surface. By constructing a three-dimensional data matrix containing incident angles, wavelength channels, and reflection spectral intensities, it is possible not only to quantitatively evaluate the cleaning effect, but also to reconstruct the spectral evolution process before and after the eggshell surface is cleaned, transforming the traditional qualitative detection that relies on manual experience into a quantitative analysis based on spectral big data.
[0085] Embodiment 5
[0086] like Figure 5 As shown, step S30 specifically includes the following steps:
[0087] S301: Preprocessing the original spectral reflectance data of multiple incident angles and multiple wavelengths to obtain a three-dimensional spectral reflectance data matrix after denoising and standardization transformation, wherein the preprocessing includes denoising and standardization transformation.
[0088] Specifically, this step first uses a wavelet denoising algorithm for the original spectral reflectance data, specifically using the Symlet 8 wavelet basis, and performs threshold denoising on the 3rd and 4th layers of wavelet decomposition to effectively suppress instrument noise and random interference. The standardized transformation uses the Z-score transformation method, and the calculation formula is Z=(X-μ) / σ, where X is the original data, μ is the mean, and σ is the standard deviation. Through the Z-score transformation, the spectral data of different incident angles and wavelength channels are mapped to the standard normal distribution, eliminating the data scale differences and providing a unified data benchmark. Denoising and standardization processing improves the signal-to-noise ratio and comparability of the data. As an example, a three-dimensional spectral reflectance data matrix may include: the first dimension is the incident angle (such as 0°, 15°, 30°, 45°), the second dimension is the wavelength (for example, 400-1000nm, with an interval of 10nm), and the third dimension is the reflectance value.
[0089] S302: Performing discrete wavelet transform multi-scale decomposition on the three-dimensional spectral reflectance data matrix to obtain a wavelet coefficient matrix.
[0090] Specifically, the Discrete Wavelet Transform (DWT) adopts a multi-resolution analysis method and selects the Daubechies wavelet basis (db4) for multi-scale decomposition. A two-dimensional discrete wavelet transform is performed on the three-dimensional spectral reflectance data matrix, and the number of decomposition layers is set to 4. The transformation process decomposes the original data into approximate coefficients and detail coefficients. The approximate coefficients reflect the low-frequency characteristics of the data, and the detail coefficients capture the local characteristics of different scales. The specific decomposition process includes the extraction of wavelet coefficients in the horizontal, vertical and diagonal directions. The obtained wavelet coefficient matrix can effectively characterize the multi-scale characteristics of the spectral reflectance of the eggshell surface.
[0091] S303: Performing principal component analysis on the wavelet coefficient matrix after the discrete wavelet transform, identifying and retaining the principal component with the largest explained variance through a cumulative variance contribution rate threshold.
[0092] Specifically, principal component analysis is used for dimensionality reduction and feature extraction. After mean-centering the wavelet coefficient matrix, the covariance matrix is calculated to measure the linear correlation between the features. The covariance matrix is then subjected to eigenvalue decomposition to extract the principal components. The size of the eigenvalue reflects the explanatory power of each principal component on the data. According to the order of the eigenvalues and the cumulative variance contribution rate threshold (85%), the top 20-30 principal components that can retain the main information are selected, and the original data are projected into a low-dimensional space to obtain the feature data after dimensionality reduction. This process not only effectively reduces the data dimension and the computational complexity of the analysis, but also removes redundant and less relevant features, while highlighting the key features related to the spectral reflectance information of the eggshell surface.
[0093] S304: reconstructing a spectral reflectance curve using a spline interpolation method, and calculating target spectral parameters based on the reconstructed spectral reflectance curve.
[0094] Specifically, the spline interpolation method is used to reconstruct the spectral reflectance curve, and the cubic spline interpolation algorithm is selected, which has the characteristics of good continuity and smoothness. The interpolation process first smoothes the discrete spectral reflectance data points, and then reconstructs the continuous reflectance curve through the spline function. The calculation of the target spectral parameters includes: average reflectance (arithmetic mean of the calculated curve), reflectance standard deviation (reflecting the degree of discreteness of the spectral distribution), peak reflectance (maximum value of the curve), spectral curve entropy (measurement of the complexity of the spectral distribution) and spectral asymmetry index (reflecting the degree of skewness of the spectral curve). These parameters comprehensively describe the statistical characteristics of the spectral reflectance of the eggshell surface.
[0095] S305: constructing a multi-dimensional eggshell color feature vector by integrating the wavelet coefficient matrix, the principal component, and the target spectral parameter.
[0096] Specifically, the feature vector is constructed by a weighted fusion method of information entropy and discrimination. First, the wavelet coefficient matrix, principal component and target spectral parameters are normalized, and each feature is mapped to the interval [0,1] using the minimum-maximum normalization method. The weight coefficient calculation is based on the information entropy and discrimination of each feature. The information entropy of each feature is determined by the information entropy formula H = -Σ(p*log(p)), and the discrimination of the feature is determined by variance calculation. In addition, the discrimination is also calculated by the coefficient of variation (CV) of the eigenvalue. The calculation formula is: CV = (standard deviation / mean) * 100%. Finally, the normalized features are integrated into a 20-30 dimensional eggshell color feature vector by a weighted summation method. The weight distribution fully considers the information content and discrimination ability of each feature, ensuring that the constructed feature vector can accurately characterize the spectral characteristics of the eggshell surface. The target spectral parameters include at least one of the following: average reflectance, reflectance standard deviation, peak reflectance, spectral curve entropy, and spectral asymmetry index.
[0097] The embodiment of the present invention integrates signal processing technologies such as wavelet transform, principal component analysis and spline interpolation into the extraction of eggshell spectral features, realizing multi-dimensional and multi-scale accurate capture of the microscopic spectral features of the eggshell surface. Through wavelet denoising and standardized transformation, instrument noise and data inconsistency are effectively suppressed, and data quality is improved; discrete wavelet multi-scale decomposition technology can simultaneously capture the macroscopic and microscopic features of the spectral reflectance of the eggshell surface, breaking through the limitations of traditional single-scale analysis; principal component analysis compresses high-dimensional spectral data to 20-30 dimensions, greatly reducing the computational complexity while retaining key information. Spline interpolation reconstructs the spectral reflectance curve, and comprehensively describes the statistical properties of the spectral features of the eggshell surface through multidimensional parameters such as average reflectance, entropy, and asymmetry. The weighted fusion strategy dynamically adjusts the feature weights based on information entropy and discrimination. The constructed 20-30-dimensional eggshell color feature vector not only has a high degree of information concentration, but also can accurately reflect the changes in the cleanliness state of the eggshell surface, providing an intelligent solution for egg processing quality control.
[0098] Embodiment 6
[0099] like Figure 6 As shown, the method further comprises the following steps:
[0100] S50: Obtaining a description of eggshell color characteristics through a spectral analysis algorithm according to the spectral reflectance data of the eggshell surface.
[0101] Specifically, the spectral analysis algorithm uses a multi-feature fusion method to first perform a deep analysis of the eggshell color feature vector obtained above. In the specific implementation, two machine learning algorithms, Support Vector Machine (SVM) and Random Forest (RF), are selected for feature mapping and classification. The algorithm flow includes:
[0102] S51: Construct spectral feature space. In the first step of the spectral analysis algorithm, a 20-30 dimensional eggshell color feature vector is used as input data. The purpose of this step is to establish a multidimensional feature space to provide a representative data basis for subsequent machine learning algorithms. The feature vector contains various dimensional information of the spectral reflectance of the eggshell surface.
[0103] S52: Select the optimal classification hyperparameters by cross-validation method. In this step, the two machine learning algorithms, support vector machine (SVM) and random forest (RF), will be compared and their parameters will be tuned by cross-validation method. Cross-validation technology will be used to evaluate the classification performance of the two algorithms under different hyperparameter combinations, and select the algorithm and parameter configuration that can most accurately capture the eggshell color characteristics.
[0104] S53: Construct an eggshell color quality recognition model based on the eggshell color feature vector. Based on the preparations in the first two steps, an optimized SVM algorithm or RF algorithm will be used to construct a color quality recognition model based on the eggshell color feature vector. This model will focus on extracting and analyzing key features such as spectral curve entropy and asymmetry index, which can sensitively capture subtle changes in the microstructure and cleanliness of the eggshell surface. The model will eventually output quantitative descriptions such as color uniformity score, cleanliness index, and spectral consistency score, providing accurate quantitative indicators for eggshell quality assessment.
[0105] The spectral analysis algorithm focuses on key information in the feature vector, such as spectral curve entropy, asymmetry index, etc. These indicators can sensitively capture subtle changes in the microstructure and cleanliness of the eggshell surface. The algorithm output includes quantitative descriptions of color features, such as color uniformity score, cleanliness index, spectral consistency score, etc.
[0106] S60: Generate an eggshell surface color quality assessment report according to the eggshell color quality grade and the eggshell color feature description.
[0107] Specifically, the eggshell surface color quality assessment report is generated using intelligent templates and automated reporting technology. The report generation process first conducts a multi-dimensional assessment based on the feature description output by the spectral analysis algorithm, combined with the preset quality grade standards. The report template includes the following key contents: a basic information module, which records egg batches, detection time, and detection equipment parameters; a spectral feature analysis module, which presents the quantitative analysis results of the color feature vector in detail, including the numerical values of each dimensional feature and a radar chart visualization display; a quality grade assessment module, which maps spectral features to predefined quality grades (such as excellent, good, qualified, and unqualified) based on a pre-trained machine learning model; an anomaly detection module, which marks and details spectral features that deviate from the normal range; and a suggestion and conclusion module, which provides corresponding processing suggestions for different quality grades. The report uses an interactive electronic document format, supports PDF and customizable visual charts, which facilitates quick understanding and further analysis.
[0108] The embodiments of the present invention improve the intelligence, precision and interpretability of eggshell surface color quality assessment through spectral analysis algorithms and intelligent report generation technology. The multi-feature fusion spectral analysis method avoids the limitations of traditional single feature evaluation. Through machine learning algorithms such as support vector machines and random forests, it can accurately capture subtle changes in microscopic spectral features from 20-30 dimensional eggshell color feature vectors, and achieve high-precision quantitative assessment of eggshell surface cleanliness and uniformity. Intelligent report generation technology converts complex spectral data into intuitive, easy-to-read visual reports, which not only provides quantitative quality grade assessment, but also intelligently identifies abnormal features and gives targeted suggestions, greatly reducing the subjectivity and blindness of manual detection.
[0109] Embodiment 6
[0110] like Figure 7 As shown, the method further includes step S70, which includes the following steps:
[0111] S71: Collect spectral reflectance data of cleaned eggshell surfaces of multiple varieties, multiple breeding environments, and multiple growth stages through a multispectral imaging system, and establish an eggshell color quality standard database including eggshell color feature vectors and corresponding eggshell surface color quality grade labels.
[0112] Specifically, in the specific implementation, 3-5 main laying hen breeds including green-shelled chickens, brown-shelled chickens, and white-shelled chickens were selected, covering different breeding environments such as large-scale farms, ecological farms, and family free-range breeding, and tracking the different growth stages of chickens from the chick stage, adult chicken stage to the peak egg-laying period. The multispectral imaging system uses a high-precision spectrometer with a wavelength range of 400-1000nm, and each sample takes no less than 50 high-resolution images under multi-angle and multi-lighting conditions. The data collection process strictly controls the ambient temperature (20-25℃), humidity (45%-55%) and lighting conditions to ensure the standardization and comparability of the data. The final database contains 1000-5000 samples, each of which records detailed spectral reflectance data, color feature vectors, and expert-assessed eggshell surface color quality grade labels.
[0113] S72: Preprocessing the feature vectors in the eggshell color quality standard database, wherein the preprocessing includes missing value processing, outlier detection processing, feature standardization processing and feature dimension reduction processing to obtain a normalized feature matrix.
[0114] Specifically, missing values are processed using multiple interpolation methods, using mean, median or Gaussian distribution for random interpolation according to the statistical characteristics of the sample; outlier detection combines box plot analysis and Mahalanobis distance method to identify and process extreme data points beyond 3 standard deviations; feature standardization uses Z-score standardization method to map each dimension feature to a standard normal distribution with mean 0 and variance 1; feature dimensionality reduction uses principal component analysis (PCA) technology to compress 20-30 dimensional feature vectors to 5-10 principal components while retaining more than 95% of the original information, which not only reduces computational complexity but also retains key information. The normalized feature matrix after preprocessing not only eliminates data noise, but also improves the data quality of model training.
[0115] S73: Using the normalized feature matrix as training data, selecting a radial basis kernel function, and constructing and tuning an eggshell color quality assessment model through a grid search and cross-validation method to ensure that the model can be directly applied to the spectral reflectance data of the eggshell surface after cleaning.
[0116] Specifically, the eggshell color quality assessment model is constructed using radial basis kernel function (RBF) support vector machine (SVM), which is particularly suitable for dealing with nonlinear classification problems. During the grid search process, the system traverses the range of penalty parameter C [10 -3 ,10 3 ] and the range of kernel function parameter γ[10 -3 ,10 3 ], and the optimal parameter combination was selected by the 5-fold cross-validation method. The model training used 80% of the data as the training set and 20% as the validation set. The evaluation indicators included accuracy, precision, recall and F1 score. The classification accuracy of the final model on the validation set reached more than 92%, which is better than the traditional linear classification method. The model can not only be directly applied to the spectral reflectance data of the eggshell surface after cleaning, but also has good generalization ability, which can adapt to the eggshell color quality evaluation of different breeds and different breeding environments.
[0117] In alternative embodiments, for eggshell color quality assessment, random forest and gradient boosting tree (such as XGBoost) can be used. These two integrated learning algorithms are suitable for processing nonlinear complex data and can capture the complex relationship between features. For data sets with obvious nonlinear characteristics such as spectral reflectance data, these algorithms can provide more robust classification performance through the integration of multiple decision trees. In other alternatives, deep learning methods can be used. For eggshell color quality assessment, convolutional neural network (CNN) and recurrent neural network (RNN) each have their own characteristics. CNN is good at capturing local features and spatial dependencies, and can automatically extract key feature patterns in spectral reflectance data through convolutional layers and pooling layers, and is particularly suitable for processing data with spatial or spectral correlation. And RNN, especially long short-term memory network (LSTM), is good at processing sequence data and can capture the time sequence or continuous change characteristics in spectral reflectance data.
[0118] In some embodiments, in step S72, missing value processing is performed using median filling or multiple interpolation methods; outlier detection is performed using box plots or interquartile range methods; feature standardization is performed using Z-score standardization or minimum-maximum normalization methods; feature dimensionality reduction is performed using principal component analysis or mutual information method to screen key features; in step S73, the penalty parameter C and the kernel function parameter γ are tuned using grid search and cross-validation methods.
[0119] The embodiment of the present invention establishes a standard database of eggshell color feature vectors through comprehensive data collection across varieties, breeding environments and multiple growth stages, which is superior to the traditional limited evaluation method under a single variety and a single environment; secondly, a multi-dimensional data preprocessing technology including missing value processing, outlier detection, feature standardization and dimensionality reduction is proposed, which effectively eliminates data noise and extracts key features of eggshell color quality; furthermore, a radial basis kernel function support vector machine is adopted, combined with a grid search and cross-validation method, to construct a high-precision and high-generalization eggshell color quality evaluation model, which not only improves the classification accuracy, but also can be directly applied to eggshell surface spectral reflectance data from different sources.
[0120] Embodiment 8
[0121] like Figure 8 A system for evaluating the color quality of eggshell surface based on color reflection is shown, comprising:
[0122] An eggshell surface multimodal collaborative cleaning system is used to clean the eggshell surface to obtain a cleaned eggshell surface;
[0123] A multispectral imaging system is used to capture the spectral characteristics of the eggshell surface after cleaning and obtain spectral reflectance data of the eggshell surface after cleaning;
[0124] The computer device is used to extract features and reduce the dimension of the spectral reflectance data of the eggshell surface to obtain a multi-dimensional eggshell color feature vector; and obtain the eggshell surface color quality grade according to the multi-dimensional eggshell color feature vector and a trained eggshell color quality assessment model.
[0125] In a further embodiment, the eggshell surface multimodal collaborative cleaning system specifically includes:
[0126] A directional airflow cleaning module, wherein the directional airflow cleaning module has adjustable airflow parameters, wherein the airflow parameters include an airflow injection angle and an airflow pressure;
[0127] An electrostatic adsorption cleaning module, which is composed of an electrostatic fiber cloth installed at the end of a robotic arm, and adsorbs particles within a target particle size range on the surface of the eggshell through a preset electrostatic field strength;
[0128] An optical detection feedback module, the optical detection feedback module includes an industrial camera and an image processing module, the industrial camera is used to capture the clean area image of the eggshell surface in real time, the image processing module is used to quantify the cleaning effect according to the clean area image to obtain real-time feedback data, the real-time feedback data includes at least one cleaning quality parameter of particle residual area percentage, particle size distribution, surface dust density and cleaning uniformity index;
[0129] The control module is used to adjust the airflow parameters of the directional airflow cleaning module and the electrostatic strength of the electrostatic adsorption cleaning module according to the real-time feedback data of the optical detection feedback module.
[0130] In a further embodiment, the multispectral imaging system specifically comprises:
[0131] A light source module, comprising a multi-wavelength light source and an incident angle adjustment mechanism, wherein the light source module is installed above the sample stage and maintains a preset fixed distance from the eggshell surface, and the multi-wavelength light source adjusts the incident angle through the incident angle adjustment mechanism to ensure that the emitted light of a specified wavelength can evenly cover the eggshell surface;
[0132] Imaging optical components, using zoom lenses to adjust focal length and field of view parameters;
[0133] A spectrometer is used to decompose the reflected composite spectrum into monochromatic spectra of different wavelength channels corresponding to a blue light channel, a green light channel and a red light channel based on a prism or grating principle; the reflected composite spectrum is a spectral feature of the incident spectrum after being reflected from the eggshell surface;
[0134] The image sensor is specifically used to receive the monochromatic spectrum decomposed by the spectrometer, convert the optical signal corresponding to the monochromatic spectrum into digital image data, and record the spectral reflection data of the cleaned eggshell surface at each incident angle and each wavelength channel.
[0135] In a further embodiment, the computer device specifically comprises:
[0136] Data preprocessing module, used to perform denoising and standardization transformation on the original spectral reflectance data of multiple incident angles and multiple wavelengths;
[0137] The feature extraction module is used to perform discrete wavelet transform multi-scale decomposition on the pre-processed spectral reflectance data and perform principal component analysis;
[0138] The feature vector construction module is used to construct a multi-dimensional eggshell color feature vector based on the wavelet coefficient matrix, principal components and target spectral parameters.
[0139] In a further embodiment, the computer device further comprises:
[0140] A color feature description module is used to describe the characteristics of the spectral reflectance data of the eggshell surface through a spectral analysis algorithm;
[0141] The evaluation report generation module is used to generate an eggshell surface color quality evaluation report based on the eggshell color quality grade and the eggshell color feature description.
[0142] In a further embodiment, the system further comprises:
[0143] A database construction module is used to collect spectral reflectance data of cleaned eggshell surfaces of multiple varieties, multiple breeding environments, and multiple growth stages through a multispectral imaging system, and establish an eggshell color quality standard database including eggshell color feature vectors and corresponding eggshell surface color quality grade labels;
[0144] A data preprocessing module is used to perform missing value processing, outlier detection processing, feature standardization processing and feature dimension reduction processing on the feature vectors in the eggshell color quality standard database to obtain a normalized feature matrix;
[0145] The model training module is used to use the normalized feature matrix as training data, select the radial basis kernel function, and build and tune the eggshell color quality assessment model through grid search and cross-validation methods.
[0146] Compared with traditional detection methods, the technical solution of the embodiment of the present invention can improve detection accuracy and detection speed, and significantly reduce labor costs. The embodiment of the present invention can capture tiny color differences that cannot be identified by traditional methods through precise spectral sensors and data processing algorithms, and improve the accuracy and objectivity of eggshell color quality assessment.
[0147] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0148] Embodiment 9
[0149] like Fig. 9 As shown, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, each step of the above-mentioned method for evaluating the color quality of the eggshell surface based on color reflection is implemented.
[0150] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. Of course, there are other ways of readable storage media, such as quantum memory, graphene memory, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0151] Embodiment 10
[0152] like Fig.10 As shown, an embodiment of the present invention further provides an electronic device, which includes one or more processors 901, a communication interface 902, a memory 909 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other via the communication bus 904.
[0153] Memory 909, used for storing computer programs;
[0154] The processor 901 is used to implement the steps of the above-mentioned method for evaluating the color quality of the eggshell surface based on color reflection when executing the program stored in the memory 903.
[0155] Processor 901 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0156] The memory 903 may include a large capacity memory for data or instructions. For example, but not limitation, the memory 909 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 903 may include a removable or non-removable (or fixed) medium. In a specific embodiment, the memory 903 is a non-volatile solid-state memory. In a specific embodiment, the memory 903 includes a read-only memory (ROM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0157] Communication bus 904 includes hardware, software or both, for coupling the above-mentioned components to each other.For example, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus may include one or more buses.Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.
[0158] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0159] Although the present application provides method operation steps such as embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0160] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0163] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for evaluating the color quality of eggshell surface based on color reflection, characterized in that: The following steps are involved: S10: cleaning the eggshell surface by the eggshell surface multimodal collaborative cleaning system to obtain a cleaned eggshell surface; S20: using a multispectral imaging system to capture spectral features of the cleaned eggshell surface to obtain spectral reflectance data of the cleaned eggshell surface; S30: extracting features and reducing the dimensionality of the spectral reflectance data of the eggshell surface by a computer device to obtain a multi-dimensional eggshell color feature vector; S40: A computer device obtains an eggshell surface color quality grade according to the multi-dimensional eggshell color feature vector and the trained eggshell color quality assessment model.
2. The method according to claim 1, characterized in that The eggshell surface multimodal collaborative cleaning system specifically comprises: A directional airflow cleaning module, wherein the directional airflow cleaning module has adjustable airflow parameters, wherein the airflow parameters include an airflow injection angle and an airflow pressure; An electrostatic adsorption cleaning module, which is composed of an electrostatic fiber cloth installed at the end of a robotic arm, and adsorbs particles within a target particle size range on the surface of the eggshell through a preset electrostatic field strength; An optical detection feedback module, the optical detection feedback module includes an industrial camera and an image processing module, the industrial camera is used to capture the clean area image of the eggshell surface in real time, the image processing module is used to quantify the cleaning effect according to the clean area image to obtain real-time feedback data, the real-time feedback data includes at least one cleaning quality parameter of particle residual area percentage, particle size distribution, surface dust density and cleaning uniformity index; The control module is used to adjust the airflow parameters of the directional airflow cleaning module and the electrostatic strength of the electrostatic adsorption cleaning module according to the real-time feedback data of the optical detection feedback module.
3. The method according to claim 1, characterized in that The multispectral imaging system comprises: A light source module, comprising a multi-wavelength light source and an incident angle adjustment mechanism, wherein the light source module is installed above the sample stage and maintains a preset fixed distance from the eggshell surface, and the multi-wavelength light source adjusts the incident angle through the incident angle adjustment mechanism to ensure that the emitted light of a specified wavelength can evenly cover the eggshell surface; Imaging optical components, using zoom lenses to adjust focal length and field of view parameters; A spectrometer is used to decompose the composite spectrum reflected from the eggshell surface into monochromatic spectra of different wavelength channels corresponding to the blue light channel, the green light channel and the red light channel based on the principle of prism or grating; the reflected composite spectrum is the spectral feature of the incident spectrum after being reflected from the eggshell surface; The image sensor is specifically used to receive the monochromatic spectrum decomposed by the spectrometer, convert the optical signal corresponding to the monochromatic spectrum into digital image data, and record the spectral reflection data of the cleaned eggshell surface at each incident angle and each wavelength channel.
4. The method according to claim 3, characterized in that Step S20 specifically includes: S201: Initializing and calibrating parameters of the multi-spectral imaging system, including setting the wavelength range of the light source module, adjusting the intensity of the multi-wavelength light source, confirming the accuracy of the incident angle adjustment mechanism, calibrating the focal length and field of view of the imaging optical component, detecting the spectral decomposition accuracy of the spectrometer, and calibrating the sensitivity and signal-to-noise ratio of the image sensor; S202: Positioning and fixing the pretreated eggshell sample in the center of the sample stage, using a sample fixing fixture to press and limit the eggshell sample, ensuring that the surface of the eggshell sample is flat and does not shake, and the surface of the eggshell sample is perpendicular to the optical axis of the imaging optical component, and by adjusting the height and tilt angle of the sample stage, the surface of the eggshell sample is geometrically aligned with the incident light of the light source module and the optical axis of the imaging optical component; S203: adjusting the incident angle of the light source module in sequence according to a plurality of preset incident angles, emitting light of a specified wavelength, including blue light, green light and red light, to the surface of the eggshell through the multi-wavelength light source at each incident angle, and maintaining a preset distance between the light source module and the surface of the eggshell; S204: When the light of the specified wavelength emitted by the light source module irradiates the eggshell surface, the zoom lens built into the imaging optical component collects and focuses the composite spectrum reflected from the eggshell surface, and the zoom lens realizes imaging of the spectral reflection characteristics of the eggshell surface by adjusting the focal length and field of view parameters; wherein the imaging optical component is opposite to the light source module to form a preset angle; S205: Processing the collected composite spectrum through a spectrometer installed between the imaging optical component and the image sensor, wherein the spectrometer decomposes the composite spectrum into independent monochromatic spectra including blue light, green light and red light based on the principle of prism or grating, and the image sensor converts the optical signals corresponding to the decomposed monochromatic spectra into digital image data for recording the reflected spectrum intensity information under each incident angle and wavelength channel; S206: Integrate the reflection spectrum intensity data at each incident angle and each wavelength channel to construct a three-dimensional spectrum data matrix including incident angles, wavelength channels and reflection spectrum intensity values, wherein the three-dimensional spectrum data matrix is a standardized representation of the eggshell surface spectral reflectance data.
5. The method according to claim 4, characterized in that Include at least one of the following: The light source module and the imaging optical component are arranged at an angle of 45°, and the optical axis of the imaging optical component forms an angle of 45° with the incident light; The wavelength range of the light source module is 400-700nm; The multiple incident angles of the light source module include: 0°, 15°, 30°, 45°, 60°, and 75°; The distance between the light source module and the eggshell surface is maintained at 5-10 cm; The image sensor includes: a CCD image sensor or a CMOS image sensor; The three-dimensional spectrum data matrix includes: incident angle information, wavelength channel information, and corresponding reflection spectrum intensity values.
6. The method according to claim 1, characterized in that Step S30 specifically includes: S301: preprocessing the original spectral reflectance data of multiple incident angles and multiple wavelengths to obtain a three-dimensional spectral reflectance data matrix after denoising and standardization transformation, wherein the preprocessing includes denoising and standardization transformation; S302: performing discrete wavelet transform multi-scale decomposition on the three-dimensional spectral reflectance data matrix to obtain a wavelet coefficient matrix; S303: performing principal component analysis on the wavelet coefficient matrix after the discrete wavelet transform, identifying and retaining the principal component with the largest explained variance through a cumulative variance contribution rate threshold; S304: reconstructing a spectral reflectance curve using a spline interpolation method, and calculating target spectral parameters based on the reconstructed spectral reflectance curve; S305: constructing a multi-dimensional eggshell color feature vector by integrating the wavelet coefficient matrix, the principal component, and the target spectral parameter.
7. The method according to claim 6, characterized in that The standardized transformation includes normalization or Z-score transformation; The principal component analysis compresses high-dimensional spectral data to 20-30 dimensions; The target spectral parameters include at least one of the following: average reflectance, reflectance standard deviation, peak reflectance, spectral curve entropy, and spectral asymmetry index; Step S305 specifically includes: normalizing the wavelet coefficient matrix, the principal component and the target spectral parameters, and integrating the normalized wavelet coefficient matrix, the principal component and the target spectral parameters into a 20-30 dimensional eggshell color feature vector through a weighted fusion method, wherein the weighted fusion determines the weight coefficient based on the information entropy and discrimination corresponding to the wavelet coefficient matrix, the principal component and the target spectral parameters respectively.
8. The method according to claim 1, characterized in that Also includes: S50: obtaining a description of eggshell color characteristics through a spectral analysis algorithm according to the spectral reflectance data of the eggshell surface; S60: Generate an eggshell surface color quality assessment report according to the eggshell color quality grade and the eggshell color feature description.
9. The method according to claim 1, characterized in that: The method further comprises the steps of: S71: Collect spectral reflectance data of cleaned eggshell surfaces of multiple varieties, multiple breeding environments, and multiple growth stages through a multispectral imaging system, and establish an eggshell color quality standard database including eggshell color feature vectors and corresponding eggshell surface color quality grade labels; S72: preprocessing the feature vectors in the eggshell color quality standard database, wherein the preprocessing includes missing value processing, outlier detection processing, feature standardization processing and feature dimension reduction processing to obtain a normalized feature matrix; S73: Using the normalized feature matrix as training data, selecting a radial basis kernel function, and constructing and tuning an eggshell color quality assessment model through a grid search and cross-validation method to ensure that the model can be directly applied to the spectral reflectance data of the eggshell surface after cleaning.
10. A system for evaluating the color quality of eggshell surface based on color reflection, characterized in that: include: An eggshell surface multimodal collaborative cleaning system is used to clean the eggshell surface to obtain a cleaned eggshell surface; A multispectral imaging system is used to capture the spectral characteristics of the eggshell surface after cleaning and obtain spectral reflectance data of the eggshell surface after cleaning; The computer device is used to extract features and reduce the dimension of the spectral reflectance data of the eggshell surface to obtain a multi-dimensional eggshell color feature vector; and obtain the eggshell surface color quality grade according to the multi-dimensional eggshell color feature vector and a trained eggshell color quality assessment model.
Citation Information
Patent Citations
A novel color based optical grading system with multi reflectance and multi-angle views
CN107614127A
Egg sorting device
CN113207752A
Breeding poultry egg laying and breeding character collecting method and device based on machine vision and medium
CN115761340A
Water quality monitoring method and system based on remote sensing data
CN118777222A
Method and apparatus for inspecting the surface condition of egg shells
EP1221613A2
Cited By
Egg quality identification method and device based on optical spectrum and computer
CN120043975A
Colored spun yarn color characterization method fusing spatial features
CN120655737A
A color representation method of color spun yarn fusing spatial features
CN120655737B
Egg shell crack detection method and system based on convolutional neural network
CN121207991A