CN108537153B - A method for detecting and locating hole defects in log boards based on ellipse fitting - Google Patents

A method for detecting and locating hole defects in log boards based on ellipse fitting Download PDF

Info

Publication number
CN108537153B
CN108537153B CN201810260055.4A CN201810260055A CN108537153B CN 108537153 B CN108537153 B CN 108537153B CN 201810260055 A CN201810260055 A CN 201810260055A CN 108537153 B CN108537153 B CN 108537153B
Authority
CN
China
Prior art keywords
ellipse
log
image
group
point
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
Application number
CN201810260055.4A
Other languages
Chinese (zh)
Other versions
CN108537153A (en
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.)
South China Agricultural University
Original Assignee
South China 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 South China Agricultural University filed Critical South China Agricultural University
Priority to CN201810260055.4A priority Critical patent/CN108537153B/en
Publication of CN108537153A publication Critical patent/CN108537153A/en
Application granted granted Critical
Publication of CN108537153B publication Critical patent/CN108537153B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

本发明涉及一种基于椭圆拟合的原木板材孔洞缺陷检测与定位方法,包括以下步骤:S1.使用拍摄设备于原木板材运输传送带上方垂直向下对原木板材进行拍照,获得原木板材的图像;S2.对原木板材的图像中的每一个像素点做色差均方值运算,依据色差均方值对原木板材的图像做二值化处理;S3.对步骤S2得到的二值化图像利用二值连通区域标记法于全域内标定孔洞边缘点,完成每一个孔洞边缘点的标定和逐次编号;S4.对步骤S3得到的每一个孔洞边缘点分别进行椭圆拟合,使拟合椭圆能最小化的完全覆盖孔洞;S5.对步骤S1中原木板材两端用于压实板材的绘有定标线的固定条进行像素度量,从而实现在整幅图像中的像素级定位,结合拟合椭圆信息将椭圆的圆心点精确定位,并发送给数控机床设备。

Figure 201810260055

The present invention relates to a method for detecting and locating hole defects in a log board based on ellipse fitting, comprising the following steps: S1. Use a photographing device to take a picture of the log board vertically and downward above the log board transport conveyor belt to obtain an image of the log board; S2 . Perform a color difference mean square value operation on each pixel in the image of the log board, and perform a binarization process on the log board image according to the color difference mean square value; S3. Use binary connectivity for the binarized image obtained in step S2 The area marking method calibrates the hole edge points in the whole area, and completes the calibration and sequential numbering of each hole edge point; S4. Perform ellipse fitting on each hole edge point obtained in step S3, so that the fitting ellipse can be minimized completely. Covering the holes; S5. Perform pixel measurement on the fixed bars with calibration lines drawn at both ends of the log plate used for compacting the plate in step S1, so as to achieve pixel-level positioning in the entire image, and combine the fitting ellipse information to fit the ellipse The center point of the circle is precisely positioned and sent to the CNC machine tool.

Figure 201810260055

Description

