CN111551552B - Appearance quality detection method for round hole punching net - Google Patents

Appearance quality detection method for round hole punching net Download PDF

Info

Publication number
CN111551552B
CN111551552B CN202010419366.8A CN202010419366A CN111551552B CN 111551552 B CN111551552 B CN 111551552B CN 202010419366 A CN202010419366 A CN 202010419366A CN 111551552 B CN111551552 B CN 111551552B
Authority
CN
China
Prior art keywords
circle
line
image
hole punching
row
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
CN202010419366.8A
Other languages
Chinese (zh)
Other versions
CN111551552A (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.)
Xiangtan University
Original Assignee
Xiangtan 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 Xiangtan University filed Critical Xiangtan University
Priority to CN202010419366.8A priority Critical patent/CN111551552B/en
Publication of CN111551552A publication Critical patent/CN111551552A/en
Application granted granted Critical
Publication of CN111551552B publication Critical patent/CN111551552B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/08Measuring arrangements characterised by the use of optical techniques for measuring diameters
    • G01B11/12Measuring arrangements characterised by the use of optical techniques for measuring diameters internal diameters
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/14Measuring arrangements characterised by the use of optical techniques for measuring distance or clearance between spaced objects or spaced apertures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method for detecting the appearance quality of a round hole punching net. The invention mainly comprises four steps: firstly, preprocessing a hole punching net image to be detected; then virtually setting two horizontal lines in a hole punching net image to be detected to intersect with a first row of holes, intersecting two vertical lines with a first column of holes, and gradually adjusting and determining the final positions of the four lines; thirdly, virtual upper transverse lines, lower transverse lines, left vertical lines and right vertical lines are set in batches by using priori knowledge, and intersection points of all round holes and all virtual lines are obtained; finally, judging the appearance defect of the round hole punching net and calculating the center coordinates of all round holes, the radius of the round holes, the hole spacing and other parameters. The invention has the advantages of strong universality, suitability for appearance detection and parameter determination of various round hole punching nets, high detection speed and high precision.

Description

