CN105698693B - A kind of egg gas chamber diameter measuring method based on near-infrared laser image - Google Patents
A kind of egg gas chamber diameter measuring method based on near-infrared laser image Download PDFInfo
- Publication number
- CN105698693B CN105698693B CN201610180628.3A CN201610180628A CN105698693B CN 105698693 B CN105698693 B CN 105698693B CN 201610180628 A CN201610180628 A CN 201610180628A CN 105698693 B CN105698693 B CN 105698693B
- Authority
- CN
- China
- Prior art keywords
- egg
- image
- point
- air cell
- infrared laser
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 235000013601 eggs Nutrition 0.000 claims abstract description 79
- 239000002184 metal Substances 0.000 claims abstract description 19
- 230000011218 segmentation Effects 0.000 claims abstract description 7
- 238000003672 processing method Methods 0.000 claims abstract description 4
- CWYNVVGOOAEACU-UHFFFAOYSA-N Fe2+ Chemical compound [Fe+2] CWYNVVGOOAEACU-UHFFFAOYSA-N 0.000 claims abstract description 3
- 238000012821 model calculation Methods 0.000 claims description 8
- 230000003760 hair shine Effects 0.000 claims description 4
- 238000003384 imaging method Methods 0.000 claims description 4
- 238000005259 measurement Methods 0.000 claims description 2
- 238000009659 non-destructive testing Methods 0.000 abstract description 4
- 238000001514 detection method Methods 0.000 abstract description 2
- 238000000605 extraction Methods 0.000 abstract description 2
- 230000002902 bimodal effect Effects 0.000 abstract 1
- 230000007423 decrease Effects 0.000 description 2
- 210000003278 egg shell Anatomy 0.000 description 2
- 235000016709 nutrition Nutrition 0.000 description 2
- 239000011148 porous material Substances 0.000 description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 2
- 102000002322 Egg Proteins Human genes 0.000 description 1
- 108010000912 Egg Proteins Proteins 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 235000013305 food Nutrition 0.000 description 1
- 244000005700 microbiome Species 0.000 description 1
- 230000035764 nutrition Effects 0.000 description 1
- 238000002834 transmittance Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/08—Measuring arrangements characterised by the use of optical techniques for measuring diameters
- G01B11/12—Measuring arrangements characterised by the use of optical techniques for measuring diameters internal diameters
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/3563—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light for analysing solids; Preparation of samples therefor
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
- G01N21/359—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/95—Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
Landscapes
- Physics & Mathematics (AREA)
- Spectroscopy & Molecular Physics (AREA)
- General Physics & Mathematics (AREA)
- Biochemistry (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
本发明公开一种基于近红外激光图像的鸡蛋气室直径测量方法,属于计算机视觉无损检测领域。该方法提供了一种由红外激光器、黑色金属管、蛋托、近红外摄像头和暗箱组成的鸡蛋气室图像采集装置及相应气室图像采集方法,还提供了包含图像中值滤波、64阶灰度直方图提取、自动双峰法阈值分割、去除所有非最大面积的连通区域、计算气室二值图像面积的图像处理方法和计算鸡蛋气室直径的方法。该方法可以快速准确地测量鸡蛋的气室直径,为基于气室特征的鸡蛋新鲜度检测研究奠定了基础。The invention discloses a method for measuring the diameter of an egg air chamber based on a near-infrared laser image, which belongs to the field of computer vision nondestructive testing. The method provides an egg air chamber image acquisition device and a corresponding air chamber image acquisition method composed of an infrared laser, a ferrous metal tube, an egg tray, a near-infrared camera, and a dark box. Degree histogram extraction, automatic bimodal threshold segmentation, removal of all non-maximum area connected regions, image processing method to calculate air cell binary image area and method to calculate egg air cell diameter. This method can quickly and accurately measure the air cell diameter of eggs, which lays the foundation for the research on egg freshness detection based on air cell characteristics.
Description
技术领域:Technical field:
本发明属于计算机视觉无损检测领域,特别涉及一种基于近红外激光图像的鸡蛋气室直径测量方法。The invention belongs to the field of computer vision non-destructive testing, in particular to a method for measuring the diameter of an egg air chamber based on a near-infrared laser image.
背景技术:Background technique:
鸡蛋营养丰富、价格低廉,深受广大消费者的欢迎。随着贮藏时间的增长,鸡蛋新鲜度、营养价值和食用安全性都会逐渐降低。鸡蛋气室是鸡蛋排除母鸡体外后,其内容物由于温度降低收缩而在鸡蛋大头形成的中空区域。随着鸡蛋贮藏时间增长和新鲜度的下降,蛋内原有水分通过蛋壳气孔蒸发,部分内容物被微生物分解为CO2和水分通过气孔溢出,导致内容物进一步收缩,气室逐渐变大。气室大小是鸡蛋新鲜度无损检测中的重要参数,很多鸡蛋新鲜度无损检测的方法都采用气室大小作为主要评价指标。Eggs are rich in nutrition and low in price, and are very popular among consumers. As the storage time increases, the freshness, nutritional value and food safety of eggs will gradually decrease. The egg air cell is the hollow area formed in the large head of the egg after the egg is removed from the hen's body and its contents shrink due to cooling. As the egg storage time increases and the freshness decreases, the original water in the egg evaporates through the pores of the eggshell, and part of the contents are decomposed by microorganisms into CO 2 and the water overflows through the pores, resulting in further shrinkage of the contents and the gradual enlargement of the air cells. The size of the air cell is an important parameter in the non-destructive testing of egg freshness. Many methods of non-destructive testing of egg freshness use the size of the air cell as the main evaluation index.
气室高度是鸡蛋气室大小的评价目前常用指标,然而气室在鸡蛋大头端分布的不均匀性导致在不同的方向所观察到的气室高度差别较大,且气室高度测量易受相机拍摄角度的影响,测量的气室高度不能真实反应鸡蛋的气室大小。从鸡蛋大头端观察气室时,气室近似为圆形,相对而言,用气室的直径评价鸡蛋气室大小所受影响因素较小,更能客观地反应鸡蛋气室的大小,从而更准确地评价鸡蛋新鲜度。在气室被光源照亮的情况下,可以用笔描出鸡蛋气室的形状,再用游标卡尺测量其直径,但是由于鸡蛋个体差异较大,蛋壳透光性各不相同,实现鸡蛋气室直径自动检测较为困难,相应方法也未见报道。The air cell height is a commonly used index to evaluate the size of the egg air cell at present. However, the uneven distribution of the air cell at the large end of the egg leads to a large difference in the height of the air cell observed in different directions, and the measurement of the air cell height is easily affected by the camera. Due to the influence of the shooting angle, the measured air cell height cannot truly reflect the size of the air cell of the egg. When the air cell is observed from the big end of the egg, the air cell is approximately circular. Relatively speaking, using the diameter of the air cell to evaluate the size of the egg’s air cell is less affected, and it can more objectively reflect the size of the egg’s air cell. Accurately evaluate egg freshness. When the air cell is illuminated by the light source, you can use a pen to trace the shape of the egg air cell, and then use a vernier caliper to measure its diameter. However, due to the large differences between individual eggs and the light transmittance of eggshells, the diameter of the egg air cell can be realized. Automatic detection is relatively difficult, and the corresponding method has not been reported.
因此,建立能够自动无损检测鸡蛋气室的方法是目前本领域科研工作者需要解决的技术问题。Therefore, establishing a method capable of automatically non-destructively detecting egg air chambers is a technical problem that researchers in this field need to solve.
发明内容:Invention content:
本发明的目的是提供一种测量鸡蛋气室直径方法,该方法可以测量鸡蛋的气室直径。The purpose of the present invention is to provide a method for measuring the diameter of the air cell of an egg, which can measure the diameter of the air cell of the egg.
为解决上述问题,本发明提供了一种基于近红外激光图像的鸡蛋气室直径测量方法,测量步骤为先用近红外激光图像系统按照气室图像采集方法获取图像,再经过图像处理方法得到气室二值图像面积,最后利用模型计算方法得到鸡蛋气室直径,其特征在于:In order to solve the above problems, the present invention provides a method for measuring the diameter of the air cell of an egg based on a near-infrared laser image. The area of the chamber binary image, and finally use the model calculation method to obtain the diameter of the egg air chamber, which is characterized in that:
1)近红外激光图像系统,包含50mW 980nm圆形光斑近红外激光器(1)、黑色金属管(2)、蛋托(4)、近红外摄像头(5)和暗箱(6),其中,近红外激光器(1)与竖直方向夹角为30°;黑色金属管内径4mm,外径6mm连接在近红外激光器(1)的出光孔上,并平行于近红外激光器(1),使激光器射出的激光可以穿过黑色金属管(2),黑色金属管(2)末端为水平切口,切口周围粘贴一层环状黑绒布以防漏光;蛋托(4)位于黑色金属管水平切口下方5cm处,且可上下运动各5mm,以适应不同大小的鸡蛋(3);近红外摄像头(5)感光范围为800到1000nm,130万像素黑白近红外摄像头,焦距为20cm,位于鸡蛋(3)的正上方20cm处;暗箱(6)为不透光箱体,罩在装置外部,为图像采集提供暗环境,并为各部件提供支撑;1) A near-infrared laser imaging system, including a 50mW 980nm circular spot near-infrared laser (1), a ferrous metal tube (2), an egg tray (4), a near-infrared camera (5) and a dark box (6), in which the near-infrared The angle between the laser (1) and the vertical direction is 30°; the black metal tube with an inner diameter of 4 mm and an outer diameter of 6 mm is connected to the light exit hole of the near-infrared laser (1), and is parallel to the near-infrared laser (1), so that the laser emits The laser can pass through the black metal tube (2), and the end of the black metal tube (2) is a horizontal cut, and a layer of ring-shaped black flannelette is pasted around the cut to prevent light leakage; the egg tray (4) is located 5cm below the horizontal cut of the black metal tube, And it can move up and down by 5mm to adapt to eggs (3) of different sizes; the near-infrared camera (5) has a photosensitive range of 800 to 1000nm, a 1.3 million-pixel black and white near-infrared camera with a focal length of 20cm, and is located directly above the egg (3) 20cm; the dark box (6) is an opaque box, which is covered outside the device to provide a dark environment for image acquisition and support for each component;
2)气室图像采集方法为:将鸡蛋(3)大头向上放置于蛋托(4)上,上下移动蛋托(4),使鸡蛋(3)大头端中心紧贴黑色金属管(2)的末端,然后打开近红外激光器(1),近红外激光器(1)发出一束波长为980nm红外光线穿过黑色金属管(2)照在鸡蛋(3)大头端中心,再用近红外摄像头(5)采集图像,即可得到清晰的鸡蛋气室图像;2) The air chamber image acquisition method is as follows: place the egg (3) with the big head up on the egg tray (4), move the egg tray (4) up and down, so that the center of the big end of the egg (3) is close to the center of the black metal tube (2). end, then turn on the near-infrared laser (1), and the near-infrared laser (1) emits a beam of infrared light with a wavelength of 980nm through the black metal tube (2) and shines on the center of the big end of the egg (3), and then uses the near-infrared camera (5 ) to collect images to obtain a clear egg air cell image;
3)图像处理方法为:先对图像进行5×5中值滤波去噪,然后提取图像256阶原始灰度直方图,并将原直方图中每4阶分为一组,取像素点个数的平均值为该阶的像素值,获得图像的64阶灰度直方图,然后从64阶灰度直方图第一点开始向后遍历,若后点对应的像素点个数大于当前点时,前点为一个峰的起点,再从该点的下一个点开始向后遍历,若后点对应像素点个数大于当前点,则当前点为峰的结束点,后点为下一个峰的起点,按照该方法循环向后遍历,直到直方图末端,得到所有峰的起点和结束点,然后遍历找出各峰的峰顶对应的阶数及其像素值,再将所有峰编号,并按各峰峰顶的像素值对各峰排序,求出第二和第三个峰的峰顶对应的阶数a和b,然后从图像原始256阶灰度直方图中遍历灰度值在(a+1)×4和(b-1)×4之间区域,找出像素点个数最小的灰度值作为分割阈值,并用该阈值对原始气室图像阈值分割,得到含噪点的气室的二值图像,然后对气室二值图像中每个连通域进行标记,并计算出各连通域面积,找出最大的连通域面积,再去除小于该面积的所有连通域,得到气室的二值图像,并求其面积S;3) The image processing method is as follows: first perform 5×5 median filter denoising on the image, then extract the 256-order original grayscale histogram of the image, and divide the original histogram into a group for every 4th order, and take the number of pixels The average value of is the pixel value of this order, and obtains the 64-level grayscale histogram of the image, and then traverses backwards from the first point of the 64-level grayscale histogram. If the number of pixels corresponding to the latter point is greater than the current point, The previous point is the starting point of a peak, and then traverse backward from the next point of this point, if the number of pixels corresponding to the latter point is greater than the current point, the current point is the end point of the peak, and the latter point is the starting point of the next peak , follow this method to loop backwards until the end of the histogram to get the start and end points of all peaks, and then traverse to find the order and pixel value corresponding to the peak top of each peak, and then number all the peaks and press each The pixel values of the peaks are sorted for each peak, and the orders a and b corresponding to the peaks of the second and third peaks are obtained, and then the gray value is traversed from the original 256-level gray histogram of the image in (a+ In the area between 1)×4 and (b-1)×4, find out the gray value with the smallest number of pixels as the segmentation threshold, and use this threshold to segment the original air chamber image threshold, and obtain the second image of the air chamber containing noise. Value image, and then mark each connected domain in the binary image of the gas chamber, and calculate the area of each connected domain, find the largest connected domain area, and then remove all connected domains smaller than this area, and obtain the binary value of the gas chamber image, and find its area S;
4)模型计算方法为:模型计算公式为:其中S为鸡蛋气室二值图像的面积,d为鸡蛋气室直径。4) The model calculation method is: the model calculation formula is: Where S is the area of the binary image of the egg air cell, and d is the diameter of the egg air cell.
附图说明:Description of drawings:
图1:鸡蛋气室图像采集装置Figure 1: Egg Air Cell Image Acquisition Device
图2:鸡蛋原始气室图像Figure 2: Image of the original air cell of an egg
图3:256阶灰度直方图Figure 3: 256-level grayscale histogram
图4:64阶灰度直方图Figure 4: 64-level grayscale histogram
图5:气室二值图像Figure 5: Binary image of the gas chamber
具体实施方式:Detailed ways:
本发明的目的是提供一种测量鸡蛋气室直径方法,该方法可以测量鸡蛋的气室直径,获得更客观的描述气室大小的参数。The purpose of the present invention is to provide a method for measuring the diameter of the air cell of an egg, which can measure the diameter of the air cell of the egg and obtain a more objective parameter describing the size of the air cell.
为了使本技术领域人员更好地理解本发明方案,下面结合具体实施方式对本发明作进一步的详细说明。In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention will be further described in detail below in conjunction with specific embodiments.
在一种具体实施例中,测量鸡蛋的气室直径。首先将鸡蛋(3)大头向上放置于近红外激光图像系统的蛋托(4)上,上下移动蛋托(4),使鸡蛋(3)大头端中心紧贴黑色金属管(2)的末端,然后打开近红外激光器(1),近红外激光器(1)发出一束波长为980nm红外光线穿过黑色金属管(2)照在鸡蛋(3)大头端中心,再用近红外摄像头采集图片得到原始鸡蛋气室图像。然后对鸡蛋气室图像进行5×5中值滤波,并提取图像256阶原始灰度直方图。将原始直方图中每4阶分为一组,并取像素点个数的平均值为该阶的像素值,即可得图像的64阶灰度直方图,然后从该直方图第一点开始向后遍历,若后点对应的像素点个数大于当前点时,前点为一个峰的起点,再从该点的下一个点开始向后遍历,若后点对应像素点个数大于当前点,则当前点为峰的结束点,后点为下一个峰的起点,再继续遍历,直到直方图末端,得到所有峰的起点和结束点,然后遍历找出各峰的峰顶对应的阶数及其像素值,再将所有峰编号,并按各峰峰顶的像素值对各峰排序,求出第二和第三个峰的峰顶对应的阶数a和b,然后从图像原始256阶灰度直方图中遍历灰度值在(a+1)×4和(b-1)×4之间区域,找出像素点个数最小的灰度值作为分割阈值,再用该阈值对原始气室图像阈值分割,得到含噪点的气室的二值图像,然后对图像中每个连通域进行标记,计算出各连通域面积,并找出最大的连通域面积,再去除小于该面积的所有连通域,得到气室的二值图像,并计算出气室二值图像的面积S,带入模型计算式中求出鸡蛋的气室直径d。In a specific embodiment, the air cell diameter of an egg is measured. First, put the egg (3) with its big head up on the egg tray (4) of the near-infrared laser imaging system, move the egg tray (4) up and down, so that the center of the big end of the egg (3) is close to the end of the black metal tube (2), Then turn on the near-infrared laser (1), and the near-infrared laser (1) emits a beam of infrared light with a wavelength of 980nm through the black metal tube (2) and shines on the center of the big end of the egg (3), and then collects pictures with a near-infrared camera to obtain the original Egg air cell image. Then the 5×5 median filter is performed on the egg air cell image, and the 256-order original gray histogram of the image is extracted. Divide the original histogram into groups of 4 levels, and take the average value of the number of pixels as the pixel value of this level to get the 64-level grayscale histogram of the image, and then start from the first point of the histogram Traverse backwards, if the number of pixels corresponding to the latter point is greater than the current point, the previous point is the starting point of a peak, and then traverse backwards from the next point of this point, if the number of pixels corresponding to the latter point is greater than the current point , then the current point is the end point of the peak, and the next point is the start point of the next peak, and then continue to traverse until the end of the histogram, get the start and end points of all peaks, and then traverse to find the order corresponding to the peak top of each peak and its pixel value, and then number all the peaks, and sort the peaks according to the pixel value of the top of each peak, and find the order a and b corresponding to the peak top of the second and third peak, and then from the original image 256 In the grayscale histogram, traverse the grayscale value between (a+1)×4 and (b-1)×4, find out the grayscale value with the smallest number of pixels as the segmentation threshold, and then use this threshold to Threshold segmentation of the original air chamber image to obtain the binary image of the air chamber containing noise, and then mark each connected domain in the image, calculate the area of each connected domain, and find the largest connected domain area, and then remove the smaller than the area All the connected domains of , get the binary image of the air chamber, and calculate the area S of the binary image of the air chamber, and bring it into the model calculation formula Find the air cell diameter d of the egg.
实施例Example
鸡蛋气室直径的提取:首先将待测鸡蛋(3)大头向上放置于近红外激光图像系统的蛋托(4)上,上下移动蛋托(4),使鸡蛋(3)大头端中心紧贴黑色金属管(2)的末端,然后打开近红外激光器(1),近红外激光器(1)发出一束波长为980nm红外光线穿过黑色金属管(2)照在鸡蛋(3)大头端中心,再用近红外摄像头采集图片得到原始鸡蛋气室图像,如图2所示。Extraction of egg air cell diameter: first place the egg to be tested (3) with its big head up on the egg tray (4) of the near-infrared laser imaging system, and move the egg tray (4) up and down so that the center of the egg (3) is close to the center of the big end The end of the black metal tube (2), and then turn on the near-infrared laser (1), and the near-infrared laser (1) emits a beam of infrared light with a wavelength of 980nm through the black metal tube (2) and shines on the center of the big end of the egg (3), Then use a near-infrared camera to collect pictures to obtain the original egg air cell image, as shown in Figure 2.
然后对鸡蛋气室图像进行5×5中值滤波,并提取图像256阶原始灰度直方图,如图3所示。将原始直方图中每4阶分为一组,并取像素点个数的平均值为该阶的像素值,获得图像的64阶灰度直方图,如图4所示。Then, the 5×5 median filter is performed on the egg air cell image, and the 256-order original gray histogram of the image is extracted, as shown in Figure 3. Divide the original histogram into groups of 4 levels, and take the average value of the number of pixels as the pixel value of this level to obtain the 64-level grayscale histogram of the image, as shown in Figure 4.
然后从该直方图第一点开始向后遍历,若后点对应的像素点个数大于当前点时,前点为一个峰的起点,再从该点的下一个点开始向后遍历,若后点对应像素点个数大于当前点,则当前点为峰的结束点,后点为下一个峰的起点,再继续遍历,直到直方图末端,得到所有峰的起点和结束点,然后遍历找出各峰的峰顶对应的阶数及其像素值,再将所有峰编号,并按各峰峰顶的像素值对各峰排序,求出第二和第三个峰的峰顶对应的阶数为7和15,然后从图像原始256阶灰度直方图中遍历灰度值在32和56之间区域,找出当灰度值为39时,对应像素点个数最小,即得出最佳分割阈值为39。Then traverse backwards from the first point of the histogram. If the number of pixels corresponding to the latter point is greater than the current point, the previous point is the starting point of a peak, and then traverse backwards from the next point of this point. If the number of pixels corresponding to the point is greater than the current point, the current point is the end point of the peak, and the next point is the start point of the next peak, and then continue to traverse until the end of the histogram, get the start and end points of all peaks, and then traverse to find out The order corresponding to the top of each peak and its pixel value, and then number all the peaks, and sort the peaks according to the pixel value of the top of each peak, and find the order corresponding to the top of the second and third peaks 7 and 15, and then traverse the area with gray values between 32 and 56 from the original 256-level gray histogram of the image, and find out that when the gray value is 39, the number of corresponding pixels is the smallest, that is, the best The segmentation threshold is 39.
再用最佳阈值51对原始气室图像阈值分割,得到带噪点的鸡蛋气室图像,然后对图像中每个连通域进行标记,计算出各连通域面积,并找出最大的连通域面积,再去除小于该面积的所有连通域,得到气室的二值图像,如图5所示,并计算得出气室二值图像面积为27319像素。Then use the optimal threshold 51 to threshold the original air chamber image to obtain the egg air chamber image with noise, then mark each connected domain in the image, calculate the area of each connected domain, and find the largest connected domain area, Then remove all connected domains smaller than this area to obtain the binary image of the air chamber, as shown in Figure 5, and calculate the area of the binary image of the air chamber to be 27319 pixels.
最后将气室二值图像面积带入模型计算式求出气室直径d为25.7mm,与游标卡尺实测值26.3mm相比误差只有2.3%。Finally, bring the area of the binary image of the gas chamber into the model calculation formula The calculated diameter d of the air chamber is 25.7mm, and the error is only 2.3% compared with the measured value of 26.3mm by the vernier caliper.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610180628.3A CN105698693B (en) | 2016-03-24 | 2016-03-24 | A kind of egg gas chamber diameter measuring method based on near-infrared laser image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610180628.3A CN105698693B (en) | 2016-03-24 | 2016-03-24 | A kind of egg gas chamber diameter measuring method based on near-infrared laser image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105698693A CN105698693A (en) | 2016-06-22 |
CN105698693B true CN105698693B (en) | 2018-04-17 |
Family
ID=56232916
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610180628.3A Active CN105698693B (en) | 2016-03-24 | 2016-03-24 | A kind of egg gas chamber diameter measuring method based on near-infrared laser image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105698693B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111014969B (en) * | 2019-12-29 | 2022-03-25 | 上海赛摩电气有限公司 | Automatic change egg broken wall special plane |
CN111037102B (en) * | 2019-12-29 | 2021-10-29 | 上海赛摩电气有限公司 | Automatic egg shelling method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101672839A (en) * | 2009-09-25 | 2010-03-17 | 南京农业大学 | Device and method for detecting hatching egg incubation quality based on computer vision |
CN102147402A (en) * | 2011-03-08 | 2011-08-10 | 江苏大学 | Machine vision technology based method for rapidly detecting egg freshness |
CN102169092A (en) * | 2011-01-11 | 2011-08-31 | 西安理工大学 | Method for testing poultry egg freshness based on photon radiation |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001017020A (en) * | 1999-07-09 | 2001-01-23 | Seiichi Kitamura | Distinguishing device for class and freshness of egg |
JP4674685B2 (en) * | 2004-08-02 | 2011-04-20 | 有限会社ハイ・サーブ | Chicken egg freshness detection method and apparatus by impedance sensing |
-
2016
- 2016-03-24 CN CN201610180628.3A patent/CN105698693B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101672839A (en) * | 2009-09-25 | 2010-03-17 | 南京农业大学 | Device and method for detecting hatching egg incubation quality based on computer vision |
CN102169092A (en) * | 2011-01-11 | 2011-08-31 | 西安理工大学 | Method for testing poultry egg freshness based on photon radiation |
CN102147402A (en) * | 2011-03-08 | 2011-08-10 | 江苏大学 | Machine vision technology based method for rapidly detecting egg freshness |
Non-Patent Citations (1)
Title |
---|
傅里叶变换近红外反射用于鸡蛋蛋品质的研究;候卓成等;《光谱学与光谱分析》;20090831;第29卷(第8期);第2063-2066页 * |
Also Published As
Publication number | Publication date |
---|---|
CN105698693A (en) | 2016-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108629775B (en) | A kind of hot high-speed wire surface image processing method | |
CN102176228B (en) | A Machine Vision Method for Recognizing Information on Multiple Analog Instrument Dials | |
CN101634551B (en) | Method and system for detecting surface roughness | |
CN101546426B (en) | Weak luminescent image processing method based on region enhancement and region extraction | |
CN115018844B (en) | Plastic film quality evaluation method based on artificial intelligence | |
CN104198497B (en) | Surface defect detection method based on visual saliency map and support vector machine | |
CN110443278B (en) | A method, device and equipment for detecting abnormal thickness of grid lines of solar cells | |
CN103900972B (en) | Multi-feature fusion-based meat freshness hyperspectral image visual detection | |
CN109766909B (en) | Analysis method for aging behavior of shore environment microplastic based on spectrogram fusion | |
CN105372324B (en) | The defects of based on magneto-optic imaging method detection method | |
CN103674968A (en) | Method and device for evaluating machine vision original-value detection of exterior corrosion appearance characteristics of material | |
CN106023158A (en) | SD-OCT-image-based nacre layer defect identification method for fresh water non-nucleated pearl | |
CN104700395A (en) | Method and system for detecting appearance crack of structure | |
CN108663367A (en) | A kind of egg quality lossless detection method based on egg unit weight | |
CN101709951A (en) | Method for measuring and recording phenotypic characters of scallop by computer | |
CN106340007A (en) | Image processing-based automobile body paint film defect detection and identification method | |
CN107631782A (en) | A kind of level testing methods based on Harris Corner Detections | |
CN109283182A (en) | A method, device and system for detecting defects in battery solder joints | |
CN105698693B (en) | A kind of egg gas chamber diameter measuring method based on near-infrared laser image | |
CN112132803A (en) | A method for egg freshness detection based on convolutional neural network | |
CN101419151A (en) | Industrial purified terephthalic acid particle size distribution estimation method based on microscopic image | |
CN116087036A (en) | Device for identifying images of sediment plume of deep sea mining and image analysis method | |
CN106574224B (en) | Method for detecting the presence or absence of biological particles | |
CN110426395B (en) | A kind of solar EL battery silicon wafer surface detection method and device | |
CN107220972B (en) | A kind of quality of poultry eggs discrimination method based on infrared image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230609 Address after: 750000 West of Jinshan Village, Hongguang Town, Helan County, Yinchuan, Ningxia (east foot of Helan) Patentee after: NINGXIA JIUSANLING ECOLOGICAL AGRICULTURE AND ANIMAL HUSBANDRY CO.,LTD. Address before: Nanjing City, Jiangsu Province, No. 1 210095 Weigang Patentee before: NANJING AGRICULTURAL University |
|
TR01 | Transfer of patent right |