[go: up one dir, main page]

CN116930176A - Method and system for detecting sex of early embryo of chicken hatching eggs based on hyperspectral technology - Google Patents

Method and system for detecting sex of early embryo of chicken hatching eggs based on hyperspectral technology Download PDF

Info

Publication number
CN116930176A
CN116930176A CN202210376721.7A CN202210376721A CN116930176A CN 116930176 A CN116930176 A CN 116930176A CN 202210376721 A CN202210376721 A CN 202210376721A CN 116930176 A CN116930176 A CN 116930176A
Authority
CN
China
Prior art keywords
chicken
hyperspectral
chicken hatching
gender
eggs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210376721.7A
Other languages
Chinese (zh)
Inventor
屠康
宋科
杨崇龙
石永宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Agricultural University
Original Assignee
Nanjing Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Agricultural University filed Critical Nanjing Agricultural University
Priority to CN202210376721.7A priority Critical patent/CN116930176A/en
Publication of CN116930176A publication Critical patent/CN116930176A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/27Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands using photo-electric detection ; circuits for computing concentration

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention discloses a prediction method and a prediction system for detecting the sex of early embryo of chicken hatching eggs based on a hyperspectral imaging system. The prediction method comprises the following steps: collecting hyperspectral transmission images of the big head parts of the 0-14d chicken hatching eggs during incubation by using a hyperspectral imaging system, and then correcting and extracting spectral data information; establishing a 0-14d chicken hatching egg embryo sex discrimination model, comparing model discrimination rates under different incubation days, and determining the optimal detection days; the optimal hyperspectral pretreatment method of the chicken hatching egg embryo is selected through analyzing four different pretreatment algorithms; on the basis, screening characteristic wave bands, and constructing an optimal model for judging the sex of the chicken hatching egg embryos; and finally, identifying the sex of the chicken hatching egg embryo by using the constructed model. The invention can realize nondestructive and effective detection of chicken hatching egg embryos, has early discrimination time and high detection speed, thereby providing important basis for judging the sex of chicken hatching eggs in a hatchery, solving the problem of animal ethics and reducing the economic loss of the hatchery.

Description

一种基于高光谱技术检测鸡种蛋早期胚胎性别的方法及系统A method and system for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology

技术领域Technical field

本发明涉及的是高光谱无损检测领域,具体涉及一种基于高光谱技术检测鸡种蛋早期胚胎性别的方法及系统。The invention relates to the field of hyperspectral non-destructive detection, and specifically relates to a method and system for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology.

背景技术Background technique

我国禽蛋产量居世界第一,鸡种蛋作为禽蛋中的一个分支,其胚胎性别的鉴定是影响后期生产效益的重要方面。如在肉鸡生产中,希望孵出雄性雏鸡,因其饲料转化率高,生长速度更快,可以生产更多的肉。而在蛋鸡生产中,却希望孵出雌性雏鸡多,雄雏一般刚出生就会被处理,每年全球有超过70亿日龄雄雏被二氧化碳窒息或浸渍扑杀,引发严重的动物伦理问题并导致重大经济损失。因此,从商业和伦理(动物福利)的角度来看,孵化期间的早期鸡胚性别鉴定是一个至关重要的问题。如果在胚胎发育过程中可以鉴别胚胎的性别不仅解决了动物福利问题,更可以节约孵化时的花费以及节约废雏的处理费用。my country's poultry egg production ranks first in the world. As a branch of poultry eggs, the identification of embryonic sex is an important aspect that affects later production efficiency. For example, in broiler production, it is hoped to hatch male chicks, which can produce more meat due to their high feed conversion rate and faster growth rate. However, in the production of laying hens, more female chicks are expected to be hatched, and male chicks are usually disposed of right after birth. Every year, more than 7 billion day-old male chicks are suffocated or soaked in carbon dioxide and culled globally, causing serious animal ethics issues and resulting in significant economic losses. Therefore, early sexing of chicken embryos during incubation is a crucial issue from a commercial and ethical (animal welfare) perspective. If the gender of the embryo can be identified during embryonic development, it will not only solve the animal welfare problem, but also save the cost of hatching and the cost of disposal of waste chicks.