Log plate hole defect detection and positioning method based on ellipse fitting
Technical Field
The invention relates to the technical field of wood processing, in particular to a log board hole defect detection and positioning method based on ellipse fitting.
Background
The shortage of forest resources in China, and the improvement of the timber outturn rate and the production efficiency are the key points in the fields of timber processing and automation. The quality defects of knots, cracks, decay and the like of the wood can cause the solid wood board to have porosity and layering, and the use value, the economic value and the like of the log board can be directly influenced. Traditional wood working enterprises mostly utilize the manual work to detect and fix a position, and the manual work detects with the inefficiency of location, and can waste human resources. The wood surface detection means that surface defect data of the raw wood plate, such as the number, shape, position, size and the like of surface defect holes, are acquired in a nondestructive mode, data information is transmitted to a numerical control machine tool and the like, and a rapid filling scheme is realized. The solid wood board is automatically detected, quickly positioned and optimally filled with holes by adopting an image recognition technology and a graphics technology, so that the board can be utilized to the maximum extent, and the automation level of optimal processing of the log board can be greatly improved.
Disclosure of Invention
The invention provides a log board hole defect detecting and positioning method based on ellipse fitting, aiming at solving the technical defects of low efficiency and waste of human resources in the prior art that the log board hole is detected and positioned manually.
In order to realize the purpose, the technical scheme is as follows:
a log board hole defect detection and positioning method based on ellipse fitting comprises the following steps:
s1, photographing a log plate vertically downwards above a log plate conveying conveyor belt by using photographing equipment to obtain an image of the log plate;
s2, performing color difference mean square value operation on each pixel point in the image of the log plate, performing binarization processing on the image of the log plate according to a color difference mean square value, setting the pixel point with the color difference mean square value larger than a certain set value as 1, and setting the pixel point with the color difference mean square value smaller than the certain set value as 0; thereby separating the wells and the background;
s3, hole edge points are calibrated in the universe by utilizing a binary connected region marking method for the binary image obtained in the step S2, and calibration and successive numbering of each hole edge point are completed;
s4, respectively carrying out ellipse fitting on each hole edge point obtained in the step S3 to enable the fitted ellipse to be minimized and completely cover the hole;
and S5, carrying out pixel measurement on the fixing strips which are used for compacting the plate and are drawn with the fixed marking lines at the two ends of the original wood plate in the step S1, thereby realizing pixel-level positioning in the whole image, accurately positioning the central point of the ellipse by combining fitting ellipse information, and sending the central point of the ellipse to numerical control machine equipment.
Preferably, the specific process of performing the color difference mean square value operation in step S2 is as follows:
1) firstly, each pixel point P is obtainedx,yAverage value of RBG tristimulus values of (R, G, B)
Figure BDA0001610037870000021
Figure BDA0001610037870000022
2) Calculate the point and the average value of three colors
Figure BDA0001610037870000023
Mean square value of θ:
Figure BDA0001610037870000024
preferably, the specific process of numbering hole edge points in step S3 is as follows:
for a binary image with a background of 0 and a hole of 1, carrying out progressive image scanning from top to bottom, forming a sequence of continuous black pixels in each line into a group, and recording the starting position, the ending position and the line number of the black pixels; when scanning the next row, searching a group of continuous black pixels, and if the group has a superposition area with the group of the previous row, assigning the group mark of the previous row to the group mark of the previous row; if it has overlapping area with more than two groups in the previous row, assigning the minimum label of a connected group to the current group, and writing the group label of the previous row into the equivalent pair; converting each row of the equivalent pairs in the group with the same label into equivalent sequences, giving each sequence an identical label, starting from 2, and giving each equivalent sequence a label; traversing the marks of the starting group, searching the equivalent sequence, and giving a new mark to the equivalent sequence, namely completing the hole edge point search and numbering.
Preferably, the step S4 implements the specific process of precisely positioning the ellipse center point as follows:
using n edge points (x) of the marked holes1,y1),(x2,y2),…(xn,yn) Fitting an ellipse covering the minimum area of the cavity, solving a fitting ellipse method according to a least square method, wherein an ellipse curve can be expressed as:
Figure BDA0001610037870000025
if the center point offset is considered, another description of the ellipse not at the origin is:
Figure BDA0001610037870000026
finishing to obtain:
Figure BDA0001610037870000027
order:
Figure BDA0001610037870000031
the expansion can be expressed as:
Ax2+By2+Cxy=1
this equation indicates that the major and minor axes of the ellipse are no longer parallel to the coordinate axes, but the center is still at the origin, moving the center point to (x)0,y0) Obtaining:
A(x-x0)2+By(y-y0)2+C(x-x0)(y-y0)=1
the unfolding is as follows:
Figure BDA0001610037870000032
the general equation for the corresponding ellipse is:
x2+gxy+cy2+dx+ey+f=0
wherein
Figure BDA0001610037870000033
Figure BDA0001610037870000034
The ellipse center (x) can be obtained by determining the parameters g, c, d, e and f0,y0) The rotation angle theta, and the major and minor axes a and b, which are the least squares solution of the system of equations in five-membered form;
if a certain point (x)i,yj) With an error epsiloniThe least square principle is that the sum of squares of the errors of the minimization equation is used for determining each index parameter;
Figure BDA0001610037870000035
therefore, it is
Figure BDA0001610037870000036
First order partial derivatives of the respective parameters
Figure BDA0001610037870000037
Figure BDA0001610037870000038
Figure BDA0001610037870000039
Figure BDA00016100378700000310
Figure BDA00016100378700000311
Solving the above equation to find the respective parameters g, c, d, e, f in the least squares sense and thus the ellipse center (x)0,y0) Rotation angle ofTheta, and major and minor axes a and b.
Compared with the prior art, the invention has the beneficial effects that:
according to the invention, an image processing technology and graphics are combined, a log plate image on a conveyor belt is obtained through shooting equipment, a black-white binary image is obtained through color difference mean square value processing, holes with defects are preliminarily separated, edge points of the holes are searched in the universe through a binary connected region marking method, the holes are numbered successively, and a minimum ellipse covering the holes is obtained through ellipse fitting according to the numbered edge points; and determining a measurement pixel value according to the calibration line of the edge of the compacted wood board, finally calculating the position of the center of the ellipse according to the pixel measurement result, realizing the accurate positioning of the hole repairing, and sending the hole repairing result to numerical control machine equipment to finish the hole repairing operation of the log board. The invention uses shooting equipment to complete the detection and positioning of the holes and the large color difference blocks of the original wood board, and is beneficial to the automatic operation of a numerical control machine.
Drawings
FIG. 1 is a schematic flow diagram of a method.
Figure 2 is a schematic view of the log sheet transfer and image acquisition.
Fig. 3 is a schematic image of the obtained raw wood plank.
Fig. 4 is a schematic diagram of a binarized image.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
the invention is further illustrated below with reference to the figures and examples.
Example 1
As shown in fig. 1, the log board hole defect detecting and positioning method based on ellipse fitting provided by the invention comprises the following steps:
s1, photographing a log plate vertically downwards above a log plate conveying conveyor belt by using photographing equipment to obtain an image of the log plate; the color of the transport conveyor belt is required to be a color with a large RGB color mean square value (such as red, green, blue, etc.), and the color is used as a background, so that the holes and the raw wood plates form large color difference contrast. The log planks are on parallel running conveyor belts and the camera is positioned directly above the conveyor belts perpendicular to the conveyor belts as shown in figure 2. An image of the raw wood plank was obtained as shown in fig. 3.
S2, performing color difference mean square value operation on each pixel point in the image of the log plate, performing binarization processing on the image of the log plate according to a color difference mean square value, setting the pixel point with the color difference mean square value larger than a certain set value as 1, and setting the pixel point with the color difference mean square value smaller than the certain set value as 0; thereby separating the pores from the background. The small mean square value of the difference is the natural color of the wood board, the binary array of the difference is set to be 0, the large mean square value of the difference is the background color corresponding to the hole, and the binary array of the difference is set to be 1. Considering that fine noise spots possibly appear in the binary image, a morphological erosion expansion algorithm is adopted for smooth denoising. An example of the binarized image is shown in fig. 4.
S3, hole edge points are calibrated in the universe by utilizing a binary connected region marking method for the binary image obtained in the step S2, and calibration and successive numbering of each hole edge point are completed;
s4, respectively carrying out ellipse fitting on each hole edge point obtained in the step S3 to enable the fitted ellipse to be minimized and completely cover the hole;
and S5, carrying out pixel measurement on the fixing strips which are used for compacting the plate and are drawn with the fixed marking lines at the two ends of the original wood plate in the step S1, thereby realizing pixel-level positioning in the whole image, accurately positioning the central point of the ellipse by combining fitting ellipse information, and sending the central point of the ellipse to numerical control machine equipment. As shown in fig. 2, the plate compacting bars are printed with fixed lines, the fixed lines are 1 cm long stripes with black and white alternated, the number of pixels of 1 cm black and white blocks and 1 cm white blocks of each row of black and white stripes is detected, the average value is obtained, the average value of the pixels in the 1 cm area is calculated, and then the length of the 1 pixel representing the distance can be calculated. And further, the data of the ellipse center and the major and minor axes can be gradually obtained for concretization.
In this embodiment, the specific process of performing the color difference mean square value operation in step S2 is as follows:
1) firstly, each pixel point P is obtainedx,y(R,Average of RBG tristimulus values of G, B)
Figure BDA0001610037870000051
Figure BDA0001610037870000052
2) Calculate the point and the average value of three colors
Figure BDA0001610037870000053
Mean square value of θ:
Figure BDA0001610037870000054
in this embodiment, the specific process of numbering the hole edge points in step S3 is as follows:
for a binary image with a background of 0 and a hole of 1, carrying out progressive image scanning from top to bottom, forming a sequence of continuous black pixels in each line into a group, and recording the starting position, the ending position and the line number of the black pixels; when scanning the next row, searching a group of continuous black pixels, and if the group has a superposition area with the group of the previous row, assigning the group mark of the previous row to the group mark of the previous row; if it has overlapping area with more than two groups in the previous row, assigning the minimum label of a connected group to the current group, and writing the group label of the previous row into the equivalent pair; converting each row of the equivalent pairs in the group with the same label into equivalent sequences, giving each sequence an identical label, starting from 2, and giving each equivalent sequence a label; traversing the marks of the starting group, searching the equivalent sequence, and giving a new mark to the equivalent sequence, namely completing the hole edge point search and numbering.
In this embodiment, the specific process of implementing accurate positioning of the elliptical center point in step S4 is as follows:
using n edge points (x) of the marked holes1,y1),(x2,y2),…(xn,yn) Fitting an ellipse covering the minimum area of the hole, according to a minimum of twoThe method of fitting an ellipse by multiplication, the ellipse curve can be expressed as:
Figure BDA0001610037870000055
if the center point offset is considered, another description of the ellipse not at the origin is:
Figure BDA0001610037870000061
finishing to obtain:
Figure BDA0001610037870000062
order:
Figure BDA0001610037870000063
the expansion can be expressed as:
Ax2+By2+Cxy=1
this equation indicates that the major and minor axes of the ellipse are no longer parallel to the coordinate axes, but the center is still at the origin, moving the center point to (x)0,y0) Obtaining:
A(x-x0)2+By(y-y0)2+C(x-x0)(y-y0)=1
the unfolding is as follows:
Figure BDA0001610037870000064
the general equation for the corresponding ellipse is:
x2+gxy+cy2+dx+ey+f=0
wherein
Figure BDA0001610037870000065
Figure BDA0001610037870000066
The ellipse center (x) can be obtained by determining the parameters g, c, d, e and f0,y0) The rotation angle theta, and the major and minor axes a and b, which are the least squares solution of the system of equations in five-membered form;
if a certain point (x)i,yj) With an error epsiloniThe least square principle is that the sum of squares of the errors of the minimization equation is used for determining each index parameter;
Figure BDA0001610037870000067
therefore, it is
Figure BDA0001610037870000068
First order partial derivatives of the respective parameters
Figure BDA0001610037870000069
Figure BDA00016100378700000610
Figure BDA0001610037870000071
Figure BDA0001610037870000072
Figure BDA0001610037870000073
Solving the above equation to find the respective parameters g, c, d, e, f in the least squares sense and thus the ellipse center (x)0,y0) The rotation angle theta, and the major and minor axes a and b.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (3)

