CN116862827A - Thin-wall round sleeve qualification detection method based on image processing technology - Google Patents

Thin-wall round sleeve qualification detection method based on image processing technology Download PDF

Info

Publication number
CN116862827A
CN116862827A CN202310209620.5A CN202310209620A CN116862827A CN 116862827 A CN116862827 A CN 116862827A CN 202310209620 A CN202310209620 A CN 202310209620A CN 116862827 A CN116862827 A CN 116862827A
Authority
CN
China
Prior art keywords
thin
wall
contour
round sleeve
sleeve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310209620.5A
Other languages
Chinese (zh)
Inventor
陈爱军
沈寅初
于超
蔡晋辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Jiliang University
Original Assignee
China Jiliang 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 China Jiliang University filed Critical China Jiliang University
Priority to CN202310209620.5A priority Critical patent/CN116862827A/en
Publication of CN116862827A publication Critical patent/CN116862827A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • 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
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses a thin-wall round sleeve qualification detection method based on an image processing technology, which comprises the following specific steps: firstly, binarizing and contour detection are carried out on an image, then, two contours with the most and the most contour points are screened, circle fitting is carried out on the contours, and then, the inner contour and the outer contour of the thin-wall circular sleeve are determined according to the radius of the fitted circle; selecting the center of a fitting circle with the smallest difference from a standard circle from fitting circles of the inner and outer contours, creating rays by taking the center as a starting point, and calculating the wall thickness difference of the thin-wall circular sleeve; and finally judging whether burrs exist on the inner side of the thin-wall round sleeve according to the included angle of the inner contour of the thin-wall round sleeve and the distance between the contour point and the circle center of the fitting circle, and judging the qualification of the tested thin-wall round sleeve according to whether the maximum wall thickness difference of the thin-wall round sleeve exceeds the maximum wall thickness difference and whether the burrs exist. The method can rapidly and accurately judge whether the thin-wall round sleeve part is qualified or not, and improves the detection efficiency.

Description