目前,我国禽蛋产业对于鸡种蛋孵化,特别是性别检测通常是在孵化出鸡雏后人工检测,主要的方法有翻肛法、羽速法和羽色法。翻肛法需要专业人员进行检测,耗时耗力,且容易对幼雏造成一定的损伤;羽色法及羽速法只针对一些专有品种的检测,局限性较大;高光谱图像检测技术具有同时检测光谱和图像以及无损检测的优点,获取样品的图像以及光谱信息。目前,在水果、蔬菜以及肉类等品质检测方面,高光谱技术已经得到广泛应用。然而,利用高光谱技术检测鸡种蛋胚胎性别的研究实属罕见。At present, my country's poultry and egg industry usually performs manual testing on the hatching of chicken eggs, especially the gender detection after the chicks are hatched. The main methods include the anus turning method, the feather speed method and the feather color method. The anal turning method requires professionals to perform detection, which is time-consuming and labor-intensive, and can easily cause certain damage to the chicks; the feather color method and the feather speed method are only for the detection of some proprietary species, and have great limitations; hyperspectral image detection technology It has the advantages of simultaneous detection of spectra and images and non-destructive testing, and obtains images and spectral information of the sample. At present, hyperspectral technology has been widely used in quality inspection of fruits, vegetables and meat. However, studies using hyperspectral technology to detect the gender of chicken egg embryos are rare.

发明内容Contents of the invention

为了解决上述问题,本发明提供了一种基于高光谱技术检测鸡种蛋早期胚胎性别的方法及系统,可以快速、准确、无损检测鸡种蛋胚胎性别,以满足鸡种蛋胚胎性别鉴定实现在线检测的需求。In order to solve the above problems, the present invention provides a method and system for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology, which can quickly, accurately and non-destructively detect the gender of chicken hatching egg embryos to meet the needs of online detection for gender identification of chicken hatching eggs. .

为实现上述目的,本发明提供了以下方案:In order to achieve the above objects, the present invention provides the following solutions:

本发明提出一种基于高光谱技术检测鸡种蛋早期胚胎性别的方法及系统,包括以下步骤:The present invention proposes a method and system for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology, which includes the following steps:

步骤,选取大小一致,蛋壳无裂痕的鸡种蛋入孵;Steps: Select chicken eggs of the same size and with no cracks in the shell for incubation;

步骤二,采集0-14d鸡种蛋大头部位高光谱透射图像;对采集到的高光谱图像进行校正,得到标准图像;Step 2: Collect hyperspectral transmission images of the large heads of 0-14d hen eggs; correct the collected hyperspectral images to obtain standard images;

步骤三,提取高光谱图像的光谱信息,建立0-14d的鸡种蛋胚胎性别判别模型;确定最佳的检测天数;Step 3: Extract the spectral information of the hyperspectral image and establish a gender discrimination model for 0-14d chicken egg embryos; determine the optimal number of days for detection;

步骤四,在步骤三的基础上。通过分析四种不同的预处理算法,选出最佳的鸡种蛋胚胎高光谱预处理方法;Step four is based on step three. By analyzing four different pre-processing algorithms, the best hyperspectral pre-processing method for chicken egg embryos was selected;

步骤五,在步骤四的基础上,进一步筛选特征波长,优化模型,建立特征波长所对应的高光谱数据的胚胎性别判别模型;Step 5: Based on Step 4, further screen the characteristic wavelengths, optimize the model, and establish an embryonic gender discrimination model for hyperspectral data corresponding to the characteristic wavelengths;

步骤六,利用建立的种蛋胚胎性别判别模型对种蛋胚胎性别进行检测。Step 6: Use the established hatching egg embryo gender discrimination model to detect the hatching egg embryo gender.

孵化箱的孵化温度为37.8℃,相对湿度为65%;每两小时自动翻蛋一次。The incubation temperature of the incubator is 37.8°C and the relative humidity is 65%; the eggs are automatically turned over every two hours.

种蛋高光谱图像采集方式为线扫描方式;The hyperspectral image collection method of hatching eggs is line scanning;

图像分辨率为440*804,曝光时间为72ms,采集速度为1.5mm/s,光源强度为255W。The image resolution is 440*804, the exposure time is 72ms, the acquisition speed is 1.5mm/s, and the light source intensity is 255W.

使用MatlabR2010b软件提取光谱数据并分析。选用鸡种蛋大头部位在689nm波长处的灰度图像为掩膜特征图像,进行二值化阈值分割和背景去除,统计样本总的像素点个数和有效光谱值总和,提取每个样本的平均光谱值,经归一化得到相对透射率用于后续数据处理和分析。Spectral data were extracted and analyzed using MatlabR2010b software. Select the grayscale image of the bulk part of the chicken hatching egg at a wavelength of 689nm as the mask feature image, perform binary threshold segmentation and background removal, count the total number of pixels and the sum of effective spectral values of the sample, and extract the average spectrum of each sample value, and the relative transmittance is obtained after normalization for subsequent data processing and analysis.

判别模型有偏最小二乘判别分析(partial least squares-discriminantanalysis,PLS-DA)和支持向量机(support vector machine,SVM)优化模型Discriminant model partial least squares-discriminant analysis (PLS-DA) and support vector machine (SVM) optimization model