1.一种基于椭圆拟合的原木板材孔洞缺陷检测与定位方法,其特征在于:包括以下步骤:1. a log plate hole defect detection and positioning method based on ellipse fitting, is characterized in that: comprise the following steps: S1.使用拍摄设备于原木板材运输传送带上方垂直向下对原木板材进行拍照,获得原木板材的图像;S1. Use photographing equipment to take pictures of the log board vertically above the log board transport conveyor belt to obtain an image of the log board; S2.对原木板材的图像中的每一个像素点做色差均方值运算,然后依据色差均方值对原木板材的图像做二值化处理,将色差均方值大于某一设定值的像素点设置为1,而将色差均方值小于某一设定值的像素点设置为0;由此分离出孔洞和背景;S2. Perform the color difference mean square value operation on each pixel in the image of the log plate, and then binarize the image of the log plate according to the color difference mean square value, and divide the pixels whose color difference mean square value is greater than a certain set value. The point is set to 1, and the pixel point whose color difference mean square value is less than a certain set value is set to 0; thus, the hole and the background are separated; S3.对步骤S2得到的二值化图像利用二值连通区域标记法于全域内标定孔洞边缘点,完成每一个孔洞边缘点的标定和逐次编号;S3. Use the binary connected region marking method to demarcate the hole edge points in the whole domain for the binarized image obtained in step S2, and complete the calibration and successive numbering of each hole edge point; S4.对步骤S3得到的每一个孔洞边缘点分别进行椭圆拟合,使拟合椭圆能最小化的完全覆盖孔洞;S4. Perform ellipse fitting on each hole edge point obtained in step S3, so that the fitted ellipse can be minimized and completely cover the hole; S5.对步骤S1中原木板材两端用于压实板材的绘有定标线的固定条进行像素度量,从而实现在整幅图像中的像素级定位,结合拟合椭圆信息将椭圆的圆心点精确定位,并发送给数控机床设备;S5. Pixel measurement is performed on the fixed bars with calibration lines drawn at both ends of the log plate used for compacting the plate in step S1, so as to realize pixel-level positioning in the entire image, and the center point of the ellipse is combined with the fitting ellipse information. Precise positioning and send to CNC machine tools; 所述步骤S4实现椭圆圆心点精确定位的具体过程如下:The specific process of realizing the precise positioning of the ellipse center point in the step S4 is as follows: 利用标记出来孔洞的n个边缘点(x1,y1),(x2,y2),…(xn,yn)拟合一个覆盖空洞最小面积的椭圆,按照最小二乘法求拟合椭圆方法,椭圆曲线可以表示为:Use the n edge points (x 1 , y 1 ), (x 2 , y 2 ), ... (x n , y n ) of the marked holes to fit an ellipse covering the minimum area of the hole, and find the fit according to the least squares method Ellipse method, elliptic curve can be expressed as:
Figure FDA0003125688820000011
Figure FDA0003125688820000011
若考虑中心点偏移,不在原点则椭圆的另外一个描述形式为:If the center point offset is considered, and it is not at the origin, another description form of the ellipse is:
Figure FDA0003125688820000012
Figure FDA0003125688820000012
整理得:Arranged:
Figure FDA0003125688820000013
Figure FDA0003125688820000013
令:make:
Figure FDA0003125688820000014
Figure FDA0003125688820000014
则展开式可以表示为:Then the expansion can be expressed as: Ax2+By2+Cxy=1Ax 2 +By 2 +Cxy=1 该式表明椭圆长短轴已不再和坐标轴平行,但中心仍在原点,将中心点移到(x0,y0)得到:This formula shows that the major and minor axes of the ellipse are no longer parallel to the coordinate axes, but the center is still at the origin. Move the center point to (x 0 , y 0 ) to get: A(x-x0)2+By(y-y0)2+C(x-x0)(y-y0)=1A(xx 0 ) 2 +By(yy 0 ) 2 +C(xx 0 )(yy 0 )=1 展开有:Expand with:
Figure FDA0003125688820000021
Figure FDA0003125688820000021
对应椭圆一般方程为:The general equation of the corresponding ellipse is: x2+gxy+cy2+dx+ey+f=0x 2 +gxy+cy 2 +dx+ey+f=0 其中
Figure FDA0003125688820000022
Figure FDA0003125688820000023
确定了参数g,c,d,e,f就可以得到椭圆中心(x0,y0),旋转角度θ、以及长短轴a和b,这五元一次方程组的最小二乘解;
in
Figure FDA0003125688820000022
Figure FDA0003125688820000023
After determining the parameters g, c, d, e, and f, the center of the ellipse (x 0 , y 0 ), the rotation angle θ, and the major and minor axes a and b, the least squares solution of the five-element linear equation system can be obtained;
若某点(xi,yj)带入有误差εi,最小二乘原理就是用极小化方程误差的平方和来确定各指标参数;If a certain point (x i , y j ) brings an error ε i , the principle of least squares is to use the sum of squares of the minimization equation errors to determine the parameters of each index;
Figure FDA0003125688820000024
Figure FDA0003125688820000024
Figure FDA0003125688820000025
对各个参数求一阶偏导
Therefore
Figure FDA0003125688820000025
Find first-order partial derivatives for each parameter
Figure FDA0003125688820000026
Figure FDA0003125688820000026
Figure FDA0003125688820000027
Figure FDA0003125688820000027
Figure FDA0003125688820000028
Figure FDA0003125688820000028
Figure FDA0003125688820000029
Figure FDA0003125688820000029
Figure FDA00031256888200000210
Figure FDA00031256888200000210
求解上述方程从而求得最小二乘意义上的各个参数g,c,d,e,f,从而求得椭圆中心(x0,y0),旋转角度θ、以及长短轴a和b。Solve the above equation to obtain each parameter g, c, d, e, f in the sense of least squares, thereby obtain the ellipse center (x 0 , y 0 ), the rotation angle θ, and the major and minor axes a and b.
2.根据权利要求1所述的基于椭圆拟合的原木板材孔洞缺陷检测与定位方法,其特征在于:所述步骤S2进行色差均方值运算的具体过程如下:2. the log plate hole defect detection and positioning method based on ellipse fitting according to claim 1, is characterized in that: the concrete process that described step S2 carries out chromatic aberration mean square value calculation is as follows: 1)先取每一个像素点Px,y(R,G,B)的RBG三色值的平均值
Figure FDA0003125688820000031
1) First take the average value of the RBG tristimulus values of each pixel point P x, y (R, G, B)
Figure FDA0003125688820000031
Figure FDA0003125688820000032
Figure FDA0003125688820000032
2)求取该点与三色平均值
Figure FDA0003125688820000033
的均方值θ:
2) Find the point and the three-color average
Figure FDA0003125688820000033
The mean square value θ of :
Figure FDA0003125688820000034
Figure FDA0003125688820000034
3.根据权利要求1所述的基于椭圆拟合的原木板材孔洞缺陷检测与定位方法,其特征在于:所述步骤S3对孔洞边缘点编号的具体过程如下:3. the log plate hole defect detection and positioning method based on ellipse fitting according to claim 1, is characterized in that: described step S3 is as follows to the concrete process of hole edge point numbering: 对于背景为0,孔洞为1的二值图像,从上往下进行逐行图像扫描,把每一行中连续的黑色像素组成一个序列成为一组,记录其开始位置、终止位置以及其所在行号;扫描下一行时,同样寻找连续黑色像素的组,如果跟上一行的组有重合区域,则将上一行的组标赋值给它;如果它与上一行两个以上的组有重叠区域,则给当前组赋一个相连组的最小标号,并将上一行的组标记写入等价对;将相同标号的组中每一行等价对转换为等价序列,每一个序列用给定一相同标号,标号从2开始,给每一个等价序列一个标号;遍历开始组的标记,查找等价序列,给予等价序列新的标记,即完成孔洞边缘点搜索和编号。For a binary image with a background of 0 and a hole of 1, scan the image line by line from top to bottom, form a sequence of consecutive black pixels in each line into a group, and record its start position, end position, and the line number where it is located. ; When scanning the next line, also look for a group of consecutive black pixels. If there is an overlapping area with the group in the previous line, assign the group label of the previous line to it; if it has an overlapping area with more than two groups in the previous line, then Assign the minimum label of a connected group to the current group, and write the group label of the previous row into the equivalent pair; convert each row of equivalent pairs in the group with the same label into an equivalent sequence, and each sequence uses the given same label , the label starts from 2, and each equivalent sequence is given a label; traverse the labels of the starting group, find the equivalent sequence, and give a new label to the equivalent sequence, that is, complete the search and numbering of hole edge points.
CN201810260055.4A 2018-03-27 2018-03-27 A method for detecting and locating hole defects in log boards based on ellipse fitting Active CN108537153B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810260055.4A CN108537153B (en) 2018-03-27 2018-03-27 A method for detecting and locating hole defects in log boards based on ellipse fitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810260055.4A CN108537153B (en) 2018-03-27 2018-03-27 A method for detecting and locating hole defects in log boards based on ellipse fitting