Thin-wall round sleeve qualification detection method based on image processing technology
Technical Field
The invention relates to the technical field of image processing, in particular to a thin-wall round sleeve qualification detection method based on an image processing technology.
Background
Quality detection links are particularly important in the production line of factories. The quality inspection is inserted in a plurality of process links, so that the qualification rate of the produced parts can be effectively guaranteed, and meanwhile, the production cost is reduced.
Traditional quality inspection of thin-wall round sleeve workpieces mostly uses dial indicators and vernier calipers to measure the sizes of the thin-wall round sleeve workpieces and distinguish burrs through human eye observation, detection efficiency is low, and detection quality is greatly affected by human factors. For industrial production activities pursuing high efficiency, the traditional method cannot be well applied to a production line, and more intelligent devices are combined to reduce human intervention so as to improve quality inspection efficiency and effect of products. However, the research results of the method for automatically detecting the eligibility of the thin-wall round sleeve at home and abroad are very few.
Disclosure of Invention
Aiming at the defects in the background technology, the invention aims to provide a thin-wall round sleeve qualification detection method based on an image processing technology, and the measurement precision and the detection efficiency are improved.
In order to achieve the purpose, the technical scheme adopted by the invention is that the thin-wall round sleeve qualification detection method based on the image processing technology is implemented according to the following steps:
step 1: performing binarization processing of a self-adaptive threshold value on an original thin-wall circular sleeve gray level image;
step 2: performing contour detection in the binary image to obtain two contours with the maximum and the maximum number of contour points;
step 3: performing circle fitting on the two contours obtained in the step 2, and determining the inner contour and the outer contour of the thin-wall circular sleeve;
step 4: selecting a contour with small difference from a standard circle from the inner contour and the outer contour of the thin-wall circular sleeve, and obtaining the circle center O of a fitting circle corresponding to the contour;
step 5: taking the circle center O obtained in the step 4 as a starting point to make a ray outwards, calculating the wall thickness of the thin-wall round sleeve in the ray direction, rotating the ray by a constant-value step angle, and respectively calculating the wall thickness of the thin-wall round sleeve in different ray directions, thereby obtaining the maximum wall thickness difference of the thin-wall round sleeve;
step 6: calculating an included angle between a connecting line of each contour point of the inner contour of the thin-wall round sleeve and the circle center of the fitting circle of the inner contour and a horizontal line, and a distance between each contour point of the inner contour of the thin-wall round sleeve and the circle center of the fitting circle of the inner contour, and judging whether burrs exist on the inner side of the thin-wall round sleeve according to the obtained included angle and the obtained distance;
step 7: and judging whether the thin-wall round sleeve is qualified or not according to whether the maximum wall thickness difference of the thin-wall round sleeve exceeds the maximum wall thickness difference and whether burrs exist on the inner side of the thin-wall round sleeve.
Further, the step of acquiring the two contours with the maximum and the maximum contour points mainly comprises the following steps: 1) Performing contour detection in the binarized image; 2) Counting the number of contour points of each contour; 3) Sequencing all contours according to the number of contour points; 4) The two contours with the most points and the most times are extracted.
Further, the method for determining the inner contour and the outer contour of the thin-wall round sleeve comprises the following steps: and (3) performing circle fitting on the two contours obtained in the step (2) by using a least square method, wherein the contour corresponding to the fitting circle with the larger diameter is the outer contour of the thin-wall circular sleeve, and the contour corresponding to the fitting circle with the smaller diameter is the inner contour of the thin-wall circular sleeve.
Further, the method for selecting the contour with small gap from the circle in the step 4 is as follows: respectively calculating the circularity e of the inner contour and the outer contour of the thin-wall circular sleeve, wherein the contour with the circularity closest to 1 is the contour with small difference from the circle;
the calculation formula of the circularity e is as follows:
e=4πS/L 2
in the formula, S is the area of the area surrounded by the outline, namely the number of pixels surrounded by the outline, and L is the perimeter of the outline, namely the number of outline points of the outline. When the circularity e is 1, the outline is a standard circle, and the smaller the e is, the more irregular the outline is, and the larger the difference between the outline and the standard circle is.
Further, the method for obtaining the wall thickness of the thin-wall round sleeve in the direction of a certain ray comprises the following steps:
taking the circle center O obtained in the step 4 as a starting point and taking any point Q 0 To point Q 0 Making a ray respectively intersecting the inner contour fitting circle and the outer contour fitting circle of the thin-wall circular sleeve at pointsP 1 Sum point P 2 Find and P on the inner contour 1 Nearest point P 3 And find the P on the outer contour 2 Nearest point P 4 ,P 3 And P 4 The distance of the (a) is the wall thickness d of the thin-wall round sleeve in the ray direction 0
Further, the method for solving the maximum wall thickness difference of the thin-wall round sleeve comprises the following steps:
point Q 0 (x 0 ,y 0 ) Around the centre of a circle O (x) c ,y c ) Rotating according to integral multiple of a constant step angle theta to obtain a point Q 0 Rotated point Q i (x i ,y i ) I=1, 2, …, n-1, ray OQ is calculated i Thin-wall circular sleeve wall thickness d in direction i Finding the maximum thin-wall circular sleeve wall thickness d among n thin-wall circular sleeve wall thicknesses max And minimum thin-walled circular sleeve wall thickness d min The maximum wall thickness difference d=d of the thin-walled sleeve max -d min
The calculation formula of the step angle theta is as follows: θ=360 °/n;
the point Q i The set of equations for solving the coordinates of (c) is as follows:
x i =(x 0 -x c )cos(iθ)-(y 0 -y c )sin(iθ)+x c
y i =(x 0 -x c )sin(iθ)-(y 0 -y c )cos(iθ)+y c
where i=1, 2, …, n-1.
Further, judging whether burrs exist on the inner side of the thin-wall round sleeve mainly comprises the following steps:
fitting circle center O from inner contour of thin-wall circular sleeve in (x in ,y in ) Continuously acquiring a contour point A of the inner contour of the thin-wall round sleeve clockwise or anticlockwise from the right horizontal direction of the thin-wall round sleeve j (x j ,y j ) J=1, 2, …, m, m is the number of contour points of the inner contour of the thin-wall circular sleeve;
calculating each contour point A of inner contour of thin-wall circular sleeve j To the center of circle O in Distance D of (2) j
D j =[(x j -x in ) 2 +(y j -y in ) 2 ] 1/2
Where j=1, 2, …, m.
Calculating all contour points of the inner contour of the thin-wall circular sleeve to the circle center O in Average value D of the distances of (2) avg
D avg =(D 1 +D 2 +…+D m )/m
Calculate the circle center O in And each contour point A of the inner contour of the thin-wall circular sleeve j Included angle alpha between the connecting line of (C) and the horizontal direction j ,α j The calculation formula of (2) is as follows:
α j =arctan[(y j -y in )/(x j -x in )]
where j=1, 2, …, m.
Further, the specific conditions for judging whether burrs exist on the inner side of the thin-wall round sleeve are as follows:
condition 1: included angle alpha j Continuously increasing or continuously decreasing, j=1, 2, …, m;
condition 2: each distance D j Are all in interval (D) avg -th1,D avg +th2), where th1 and th2 are two real numbers, which can be determined experimentally, j=1, 2, …, m;
when the conditions 1 and 2 are satisfied at the same time, judging that burrs do not exist on the inner side of the thin-wall round sleeve; otherwise, judging that burrs exist on the inner side of the thin-wall round sleeve.
Further, the condition for judging whether the thin-wall round sleeve is qualified is as follows:
condition 3: the maximum wall thickness difference d of the thin-wall round sleeve is smaller than a threshold value th3, and th3 is determined through experiments;
condition 4: burrs do not exist on the inner side of the thin-wall round sleeve;
when the condition 3 and the condition 4 are met at the same time, judging that the thin-wall round sleeve is qualified; otherwise, judging that the thin-wall round sleeve is unqualified.
Compared with the background art, the gain effect of the invention is as follows:
1. the invention realizes non-contact automatic measurement of the wall thickness of the thin-wall circular sleeve by using an image processing technology, can detect the inner burrs, and can effectively avoid false detection caused by errors generated by instruments and human factors compared with manual detection.
2. According to the invention, the wall thickness is measured after the extracted contour is subjected to circle fitting, the circle center of the best fitting circle is screened out by comparing the fitting effect by utilizing the circularity of the fitting circle, and the wall thickness measurement of the thin-wall circular sleeve can be more accurate by adopting the actual contour point closest to the fitting point when the wall thickness is measured.
3. The invention judges the burrs on the inner side of the thin-wall round sleeve by comparing the relation between the included angles of each contour point and the horizontal direction of the connecting line of the inner circle center, and compared with a method for only detecting the distance between the contour point and the circle center, the method can judge whether the burrs exist on the inner side of the thin-wall round sleeve more accurately.
Drawings
FIG. 1 is an overall flow chart of a thin-walled cylinder jacket wall thickness measurement of the present invention;
FIG. 2 is a gray scale image of the end face of a thin-walled cylinder jacket to be inspected in accordance with the present invention;
FIG. 3 is a binary image of the end face of a thin-walled cylinder jacket after pretreatment according to the present invention;
FIG. 4 is a representation of two profile images of the end face of a thin-walled cylinder jacket of the present invention;
FIG. 5 is an image of an inner and outer contour fitted circle of the present invention;
FIG. 6 is a schematic diagram of the calculation of the wall thickness of a thin-walled cylinder jacket according to the present invention;
FIG. 7 is a schematic diagram of the ray generation of the present invention;
FIG. 8 is an image of the actual location of the maximum and minimum wall thicknesses of the present invention;
FIG. 9 is a schematic diagram of an angle calculation method according to the present invention;
fig. 10 is an image of the actual position of the burr of the present invention.
Detailed Description
The invention is further illustrated by the following figures and examples, which are not intended to be limiting.
It should be noted that the invention uses industrial camera and lens to collect the end face gray image of thin-wall round sleeve part through the back light of the surface light source.
As shown in fig. 1, the method of the present invention comprises the steps of:
step 1: binarization processing of self-adaptive threshold value is carried out on original thin-wall circular sleeve gray level image
And (3) reading the acquired original image of the thin-wall circular sleeve shown in fig. 2, automatically acquiring a threshold value for the original image by adopting an OTSU method, and performing binarization processing on an end face image of the thin-wall circular sleeve, wherein the background in the processed image is black, and the target is white, as shown in fig. 3.
Step 2: performing contour detection in the binary image to obtain two contours with the maximum and the next maximum contour points
Performing contour detection on the binary image, calculating the number of contour points contained in each contour, sequencing the contours according to the number of contour points, and selecting two contours Con with the maximum number and the maximum number of contour points 1 And Con 2 As shown in fig. 4, the two contours are the inner and outer contours of the thin-walled circular sleeve.
Step 3: performing circle fitting on the two contours obtained in the step 2 to determine the inner contour and the outer contour of the thin-wall circular sleeve
To Con 1 、Con 2 The two contours are subjected to circle fitting by using a least square method to obtain 2 fitting circles C 1 And C 2 The shape and center of the circle are shown in fig. 5. Because burrs may exist on the inner wall and the outer wall of the thin-wall circular sleeve, the corresponding relation between the inner circle and the outer circle and the outline cannot be judged according to the sequencing result of the number of the outline points. And judging the outline corresponding to the fitting circle with larger diameter as the outer outline of the thin-wall circular sleeve, and judging the outline corresponding to the fitting circle with smaller diameter as the inner outline of the thin-wall circular sleeve.
Step 4: selecting a contour with small difference from the inner contour and the outer contour of the thin-wall circular sleeve, and obtaining the circle center O of a fitting circle corresponding to the contour
Because rays are needed when the wall thickness of the thin-wall round sleeve part is calculated in the subsequent step 5, the circle center O of a fitting circle corresponding to the outline of the standard circle with the circularity e being closer to the circle center O is selected as a starting point of the rays. The calculation formula of the contour circularity e is as follows:
e=4πS/L 2
in the formula, S is the area of the area surrounded by the outline, namely the number of pixels surrounded by the outline, and L is the perimeter of the outline, namely the number of outline points of the outline. When the circularity e is 1, the outline is a standard circle, and the smaller the e is, the more irregular the outline shape is, and the larger the difference between the outline shape and the circle is.
Step 5: taking the circle center O obtained in the step 4 as a starting point to take a ray outwards, calculating the wall thickness of the thin-wall circular sleeve in the ray direction, simultaneously rotating the ray by a constant-value step angle, and respectively calculating the wall thicknesses of the thin-wall circular sleeves in different ray directions to obtain the maximum wall thickness difference of the thin-wall circular sleeve
After the origin O is obtained, rays for calculating wall thickness pixel values need to be plotted, as shown in FIG. 6, rays OQ are plotted 0 Inner and outer circles of the cross-section P 01 、P 02 Finding intersection point P on inner contour of end face of thin-wall round sleeve part 01 Nearest pixel point P 03 And find the intersection point P on the outer contour 02 Nearest pixel point P 04 ,P 03 And P 04 Is the Euclidean distance of ray OQ 0 Pixel value d of wall thickness of thin-wall round sleeve part in direction 0
As shown in FIG. 7, ray OQ 0 With O as the rotation center, anticlockwise rotates by an angle theta to obtain rays OQ 1 The ray OQ is calculated according to the method 1 Pixel value d of wall thickness of thin-wall round sleeve part in direction 1
Continuously rotating the rays according to the steps and calculating pixel values of the wall thickness of the thin-wall round sleeve part in the direction of the rays after the rotation until rays OQ are obtained n-1 Pixel value d of wall thickness of thin-wall round sleeve part n-1 Until, where n=360°/θ.
Point Q i The set of equations for solving the coordinates of (c) is as follows:
x i =(x 0 -x c )cos(iθ)-(y 0 -y c )sin(iθ)+x c
y i =(x 0 -x c )sin(iθ)-(y 0 -y c )cos(iθ)+y c
where i=1, 2, …, n-1.
Obtaining the maximum value d of pixel values of the wall thickness of the thin-wall round sleeve part in all ray directions max Minimum value d min Mean value d avg The pixel value of the wall thickness of the thin-wall round sleeve part is an average value d avg The pixel value of the wall thickness difference is d max And d min Is a difference in (c).
And then the actual physical quantity represented by each pixel, namely the pixel equivalent, is obtained through calibration.
And multiplying the pixel value of the maximum wall thickness, the pixel value of the minimum wall thickness and the pixel value of the wall thickness of the thin-wall round sleeve part obtained in the steps by pixel equivalent respectively to obtain the actual values of the maximum wall thickness, the minimum wall thickness and the wall thickness of the thin-wall round sleeve part.
As shown in fig. 8, the "1" position is the thinnest part of the thin-wall round sleeve, and the "2" position is the thickest part of the thin-wall round sleeve.
Step 6: calculating the included angle between the connecting line of each contour point of the inner contour of the thin-wall circular sleeve and the circle center of the fitting circle of the inner contour and the horizontal line, and the distance between each contour point of the inner contour of the thin-wall circular sleeve and the circle center of the fitting circle of the inner contour, and judging whether burrs exist inside the thin-wall circular sleeve according to the obtained included angle and the obtained distance
The calculation schematic diagram of the included angle between the connecting line of each contour point of the inner contour of the thin-wall circular sleeve and the circle center of the fitting circle of the inner contour and the horizontal line is shown in fig. 9. The included angle is the circle center O in And each contour point A of the inner contour of the thin-wall circular sleeve j An included angle alpha between the connecting line of (a) and the negative half axis of the horizontal direction y j The calculation formula of (2) is as follows:
α j =arctan[(y j -y in )/(x j -x in )]+β
wherein β is a correction value, and β is 180 ° when the contour point falls at the first and fourth image points; when the contour point falls at the second quadrant, beta is 360 degrees; the remaining cases β are 0 °. When x is j =x in When the contour point falls on the positive half axis of y, alpha j =180°; when the contour point falls on the y negative half axis, alpha j =0°。
And calculating the distance from each contour point of the inner contour of the thin-wall circular sleeve to the center of the fitting circle of the inner contour. Inner contour wheels of thin-wall round sleeveProfile point a j To the center of circle O in Distance D of (2) j The calculation formula of (2) is as follows:
D j =[(x j -x in ) 2 +(y j -y in ) 2 ] 1/2
where j=1, 2, …, m, m is the number of contour points of the inner contour of the thin-walled cylinder jacket.
Calculating all contour points of the inner contour of the thin-wall circular sleeve to the circle center O in Average value D of the distances of (2) avg
D avg =(D 1 +D 2 +…+D m )/m
Judging whether burrs exist on the inner side of the thin-wall round sleeve or not through the following conditions:
condition 1: included angle alpha j Continuously increasing or continuously decreasing, j=1, 2, …, m;
condition 2: each distance D j Are all in interval (D) avg -th1,D avg +th2), th1 and th2 are two real numbers, and j=1, 2, …, m can be determined experimentally.
After finding D avg And a series of alpha j 、D j Then, selecting proper th1 and th2 according to actual requirements, and judging that burrs are not existed on the inner side of the thin-wall round sleeve when the condition 1 and the condition 2 are simultaneously met; otherwise, judging that burrs exist on the inner side of the thin-wall round sleeve. Fig. 10 is a graph of the detection results of this example, in which burrs are present at gray marks at the "3" and "4" positions.
Step 7: judging whether the thin-wall round sleeve is qualified or not according to whether the maximum wall thickness difference of the thin-wall round sleeve exceeds the maximum wall thickness difference and whether burrs exist on the inner side of the thin-wall round sleeve or not
The condition for judging whether the thin-wall round sleeve is qualified is as follows:
condition 3: the maximum wall thickness difference d of the thin-wall round sleeve is smaller than a threshold value th3, and th3 is determined through experiments;
condition 4: burrs do not exist on the inner side of the thin-wall round sleeve.
And when the conditions 3 and 4 are simultaneously met, the tested thin-wall round sleeve is a qualified piece, and otherwise, the tested thin-wall round sleeve is a disqualified piece.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (8)