Appearance quality detection method for round hole punching net
Technical Field
The invention relates to a technology for detecting appearance quality of a round hole punching net, in particular to a method for detecting round hole parameters and appearance defects in the round hole punching net.
Background
The round hole punching net is formed by using a metal plate as a raw material, and punching a plurality of round holes with the same radius, equal horizontal spacing and equal vertical spacing on the metal plate by a punching machine, wherein the round holes are regularly distributed. The round hole punching net usually takes galvanized steel plates, stainless steel plates, copper plates, aluminum plates, nickel plates and alloy plates as raw materials, and has the advantages of bending resistance, aging resistance, difficult rust, flat and smooth net surface, firmness, durability and the like. The product is mainly applied to various industries such as chemical machinery, pharmaceutical equipment, food and beverage machinery, cigarette machinery, harvesters, dry cleaners, ironing tables, silencing equipment, refrigerating equipment (central air conditioning) loudspeaker boxes, artware manufacturing, papermaking, hydraulic fittings, pharmaceutical equipment, filtering equipment and the like.
Due to the complexity of the round hole punching net structure and the precision limitation of the mechanical control system, various defects of the round hole punching net inevitably occur. The appearance defects of the round hole punching net mainly comprise uneven thickness distribution of the round hole punching net, nonstandard parameters such as punching hole diameter, transverse hole distance, longitudinal hole distance and the like, incomplete edges of the punching ring and the like. The surface characteristics of the product are reflected by important performance indexes, and the possible defects cause serious safety problems in subsequent use, so that the method has important practical significance for online detection of the surface appearance of the product.
The punching process is the main process in the manufacturing process of the round hole punching net. The punching aperture, the transverse pitch and the longitudinal pitch are key technical indexes. In the stamping process, defects such as uneven blind hole distance, connecting holes and the like appear due to various reasons. This will have a great impact on the performance and quality of the product. Currently, parameter measurement and defect detection of round hole punching networks are heavily dependent on manual sampling. This will have a number of negative effects and inconveniences on production. First, more labor is required and labor intensity is high. Secondly, whether each product has defects is very time-consuming to check, and the false detection rate and the omission rate are higher. In recent years, with the rapid development of machine vision technology, a detection method based on machine vision has been well developed and applied in the field of surface defect detection. The method is characterized in that Hough transformation and a least square method are widely adopted in circle parameter detection to obtain information such as the radius, the circle center and the like of each circle (namely punching) in an image, on the basis, parameters such as the transverse hole distance and the longitudinal hole distance between punching are calculated one by one, and because of the fact that the circles and the edge points of the circles are numerous, all circles in the image are analyzed, the calculated amount is large, the time consumption is long, and the requirement of monitoring instantaneity is difficult to meet. In the method of subtracting the standard template from the image to be measured by adopting the customized template, the standard template cannot be obtained in practice because of the unavoidable deviation within the tolerance allowable range in the mechanical stamping process, and a certain difficulty is brought to the implementation of the method.
Disclosure of Invention
Aiming at the problems, the invention provides an automatic detection method for appearance defects of a round hole punching net, which utilizes four lines (two transverse lines and two vertical lines) to obtain eight edge points on each circle, and calculates the center coordinates of the round holes, the radius thereof, the hole spacing and other parameters by using a small number of intersection points. The method can replace manual spot check, realize high-speed and high-precision quality detection of the round hole punching plate, and enable the round hole punching net to meet the appearance qualification standard. The invention obtains the hole punching net region image by a high-precision industrial CCD camera, and the specific contents are as follows:
s100, preprocessing a hole punching net image with the size of (m, n);
s200, virtually setting an initial transverse line H 11 、H 21 And vertical line Z 11 、Z 21 Gradually adjusting the initial virtual line position and obtaining the final intersection point of the round holes and the virtual lines in the round hole punching net image;
s300, setting virtual upper transverse lines H in batches 1p Lower transverse line H 2p Left vertical line Z 1q And right vertical line Z 2q And obtaining round holes and batch setting virtual lines H in the round hole punching net image 1p 、H 2p 、Z 1q 、Z 2q Wherein p is the p-th row circle in the hole punching net image, q is the q-th column circle in the hole punching net image, H 1p Represents the upper horizontal line of the p row, H 2p Represents the p-th row lower transverse line, Z 1q Represents the left vertical line of the q-th column, Z 2q Represents the right vertical line of the q-th column;
s400, judging appearance defects of the round holes, and calculating the circle center coordinates, the radius, the transverse hole distance, the longitudinal hole distance and other dimensional parameters of each round hole by using a small number of intersection points. The invention has the following advantages:
1. the invention has strong universality and is suitable for appearance detection of various round hole punching nets;
2. the invention is not limited to the independent detection of each circle, but calculates the radius of each round hole, the circle center thereof, the distance between the round holes and other parameters by using a small number of points on the round holes, and the invention is applicable even if the machining has tolerance within the allowable range, and has high speed and high precision.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is an explanatory diagram of hole punching mesh spacing;
FIG. 3 is a cross hole pitch illustration of a round hole punch screen;
FIG. 4 is a longitudinal pitch illustration of a round hole punch screen;
FIG. 5 is an illustration of the left width of a round hole punch screen;
FIG. 6 is an illustration of the right side width of a round hole punch screen;
FIG. 7 is an initial landscape-portrait positioning chart;
FIG. 8 is a diagram of virtual horizontal and vertical lines intersecting circles;
fig. 9 is a graph of virtual horizontal and vertical lines intersecting circles.
Detailed Description
The invention is described by taking the quality detection of a round hole punching net produced by Haohui precision instruments limited company as an example. The round hole punching net is mainly applied to equipment such as dry cleaning machines, ironing tables, silencing equipment, sound boxes and the like; the appearance detection mainly comprises parameters (radius, circle center and the like) of each round hole, transverse hole distance, longitudinal hole distance and the like; before the detection starts, the model CX161 of the round hole punching net to be detected and related prior parameters thereof are input, wherein the model CX161 comprises the total width d 6 = 160.003mm, right side width d 4 11.171mm, left side width d 5 24.099mm, transverse pitch d 2 2.597mm, longitudinal pitch d 3 =1.493 mm, pore diameter d 1 =1.965 mm, as shown in fig. 2, 3, 4, 5, 6.
And converting the parameters in the world coordinate system into an image coordinate system, wherein the aim of calibration is to determine the quantitative corresponding relation between the actual size of the measured object and the number of pixels in the image acquired by the camera so as to correspond the image distance to the actual distance of the measured object, thereby realizing the actual test requirement of the parameters. When the method is implemented, the standard component imaging method is adopted to calibrate the transformation of the coordinate system. The specific calibration process is as follows:
(1) placing the calibration plate on a measuring system object stage in a horizontal manner with the accuracy of 1um by 5.6mm, and ensuring that the edges of the calibration plate are parallel to the coordinate axes of the camera imaging screen;
(2) collecting an image of a calibration plate, identifying left and right marking circles on the calibration plate, and obtaining pixel values between the left and right marking circles and the left and right marking circle centers by using the upper and lower marking circles;
(3) the actual distance of the upper, lower, left and right marking circles is divided by the pixel value between the two to obtain the pixel equivalent under the condition of fixed focal length and fixed object distance. To improve the detection accuracy, the pixel equivalent is reserved by 12 bits, the equivalent in the X-axis pixel direction of the camera is 0.003826796100mm, and the pixel equivalent in the Y-axis direction is 0.003827779593mm.
According to the transformation relation between the world coordinate system and the image coordinate system, converting the parameters under the world coordinate system into the image coordinate system to obtain the total width d 6 ' right side width d 5 ' left side width d 4 ' transverse pitch d 2 ' longitudinal pitch d 3 ' aperture d 1 ′。
The round hole punching net is horizontally arranged on the belt conveyer belt and enters the detection workstation from left to right at a fixed speed. In the detection workstation, a high-precision industrial CCD camera is vertically downward, and a top annular light source is adopted for illumination to obtain a hole punching net image. With reference to fig. 2, the specific implementation steps of the present invention are as follows:
s100, preprocessing a hole punching net image with the size of (m, n):
s110, filtering noise by using median filtering, acquiring a threshold value by using an Otsu algorithm, and performing binarization processing on the image.
S200, virtually setting initial transverse lines and vertical lines in a round hole punching net image, gradually adjusting initial virtual line positions and obtaining final intersecting points of round holes and virtual lines in the round hole punching net image:
s210, virtually setting two horizontal lines and two vertical lines in an image, and respectively recordingIs an upper transverse line H 11 And a lower transverse line H 21 Left vertical line Z 11 And right vertical line Z 21, wherein ,H11 and H21 Intersecting with the first row circle, Z 11 and Z21 Intersecting the first row of circles, an upper transverse line H 11 Is yy 01 Lower transverse line H 21 Is yy 11 Left vertical line Z 11 Is xx 01 Right vertical line Z 21 Is xx 11 As shown in fig. 7;
s220. let t=1, k=1, g=0, h=0, e=0, yy for the ordinate 01 Upper transverse line H of (2) 11 Execute S230 to determine the final position yy 01last
S230, searching a horizontal line with the y-axis in the image from left to right, and acquiring a pixel coordinate point where the horizontal line intersects with a circle:
f 1 =I(i+1,yy)-I(i,yy) i∈[1,m) (1)
Figure BDA0002496356940000031
wherein I (I, yy) is a pixel value of the image at the position (I, yy), p is a p-th row circle in the hole punching net image, and q is a q-th column circle in the hole punching net image; h t (x tpq ) Satisfy f for horizontal line 1 >The abscissa value of row q at 0; h t (y tpq ) Satisfy f for horizontal line 1 >The ordinate value of row q at 0; c (C) k (x kpq ) Satisfy f for horizontal line 1 <The abscissa value of row q at 0; c (C) k (y kpq ) Satisfy f for horizontal line 1 <The ordinate value of row q at 0;
if h=0 and g=0, S231 is performed;
if h=0 and g=1, g=g+1, S231 is performed;
if h=0 and g=3, S231 is performed;
if h=1, execute S322;
if h=2, S323 is executed;
s231 calculating H t -C k The average value of (2), namely:
Figure BDA0002496356940000041
wherein N is the number of the rows of circles;
if g=0, then step S232 is performed;
if g=2, then step S233 is performed;
if g=3, then step S234 is performed;
s232. g=g+1, yy=yy+1, if g=1, then S230 is performed, otherwise S233 is performed;
S233.c t =b t2 -b t0 ,g=g+1,b t3 =b t2
s234. if t=1 and c t >0 indicates that the horizontal line is in the upper half of the p-th row circle, the following operations are performed:
if it is
Figure BDA0002496356940000042
And e<r, yy=yy+1, e=e+1, S230 is performed;
if it is
Figure BDA0002496356940000043
And e<r, the final position of the line circle is yy, i.e. yy last =yy;
If it is
Figure BDA0002496356940000044
And e>r, judging that the line circle has a defective circle;
if t=1 and c t <0, yy 01 =yy 01 -10, performing S220;
if t=2 and c t <0 indicates that the horizontal line is in the lower half of the p-th row circle, then the following operations are performed:
if it is
Figure BDA0002496356940000045
And e<r, yy=yy-1, e=e+1, S230 is performed;
if it is
Figure BDA0002496356940000046
And e<r, the final position of the line circle is yy, i.e. yy last =yy;
If it is
Figure BDA0002496356940000047
And e>r, judging that the line circle has a defective circle;
if t=2 and c t >0, yy 11 =yy 11 +10, executing S240;
wherein ,
Figure BDA0002496356940000048
if t=1 and k=1, yy 01last =yy last The method comprises the steps of carrying out a first treatment on the surface of the If t=2 and k=2, yy 11last =yy last
If t=2 and k=2, then S250 is performed, otherwise S240 is performed;
s240. let t=2, k=2, g=0, h=0, e=0, yy for the ordinate 11 Lower transverse line H of (2) 21 Execute S230 to determine the final position yy 11last
S250. let t=3, k=3, g=0, h=0, e=0, xx for the abscissa 01 Left vertical line Z of (2) 11 Execution S260 determines its final position xx 01last
S260, searching from top to bottom for a vertical line with an abscissa xx in the image, and acquiring a pixel coordinate point where the vertical line intersects with a circle:
f 2 =I(xx,j+1)-I(xx,j) j∈[1,n) (3)
Figure BDA0002496356940000051
wherein I (xx, j) is a pixel value of an image at a position (xx, j), p is a p-th row circle in the hole punching net image, and q is a q-th column circle in the hole punching net image; h t (x tpq ) Satisfy f for vertical line 2 >The abscissa value of row q at 0; h t (y tpq ) Satisfy f for vertical line 2 >The ordinate value of row q at 0; c (C) k (x kpq ) Satisfy f for vertical line 2 <The abscissa value of row q at 0; c (C) k (y kpq ) Satisfy f for vertical line 2 <The ordinate value of row q at 0;
if h=0 and g=0, S261 is executed;
if h=0 and g=1, g=g+1, S261 is performed;
if h=0 and g=3, S261 is performed;
if h=1, S324 is performed;
if h=2, S400 is performed;
s261, calculating H t -C k The average value of (2), namely:
Figure BDA0002496356940000052
where M is the number of circles in the column,
if g=0, then step S262 is performed;
if g=2; step S263 is performed;
if g=3, then step S264 is performed;
s262.g=g+1, xx=xx+1, if g=1, S260 is performed, otherwise S263 is performed;
S263.c t =b t2 -b t0 ,g=g+1,b t3 =b t2
s264. if t=3 and c t >0 indicates that the horizontal line is in the left half of the q-th column circle, the following operations are performed:
if it is
Figure BDA0002496356940000053
And e<r, then xx=xx+1, e=e+1, S260 is performed;
if it is
Figure BDA0002496356940000054
And e<r, the final position of the column circle is xx, i.e. xx last =xx;
If it is
Figure BDA0002496356940000055
And e>r, judging that the column of circles has a defective circle;
if t=3 and c t <0, xx 01 =xx 01 -10, performing S250;
if t=4 and c t <0 indicates that the horizontal line is in the right half of the q-th column circle, then the following is performed:
if it is
Figure BDA0002496356940000056
And e<r, then xx=xx-1, e=e+1, S260 is performed;
if it is
Figure BDA0002496356940000057
And e<r, the final position of the column circle is yy, i.e. xx last =xx;
If it is
Figure BDA0002496356940000058
And e>r, judging that the column of circles has a defective circle;
if t=4 and c t >0, xx 11 =xx 11 +10, execution S270;
wherein ,
Figure BDA0002496356940000059
if t=3 and k=3, xx 01last =xx last The method comprises the steps of carrying out a first treatment on the surface of the If t=4 and k=4, xx 11last =xx last
If t=4 and k=4, then S300 is performed, otherwise S270 is performed;
s270. let t=4, k=4, g=0, h=0, e=0, xx for the abscissa 11 Right vertical line Z of (2) 21 Execution S260 determines its final position xx 11last
S300, setting virtual upper transverse lines H in batches 1p Lower transverse line H 2p Left vertical line Z 1q And right vertical line Z 2q And obtain round hole punchVirtual line H is set for round holes and batches in hole network image 1p 、H 2p 、Z 1q 、Z 2q Wherein p is the p-th row circle in the hole punching net image, q is the q-th column circle in the hole punching net image, H 1p Represents the upper horizontal line of the p row, H 2p Represents the p-th row lower transverse line, Z 1q Represents the left vertical line of the q-th column, Z 2q The right vertical line of the q-th column is shown in fig. 8, and the specific method is as follows:
s310 upper transverse line H 11 To finally determine yy 01last For the start ordinate, every interval d 3 ' set virtual upper horizontal lines in batch, namely:
yy 0p =yy 01last +(p-1)*d′ 3 ; (5)
lower transverse line H 21 To finally determine yy 11last For the start ordinate, every interval d 3 ' virtual lower horizontal lines are set in batch, namely:
yy 1p =yy 11last +(p-1)*d′ 3 ; (6)
left vertical line Z 11 To finally determine xx 01last For starting abscissa, every interval d 2 ' batch setting virtual left vertical lines, namely:
xx 0q =xx 01last +(q-1)*d′ 2 ; (7)
right vertical line Z 21 To finally determine xx 11last For starting abscissa, every interval d 2 ' batch setting of virtual right vertical lines, namely:
xx 1q =xx 11last +(q-1)*d′ 2 ; (8)
wherein p is the p-th row circle in the hole punching net image, and q is the q-th column circle in the hole punching net image;
s320, calculating virtual lines H set in batches 1p 、H 2p 、Z 1q 、Z 2q The specific method of the intersection point with the round hole in the round hole punching net image is as follows:
s321, for any upper transverse line H 1p Let t=1, k=1, yy=yy 0p H=1, executing S230, and obtaining the hole punching pattern and the round hole in the round hole punching net imageIntersection point H 1 (x 1pq ,y 1pq )、C 1 (x 1pq ,y 1pq );
S322 for any lower transverse line H 2p Let t=2, k=2, yy=yy 1p H=2, executing S230, and obtaining the intersection point H of the hole punching screen image and the round hole in the round hole punching screen image 2 (x 2pq ,y 2pq )、C 2 (x 2pq ,y 2pq );
S323 for any left vertical line Z 1q Let t=3, k=3, xx=xx 0q H=1, executing S260, and obtaining the intersection point H of the hole punched net image and the round hole 3 (x 3pq ,y 3pq )、C 3 (x 3pq ,y 3pq );
S324 for any right vertical line Z 2q Let t=4, k=4, xx=xx 1q H=2, executing S260, and obtaining the intersection point H of the hole punching screen image and the round hole in the round hole punching screen image 4 (x 4pq ,y 4pq )、C 4 (x 4pq ,y 4pq )。
S400, judging appearance defects of the round holes, and calculating the circle center coordinates, the radius, the transverse hole distance, the longitudinal hole distance and other dimensional parameters of each round hole by using a small number of intersection points:
s410, calculating a coordinate difference value, wherein the specific operation is as follows:
u 1 =H 1 (x 1pq )-H 1 (x 1p(q-1) );v 1 =H 3 (y 3pq )-H 3 (y 3(p-1)q ); (9)
u 2 =C 1 (x 1pq )-C 1 (x 1p(q-1) );v 2 =C 3 (y 3pq )-C 3 (y 3(p-1)q ); (10)
u 3 =H 2 (x 2pq )-H 2 (x 2p(q-1) );v 3 =H 4 (y 4pq )-H 4 (y 4(p-1)q ); (11)
u 4 =C 2 (x 2pq )-C 2 (x 2p(q-1) );v 4 =C 4 (y 4pq )-C 4 (y 4(p-1)q ); (12)
u 5 =H 1 (x 1pq )-C 1 (x 1p(q-1) );v 5 =H 3 (y 3pq )-C 3 (y 3(p-1)q );(13)
u 6 =H 2 (x 2pq )-C 2 (x 2p(q-1) );v 6 =H 4 (y 4pq )-C 4 (y 4(p-1)q ); (14)
s420, judging appearance defects of the round hole, wherein the specific operation is as follows:
setting a threshold t=15, performing the following operations:
u′ 1 =u 1 (w 1 +1)-u 1 (w 1 );v′ 1 =v 1 (s 1 +1)-v 1 (s 1 ); (15)
u′ 2 =u 2 (w 1 +1)-u 1 (w 1 );v′ 2 =v 2 (s 1 +1)-v 2 (s 1 ); (16)
u′ 3 =u 3 (w 1 +1)-u 3 (w 1 );v′ 3 =v 3 (s 1 +1)-v 3 (s 1 ); (17)
u′ 4 =u 4 (w 1 +1)-u 4 (w 1 );v′ 4 =v 4 (s 1 +1)-v 4 (s 1 ); (18)
u′ 5 =u 5 (w 2 +1)-u 5 (w 2 );v′ 5 =v 5 (s 2 +1)-v 5 (s 2 ); (19)
u′ 6 =u 6 (w 2 +1)-u 6 (w 2 );v′ 6 =v 6 (s 2 +1)-v 6 (s 2 ); (20)
wherein ,w1 ∈[1,max(q)-1),w 2 ∈[1,max(q)-2),s 1 ∈[1,max(p)-1),s 2 E [1, max (p) -2); p is a hole punching net pictureThe p-th row circle in the image, q is the q-th column circle in the hole punching net image;
if it is
Figure BDA0002496356940000077
The round hole has appearance defects;
s430, calculating a circle center coordinate and a radius, wherein the specific operation is as follows:
at H 1 、H 2 、H 3 、H 4 、C 1 、C 2 、C 3 、C 4 Three points H are selected from eight points 3 (x 3pq ,y 3pq )、H 4 (x 4pq ,y 4pq )、C 1 (x 1pq ,y 1pq );
Let A (x) 0 ,y 0 )=H 3 (x 3pq ,y 3pq )、B(x 1 ,y 1 )=H 4 (x 4pq ,y 4pq )、C(x 2 ,y 2 )=C 1 (x 1pq ,y 1pq )
The center of circle is marked as (x) c ,y c ) The radius is r, the diameter is equal to r,
Figure BDA0002496356940000071
Figure BDA0002496356940000072
Figure BDA0002496356940000073
wherein ,
Figure BDA0002496356940000074
Figure BDA0002496356940000075
s440, calculating the transverse hole distance and the longitudinal hole distance,
transverse pitch:
Figure BDA0002496356940000076
longitudinal hole pitch:
Figure BDA0002496356940000081
the (p, q) is the p-th row and q-th column circle in the hole punching net image, namely the q-th circle from left to right on the p-th row or the p-th circle from top to bottom on the q-th column;
s450, converting parameters calculated under the image coordinate system into the world coordinate system according to the calibrated transformation relation between the world coordinate system and the image coordinate system, and obtaining the dimensional parameters such as the center coordinates, the radius, the transverse hole pitch, the longitudinal hole pitch and the like of all the round holes in the round hole punching net image under the world coordinate system;
s460, comparing the circle center coordinates, the radius, the transverse hole distance and the longitudinal hole distance of each round hole in the round hole punching net image under the world coordinate system with the circle center coordinates, the radius, the transverse hole distance and the longitudinal hole distance of factory standards, and detecting whether the round hole meets the standards.

