CN101320004A - Bamboo strip defect online detection method based on machine vision - Google Patents
Bamboo strip defect online detection method based on machine vision Download PDFInfo
- Publication number
- CN101320004A CN101320004A CNA2008101502442A CN200810150244A CN101320004A CN 101320004 A CN101320004 A CN 101320004A CN A2008101502442 A CNA2008101502442 A CN A2008101502442A CN 200810150244 A CN200810150244 A CN 200810150244A CN 101320004 A CN101320004 A CN 101320004A
- Authority
- CN
- China
- Prior art keywords
- image
- bamboo
- defective
- bamboo bar
- defects
- 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
Links
Images
Landscapes
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
Description
技术领域 technical field
本发明属于视觉检测领域,具体是一种竹条缺陷的非接触式检测方法。The invention belongs to the field of visual detection, in particular to a non-contact detection method for bamboo strip defects.
背景技术 Background technique
我国竹子有39属,500多种,分布面积500多万公顷,竹类资源丰富且再生能力强,从而被越来越广泛采用。一般竹子造林5-10年以后,就可以年年砍伐利用。然而由于地理环境、气候、湿度等原因,有些竹子在生长过程中会从根部开始腐烂,会生虫;若砍伐下来后没有储存保管得当,会发霉以及会出现裂纹;而且在竹子加工中还会出现斜切、过切等缺损情况,因而竹条上会出现腐烂、蛀孔、发霉、裂纹和斜切等缺陷。竹产品生产工艺主要由两大步骤组成:第一步是基材加工,第二步是基材组合后加工。在第一、二步之间必须对基材(即竹条)进行缺陷检测,否则会严重影响竹产品的合格率。随着竹产品的自动化加工能力的提高,越来越多的竹条在第二步前需要等待缺陷检测,而目前仅靠人工肉眼检查,不但人为因素影响较大,而且多种不同程度的缺陷容易使人产生视觉疲劳,从而造成对竹条缺陷的误判和漏检。目前国内还没有利用视觉图像对竹条缺陷进行自动在线检测的方法。There are 39 genera and more than 500 kinds of bamboo in my country, with a distribution area of more than 5 million hectares. Bamboo resources are abundant and have strong regeneration ability, so they are more and more widely used. After 5-10 years of general bamboo afforestation, it can be felled and utilized every year. However, due to geographical environment, climate, humidity and other reasons, some bamboos will rot from the roots during the growth process and will be infected with insects; Defects such as oblique cuts and overcuts occur, so defects such as rot, boreholes, mold, cracks and oblique cuts will appear on the bamboo strips. The production process of bamboo products is mainly composed of two steps: the first step is substrate processing, and the second step is post-processing of substrate combination. Defect detection must be carried out to the base material (ie bamboo strips) between the first and second steps, otherwise the qualified rate of bamboo products will be seriously affected. With the improvement of the automatic processing capacity of bamboo products, more and more bamboo strips need to wait for defect detection before the second step. At present, only manual inspection with naked eyes is not only greatly affected by human factors, but also various defects of different degrees It is easy to cause visual fatigue, resulting in misjudgment and missed detection of bamboo defects. At present, there is no automatic online detection method for bamboo strip defects using visual images in China.
发明内容 Contents of the invention
为了克服现有技术不能自动检测竹条缺陷的不足,本发明提供一种基于机器视觉的竹条缺陷在线检测方法,能够对竹条沿长度方向的四个表面上的腐烂、蛀孔、发霉、裂纹和斜切等缺陷进行在线自动检测。In order to overcome the deficiency that the existing technology cannot automatically detect the defects of bamboo strips, the present invention provides a method for online detection of bamboo strip defects based on machine vision, which can detect rot, boreholes, mildew, Defects such as cracks and chamfers are automatically detected online.
本发明解决其技术问题所采用的技术方案包括以下步骤:The technical solution adopted by the present invention to solve its technical problems comprises the following steps:
一.沿竹条长度方向,使用相机对竹条的四个表面连续拍摄,获取竹条表面的灰度图像;预定义:对于灰度图像,像素点的灰度值越小亮度越暗,灰度值越大亮度越亮;1. Along the length direction of the bamboo strip, use the camera to continuously shoot the four surfaces of the bamboo strip to obtain the grayscale image of the bamboo strip surface; predefined: for the grayscale image, the smaller the grayscale value of the pixel, the darker the brightness, and the grayscale The larger the intensity value, the brighter the brightness;
二.对捕获的每一帧数字图像进行图像处理,根据竹条缺陷检测方法,判断此帧图像中的小段竹条上是否存在缺陷;Two. Image processing is carried out to each frame of digital images captured, and according to the bamboo strip defect detection method, judge whether there is defect on the small section bamboo strip in this frame image;
三.如果此帧图像中的小段竹条存在缺陷,则认为整根竹条存在缺陷,同时向分拣机构发送存在缺陷的指令;3. If there is a defect in the small section of bamboo in this frame image, then it is considered that the whole bamboo is defective, and an instruction of defect is sent to the sorting mechanism at the same time;
四.如果整根竹条的所有帧图像中的小段竹条都没有缺陷,则认为此根竹条没有缺陷;同时向分拣机构发送没有缺陷的指令。4. If the small bamboo strips in all frame images of the whole bamboo strip have no defects, then it is considered that this bamboo strip has no defects; at the same time, an instruction that there is no defect is sent to the sorting mechanism.
所述的竹条缺陷检测方法包括以下步骤:Described bamboo strip defect detection method comprises the following steps:
一、对整幅灰度图像,通过边缘检测获取竹条的边界,去除背景,得到竹条区域的图像f,并复制竹条区域的图像数据f’,获取图像f中竹条的两条边界直线L1和L2。计算L1和L2之间的夹角θ,如果θ≥判定阀值Tp,(Tp≤2°)则认为该竹条两条边界直线不平行,存在“三角条”的缺陷,转至步骤六,给出竹条存在缺陷的检测结果信号;否则认为该幅图像中竹条的两条边界直线近似平行,继续进行下一步的检测。1. For the entire grayscale image, obtain the border of the bamboo strip through edge detection, remove the background, obtain the image f of the bamboo strip area, and copy the image data f' of the bamboo strip area, and obtain the two boundaries of the bamboo strip in the image f Straight lines L1 and L2. Calculate the angle θ between L1 and L2, if θ≥judgment threshold Tp, (Tp≤2°), it is considered that the two boundary lines of the bamboo strip are not parallel, and there is a defect of "triangular strip", go to step six, Give the detection result signal that the bamboo strips have defects; otherwise, it is considered that the two boundary lines of the bamboo strips in the image are approximately parallel, and continue to the next step of detection.
二、对图像f,进行均值滤波,去除噪声点的干扰,得到图像f1。2. Perform mean filtering on the image f to remove the interference of noise points to obtain the image f1.
三、对图像f1,进行滤除纹理操作:以当前像素点为中心,用当前像素行的左右邻近像素灰度值中的最大值,代替当前像素点的灰度值。左右邻域像素的总宽度,大于等于图像中竹子纹理的一半像素宽度dH,小于等于图像中竹子相邻两个纹理之间的像素宽度dB(预先通过实验,测定dH和dB)。对图像f1中所有像素逐点处理,最终可获得滤除竹子纹理后的图像f2。3. Perform a texture filtering operation on the image f1: take the current pixel as the center, and replace the gray value of the current pixel with the maximum value among the gray values of the left and right adjacent pixels in the current pixel row. The total width of the left and right neighborhood pixels is greater than or equal to half the pixel width d H of the bamboo texture in the image, and is less than or equal to the pixel width d B between two adjacent bamboo textures in the image (d H and d B are determined through experiments in advance) . All the pixels in the image f1 are processed point by point, and finally the image f2 after filtering out the bamboo texture can be obtained.
四、竹条大缺陷的检测,包括以下步骤:4. Detection of large defects in bamboo strips, including the following steps:
1.对图像f2,采用最大类间距方法求得分割阈值Th以及两个类的平均灰度值u1、u2;1. For the image f2, the segmentation threshold Th and the average gray value u1 and u2 of the two classes are obtained by using the maximum class distance method;
2.如果图像f2所求得的u1与u2之间的灰度差值小于预先测定的实验值D(D为预先通过实验,对合格的竹条图像采用最大类间距方法处理,求得的u1与u2之间的灰度差值),则认为该幅图像不含有竹条大缺陷,跳转至步骤五,进行竹条小缺陷的检测;2. If the grayscale difference between u1 and u2 obtained by image f2 is less than the pre-determined experimental value D (D is pre-tested, and the qualified bamboo strip images are processed by the maximum class distance method, the obtained u1 and u2), then it is considered that the image does not contain large bamboo defects, and jumps to step five to detect small bamboo defects;
3.在图像f2中,灰度值小于等于Th的像素即为缺陷区域,统计图像f2中缺陷区域像素点的总数num和图像f2中所有像素点的总数sum,如果num与sum的比值小于判定阈值Pe(Pe为检测精度要求下,缺陷面积占竹条总面积百分比的最小判定阈值),则认为该幅图像无缺陷,跳转至步骤五,进行竹条小缺陷的检测,否则认为该幅图像存在缺陷,并对图像f2进行二值化处理,转至步骤六,给出竹条存在缺陷的检测结果信号。3. In the image f2, the pixel whose gray value is less than or equal to Th is the defect area. The total number of pixels num in the defect area in the image f2 and the total sum of all pixels in the image f2 are counted. If the ratio of num to sum is less than the judgment Threshold Pe (Pe is the minimum judgment threshold of the percentage of defect area in the total area of bamboo strips under the detection accuracy requirements), then the image is considered to be free of defects, and skips to step 5 to detect small defects in bamboo strips, otherwise the image is considered There is a defect in the image, and binary processing is performed on the image f2, then go to step 6, and a detection result signal of the defect in the bamboo strip is given.
对竹条的表面进行垂直打光,在竹条图像中,竹条缺陷:虫蛀孔、发霉、竹青区域与竹条表面的正常区域相比亮度较暗;平行四边形缺陷区域和斜切缺陷区域,在图像中表现为竹条侧边的阴影区域,与竹条表面的正常区域相比亮度较暗。由于以上五种竹条缺陷区域在灰度图像中,灰度值较小,面积相对较大,经步骤四可判断竹条是否存在这五种缺陷。The surface of the bamboo strip is lit vertically, in the bamboo strip image, the bamboo strip defects: moth hole, mildew, bamboo green area is darker than the normal area of the bamboo strip surface; parallelogram defect area and chamfering defect The area, which appears in the image as the shadow area on the side of the bamboo strip, is darker than the normal area on the bamboo strip surface. Since the above five kinds of defect areas of bamboo strips have small gray value and relatively large area in the grayscale image, it can be judged whether there are these five kinds of defects in bamboo strips through step 4.
五、竹条小缺陷的检测,包括以下步骤:5. Detection of small defects in bamboo strips, including the following steps:
1.对于竹条区域的图像f’,沿着竹条的长度方向,按n个像素宽(n小于等于10)划分为有限个小区域;1. For the image f' of the bamboo strip area, along the length direction of the bamboo strip, it is divided into a limited number of small areas by n pixels wide (n is less than or equal to 10);
2.使用梯度算子,计算每个像素点的梯度值;2. Use the gradient operator to calculate the gradient value of each pixel;
3.分别统计每个小区域中梯度最大值所对应像素点的灰度值Gi;3. Count the gray value Gi of the pixel corresponding to the maximum value of the gradient in each small area;
4.对于所有小区域中的Gi,找出其中的最小值Gmin;4. For Gi in all small areas, find the minimum value Gmin among them;
5.计算竹条区域图像f’的灰度平均值u,如果u与Gmin的差值小于d(d为预先试验,计算合格的竹条图像所得的u与Gmin之间的灰度差值),则认为该幅图像不存在缺陷,转至步骤六,给出该图像没有缺陷的检测结果信号;5. Calculate the average gray value u of the bamboo strip image f', if the difference between u and Gmin is less than d (d is the grayscale difference between u and Gmin obtained by calculating the qualified bamboo strip image in advance) , then it is considered that there is no defect in the image, go to step six, and give the detection result signal that the image has no defect;
6.取分割阈值为Gmin,对图像f’进行二值化处理,得到二值图像f”。在图像f’中,灰度值小于等于Gmin的像素即为缺陷区域。对二值图像f”中的缺陷区域进行贴标签处理,计算每个缺陷区域的面积Area、长宽比Scale,如果Area≥Ta并且{|Scale-1|≤ξ或Scale≥Tb},(其中Ta、Tb、ξ分别为检测精度要求下的最小虫蛀孔的像素点总数、最短裂缝的长宽比、虫蛀孔的圆形度范围),则认为该图像存在缺陷,转至步骤六,给出竹条存在缺陷的检测结果信号;否则认为该幅图像不存在缺陷,转至步骤六,给出该幅图像没有缺陷的检测结果信号。6. Take the segmentation threshold as Gmin, and perform binary processing on the image f' to obtain a binary image f". In the image f', pixels whose gray value is less than or equal to Gmin are defective areas. For the binary image f" Labeling is performed on the defect area in , and the area and aspect ratio Scale of each defect area are calculated. If Area≥Ta and {|Scale-1|≤ξ or Scale≥Tb}, (where Ta, Tb, and ξ are respectively The total number of pixels of the smallest moth-eaten hole, the aspect ratio of the shortest crack, and the circularity range of the moth-eaten hole under the detection accuracy requirements), then it is considered that the image has defects, go to step 6, and give the defects of the bamboo strips The detection result signal; otherwise, it is considered that there is no defect in the image, and go to step six, and the detection result signal that the image has no defect is given.
对于较小的虫蛀孔、裂缝和裂纹,由于其像素宽度较小,面积较小,经步骤四不能检测识别;但其边界的梯度值较大,经步骤五可检测识别。For smaller moth-eaten holes, cracks and cracks, due to their small pixel width and small area, they cannot be detected and identified through step four; but the gradient values of their boundaries are large, and can be detected and identified through step five.
六、给出竹条图像的检测结果信号。6. Give the detection result signal of the bamboo stick image.
本发明的有益效果是:本发明可以对不同颜色深浅的竹条缺陷进行在线检测,同时检测沿竹条长度方向上的四个表面。可检测的竹条缺陷的种类如图3所示,包括:虫蛀孔、发霉、裂缝、裂纹、平行四边、三角条、竹青、斜切,有效的解决由于人为因素所造成的对竹条缺陷的误判及漏检。检测效果如图4所示,竹条缺陷:虫蛀孔、发霉、裂缝、裂纹、平行四边、竹青、斜切在图中显示为黑色,三角条缺陷显示为竹条的两条边界直线。The beneficial effects of the invention are: the invention can detect the defects of bamboo strips with different color depths on-line, and simultaneously detect four surfaces along the length direction of the bamboo strips. The types of bamboo strip defects that can be detected are shown in Figure 3, including: moth-eaten holes, mold, cracks, cracks, parallelograms, triangle strips, bamboo green, and oblique cuts, effectively solving the problem of bamboo strips caused by human factors. Misjudgment and missed detection of defects. The detection results are shown in Figure 4. Bamboo strip defects: moth-eaten holes, mold, cracks, cracks, parallelograms, bamboo green, and oblique cuts are shown in black in the figure, and triangular strip defects are displayed as two boundary lines of bamboo strips.
如果采用分辨率为752×480的工业相机、帧频为60帧/秒、16mm镜头、视场70mm×45mm;计算机采用:CPU赛扬2.0GHz,内存512MB,显卡64M,则实验检测结果如下表所示:If an industrial camera with a resolution of 752×480, a frame rate of 60 frames per second, a 16mm lens, and a field of view of 70mm×45mm are used; the computer uses: CPU Celeron 2.0GHz, memory 512MB, graphics card 64M, the experimental test results are as follows Shown:
每幅图像的平均处理时间80ms,检测结果准确率为92%,竹条的检测速度大于0.87m/s。The average processing time of each image is 80ms, the detection accuracy rate is 92%, and the detection speed of bamboo strips is greater than 0.87m/s.
下面结合附图和实施例对本发明进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
附图说明 Description of drawings
图1是本发明的总体检测步骤流程;Fig. 1 is overall detection step flow process of the present invention;
图2是竹条缺陷检测方法的流程;Fig. 2 is the flow process of bamboo strip defect detection method;
图3是本发明可以检测的8种竹条缺陷。图中:(a)-虫蛀孔,(b)-发霉,(c)-裂缝,(d)-裂纹,(e)-平行四边,(f)-三角条,(g)-竹青,(h)-斜切;Fig. 3 is 8 kinds of bamboo strip defects that the present invention can detect. In the picture: (a)-wormhole, (b)-mold, (c)-crack, (d)-crack, (e)-parallelogram, (f)-triangular strip, (g)-bamboo green, (h) - oblique cut;
图4是本发明对8种竹条缺陷检测后的显示结果。图中:(a)-虫蛀孔,(b)-发霉,(c)-裂缝,(d)-裂纹,(e)-平行四边,(f)-三角条,(g)-竹青,(h)-斜切。Fig. 4 is the display result after the present invention detects 8 kinds of bamboo strip defects. In the picture: (a)-wormhole, (b)-mold, (c)-crack, (d)-crack, (e)-parallelogram, (f)-triangular strip, (g)-bamboo green, (h) - Miter cut.
具体实施方式 Detailed ways
本发明所检测的竹条宽度为14mm~25mm,厚度为6mm~10mm,长度为0.9m~2.6m,竹条属于窄长型工件。使用光源对竹条沿长度方向上的四个表面进行垂直照射,在获取的竹条图像中,三角条缺陷表现为竹条的两条边界直线有较大的夹角;虫蛀孔、发霉、竹青区域与竹条表面的正常区域相比亮度较暗,灰度值较小,面积较大;平行四边形缺陷区域和斜切缺陷区域,在图像中显现为竹条侧边的阴影区域,与竹条表面的正常区域相比亮度较暗,灰度值较小,面积较大;对于较小的虫蛀孔、裂缝和裂纹,为细长型特征,缺陷面积较小,但其边界的梯度值较大。The bamboo strips detected by the invention have a width of 14mm-25mm, a thickness of 6mm-10mm, and a length of 0.9m-2.6m, and the bamboo strips are narrow and long workpieces. The light source is used to irradiate the four surfaces of the bamboo strips along the length direction vertically. In the obtained bamboo strip images, the defects of the triangular strips are shown as the two boundary straight lines of the bamboo strips have a large angle; moth holes, mildew, Compared with the normal area on the surface of the bamboo strips, the bamboo green area has darker brightness, smaller gray value, and larger area; the parallelogram defect area and the beveled defect area appear as the shadow area on the side of the bamboo strip in the image, which is similar to the The normal areas on the surface of bamboo strips are darker in brightness, smaller in gray value, and larger in area; for smaller moth-eaten holes, cracks, and cracks, they are elongated features, and the defect area is smaller, but the gradient of the boundary The value is larger.
具体实施,如图1所示:沿竹条长度方向,使用相机对竹条的四个表面连续拍摄,获取竹条表面的灰度图像;对捕获的每一帧数字图像进行图像处理,根据竹条缺陷检测方法,判断此帧图像中的小段竹条上是否存在缺陷;如果此帧图像中的小段竹条存在缺陷,则认为整根竹条存在缺陷,同时向分拣机构发送存在缺陷的指令;如果整根竹条的所有帧图像中的小段竹条都没有缺陷,则认为此根竹条没有缺陷;同时向分拣机构发送没有缺陷的指令。The specific implementation is as shown in Figure 1: along the length direction of the bamboo strips, use the camera to continuously shoot the four surfaces of the bamboo strips to obtain grayscale images of the bamboo strip surfaces; image processing is performed on each frame of digital images captured, according to the bamboo strips Strip defect detection method, to judge whether there are defects on the small bamboo strips in this frame image; if there are defects in the small bamboo strips in this frame image, it is considered that the whole bamboo strip is defective, and at the same time send a defect instruction to the sorting mechanism ; If the small bamboo strips in all the frame images of the whole bamboo strip have no defects, then this bamboo strip is considered to have no defects; at the same time, an instruction of no defects is sent to the sorting mechanism.
所述的竹条缺陷检测方法,如图2所示,包括以下步骤:Described bamboo strip defect detection method, as shown in Figure 2, comprises the following steps:
一、对整幅灰度图像,通过边缘检测获取竹条的边界,去除背景,得到竹条区域的图像f,并复制竹条区域的图像数据f’,获取图像f中竹条表面的两条边界直线L1和L2。计算L1和L2之间的夹角θ,如果θ≥Tp,(Tp≤2°)则认为该竹条两条边界直线不平行,存在“三角条”的缺陷,转至步骤六,给出竹条存在缺陷的检测结果信号;否则认为该幅图像中竹条的两条边界近似平行,继续进行下一步的检测。1. For the entire grayscale image, obtain the boundary of the bamboo strips through edge detection, remove the background, obtain the image f of the bamboo strip area, and copy the image data f' of the bamboo strip area, and obtain two lines on the surface of the bamboo strips in the image f Boundary straight lines L1 and L2. Calculate the angle θ between L1 and L2, if θ≥Tp, (Tp≤2°), it is considered that the two boundary lines of the bamboo strip are not parallel, and there is a defect of "triangular strip", go to step 6, and give the bamboo strip Otherwise, it is considered that the two borders of the bamboo strips in this image are approximately parallel, and the next step of detection is continued.
二、对图像f,进行均值滤波,去除噪声点的干扰,得到图像f1。2. Perform mean filtering on the image f to remove the interference of noise points to obtain the image f1.
三、对图像f1,进行滤除纹理:以当前像素点为中心,用当前像素行的左右邻近像素灰度值中的最大值,代替当前像素点的灰度值。左右邻域像素的总宽度,大于等于图像中竹子纹理的一半像素宽度dH,小于等于图像中竹子相邻两个纹理之间的像素宽度dB(预先通过实验,测定dH和dB)。对图像f1中所有像素逐点处理,最终可获得滤除竹子纹理后的图像f2。3. For the image f1, filter the texture: take the current pixel as the center, and replace the gray value of the current pixel with the maximum value among the gray values of the left and right neighboring pixels of the current pixel row. The total width of the left and right neighborhood pixels is greater than or equal to half the pixel width d H of the bamboo texture in the image, and is less than or equal to the pixel width d B between two adjacent bamboo textures in the image (d H and d B are determined through experiments in advance) . All the pixels in the image f1 are processed point by point, and finally the image f2 after filtering out the bamboo texture can be obtained.
四、竹条大缺陷的检测,包括以下步骤:4. Detection of large defects in bamboo strips, including the following steps:
1.对图像f2,采用最大类间距方法求得分割阈值Th以及两个类的平均灰度值u1、u2;1. For the image f2, the segmentation threshold Th and the average gray value u1 and u2 of the two classes are obtained by using the maximum class distance method;
2.如果某幅图像所求得的u1与u2之间的灰度差值小于预先测定的实验值D(D为预先通过实验,对合格的竹条采用最大类间距方法处理,求得u1与u2之间的灰度差值),则认为该幅图像不含有竹条大缺陷,跳转至步骤五,进行竹条小缺陷的检测;2. If the gray value difference between u1 and u2 obtained from a certain image is less than the pre-determined experimental value D (D is the pre-test, the qualified bamboo strips are processed by the method of maximum class spacing, and u1 and u2 are obtained. u2), then it is considered that the image does not contain large defects of bamboo strips, and jumps to step five to detect small defects of bamboo strips;
3.在图像f2中,灰度值小于等于Th的像素即为缺陷区域,统计图像f2中竹条缺陷区域像素点的总数num和竹条区域所有像素点的总数sum,如果hum与sum的比值小于判定阈值Pe(Pe为检测精度要求下,缺陷面积占竹条总面积百分比的最小判定阈值),则认为该幅图像无缺陷,跳转至步骤五,进行竹条小缺陷的检测,否则认为该幅图像存在缺陷,并对图像f2进行二值化处理,转至步骤六,给出竹条存在缺陷的检测结果信号;3. In the image f2, the pixel whose gray value is less than or equal to Th is the defect area. The total number of pixels num in the bamboo defect area and the sum of all the pixels in the bamboo area in the image f2 are counted. If the ratio of hum to sum If it is less than the judgment threshold Pe (Pe is the minimum judgment threshold of the percentage of the defect area in the total area of the bamboo strips under the detection accuracy requirements), then the image is considered to be free of defects, and skips to step 5 to detect small defects in the bamboo strips, otherwise it is considered There is a defect in the image, and the image f2 is binarized, then go to step 6, and the detection result signal of the defect in the bamboo strip is given;
五、竹条小缺陷的检测,包括以下步骤:5. Detection of small defects in bamboo strips, including the following steps:
1.对于竹条区域的图像f’,把竹条区域的图像按n个像素宽(n小于等于10),沿着竹条的长度方向平均等分为有限个小区域;1. For the image f' of the bamboo strip area, the image of the bamboo strip area is divided into a limited number of small areas on average along the length direction of the bamboo strip by n pixels wide (n is less than or equal to 10);
2.使用梯度算子,计算每个像素点的梯度值;2. Use the gradient operator to calculate the gradient value of each pixel;
3.分别统计每个小区域中梯度最大值所对应像素点的灰度值Gi;3. Count the gray value Gi of the pixel corresponding to the maximum value of the gradient in each small area;
4.对于所有小区域中的Gi,找出其中的最小值Gmin;4. For Gi in all small areas, find the minimum value Gmin among them;
5.计算竹条区域图像f’的灰度平均值u,如果u与Gmin的差值d(d为预先试验,计算合格竹条所得的u与Gmin之间的灰度差值),则认为该幅图像不存在缺陷,转至步骤六,给出该图像没有缺陷的检测结果信号;5. Calculate the average gray value u of the image f' of the bamboo strip area, if the difference d between u and Gmin (d is the grayscale difference between u and Gmin obtained by calculating qualified bamboo strips in advance), then it is considered There is no defect in the image, go to step 6, and give the detection result signal that the image has no defect;
6.取分割阈值为Gmin,对竹条区域图像f’进行二值化处理,得到图像f”。在竹条区域图像f’中,灰度值小于等于Gmin的像素即为缺陷区域。对图像f”中的缺陷区域进行贴标签处理,计算每个缺陷区域的面积Area、长宽比Scale,如果Area≥Ta并且{|Scale-1|≤ξ或Scale≥Tb},(其中Ta、Tb、ξ分别为检测精度要求下的最小虫蛀孔的像素点总数、最短裂缝的长宽比、虫蛀孔的圆形度范围),则认为该图像存在缺陷,转至步骤六,给出竹条存在缺陷的检测结果信号;否则认为该幅图像不存在缺陷,转至步骤六,给出该幅图像没有缺陷的检测结果信号。6. Take the segmentation threshold as Gmin, and carry out binarization processing on the bamboo strip area image f' to obtain the image f". In the bamboo strip area image f', the pixel whose gray value is less than or equal to Gmin is the defect area. For the image The defect area in f" is labeled, and the area Area and aspect ratio Scale of each defect area are calculated. If Area≥Ta and {|Scale-1|≤ξ or Scale≥Tb}, (where Ta, Tb, ξ are respectively the total number of pixels of the smallest moth-eaten hole, the aspect ratio of the shortest crack, and the circularity range of the moth-eaten hole under the detection accuracy requirements), then it is considered that the image has defects, go to step 6, and give the existence of bamboo strips The detection result signal of the defect; otherwise, it is considered that there is no defect in the image, go to step six, and the detection result signal of the image without defect is given.
六、给出竹条图像的检测结果信号。6. Give the detection result signal of the bamboo stick image.
对于竹条图像,经检测步骤一,可判断竹条是否存在“三角条”的缺陷;经检测步骤四,可判断竹条是否存在的缺陷种类有:虫蛀孔、发霉、竹青、平行四边、斜切;经检测步骤五,可判断竹条是否存在的缺陷种类有:较小的虫蛀孔、裂缝、裂纹。For the bamboo strip image, after the detection step 1, it can be judged whether the bamboo strip has the defect of "triangular strip"; after the detection step 4, it can be judged whether the bamboo strip has the defect types: moth holes, mildew, bamboo green, parallelogram , Oblique cutting; after the inspection step five, the types of defects that can be judged whether the bamboo strips are: small moth-eaten holes, cracks, and cracks.
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNA2008101502442A CN101320004A (en) | 2008-07-03 | 2008-07-03 | Bamboo strip defect online detection method based on machine vision |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNA2008101502442A CN101320004A (en) | 2008-07-03 | 2008-07-03 | Bamboo strip defect online detection method based on machine vision |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN101320004A true CN101320004A (en) | 2008-12-10 |
Family
ID=40180172
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNA2008101502442A Pending CN101320004A (en) | 2008-07-03 | 2008-07-03 | Bamboo strip defect online detection method based on machine vision |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101320004A (en) |
Cited By (30)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102034098A (en) * | 2010-12-21 | 2011-04-27 | 上海电机学院 | Automatic bolt sorting system and automatic bolt sorting method |
| CN102359952A (en) * | 2011-06-13 | 2012-02-22 | 浙江大学 | Contact photoelectric sensor for identifying front and back of bamboo filament |
| CN102521600A (en) * | 2011-11-03 | 2012-06-27 | 北京农业信息技术研究中心 | Method and system for identifying white-leg shrimp disease on basis of machine vision |
| CN102937592A (en) * | 2012-10-20 | 2013-02-20 | 山东理工大学 | Ceramic radome pore and material loosening defect automatic detection method |
| CN104458748A (en) * | 2013-09-25 | 2015-03-25 | 中国科学院沈阳自动化研究所 | Aluminum profile surface defect detecting method based on machine vision |
| CN105021628A (en) * | 2015-07-19 | 2015-11-04 | 中北大学 | Detection method for surface defects of optical fiber image inverter |
| CN105158258A (en) * | 2015-07-15 | 2015-12-16 | 广西师范大学 | Computer vision-based bamboo strip surface defect detection method |
| CN105405142A (en) * | 2015-11-12 | 2016-03-16 | 冯平 | Edge defect detection method and system for glass panel |
| CN105466950A (en) * | 2016-01-14 | 2016-04-06 | 上海孚兴电子科技有限公司 | Bamboo dice online detection method and system based on vision |
| CN106248690A (en) * | 2015-06-09 | 2016-12-21 | 东芝机械株式会社 | Defect detecting method and flaw detection apparatus |
| CN106645178A (en) * | 2017-01-11 | 2017-05-10 | 广西师范大学 | Apparatus for detecting bamboo strip edge defects |
| CN106651831A (en) * | 2016-09-30 | 2017-05-10 | 广西师范大学 | Bamboo piece defect detection method and bamboo piece defect detection system |
| CN106770331A (en) * | 2017-02-10 | 2017-05-31 | 南京航空航天大学 | A kind of workpiece, defect detecting system based on machine vision |
| CN106780473A (en) * | 2016-12-23 | 2017-05-31 | 西安交通大学 | A kind of magnet ring defect multi-vision visual detection method and system |
| CN107154039A (en) * | 2017-04-28 | 2017-09-12 | 北京简易科技有限公司 | The online defect detecting device of sebific duct and method |
| CN107256549A (en) * | 2017-06-06 | 2017-10-17 | 滁州市天达汽车部件有限公司 | A kind of bamboo strip defect detection method based on machine vision |
| CN108181316A (en) * | 2018-03-13 | 2018-06-19 | 广西师范大学 | A kind of bamboo strip defect detection method based on machine vision |
| CN108333188A (en) * | 2018-02-01 | 2018-07-27 | 天津力神电池股份有限公司 | A kind of online apparent visual detection device of battery pole piece |
| CN108776143A (en) * | 2018-05-28 | 2018-11-09 | 湖北工业大学 | A kind of online vision inspection apparatus and method of the small stain of egg eggshell surface |
| CN108918526A (en) * | 2018-04-10 | 2018-11-30 | 华南理工大学 | A kind of chips defect detection method of flexibility IC package base plate line |
| CN109242848A (en) * | 2018-09-21 | 2019-01-18 | 西华大学 | Based on OTSU and GA-BP neural network wallpaper defects detection and recognition methods |
| CN109632808A (en) * | 2018-12-05 | 2019-04-16 | 深圳大学 | Seamed edge defect inspection method, device, electronic equipment and storage medium |
| CN109903283A (en) * | 2019-03-04 | 2019-06-18 | 江苏维普光电科技有限公司 | A kind of mask graph edge defect detection algorithm based on image normal vector |
| CN110487808A (en) * | 2019-08-22 | 2019-11-22 | 广东智源机器人科技有限公司 | It is a kind of for automating the hygienic state detection method and system of frying pan pot gallbladder |
| CN111389747A (en) * | 2020-04-26 | 2020-07-10 | 成都复星联创科技有限公司 | Bamboo strip intelligent sorting system and method based on visual identification |
| CN115655342A (en) * | 2022-08-25 | 2023-01-31 | 中冶建工集团有限公司 | Test device and method for monitoring mildew of raw bamboo |
| CN115684174A (en) * | 2022-10-19 | 2023-02-03 | 咸宁职业技术学院 | A method for monitoring the safe operation of an agricultural product transport conveyor belt |
| CN117351470A (en) * | 2023-12-04 | 2024-01-05 | 西北工业大学 | A worker fatigue detection method based on spatiotemporal characteristics |
| CN117732755A (en) * | 2024-01-03 | 2024-03-22 | 东方电气集团东方汽轮机有限公司 | Bamboo strip intelligent screening and grading device |
| CN120931657A (en) * | 2025-10-13 | 2025-11-11 | 晶科能源(海宁)有限公司 | Defect detection method and defect detection system for photovoltaic cell |
-
2008
- 2008-07-03 CN CNA2008101502442A patent/CN101320004A/en active Pending
Cited By (44)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102034098A (en) * | 2010-12-21 | 2011-04-27 | 上海电机学院 | Automatic bolt sorting system and automatic bolt sorting method |
| CN102359952A (en) * | 2011-06-13 | 2012-02-22 | 浙江大学 | Contact photoelectric sensor for identifying front and back of bamboo filament |
| CN102359952B (en) * | 2011-06-13 | 2013-07-03 | 浙江大学 | Contact photoelectric sensor for identifying front and back of bamboo filament |
| CN102521600A (en) * | 2011-11-03 | 2012-06-27 | 北京农业信息技术研究中心 | Method and system for identifying white-leg shrimp disease on basis of machine vision |
| CN102937592A (en) * | 2012-10-20 | 2013-02-20 | 山东理工大学 | Ceramic radome pore and material loosening defect automatic detection method |
| CN102937592B (en) * | 2012-10-20 | 2014-07-16 | 山东理工大学 | Ceramic radome pore and material loosening defect automatic detection method |
| CN104458748A (en) * | 2013-09-25 | 2015-03-25 | 中国科学院沈阳自动化研究所 | Aluminum profile surface defect detecting method based on machine vision |
| CN104458748B (en) * | 2013-09-25 | 2017-02-08 | 中国科学院沈阳自动化研究所 | Aluminum profile surface defect detecting method based on machine vision |
| CN106248690A (en) * | 2015-06-09 | 2016-12-21 | 东芝机械株式会社 | Defect detecting method and flaw detection apparatus |
| CN105158258A (en) * | 2015-07-15 | 2015-12-16 | 广西师范大学 | Computer vision-based bamboo strip surface defect detection method |
| CN105158258B (en) * | 2015-07-15 | 2017-09-01 | 广西师范大学 | A method for detecting surface defects of bamboo strips based on computer vision |
| CN105021628A (en) * | 2015-07-19 | 2015-11-04 | 中北大学 | Detection method for surface defects of optical fiber image inverter |
| CN105405142A (en) * | 2015-11-12 | 2016-03-16 | 冯平 | Edge defect detection method and system for glass panel |
| CN105405142B (en) * | 2015-11-12 | 2019-04-05 | 冯平 | A kind of the side defect inspection method and system of glass panel |
| CN105466950A (en) * | 2016-01-14 | 2016-04-06 | 上海孚兴电子科技有限公司 | Bamboo dice online detection method and system based on vision |
| CN106651831A (en) * | 2016-09-30 | 2017-05-10 | 广西师范大学 | Bamboo piece defect detection method and bamboo piece defect detection system |
| CN106651831B (en) * | 2016-09-30 | 2020-02-11 | 广西师范大学 | Bamboo block defect detection method and system |
| CN106780473A (en) * | 2016-12-23 | 2017-05-31 | 西安交通大学 | A kind of magnet ring defect multi-vision visual detection method and system |
| CN106645178B (en) * | 2017-01-11 | 2023-05-12 | 广西师范大学 | Bamboo splint edge defect detection device |
| CN106645178A (en) * | 2017-01-11 | 2017-05-10 | 广西师范大学 | Apparatus for detecting bamboo strip edge defects |
| CN106770331A (en) * | 2017-02-10 | 2017-05-31 | 南京航空航天大学 | A kind of workpiece, defect detecting system based on machine vision |
| CN106770331B (en) * | 2017-02-10 | 2020-03-10 | 南京航空航天大学 | A workpiece defect detection system based on machine vision |
| CN107154039B (en) * | 2017-04-28 | 2020-10-27 | 北京简易科技有限公司 | Rubber tube online defect detection method |
| CN107154039A (en) * | 2017-04-28 | 2017-09-12 | 北京简易科技有限公司 | The online defect detecting device of sebific duct and method |
| CN107256549A (en) * | 2017-06-06 | 2017-10-17 | 滁州市天达汽车部件有限公司 | A kind of bamboo strip defect detection method based on machine vision |
| CN108333188A (en) * | 2018-02-01 | 2018-07-27 | 天津力神电池股份有限公司 | A kind of online apparent visual detection device of battery pole piece |
| CN108181316B (en) * | 2018-03-13 | 2019-12-20 | 广西师范大学 | Bamboo strip defect detection method based on machine vision |
| CN108181316A (en) * | 2018-03-13 | 2018-06-19 | 广西师范大学 | A kind of bamboo strip defect detection method based on machine vision |
| CN108918526A (en) * | 2018-04-10 | 2018-11-30 | 华南理工大学 | A kind of chips defect detection method of flexibility IC package base plate line |
| CN108776143A (en) * | 2018-05-28 | 2018-11-09 | 湖北工业大学 | A kind of online vision inspection apparatus and method of the small stain of egg eggshell surface |
| CN109242848B (en) * | 2018-09-21 | 2021-04-20 | 西华大学 | Wallpaper defect detection and identification method based on OTSU and GA-BP neural network |
| CN109242848A (en) * | 2018-09-21 | 2019-01-18 | 西华大学 | Based on OTSU and GA-BP neural network wallpaper defects detection and recognition methods |
| CN109632808A (en) * | 2018-12-05 | 2019-04-16 | 深圳大学 | Seamed edge defect inspection method, device, electronic equipment and storage medium |
| CN109632808B (en) * | 2018-12-05 | 2021-11-09 | 深圳大学 | Edge defect detection method and device, electronic equipment and storage medium |
| CN109903283A (en) * | 2019-03-04 | 2019-06-18 | 江苏维普光电科技有限公司 | A kind of mask graph edge defect detection algorithm based on image normal vector |
| CN110487808A (en) * | 2019-08-22 | 2019-11-22 | 广东智源机器人科技有限公司 | It is a kind of for automating the hygienic state detection method and system of frying pan pot gallbladder |
| CN111389747A (en) * | 2020-04-26 | 2020-07-10 | 成都复星联创科技有限公司 | Bamboo strip intelligent sorting system and method based on visual identification |
| CN115655342A (en) * | 2022-08-25 | 2023-01-31 | 中冶建工集团有限公司 | Test device and method for monitoring mildew of raw bamboo |
| CN115684174A (en) * | 2022-10-19 | 2023-02-03 | 咸宁职业技术学院 | A method for monitoring the safe operation of an agricultural product transport conveyor belt |
| CN117351470A (en) * | 2023-12-04 | 2024-01-05 | 西北工业大学 | A worker fatigue detection method based on spatiotemporal characteristics |
| CN117351470B (en) * | 2023-12-04 | 2024-03-19 | 西北工业大学 | Operator fatigue detection method based on space-time characteristics |
| CN117732755A (en) * | 2024-01-03 | 2024-03-22 | 东方电气集团东方汽轮机有限公司 | Bamboo strip intelligent screening and grading device |
| CN120931657A (en) * | 2025-10-13 | 2025-11-11 | 晶科能源(海宁)有限公司 | Defect detection method and defect detection system for photovoltaic cell |
| CN120931657B (en) * | 2025-10-13 | 2026-02-24 | 晶科能源(海宁)有限公司 | Defect detection method and defect detection system for photovoltaic cell |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101320004A (en) | Bamboo strip defect online detection method based on machine vision | |
| CN114937055B (en) | Image self-adaptive segmentation method and system based on artificial intelligence | |
| CN107203990B (en) | A Label Damage Detection Method Based on Template Matching and Image Quality Assessment | |
| CN109115785B (en) | Casting polishing quality detection method and device and use method thereof | |
| CN108460757B (en) | Mobile phone TFT-LCD screen Mura defect online automatic detection method | |
| CN115239704B (en) | Accurate detection and repair method for wood surface defects | |
| CN104056789B (en) | Carrot defect image quantitative detection method | |
| CN102175700B (en) | Method for detecting welding seam segmentation and defects of digital X-ray images | |
| CN103063167B (en) | A kind of method of automatic decision laser cleaning effect | |
| CN105046697B (en) | A kind of beer bottleneck localization method assessed based on multiple random loop truss and degree of fitting | |
| CN103267764B (en) | Hot-rolled steel plate surface defect image identification method based on neighborhood information estimation | |
| CN110009618A (en) | A kind of Axle Surface quality determining method and device | |
| CN103674965A (en) | Classification and detection method of wafer appearance defects | |
| CN110490847A (en) | The LED chip quality determining method of view-based access control model | |
| CN104899871B (en) | A kind of IC elements solder joint missing solder detection method | |
| CN101256157A (en) | Surface defect detection method and device | |
| CN104122271A (en) | Automated optical inspection (AOI)-based bullet apparent defect detection method | |
| CN105046700A (en) | Brightness correction and color classification-based fruit surface defect detection method and system | |
| CN105424709A (en) | Fruit surface defect detection method based on image marking | |
| CN105404869A (en) | Computer vision based fruit shape grading method | |
| CN110084787B (en) | Synthetic leather gluing online monitoring method based on machine vision | |
| CN107490582A (en) | A kind of streamline Work Piece Verification System Based | |
| CN108280838A (en) | A kind of intermediate plate tooth form defect inspection method based on edge detection | |
| CN110412055A (en) | A lens white fog defect detection method based on multi-light source dark field illumination | |
| CN107256549B (en) | A method of bamboo strip defect detection based on machine vision |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20081210 |