Publications (2)

Publication Number Publication Date
CN108537153A CN108537153A (en) 2018-09-14
CN108537153B true CN108537153B (en) 2021-08-24

Family

ID=63485204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810260055.4A Active CN108537153B (en) 2018-03-27 2018-03-27 A method for detecting and locating hole defects in log boards based on ellipse fitting

Country Status (1)

Country Link
CN (1) CN108537153B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112991307B (en) * 2021-03-25 2023-07-25 中南大学 A defect circle fitting method, device and medium for drilling and blasting
CN113379688B (en) * 2021-05-28 2023-12-08 慕贝尔汽车部件(太仓)有限公司 Stabilizer bar hole deviation detection method and system based on image recognition
CN113780200A (en) * 2021-09-15 2021-12-10 安徽理工大学 Detection and localization method of various pavement disease areas based on computer vision
CN114782450B (en) * 2022-06-23 2022-10-25 北京航空航天大学杭州创新研究院 Hole filling equipment control method, device, equipment and computer readable medium
CN115239714B (en) * 2022-09-22 2022-12-06 山东汇智家具股份有限公司 Raw wood material grading evaluation method for floor production
CN116703922B (en) * 2023-08-08 2023-10-13 青岛华宝伟数控科技有限公司 Intelligent positioning method and system for sawn timber defect position
CN117214183B (en) * 2023-11-07 2024-01-30 山东泗水金立得纸业有限公司 Paper defect detection method based on machine vision

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0467149A2 (en) * 1990-07-18 1992-01-22 Dainippon Screen Mfg. Co., Ltd. Method of and device for inspecting pattern of printed circuit board
JPH1043917A (en) * 1996-07-31 1998-02-17 Seiko Precision Kk Boring method for plate-like work and boring device and boring position detecting method and boring position detecting device
EP1061466A2 (en) * 1999-06-10 2000-12-20 Konica Corporation Optical pickup device and optical type surface displacement detecting apparatus
CN203148381U (en) * 2013-01-07 2013-08-21 电子科技大学 Automatic device for detecting plate holes and groove positions of furniture plates
CN105976352A (en) * 2016-04-14 2016-09-28 北京工业大学 Weld seam surface detect feature extraction method based on grayscale image morphology
CN107389701A (en) * 2017-08-22 2017-11-24 西北工业大学 A kind of PCB visual defects automatic checkout system and method based on image

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0467149A2 (en) * 1990-07-18 1992-01-22 Dainippon Screen Mfg. Co., Ltd. Method of and device for inspecting pattern of printed circuit board
JPH1043917A (en) * 1996-07-31 1998-02-17 Seiko Precision Kk Boring method for plate-like work and boring device and boring position detecting method and boring position detecting device
EP1061466A2 (en) * 1999-06-10 2000-12-20 Konica Corporation Optical pickup device and optical type surface displacement detecting apparatus
CN203148381U (en) * 2013-01-07 2013-08-21 电子科技大学 Automatic device for detecting plate holes and groove positions of furniture plates
CN105976352A (en) * 2016-04-14 2016-09-28 北京工业大学 Weld seam surface detect feature extraction method based on grayscale image morphology
CN107389701A (en) * 2017-08-22 2017-11-24 西北工业大学 A kind of PCB visual defects automatic checkout system and method based on image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"椭圆拟合的非线性最小二乘方法";安新源 等;《计算机工程与应用》;20091231;全文 *