预处理方法有自动标准化(Autoscale)、变量标准化(standard normalizedvariate,SNV)、多元散射校正(multiplicative scatter correction,MSC)和一阶导数(The first derivative,1-st)。Preprocessing methods include automatic standardization (Autoscale), variable standardization (standard normalizedvariate, SNV), multiplicative scatter correction (MSC) and the first derivative (The first derivative, 1-st).

特征波长筛选方法有连续投影算法(SPA)、竞争性自适应重加权算法(CARS)。Feature wavelength screening methods include continuous projection algorithm (SPA) and competitive adaptive reweighting algorithm (CARS).

本发明还提供了一种基于高光谱技术检测鸡种蛋早期胚胎性别的系统,包括:图像获取模块:用来采集鸡种蛋大头部位的高光谱图像;图像校正模块:用来消除光源强度不均、相机暗电流等产生的对光谱信息的影响;光谱信息提取模块:用来提取鸡种蛋大头部位的各个像素点的高光谱数据;预处理方法处理模块:用来消除或减弱原始光谱中噪音、基线漂移、背景颜色以及吸收峰重叠等冗余信息对光谱信息的影响,获取更有效的光谱信息和高精度以及稳定的模型;特征波长提取模块;用来提取高光谱数据中的特征波长优化模型。训练模块:用于高光谱数据对偏最小二乘判别分析和支持向量机模型进行训练,得到鸡种蛋胚胎性别的鉴定模型;判别模块:用于所述的鸡种蛋胚胎性别的鉴定模型对鸡种蛋胚胎性别进行判别。The invention also provides a system for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology, including: an image acquisition module: used to collect hyperspectral images of the large head of chicken hatching eggs; an image correction module: used to eliminate uneven light source intensity, The impact on spectral information caused by camera dark current; spectral information extraction module: used to extract hyperspectral data of each pixel in the large head of hen eggs; preprocessing method processing module: used to eliminate or weaken the noise and baseline in the original spectrum The influence of redundant information such as drift, background color and absorption peak overlap on spectral information, to obtain more effective spectral information and high-precision and stable models; characteristic wavelength extraction module; used to extract characteristic wavelength optimization models in hyperspectral data. Training module: used to train partial least squares discriminant analysis and support vector machine models with hyperspectral data to obtain an identification model for the gender of chicken hatching egg embryos; Discrimination module: used for the identification model of the gender of chicken hatching egg embryos to identify chicken hatching eggs The gender of the embryo is determined.

根据本发明提供的具体实施例,本发明公开了以下技术效果:According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

本发明将高光谱成像技术应用于鸡种蛋孵化早期胚胎性别的检测中,并结合计算机算法等能够实现快速、准确、无损的鸡种蛋胚胎性别的检测,为孵化场的鸡种蛋早期胚胎性别检测提供帮助。The present invention applies hyperspectral imaging technology to the detection of the gender of early embryos in hatching chicken eggs, and combines it with computer algorithms to achieve fast, accurate, and non-destructive detection of the gender of chicken hatching embryos, and provides information for early embryo gender detection of chicken hatching eggs in hatcheries. help.

附图说明Description of the drawings

图1为一种基于高光谱技术检测鸡种蛋早期胚胎性别的方法的流程图。Figure 1 is a flow chart of a method for detecting the gender of early embryos in chicken hatching eggs based on hyperspectral technology.

图2为鸡种蛋大头部位高光谱图像的平均高光谱数据提取过程。Figure 2 shows the average hyperspectral data extraction process of hyperspectral images of the bulk part of chicken hatching eggs.

图3为应用SPA算法对鸡种蛋大头部位的高光谱数据提取的特征波长。Figure 3 shows the characteristic wavelengths extracted from hyperspectral data of the bulk part of chicken hatching eggs using the SPA algorithm.

图4为400~1000nm波段范围CARS算法变量筛选流程。Figure 4 shows the variable screening process of the CARS algorithm in the 400-1000nm band range.

具体实施方式Detailed ways

结合以下具体实例对本发明的技术方案作进一步详细的说明。The technical solution of the present invention will be further described in detail with reference to the following specific examples.

本发明的目的是提供一种基于高光谱技术检测鸡种蛋早期胚胎性别的方法及系统,可以快速、准确、无损检测鸡种蛋胚胎性别,以满足鸡种蛋胚胎性别鉴定实现在线检测的需求。The purpose of the present invention is to provide a method and system for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology, which can quickly, accurately and non-destructively detect the gender of chicken hatching egg embryos to meet the needs of online detection for gender identification of chicken hatching eggs.

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.