1. The thin-wall round sleeve qualification detection method based on the image processing technology is characterized by comprising the following steps of:
step 1: performing binarization processing of a self-adaptive threshold value on an original thin-wall circular sleeve gray level image;
step 2: performing contour detection in the binary image to obtain two contours with the maximum and the maximum number of contour points;
step 3: performing circle fitting on the two contours obtained in the step 2, and determining the inner contour and the outer contour of the thin-wall circular sleeve;
step 4: selecting a contour with small difference from a standard circle from the inner contour and the outer contour of the thin-wall circular sleeve, and obtaining the circle center O of a fitting circle corresponding to the contour;
step 5: taking the circle center O obtained in the step 4 as a starting point to make a ray outwards, calculating the wall thickness of the thin-wall round sleeve in the ray direction, rotating the ray by a constant-value step angle, and respectively calculating the wall thickness of the thin-wall round sleeve in different ray directions, thereby obtaining the maximum wall thickness difference of the thin-wall round sleeve;
step 6: calculating an included angle between a connecting line of each contour point of the inner contour of the thin-wall round sleeve and the circle center of the fitting circle of the inner contour and a horizontal line, and a distance between each contour point of the inner contour of the thin-wall round sleeve and the circle center of the fitting circle of the inner contour, and judging whether burrs exist on the inner side of the thin-wall round sleeve according to the obtained included angle and the obtained distance;
step 7: and judging whether the thin-wall round sleeve is qualified or not according to whether the maximum wall thickness difference of the thin-wall round sleeve exceeds the maximum wall thickness difference and whether burrs exist on the inner side of the thin-wall round sleeve.
2. The method for detecting the qualification of the thin-wall round sleeve based on the image processing technology as claimed in claim 1, wherein the method comprises the following steps:
in the step 2, the step of obtaining two profiles with the maximum and the maximum number of profile points mainly comprises the following steps:
step 21: performing contour detection in the binarized image;
step 22: counting the number of contour points of each contour;
step 23: sequencing all contours according to the number of contour points;
step 24: the two contours with the most points and the most times are extracted.
3. The method for detecting the qualification of the thin-wall round sleeve based on the image processing technology as claimed in claim 1, wherein the method comprises the following steps:
in the step 3, the method for determining the inner contour and the outer contour of the thin-wall round sleeve comprises the following steps: and (3) performing circle fitting on the two contours obtained in the step (2) by using a least square method, wherein the contour corresponding to the fitting circle with the larger diameter is the outer contour of the thin-wall circular sleeve, and the contour corresponding to the fitting circle with the smaller diameter is the inner contour of the thin-wall circular sleeve.
4. The method for detecting the qualification of the thin-wall round sleeve based on the image processing technology as claimed in claim 1, wherein the method comprises the following steps:
in the step 4, the method for selecting the outline with small gap from the circle comprises the following steps: respectively calculating the circularity e of the inner contour and the outer contour of the thin-wall circular sleeve, wherein the contour with the circularity closest to 1 is the contour with small difference from the circle;
the calculation formula of the circularity e is as follows:
e=4πS/L 2
wherein S is the area of the area surrounded by the outline, namely the number of pixels surrounded by the outline; l is the perimeter of the contour, i.e. the number of contour points of the contour.
5. The method for detecting the qualification of the thin-wall round sleeve based on the image processing technology as claimed in claim 1, wherein the method comprises the following steps:
in the step 5, the wall thickness of the thin-wall round sleeve in a certain radial direction is obtainedThe method comprises the following steps: taking the circle center O obtained in the step 4 as a starting point and taking any point Q 0 To point Q 0 Making a ray respectively intersecting the inner contour fitting circle and the outer contour fitting circle of the thin-wall circular sleeve at a point P 1 Sum point P 2 Find and P on the inner contour 1 Nearest point P 3 And find the P on the outer contour 2 Nearest point P 4 ,P 3 And P 4 The distance of the (a) is the wall thickness d of the thin-wall round sleeve in the ray direction 0
6. The method for detecting the qualification of the thin-wall round sleeve based on the image processing technology as claimed in claim 1, wherein the method comprises the following steps:
in the step 5, the method for obtaining the maximum wall thickness difference of the thin-wall round sleeve comprises the following steps: point Q 0 (x 0 ,y 0 ) Around the centre of a circle O (x) c ,y c ) Rotating according to integral multiple of a constant step angle theta to obtain a point Q 0 Rotated point Q i (x i ,y i ) I=1, 2, …, n-1, ray OQ is calculated i Thin-wall circular sleeve wall thickness d in direction i Finding the maximum thin-wall circular sleeve wall thickness d among n thin-wall circular sleeve wall thicknesses max And minimum thin-walled circular sleeve wall thickness d min The maximum wall thickness difference d=d of the thin-walled sleeve max -d min
The calculation formula of the step angle theta is as follows: θ=360 °/n;
the point Q i The set of equations for solving the coordinates of (c) is as follows:
x i =(x 0 -x c )cos(iθ)-(y 0 -y c )sin(iθ)+x c
y i =(x 0 -x c )sin(iθ)-(y 0 -y c )cos(iθ)+y c
where i=1, 2, …, n-1.
7. The method for detecting the qualification of the thin-wall round sleeve based on the image processing technology as claimed in claim 1, wherein the method comprises the following steps:
in the step 6, judging whether burrs exist on the inner side of the thin-wall round sleeve mainly comprises the following steps:
step 61: fitting circle center O from inner contour of thin-wall circular sleeve in (x in ,y in ) Continuously acquiring a contour point A of the inner contour of the thin-wall round sleeve clockwise or anticlockwise from the right horizontal direction of the thin-wall round sleeve j (x j ,y j ) J=1, 2, …, m, m is the number of contour points of the inner contour of the thin-wall circular sleeve;
step 62: calculating each contour point A of inner contour of thin-wall circular sleeve j To the center of circle O in Distance D of (2) j
D j =[(x j -x in ) 2 +(y j -y in ) 2 ] 1/2
Wherein j=1, 2, …, m;
step 63: calculating all contour points of the inner contour of the thin-wall circular sleeve to the circle center O in Average value D of the distances of (2) avg
D avg =(D 1 +D 2 +…+D m )/m
Step 64: calculate the circle center O in And each contour point A of the inner contour of the thin-wall circular sleeve j Included angle alpha between the connecting line of (C) and the horizontal direction j ,α j The calculation formula of (2) is as follows:
α j =arctan[(y j -y in )/(x j -x in )]+β
wherein j=1, 2, …, m; beta is a correction value;
step 65: judging whether burrs exist on the inner side of the thin-wall round sleeve or not through the following conditions:
condition 1: included angle alpha j Continuously increasing or continuously decreasing, j=1, 2, …, m;
condition 2: each distance D j Are all in interval (D) avg -th1,D avg +th2), where th1 and th2 are two real numbers, which can be determined experimentally, j=1, 2, …, m;
when the conditions 1 and 2 are satisfied at the same time, judging that burrs do not exist on the inner side of the thin-wall round sleeve; otherwise, judging that burrs exist on the inner side of the thin-wall round sleeve.
8. The method for detecting the qualification of the thin-wall round sleeve based on the image processing technology as claimed in claim 1, wherein the method comprises the following steps:
in the step 6, the condition for judging whether the thin-wall round sleeve is qualified is as follows:
condition 3: the maximum wall thickness difference d of the thin-wall round sleeve is smaller than a threshold value th3, and th3 is determined through experiments;
condition 4: burrs do not exist on the inner side of the thin-wall round sleeve;
when the condition 3 and the condition 4 are met at the same time, judging that the thin-wall round sleeve is qualified; otherwise, judging that the thin-wall round sleeve is unqualified.
CN202310209620.5A 2023-03-07 2023-03-07 Thin-wall round sleeve qualification detection method based on image processing technology Pending CN116862827A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310209620.5A CN116862827A (en) 2023-03-07 2023-03-07 Thin-wall round sleeve qualification detection method based on image processing technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310209620.5A CN116862827A (en) 2023-03-07 2023-03-07 Thin-wall round sleeve qualification detection method based on image processing technology