Also Published As

Publication number Publication date
CN108537153A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN108537153B (en) A method for detecting and locating hole defects in log boards based on ellipse fitting
CN102275382B (en) Method for automatically detecting registering deviations of color printed matters
CN115294123B (en) Corrugated board quality detection method based on image vision
KR101298957B1 (en) Wood knot detecting method, device, and program
CN105976354B (en) Color and gradient based component positioning method and system
CN106897996A (en) chromatography error detection method based on machine vision
CN105574845B (en) A kind of polyphaser array cigarette-brand lamination quantity measuring method and device
CN102765249A (en) Machine vision detection method based on four-colour printed matter registration detection marks
CN110793976A (en) Printing quality detection system and method
CN109190434B (en) A Barcode Recognition Algorithm Based on Subpixel Corner Detection
CN109752392A (en) A kind of pcb board defect type detection system and method
CN109785294A (en) A kind of pcb board defective locations detection system and method
CN113506276A (en) Marker and method for measuring structure displacement
CN111402343A (en) High-precision calibration plate and calibration method
CN111024722B (en) Data fusion-based wood defect detection system and method
CN107203356B (en) A method and system for automatic inspection of prepress data
CN111724354A (en) Image processing-based method for measuring spike length and small spike number of multiple wheat
CN105547167B (en) Strip width measuring system and method based on machine vision
WO2021256389A1 (en) Defect inspection device, defect inspection method and program, printing device, and printed matter production method
JP2005182143A (en) Cap top surface inspection method
CN114968137A (en) Intelligent manufacturing industrial production cooperative management platform based on big data analysis
CN109001112A (en) A kind of light source for defects detection determines method and system
CN113902894A (en) Strip type level meter automatic reading identification method based on image processing
CN110530287B (en) Unwrapping phase error detection and correction method based on fringe series inaccuracy
CN117274158A (en) A method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes

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
GR01 Patent grant
GR01 Patent grant