如图1所示,本发明提供的一种基于高光谱技术检测鸡种蛋早期胚胎性别的方法,包括以下步骤:As shown in Figure 1, the present invention provides a method for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology, including the following steps:

步骤一,选取大小一致,蛋壳无裂痕的鸡种蛋入孵;Step 1: Select chicken eggs of the same size and with no cracks in the shell for incubation;

步骤二,采集0-14d鸡种蛋大头部位高光谱透射图像;对采集到的高光谱图像进行校正,得到标准图像;Step 2: Collect hyperspectral transmission images of the large heads of 0-14d hen eggs; correct the collected hyperspectral images to obtain standard images;

步骤三,提取高光谱图像的光谱信息,建立0-14d的鸡种蛋胚胎性别判别模型;确定最佳的检测天数;Step 3: Extract the spectral information of the hyperspectral image and establish a gender discrimination model for 0-14d chicken egg embryos; determine the optimal number of days for detection;

步骤四,在步骤三的基础上。通过分析四种不同的预处理算法,选出最佳的鸡种蛋胚胎高光谱预处理方法;Step four is based on step three. By analyzing four different pre-processing algorithms, the best hyperspectral pre-processing method for chicken egg embryos was selected;

步骤五,在步骤四的基础上,进一步筛选特征波长,优化模型,建立特征波长所对应的高光谱数据的胚胎性别判别模型;Step 5: Based on Step 4, further screen the characteristic wavelengths, optimize the model, and establish an embryonic gender discrimination model for hyperspectral data corresponding to the characteristic wavelengths;

步骤六,利用建立的鸡种蛋胚胎性别判别模型对种蛋胚胎性别进行检测。Step 6: Use the established chicken egg embryo gender discrimination model to detect the gender of the egg embryo.

其中,步骤一具体包括:Among them, step one specifically includes:

选取大小一致,蛋壳无裂痕的鸡种蛋。经过75%酒精擦拭消毒晾干后放入孵化箱中开始孵化,孵化箱温度37.8℃,相对湿度65%,孵化箱每过两小时自动翻蛋一次。Select chicken eggs that are uniform in size and have no cracks in the shell. After wiping, disinfecting and drying with 75% alcohol, place them in an incubator to start incubation. The temperature of the incubator is 37.8°C and the relative humidity is 65%. The incubator automatically turns the eggs every two hours.

其中,步骤二具体包括:Among them, step two specifically includes:

(1)鸡种蛋摆放方式为大头竖直向上,小头朝下,其光源位于样品正下方,相机镜头位于样品正上方,距离样品30.0cm。(1) The hen eggs are placed with the big head upright and the small head down. The light source is located directly below the sample, and the camera lens is located directly above the sample, 30.0cm away from the sample.

(2)经过预实验,最终确定图像分辨率为440*804,曝光时间为72ms,采集速度为1.5mm/s,光源强度为255W。(2) After preliminary experiments, it was finally determined that the image resolution is 440*804, the exposure time is 72ms, the acquisition speed is 1.5mm/s, and the light source intensity is 255W.

(3)高光谱图像的采集:利用高光谱成像仪,利用线扫描的方式采集鸡种蛋大头部位高光谱透射图像。(3) Collection of hyperspectral images: Use a hyperspectral imager to collect hyperspectral transmission images of the large head of chicken eggs using line scanning.

(4)高光谱图像的校正:对高光谱图像进行校正,利用下列公式对采集的鸡种蛋大头部位的高光谱图像进行校正,(4) Correction of hyperspectral images: Calibrate the hyperspectral images and use the following formula to correct the hyperspectral images of the large heads of chicken hatching eggs collected.

式中:R为校正后的高光谱图像;R0为原始图像;B为全黑透射图像:W为全白透射图像。In the formula: R is the corrected hyperspectral image; R0 is the original image; B is the all-black transmission image: W is the all-white transmission image.

其中,步骤三具体包括:Among them, step three specifically includes:

(1)高光谱图像光谱信息的提取:使用MatlabR2010b软件提取光谱数据并分析。选用鸡种蛋大头部位在689nm波长处的灰度图像为掩膜特征图像,进行二值化阈值分割和背景去除,统计样本总的像素点个数和有效光谱值总和,提取每个样本的平均光谱值,经归一化得到相对透射率用于后续数据处理和分析(图2)。(1) Extraction of spectral information from hyperspectral images: Use MatlabR2010b software to extract spectral data and analyze it. Select the grayscale image of the bulk part of the chicken hatching egg at a wavelength of 689nm as the mask feature image, perform binary threshold segmentation and background removal, count the total number of pixels and the sum of effective spectral values of the sample, and extract the average spectrum of each sample value, and the relative transmittance is obtained after normalization for subsequent data processing and analysis (Figure 2).