Claims (1)

1. A method for detecting the appearance quality of a round hole punching net at least comprises the following steps:
s100, preprocessing a hole punching net image with the size of (m, n);
s200, virtually setting an initial transverse line H 11 、H 21 And vertical line Z 11 、Z 21 Gradually adjusting the initial virtual line position and obtaining the final intersection point of the round holes and the virtual line in the round hole punching net image, wherein the step S200 further comprises the steps S210-S270:
s210, virtually arranging two horizontal lines and two vertical lines in the image, respectively marked as upper transverse lines H 11 And a lower transverse line H 21 Left vertical line Z 11 And right vertical line Z 21, wherein ,H11 and H21 And the first line circleIntersection, Z 11 and Z21 Intersecting the first row of circles, an upper transverse line H 11 Is yy 01 Lower transverse line H 21 Is yy 11 Left vertical line Z 11 Is xx 01 Right vertical line Z 21 Is xx 11
S220. let t=1, k=1, g=0, h=0, e=0, yy for the ordinate 01 Upper transverse line H of (2) 11 Execute S230 to determine the final position yy 01last
S230, searching a horizontal line with the y-axis in the image from left to right, and acquiring a pixel coordinate point where the horizontal line intersects with a circle:
f 1 =I(i+1,yy)-I(i,yy) i∈[1,m) (1)
Figure FDA0004221247670000011
wherein I (I, yy) is a pixel value of the image at the position (I, yy), p is a p-th row circle in the hole punching net image, and q is a q-th column circle in the hole punching net image; h t (x tpq ) Satisfy f for horizontal line 1 >The abscissa value of row q at 0; h t (y tpq ) Satisfy f for horizontal line 1 >The ordinate value of row q at 0; c (C) k (x kpq ) Satisfy f for horizontal line 1 <The abscissa value of row q at 0; c (C) k (y kpq ) Satisfy f for horizontal line 1 <The ordinate value of row q at 0;
if h=0 and g=0, S231 is performed;
if h=0 and g=1, g=g+1, S231 is performed;
if h=0 and g=3, S231 is performed;
if h=1, execute S322;
if h=2, S323 is executed;
s231 calculating H t -C k The average value of (2), namely:
Figure FDA0004221247670000012
where N is the number of such rows of circles,
if g=0, then step S232 is performed;
if g=2, then step S233 is performed;
if g=3, then step S234 is performed;
s232. g=g+1, yy=yy+1, if g=1, then S230 is performed, otherwise S233 is performed;
S233.c t =b t2 -b t0 ,g=g+1,b t3 =b t2
s234. if t=1 and c t >0 indicates that the horizontal line is in the upper half of the p-th row circle, the following operations are performed:
if it is
Figure FDA0004221247670000013
And e<r, yy=yy+1, e=e+1, S230 is performed;
if it is
Figure FDA0004221247670000021
And e<r, the final position of the line circle is yy, i.e. yy last =yy;
If it is
Figure FDA0004221247670000022
And e>r, judging that the line circle has a defective circle;
if t=1 and c t <0, yy 01 =yy 01 -10, performing S220;
if t=2 and c t <0 indicates that the horizontal line is in the lower half of the p-th row circle, then the following operations are performed:
if it is
Figure FDA0004221247670000023
And e<r, yy=yy-1, e=e+1, S230 is performed; />
If it is
Figure FDA0004221247670000024
And e<r, the final position of the line circle is yy, i.e. yy last =yy;
If it is
Figure FDA0004221247670000025
And e>r, judging that the line circle has a defective circle;
if t=2 and c t >0, yy 11 =yy 11 +10, executing S240;
wherein ,
Figure FDA0004221247670000026
d′ 1 a round hole standard aperture known a priori;
if t=1 and k=1, yy 01last =yy last The method comprises the steps of carrying out a first treatment on the surface of the If t=2 and k=2, yy 11last =yy last
If t=2 and k=2, then S250 is performed, otherwise S240 is performed;
s240. let t=2, k=2, g=0, h=0, e=0, yy for the ordinate 11 Lower transverse line H of (2) 21 Execute S230 to determine the final position yy 11last
S250. let t=3, k=3, g=0, h=0, e=0, xx for the abscissa 01 Left vertical line Z of (2) 11 Execution S260 determines its final position xx 01last
S260, searching from top to bottom for a vertical line with an abscissa xx in the image, and acquiring a pixel coordinate point where the vertical line intersects with a circle:
f 2 =I(xx,j+1)-I(xx,j) j∈[1,n) (3)
Figure FDA0004221247670000027
wherein I (xx, j) is a pixel value of an image at a position (xx, j), p is a p-th row circle in the hole punching net image, and q is a q-th column circle in the hole punching net image; h t (x tpq ) Satisfy f for vertical line 2 >The abscissa value of row q at 0; h t (y tpq ) Satisfy f for vertical line 2 >The ordinate value of row q at 0; c (C) k (x kpq ) Satisfy f for vertical line 2 <The abscissa value of row q at 0; c (C) k (y kpq ) Satisfy f for vertical line 2 <The ordinate value of row q at 0;
if h=0 and g=0, S261 is executed;
if h=0 and g=1, g=g+1, S261 is performed;
if h=0 and g=3, S261 is performed;
if h=1, S324 is performed;
if h=2, S400 is performed;
s261, calculating H t -C k The average value of (2), namely:
Figure FDA0004221247670000028
where M is the number of circles in the column,
if g=0, then step S262 is performed;
if g=2, then step S263 is performed;
if g=3, then step S264 is performed;
s262.g=g+1, xx=xx+1, if g=1, S260 is performed, otherwise S263 is performed;
S263.c t =b t2 -b t0 ,g=g+1,b t3 =b t2
s264. if t=3 and c t >0 indicates that the horizontal line is in the left half of the q-th column circle, the following operations are performed:
if it is
Figure FDA0004221247670000031
And e<r, then xx=xx+1, e=e+1, S260 is performed;
if it is
Figure FDA0004221247670000032
And e<r, the final position of the column circle is xx, i.e. xx last =xx;
If it is
Figure FDA0004221247670000033
And e>r, judging that the column of circles has a defective circle;
if t=3 and c t <0, xx 01 =xx 01 -10, performing S250;
if t=4 and c t <0 indicates that the horizontal line is in the right half of the q-th column circle, then the following is performed:
if it is
Figure FDA0004221247670000034
And e<r, then xx=xx-1, e=e+1, S260 is performed;
if it is
Figure FDA0004221247670000035
And e<r, the final position of the column circle is yy, i.e. xx last =xx;
If it is
Figure FDA0004221247670000036
And e>r, judging that the column of circles has a defective circle;
if t=4 and c t >0, xx 11 =xx 11 +10, execution S270;
wherein ,
Figure FDA0004221247670000037
d′ 1 a round hole standard aperture known a priori;
if t=3 and k=3, xx 01last =xx last The method comprises the steps of carrying out a first treatment on the surface of the If t=4 and k=4, xx 11last =xx last
If t=4 and k=4, then S300 is performed, otherwise S270 is performed;
s270. let t=4, k=4, g=0, h=0, e=0, xx for the abscissa 11 Right vertical line Z of (2) 21 Execution S260 determines its final position xx 11last
S300, setting virtual upper transverse lines H in batches 1p Lower transverse line H 2p Left vertical line Z 1q And right sideVertical line Z 2q And obtaining round holes and batch setting virtual lines H in the round hole punching net image 1p 、H 2p 、Z 1q 、Z 2q Wherein p is the p-th row circle in the hole punching net image, q is the q-th column circle in the hole punching net image, H 1p Represents the upper horizontal line of the p row, H 2p Represents the p-th row lower transverse line, Z 1q Represents the left vertical line of the q-th column, Z 2q Representing the q-th column right vertical line, S300 further includes steps S310-S324:
s310 upper transverse line H 11 To finally determine yy 01last For the start ordinate, every interval d 3 ' set virtual upper horizontal lines in batch, namely:
yy 0p =yy 01last +(p-1)*d′ 3 ; (5)
lower transverse line H 21 To finally determine yy 11last For the start ordinate, every interval d 3 ' virtual lower horizontal lines are set in batch, namely:
yy 1p =yy 11last +(p-1)*d′ 3 ; (6)
left vertical line Z 11 To finally determine xx 01last For starting abscissa, every interval d 2 ' batch setting virtual left vertical lines, namely:
xx 0q =xx 01last +(q-1)*d′ 2 ; (7)
right vertical line Z 21 To finally determine xx 11last For starting abscissa, every interval d 2 ' batch setting of virtual right vertical lines, namely:
xx 1q =xx 11last +(q-1)*d′ 2 ; (8)
wherein p is the p-th row circle in the hole punching net image, and q is the q-th column circle in the hole punching net image;
s320, calculating virtual lines H set in batches 1p 、H 2p 、Z 1q 、Z 2q The specific method of the intersection point with the round hole in the round hole punching net image is as follows:
s321, for any upper transverse line H 1p Let t=1, k=1, yy=yy 0p H=1, executing S230, and obtaining an image of the hole punching net and the hole punching netIntersection point H of middle round hole 1 (x 1pq ,y 1pq )、C 1 (x 1pq ,y 1pq );
S322 for any lower transverse line H 2p Let t=2, k=2, yy=yy 1p H=2, executing S230, and obtaining the intersection point H of the hole punching screen image and the round hole in the round hole punching screen image 2 (x 2pq ,y 2pq )、C 2 (x 2pq ,y 2pq );
S323 for any left vertical line Z 1q Let t=3, k=3, xx=xx 0q H=1, executing S260, and obtaining the intersection point H of the hole punched net image and the round hole 3 (x 3pq ,y 3pq )、C 3 (x 3pq ,y 3pq );
S324 for any right vertical line Z 2q Let t=4, k=4, xx=xx 1q H=2, executing S260, and obtaining the intersection point H of the hole punching screen image and the round hole in the round hole punching screen image 4 (x 4pq ,y 4pq )、C 4 (x 4pq ,y 4pq );
S400, judging appearance defects of the round holes, calculating the circle center coordinates, the radius, the transverse hole distance, the longitudinal hole distance and other dimensional parameters of each round hole by using a small number of intersection points, wherein the S400 further comprises the steps of S410-S460:
s410, calculating a coordinate difference value,
u 1 =H 1 (x 1pq )-H 1 (x 1p(q-1) );v 1 =H 3 (y 3pq )-H 3 (y 3(p-1)q ); (9)
u 2 =C 1 (x 1pq )-C 1 (x 1p(q-1) );v 2 =C 3 (y 3pq )-C 3 (y 3(p-1)q ); (10)
u 3 =H 2 (x 2pq )-H 2 (x 2p(q-1) );v 3 =H 4 (y 4pq )-H 4 (y 4(p-1)q ); (11)
u 4 =C 2 (x 2pq )-C 2 (x 2p(q-1) );v 4 =C 4 (y 4pq )-C 4 (y 4(p-1)q ); (12)
u 5 =H 1 (x 1pq )-C 1 (x 1p(q-1) );v 5 =H 3 (y 3pq )-C 3 (y 3(p-1)q ); (13)
u 6 =H 2 (x 2pq )-C 2 (x 2p(q-1) );v 6 =H 4 (y 4pq )-C 4 (y 4(p-1)q ); (14)
s420, judging the defect of the round hole,
u′ 1 =u 1 (w 1 +1)-u 1 (w 1 );v′ 1 =v 1 (s 1 +1)-v 1 (s 1 ); (15)
u′ 2 =u 2 (w 1 +1)-u 1 (w 1 );v′ 2 =v 2 (s 1 +1)-v 2 (s 1 ); (16)
u′ 3 =u 3 (w 1 +1)-u 3 (w 1 );v′ 3 =v 3 (s 1 +1)-v 3 (s 1 ); (17)
u′ 4 =u 4 (w 1 +1)-u 4 (w 1 );v′ 4 =v 4 (s 1 +1)-v 4 (s 1 ); (18)
u′ 5 =u 5 (w 2 +1)-u 5 (w 2 );v′ 5 =v 5 (s 2 +1)-v 5 (s 2 ); (19)
u′ 6 =u 6 (w 2 +1)-u 6 (w 2 );v′ 6 =v 6 (s 2 +1)-v 6 (s 2 ); (20)
wherein ,w1 ∈[1,max(q)-1),w 2 ∈[1,max(q)-2),s 1 ∈[1,max(p)-1),s 2 E [1, max (p) -2), p is the p-th row circle in the hole punching net image, and q is the q-th column circle in the hole punching net image;
if it is
Figure FDA0004221247670000058
The round hole has appearance defects, wherein T is a threshold value;
s430, calculating the center coordinates and the radius,
at H 1 、H 2 、H 3 、H 4 、C 1 、C 2 、C 3 、C 4 Three points H are selected from eight points 3 (x 3pq ,y 3pq )、H 4 (x 4pq ,y 4pq )、C 1 (x 1pq ,y 1pq );
Let A (x) 0 ,y 0 )=H 3 (x 3pq ,y 3pq )、B(x 1 ,y 1 )=H 4 (x 4pq ,y 4pq )、C(x 2 ,y 2 )=C 1 (x 1pq ,y 1pq )
The center of circle is marked as (x) c ,y c ) The radius is r, the diameter is equal to r,
Figure FDA0004221247670000051
Figure FDA0004221247670000052
Figure FDA0004221247670000053
wherein ,
Figure FDA0004221247670000054
Figure FDA0004221247670000055
s440, calculating the transverse hole distance and the longitudinal hole distance,
transverse pitch:
Figure FDA0004221247670000056
longitudinal hole pitch:
Figure FDA0004221247670000057
the (p, q) is the p-th row and q-th column circle in the hole punching net image, namely the q-th circle from left to right on the p-th row or the p-th circle from top to bottom on the q-th column;
s450, converting parameters calculated under the image coordinate system into the world coordinate system according to the calibrated transformation relation between the world coordinate system and the image coordinate system, and obtaining the dimensional parameters such as the center coordinates, the radius, the transverse hole pitch, the longitudinal hole pitch and the like of all the round holes in the round hole punching net image under the world coordinate system;
s460, comparing the circle center coordinates, the radius, the transverse hole distance and the longitudinal hole distance of each round hole in the round hole punching net image under the world coordinate system with the circle center coordinates, the radius, the transverse hole distance and the longitudinal hole distance of factory standards, and detecting whether the round hole meets the standards.
CN202010419366.8A 2020-05-18 2020-05-18 Appearance quality detection method for round hole punching net Active CN111551552B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010419366.8A CN111551552B (en) 2020-05-18 2020-05-18 Appearance quality detection method for round hole punching net

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010419366.8A CN111551552B (en) 2020-05-18 2020-05-18 Appearance quality detection method for round hole punching net