Publications (1)

Publication Number Publication Date
CN116862827A true CN116862827A (en) 2023-10-10

Family

ID=88230968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310209620.5A Pending CN116862827A (en) 2023-03-07 2023-03-07 Thin-wall round sleeve qualification detection method based on image processing technology

Country Status (1)

Country Link
CN (1) CN116862827A (en)

Similar Documents

Publication Publication Date Title
CN115423813B (en) Method for detecting welding defects on surface of welded pipe
JP6922539B2 (en) Surface defect determination method and surface defect inspection device
KR20160090359A (en) Surface defect detection method and surface defect detection device
US10041888B2 (en) Surface defect inspecting device and method for hot-dip coated steel sheets
CN112686920A (en) Visual measurement method and system for geometric dimension parameters of circular part
CN107709977B (en) Surface defect detection device and surface defect detection method
CN113689415A (en) Steel pipe wall thickness online detection method based on machine vision
CN115100127A (en) Circular weld defect detection method based on visual identification
Deng et al. Defect detection of bearing surfaces based on machine vision technique
CN113706423B (en) Artificial intelligence-based mechanical part corrosion crack detection method
CN115880280B (en) Method for detecting quality of welding seam of steel structure
Du et al. Roundness detection of end face for shaft workpiece based on Canny-Zernike sub pixel edge detection and improved hough transform
CN108827197B (en) Linear array industrial CT homogeneous material size measurement method capable of reducing edge degradation influence
CN116862827A (en) Thin-wall round sleeve qualification detection method based on image processing technology
CN111815575B (en) Bearing steel ball part detection method based on machine vision
Lin et al. Real-time image-based defect inspection system of internal thread for nut
CN116205923B (en) Nondestructive testing method for internal defects of automobile hub based on X-RAY
CN112560839A (en) Automatic identification method and system for reading of pointer instrument
CN115272345B (en) Image processing-based fireproof fabric quality analysis method
JP6064942B2 (en) Surface defect detection method and surface defect detection apparatus
CN116823710A (en) Wall thickness measuring method and system for thin-wall round sleeve part for machine vision
US20030136925A1 (en) Method to detect defects in the shape of a rolled product and relative device
JP6397292B2 (en) Item identification and image discrimination method by image processing
CN114897846A (en) Dot matrix target regularity detection method based on machine vision
Fan et al. Dimensional inspecting system of shaft parts based on machine vision

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