(2)建立0-14d的鸡种蛋胚胎性别判别模型:判别模型有偏最小二乘判别分析(partial least squares-discriminant analysis,PLS-DA)和支持向量机(supportvector machine,SVM)优化模型。建立模型时,将所有数据集分为训练集和测试集,其比例为2∶1。通过建模集和预测集的判别正确率对模型进行评价。建立鸡种蛋孵化0-14d的PLS-DA和SVM胚胎性别鉴定模型,比较不同孵化天数下的模型判别准确率,结果显示在第9d的基于PLS-DA和SVM胚胎性别鉴定模型准确率达到最高,分别为80.00%和82.50%。(2) Establish a gender discrimination model for 0-14d chicken hatching egg embryos: the discrimination model includes partial least squares-discriminant analysis (PLS-DA) and support vector machine (SVM) optimization models. When building the model, all data sets are divided into training sets and test sets, with a ratio of 2:1. The model is evaluated through the discrimination accuracy of the modeling set and prediction set. Establish PLS-DA and SVM embryo sex identification models for chicken hatching eggs from 0 to 14 days incubation, and compare the model identification accuracy under different incubation days. The results show that the accuracy of the embryo sex identification model based on PLS-DA and SVM reaches the highest on the 9th day. 80.00% and 82.50% respectively.

其中,步骤四具体包括:Among them, step four specifically includes:

通过分析四种不同的预处理算法,分别为自动标准化(Autoscale)、变量标准化(standard normalized variate,SNV)、多元散射校正(multiplicative scattercorrection,MSC)和一阶导数(The first dcrivative,1-st)。结果为采用SNV预处理后建立的PLS-DA模型最优。By analyzing four different preprocessing algorithms, they are Autoscale, standard normalized variate (SNV), multiplicative scatter correction (MSC) and the first derivative (The first dcrivative, 1-st). . The result is that the PLS-DA model established after SNV preprocessing is optimal.

其中,步骤五具体包括:Among them, step five specifically includes:

(1)基于SPA算法提取特征波长:SPA是一种前向循环选择特征波段的算法,主要是用于消除原始光谱数据间的共线性,筛选出特征波段,防止数据出现交叉和重叠,简化模型。根据SPA算法得出的RMSE值大小作为挑选特征变量的依据,在400~1000nm波段,共筛选出9个特征波长分别为:400、416、700、730、808、853、903、923、935nm(图3)。(1) Extract characteristic wavelengths based on SPA algorithm: SPA is a forward loop algorithm for selecting characteristic bands. It is mainly used to eliminate collinearity between original spectral data, screen out characteristic bands, prevent data from crossing and overlapping, and simplify the model. . According to the RMSE value obtained by the SPA algorithm as the basis for selecting characteristic variables, in the 400-1000nm band, a total of 9 characteristic wavelengths were screened out: 400, 416, 700, 730, 808, 853, 903, 923, 935nm ( image 3).

(2)基于CARS算法提取特征波长:CARS算法由多次重复筛选得到一系列的波长变量子集,得到的最优特征波长组合交叉验证均方根误差(RMSECV)最小。图4为400~1000nm波段下,CARS算法筛选特征变量过程。蒙特卡罗采样次数为50,随着采样次数增加,所选择特征波长数量减少,RMSECV先减小后缓慢增加。在第30次采样时,RMSECV最小,说明在前29次采样中剔除了与雄雌无关的波长变量,而在后21次采样中可能剔除了与雄雌信息相关的关键变量,RMSECV最小时得到的18个特征波长分别为663、668、669、671、674、676、679、698、700、701、703、704、705、707、708、710、711、713nm。(2) Extract characteristic wavelengths based on the CARS algorithm: The CARS algorithm obtains a series of wavelength variable subsets through multiple repeated screenings, and the optimal characteristic wavelength combination obtained has the smallest cross-validation root mean square error (RMSECV). Figure 4 shows the process of screening characteristic variables by the CARS algorithm in the 400-1000nm band. The number of Monte Carlo sampling is 50. As the number of sampling increases, the number of selected characteristic wavelengths decreases, and the RMSECV first decreases and then slowly increases. At the 30th sampling time, RMSECV is the smallest, indicating that wavelength variables unrelated to male and female information have been eliminated in the first 29 sampling times, while key variables related to male and female information may have been eliminated in the last 21 sampling times. When RMSECV is the smallest, we get The 18 characteristic wavelengths are 663, 668, 669, 671, 674, 676, 679, 698, 700, 701, 703, 704, 705, 707, 708, 710, 711, 713nm.