Publications (2)

Publication Number Publication Date
CN111551552A CN111551552A (en) 2020-08-18
CN111551552B true CN111551552B (en) 2023-06-13

Family

ID=72002001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010419366.8A Active CN111551552B (en) 2020-05-18 2020-05-18 Appearance quality detection method for round hole punching net

Country Status (1)

Country Link
CN (1) CN111551552B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008015029A (en) * 2006-07-03 2008-01-24 Sharp Corp Display device
CN104122265A (en) * 2013-04-28 2014-10-29 郑州大学 Method and system for checking screw hole thread missing of metal plate
CN104457577A (en) * 2014-12-19 2015-03-25 上海工业自动化仪表研究院 Machine-vision-oriented non-contact type workpiece positioning and measuring method
CN106623493A (en) * 2016-12-31 2017-05-10 湖南文理学院 Detection method for continuous punching of steel band
CN107797517A (en) * 2017-09-30 2018-03-13 湖南文理学院 The method and system detected using realizing of Robot Vision steel band punching processing
CN107907063A (en) * 2017-11-14 2018-04-13 湖南文理学院 A kind of the steel band punching processing detecting system and method for view-based access control model measurement
CN109990711A (en) * 2019-04-25 2019-07-09 湘潭大学 A kind of appearance quality detection method of punched nickel-plated steel band

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010135642A (en) * 2008-12-05 2010-06-17 Tokyo Electron Ltd Substrate inspection method and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008015029A (en) * 2006-07-03 2008-01-24 Sharp Corp Display device
CN104122265A (en) * 2013-04-28 2014-10-29 郑州大学 Method and system for checking screw hole thread missing of metal plate
CN104457577A (en) * 2014-12-19 2015-03-25 上海工业自动化仪表研究院 Machine-vision-oriented non-contact type workpiece positioning and measuring method
CN106623493A (en) * 2016-12-31 2017-05-10 湖南文理学院 Detection method for continuous punching of steel band
CN107797517A (en) * 2017-09-30 2018-03-13 湖南文理学院 The method and system detected using realizing of Robot Vision steel band punching processing
CN107907063A (en) * 2017-11-14 2018-04-13 湖南文理学院 A kind of the steel band punching processing detecting system and method for view-based access control model measurement
CN109990711A (en) * 2019-04-25 2019-07-09 湘潭大学 A kind of appearance quality detection method of punched nickel-plated steel band

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于亚像素边缘检测的高精度圆孔参数测量方法研究;钱斌等;《上海航天》;20171225(第06期);全文 *
基于极坐标计盒维数的圆形通孔缺陷检测;周强等;《陕西科技大学学报(自然科学版)》;20170225(第01期);全文 *

Also Published As

Publication number Publication date
CN111551552A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN107657603B (en) Industrial appearance detection method based on intelligent vision
CN111537517B (en) Unmanned intelligent stamping defect identification method
US9582872B2 (en) Optical film defect detection method and system thereof
CN107607554A (en) A kind of Defect Detection and sorting technique of the zinc-plated stamping parts based on full convolutional neural networks
CN115294113B (en) Quality detection method for wood veneer
CN109990711B (en) Appearance quality detection method for punched nickel-plated steel strip
CN107063099A (en) A kind of machinery manufacturing industry online quality monitoring method of view-based access control model system
CN116188475B (en) Intelligent control method, system and medium for automatic optical detection of appearance defects
CN113793337B (en) Locomotive accessory surface abnormal degree evaluation method based on artificial intelligence
CN115797354B (en) Method for detecting appearance defects of laser welding seam
CN115018827B (en) Automatic detection method for quality of building material weld joint
CN115345876B (en) Bolt thread defect detection method based on ultrasonic image
CN111161237A (en) Fruit and vegetable surface quality detection method, storage medium and sorting device thereof
CN114706358A (en) Method and system for processing welding process information of straight welded pipe
IL263097B2 (en) Optimizing a set-up stage in an automatic visual inspection process
CN115797361B (en) Aluminum template surface defect detection method
CN115272305B (en) Button hole defect detection method
CN115294109A (en) Real wood board production defect identification system based on artificial intelligence, and electronic equipment
CN114187267B (en) Stamping part defect detection method based on machine vision
CN112683166B (en) Die-cutting product size detection method
CN110935646A (en) Full-automatic crab grading system based on image recognition
CN117085969B (en) Artificial intelligence industrial vision detection method, device, equipment and storage medium
CN111551552B (en) Appearance quality detection method for round hole punching net
CN117649404A (en) Medicine packaging box quality detection method and system based on image data analysis
CN116542910A (en) Stamping part round hole positioning and deformation detection method based on sub-pixel edge extraction

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