(3)提取上述经过SPA、CARS算法提取出的特征波长所对应的高光谱数据,分别输入PLSDA模型,经过训练得到鸡种蛋早期胚胎性别检测模型。结果显示,基于SPA算法特征波长预测模型的建模集、预测集准确率分别为91.25%和82.50%;基于CARS算法特征波长预测模型的建模集、预测集准确率分别为81.25%和72.50%。结果表明,应用鸡种蛋大头部位的高光谱数据提取特征波长,并构建鸡种蛋早期胚胎性别检测模型,可以实现鸡种蛋胚胎性别的快速、准确、无损检测。(3) Extract the hyperspectral data corresponding to the characteristic wavelengths extracted by the SPA and CARS algorithms, input them into the PLSDA model respectively, and obtain the early embryo gender detection model of chicken hatching eggs after training. The results show that the accuracy rates of the modeling set and prediction set based on the characteristic wavelength prediction model of the SPA algorithm are 91.25% and 82.50% respectively; the accuracy rates of the modeling set and prediction set based on the characteristic wavelength prediction model of the CARS algorithm are 81.25% and 72.50% respectively. . The results show that rapid, accurate, and non-destructive detection of the embryonic gender of chicken hatching eggs can be achieved by using hyperspectral data from the bulk head of chicken hatching eggs to extract characteristic wavelengths and constructing an early embryonic gender detection model for chicken hatching eggs.

本发明是一种基于高光谱技术来检测鸡种蛋早期的胚胎性别,进而解决动物福利问题、减少孵化场经济损失的方法。传统的鸡种蛋性别检测依赖于人工手段、经验判断,容易出现误判的情况,且需要在孵化结束后检测,检测效率低;还会引发严重的动物伦理问题。因此,本发明将高光谱成像技术结合计算机算法的方法应用于鸡种蛋早期胚胎性别的检测,来提高孵化场的经济效率。The invention is a method based on hyperspectral technology to detect the early embryonic gender of chicken eggs, thereby solving animal welfare problems and reducing hatchery economic losses. Traditional gender detection of chicken hatching eggs relies on manual means and empirical judgment, which is prone to misjudgment, and needs to be tested after incubation, which results in low detection efficiency; it also causes serious animal ethics issues. Therefore, the present invention applies hyperspectral imaging technology combined with computer algorithm to detect the gender of early embryos in chicken hatching eggs to improve the economic efficiency of the hatchery.

以上实施例仅用以说明本发明的技术方案,而非对其进行限制;尽管参照前述实施例对本发明进行了详细的说明,对于本领域的普通技术人员来说,依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或替换,并不使相应技术方案的本质脱离本发明所要求保护的技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art can still make modifications to the foregoing embodiments. Modifications are made to the recorded technical solutions, or equivalent substitutions are made to some of the technical features; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions claimed by the present invention.

Claims (7)

1.一种基于高光谱技术检测鸡种蛋早期胚胎性别的方法,其特征在于,包括以下步骤:1. A method for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology, which is characterized by including the following steps: 步骤一,选取大小一致,蛋壳无裂痕的鸡种蛋入孵;Step 1: Select chicken eggs of the same size and with no cracks in the shell for incubation; 步骤二,采集0-14d鸡种蛋大头部位高光谱透射图像;对采集到的高光谱图像进行校正,得到标准图像;Step 2: Collect hyperspectral transmission images of the large heads of 0-14d hen eggs; correct the collected hyperspectral images to obtain standard images; 步骤三,提取高光谱图像的光谱信息,建立0-14d的鸡种蛋胚胎性别判别模型;确定最佳的检测天数;Step 3: Extract the spectral information of the hyperspectral image and establish a gender discrimination model for 0-14d chicken egg embryos; determine the optimal number of days for detection; 步骤四,在步骤三的基础上。通过分析四种不同的预处理算法,选出最佳的鸡种蛋胚胎高光谱预处理方法;Step four is based on step three. By analyzing four different pre-processing algorithms, the best hyperspectral pre-processing method for chicken egg embryos was selected; 步骤五,在步骤四的基础上,进一步筛选特征波长,优化模型,建立特征波长所对应的高光谱数据的胚胎性别判别模型;Step 5: Based on Step 4, further screen the characteristic wavelengths, optimize the model, and establish an embryonic gender discrimination model for hyperspectral data corresponding to the characteristic wavelengths; 步骤六,利用建立的鸡种蛋胚胎性别判别模型对种蛋胚胎性别进行检测。Step 6: Use the established chicken egg embryo gender discrimination model to detect the gender of the egg embryo. 2.根据权利要求1所要求的鸡种蛋早期胚胎性别判别方法,其特征在于:所述步骤一中的孵化箱的孵化温度为37.8℃,相对湿度为65%;每两小时自动翻蛋一次。2. The method for identifying the sex of early embryos of chicken hatching eggs according to claim 1, characterized in that: the incubation temperature of the incubator in step one is 37.8°C and the relative humidity is 65%; the eggs are automatically turned over every two hours. 3.根据权利要求1所要求的鸡种蛋早期胚胎性别判别方法,其特征在于:所属步骤二中鸡种蛋高光谱图像采集方式为线扫描方式;图像分辨率为440*804,曝光时间为72ms,采集速度为1.5mm/s,光源强度为255W。3. The method for identifying the sex of early embryos of chicken hatching eggs according to claim 1, characterized in that: in step two, the hyperspectral image acquisition method of chicken hatching eggs is a line scan method; the image resolution is 440*804, and the exposure time is 72ms. The collection speed is 1.5mm/s, and the light source intensity is 255W. 4.根据权利要求1所要求的鸡种蛋早期胚胎性别判别方法,其特征在于:所属步骤三使用MatlabR2010b软件提取光谱数据并分析。选用鸡种蛋大头部位在689nm波长处的灰度图像为掩膜特征图像,进行二值化阈值分割和背景去除,提取每个样本的平均光谱值,经归一化得到相对透射率用于后续数据处理和分析。判别模型有偏最小二乘判别分析(partialleast squares-discriminant analysis,PLS-DA)和支持向量机(support vectormachine,SVM)优化模型。4. The method for identifying the sex of early embryos of chicken hatching eggs according to claim 1, characterized in that: in step three, MatlabR2010b software is used to extract and analyze spectral data. The grayscale image of the bulk part of the chicken hatching egg at a wavelength of 689nm is selected as the mask feature image. Binary threshold segmentation and background removal are performed. The average spectral value of each sample is extracted. After normalization, the relative transmittance is obtained for subsequent data. processing and analysis. The discriminant model includes partial least squares-discriminant analysis (PLS-DA) and support vector machine (SVM) optimization models. 5.根据权利要求1所要求的鸡种蛋早期胚胎性别判别方法,其特征在于:所属步骤四中的预处理方法有自动标准化(Autoscale)、变量标准化(standard normalized variate,SNV)、多元散射校正(multiplicative scatter correction,MSC)和一阶导数(The firstderivative,1-st)。5. The method for gender discrimination of early embryos of chicken hatching eggs as claimed in claim 1, characterized in that: the preprocessing methods in step four include automatic standardization (Autoscale), variable standardization (standard normalized variate, SNV), multivariate scattering correction ( multiplicative scatter correction (MSC) and the first derivative (The firstderivative, 1-st). 6.根据权利要求1所要求的鸡种蛋早期胚胎性别判别方法,其特征在于:所述步骤五中的特征波长筛选方法有连续投影算法(SPA)、竞争性自适应重加权算法(CARS)。6. The early embryo gender discrimination method for chicken hatching eggs according to claim 1, characterized in that: the characteristic wavelength screening method in step five includes continuous projection algorithm (SPA) and competitive adaptive reweighting algorithm (CARS). 7.一种基于高光谱技术检测鸡种蛋早期胚胎性别的系统,其特征在于,包括:图像获取模块:用来采集鸡种蛋大头部位的高光谱图像;图像校正模块:用来消除光源强度不均、相机暗电流等产生的对光谱信息的影响;光谱信息提取模块:用来提取鸡种蛋大头部位的各个像素点的高光谱数据;预处理方法处理模块:用来消除或减弱原始光谱中噪音、基线漂移、背景颜色以及吸收峰重叠等冗余信息对光谱信息的影响,获取更有效的光谱信息和高精度以及稳定的模型;特征波长提取模块:用来提取高光谱数据中的特征波长优化模型。训练模块:用于高光谱数据对偏最小二乘判别分析和支持向量机模型进行训练,得到鸡种蛋胚胎性别的鉴定模型;判别模块:应用所述的鸡种蛋胚胎性别的鉴定模型对鸡种蛋胚胎性别进行判别。7. A system for detecting the gender of early embryos of chicken hatching eggs based on hyperspectral technology, which is characterized by including: an image acquisition module: used to collect hyperspectral images of the large head of chicken hatching eggs; an image correction module: used to eliminate uneven light source intensity , camera dark current, etc. on spectral information; spectral information extraction module: used to extract hyperspectral data of each pixel in the large head of hen eggs; preprocessing method processing module: used to eliminate or weaken the noise in the original spectrum, The impact of redundant information such as baseline drift, background color and absorption peak overlap on spectral information, to obtain more effective spectral information and high-precision and stable models; Feature wavelength extraction module: used to extract feature wavelength optimization models in hyperspectral data . Training module: Use hyperspectral data to train partial least squares discriminant analysis and support vector machine models to obtain a gender identification model for chicken hatching egg embryos; Discrimination module: Apply the described gender identification model for chicken hatching egg embryos to identify chicken hatching egg embryos Distinguish gender.
CN202210376721.7A 2022-04-11 2022-04-11 Method and system for detecting sex of early embryo of chicken hatching eggs based on hyperspectral technology Pending CN116930176A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210376721.7A CN116930176A (en) 2022-04-11 2022-04-11 Method and system for detecting sex of early embryo of chicken hatching eggs based on hyperspectral technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210376721.7A CN116930176A (en) 2022-04-11 2022-04-11 Method and system for detecting sex of early embryo of chicken hatching eggs based on hyperspectral technology

Publications (1)

Publication Number Publication Date
CN116930176A true CN116930176A (en) 2023-10-24

Family

ID=88381526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210376721.7A Pending CN116930176A (en) 2022-04-11 2022-04-11 Method and system for detecting sex of early embryo of chicken hatching eggs based on hyperspectral technology

Country Status (1)

Country Link
CN (1) CN116930176A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118470540A (en) * 2024-07-09 2024-08-09 南京星罗基因科技有限公司 Network model, construction method, and nondestructive identification method and system for gender of eggs
CN118465202A (en) * 2024-07-09 2024-08-09 南京星罗基因科技有限公司 An electronic device and a method for non-destructive identification of egg sex
CN119605695A (en) * 2025-02-12 2025-03-14 海南谷得维科技有限公司 Identification method for identifying gender of embryo in egg by non-contact spectrum

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118470540A (en) * 2024-07-09 2024-08-09 南京星罗基因科技有限公司 Network model, construction method, and nondestructive identification method and system for gender of eggs
CN118465202A (en) * 2024-07-09 2024-08-09 南京星罗基因科技有限公司 An electronic device and a method for non-destructive identification of egg sex
CN119605695A (en) * 2025-02-12 2025-03-14 海南谷得维科技有限公司 Identification method for identifying gender of embryo in egg by non-contact spectrum

Similar Documents

Publication Publication Date Title
CN116930176A (en) Method and system for detecting sex of early embryo of chicken hatching eggs based on hyperspectral technology
Dissing et al. Multispectral imaging for determination of astaxanthin concentration in salmonids
CN1995987A (en) Non-destructive detection method and device for agricultural and animal products based on hyperspectral image technology
Zhang et al. Comparison of spectral and image morphological analysis for egg early hatching property detection based on hyperspectral imaging
CN104316473A (en) Gender determination method for chicken hatching egg incubation early embryo based on hyperspectral image
US20130044210A1 (en) Hyperspectral identification of egg fertility and gender
Zhu et al. The identification of white fertile eggs prior to incubation based on machine vision and least square support vector machine
Zhihui et al. Nondestructive detection of infertile hatching eggs based on spectral and imaging information
Dong et al. Assessment of hatching properties for identifying multiple duck eggs on the hatching tray using machine vision technique
CN111380813B (en) A portable multi-quality non-destructive testing device and testing method for wheat seeds
US20240341286A1 (en) Method and device for non-destructive sorting of fertilization information of hatching eggs before incubation
Park et al. Line-scan imaging analysis for rapid viability evaluation of white-fertilized-egg embryos
Smith et al. Fertility and embryo development of broiler hatching eggs evaluated with a hyperspectral imaging and predictive modeling system
CN114136920A (en) A method for identification of single-grain hybrid rice seed species based on hyperspectral
CN116297236A (en) A method and device for identifying the vigor of single corn seeds based on hyperspectral
Ahmed et al. Hyperspectral image reconstruction for predicting chick embryo mortality towards advancing egg and hatchery industry
Zhu et al. Hatching eggs nondestructive detection based on hyperspectral-imaging information and RVM
Liu et al. AFF-YOLOX: An improved lightweight YOLOX network to detect early hatching information of duck eggs
AU2021402070B2 (en) Non-invasive method of determining properties of a chicken egg and/or properties of a chicken embryo inside the egg using near ir spectroscopy, respective system and uses thereof
Li et al. Interindividual distances and orientations of laying hens under 8 stocking densities measured by integrative deep learning techniques
CN107643255A (en) A method for non-destructive detection of dead embryo eggs in the middle and late stages of breeding eggs
CN118470540A (en) Network model, construction method, and nondestructive identification method and system for gender of eggs
CN117309776A (en) Raw chicken ingredient detection method based on hyperspectral and single-tag regression
Mindoro et al. Automatic Visual Detection of Fresh Poultry Egg Quality Inspection using Image Processing
Ahmed et al. Non-destructive detection of pre-incubated chicken egg fertility using hyperspectral imaging and machine learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination