Disclosure of Invention
The technical problem to be solved by the invention is to provide a flywheel detection system and a flywheel detection method for a flywheel production line aiming at the defects in the prior art.
In order to solve the technical problems, the invention adopts the following technical scheme: the flywheel detection method for the flywheel production line comprises a flywheel body, a shaft hole formed in the center of the flywheel body, and a plurality of through holes formed in the flywheel body and arranged on the periphery of the shaft hole in a circular array:
The detection method is used for detecting the position precision and the size precision of the through hole of the flywheel intermediate product on the flywheel production line, and the position and the diameter of the shaft hole of the flywheel intermediate product and the diameter of the flywheel body are detected to be qualified; the method comprises the following steps:
1) A marking graph Z 0 is arranged on a flywheel body of the flywheel intermediate in advance, then a overlooking image of the flywheel intermediate under a white background is collected, and a gray level image P 0 is obtained after processing;
2) Acquiring a profile image P L of the flywheel body in the P 0, and removing images at the periphery of the profile image P L to obtain a gray image P 1 containing the flywheel body, the shaft holes on the flywheel body and a plurality of through holes;
3) Acquiring a shaft hole image P z and images P t of a plurality of through holes from the gray level image P 1, and acquiring a circle center O 1 of the shaft hole image P z;
4) Pre-detecting the position and the size of the through hole;
5) Establishing a two-dimensional coordinate system S t according to the mark graph Z 0 and the circle center O 1, and detecting the position accuracy of the through hole on the pre-detected qualified image;
6) Detecting the aperture precision of the through hole on the image qualified in the detection of the position precision of the through hole;
7) And judging the flywheel intermediate products with all through holes with qualified position accuracy and aperture accuracy as qualified products, and finishing the detection.
Preferably, the logo pattern Z 0 in step 1) is a pattern having marks indicating the X-direction and the Y-direction.
Preferably, step 3) specifically includes:
3-1) extracting a region P 1g,P1g with the gray value larger than the set gray threshold G T from the gray image P 1, wherein the region P 1g,P1g comprises a shaft hole image P z and a through hole image P t, and taking the region with the largest area in the P 1g as the shaft hole image P z and the rest regions as the through hole images P t; reserving a mark pattern Z 0 preset on a flywheel body of the flywheel intermediate product in P 1g;
3-2) connecting any two pixel points on the outline of the shaft hole image P z to obtain a plurality of alternative line segments, and extracting the midpoint of the longest alternative line segment in all the alternative line segments, namely the center O 1 of the shaft hole area.
Preferably, the step 4) specifically comprises:
4-1) calculating a total number of pixels Q t in all of the via images P t;
4-2) acquiring the total number Q tB of pixels in all through hole images P tB of the standard flywheel with qualified through hole positions and sizes from a pre-established database V of the standard flywheel;
4-3) comparing Q t with Q tB when When the detection is qualified, the next step is carried out; otherwise, judging that the current flywheel pre-detection is unqualified, and ending the detection.
Preferably, epsilon 1 = 0.5-5%.
Preferably, step 5) is specifically:
5-1) acquiring a mark graph Z 1 and a circle center O 1 in the P 1g, establishing a two-dimensional coordinate system S t by taking O 1 as an original point and the X, Y direction indicated by the mark graph Z 1 as a corresponding coordinate axis direction, and numbering the positions of the through hole images P ti of each through hole t i;
5-2) for the through-hole image P ti of any one through-hole t i, the center O ti of P ti is obtained by:
The method comprises the steps of obtaining the distance between each pixel point on the outline of a through hole image P ti and a circle center O 1, obtaining all intersection points q of a line segment with the longest distance and the outline of the image P ti, connecting any two points in q to obtain a plurality of line segments l, reserving the line segment l max with the longest length, taking the midpoint of l max as a perpendicular line, marking the line segment between the perpendicular line and two points where the outline of the image P ti intersects as l min, and taking the intersection point of l max and l min as the circle center O ti of P ti;
5-3) acquiring a real coordinate position (x i,yi) of O ti in a two-dimensional coordinate system S t, acquiring a standard coordinate position (x ib,yib) of the center of a through hole with the position number in the standard flywheel from a database V of the standard flywheel, and calculating the position deviation delta i of the real coordinate position and the standard coordinate position:
5-4) when delta i≤ΔT is detected, judging that the position precision of the through hole t i is qualified, and entering step 6); otherwise, judging that the test is unqualified, and ending the test; wherein, Δ T is a preset positional deviation threshold.
Preferably, Δ T =0.05-0.2%.
Preferably, the step 6) specifically comprises:
The length of l max was taken and noted as D max; the length of l min was taken and noted as D min;
when D b-ε2≤Dmin≤Dmax≤Db+ε2, and Judging that the aperture precision of the through hole t i is qualified, otherwise, judging that the aperture precision is unqualified;
Wherein, epsilon 2 and epsilon 3 are both preset thresholds, and epsilon 2=0.001-0.1mm,ε3 =0.01-1%.
Preferably, the database V of the standard flywheel is constructed by the following method:
s1, carrying out image acquisition and processing on a standard flywheel with qualified through hole positions and sizes by adopting the same method as that of the steps 1) to 3), and acquiring the following data:
The gray level image P 1B of the standard flywheel comprises a shaft hole image P zB of the standard flywheel, images P tB of all through holes, a circle center O 1B of the shaft hole image P zB, a mark pattern Z B on the standard flywheel, and a mark pattern Z B on the standard flywheel is the same as a mark pattern Z 1 arranged on a flywheel intermediate;
S2, acquiring the total number Q tB of pixels in all shaft hole images P zB;
S3, establishing a two-dimensional coordinate system S tB by adopting the same method as the step 5) and taking O 1B as an origin and the X, Y direction indicated by the mark graph Z 1 as a corresponding coordinate axis direction, wherein the two-dimensional coordinate system S tB is the same as S t; numbering each through hole image P tBi on the standard flywheel according to the same rule of the step 5-1), obtaining the circle center O tBi of the P tBi, and then obtaining the standard coordinate position (x ib,yib) of the circle center O 1Bi in the two-dimensional coordinate system S tB; the diameter of each through hole on the standard flywheel is the same, and the through hole is a known quantity and is marked as D b;
S4, combining the total number Q tB of pixels in all shaft hole images P zB of the standard flywheel, the standard coordinate position (x ib,yib) of the circle center O tBi of each through hole image P tBi, the number of the P tBi and the diameter D b of the through hole to obtain a database V of the standard flywheel.
The invention also provides a flywheel detection system for the flywheel production line, which adopts the method to detect the position precision and the dimensional precision of the through hole of the flywheel intermediate product on the flywheel production line, and the system comprises:
the image acquisition module is used for acquiring images;
The data storage module is used for storing the image acquired by the image acquisition module and a database V of the standard flywheel;
The image processing module is used for detecting the position precision and the size precision of the through hole by adopting the methods of the steps 2) to 6);
And the output module outputs a detection result for judging whether the intermediate flywheel product is qualified or not.
The beneficial effects of the invention are as follows:
The invention adopts the scheme based on the image processing technology to realize the detection of the position precision and the dimensional precision of the through hole of the flywheel intermediate product on the flywheel production line, can realize the automatic detection, has high detection efficiency and objective detection result, and has good application prospect;
In the invention, the standard flywheel is used as a reference template, the difference of the total number of pixels in all through hole images is compared, when the difference is overlarge, the difference of the occupied areas of the through hole areas is overlarge (larger than a threshold epsilon 1), and larger position or size errors of the through holes are necessarily existed, so that unqualified flywheel intermediate products can be rapidly screened out, and the overall detection efficiency is improved;
According to the invention, the mark graph Z 0 is arranged on the flywheel intermediate product in advance, a two-dimensional coordinate system S t is established by matching with the obtained center O 1 of the shaft hole, and the coordinate of the center O ti of each through hole t i can be compared with the center coordinate of the corresponding through hole in the standard flywheel in the coordinate system, so that the position deviation delta i of the through hole t i is quickly prepared and obtained, the detection of the position precision is realized, the detection of the aperture precision is realized according to the comparison of the aperture of the through hole and the aperture of the through hole of the standard flywheel, and finally, the flywheel intermediate product with qualified position precision and aperture precision of all through holes is judged as qualified products, and the quick, accurate and automatic detection of the flywheel intermediate product is completed.
Detailed Description
The present invention is described in further detail below with reference to examples to enable those skilled in the art to practice the same by referring to the description.
It will be understood that terms, such as "having," "including," and "comprising," as used herein, do not preclude the presence or addition of one or more other elements or groups thereof.
Example 1
Referring to fig. 1, the present embodiment provides a flywheel detecting method for a flywheel production line, where the flywheel includes a flywheel body 1, a shaft hole 2 formed in the center of the flywheel body 1, and a plurality of through holes 3 formed in the flywheel body 1 and arranged in a circular array on the periphery of the shaft hole 2:
The detection method is used for detecting the position precision and the size precision of the through hole of the flywheel intermediate product on the flywheel production line, and the position and the diameter of the shaft hole of the flywheel intermediate product and the diameter of the flywheel body are detected to be qualified. Namely, the flywheel object in the invention is a flywheel intermediate product which is subjected to preliminary detection and is qualified, the shaft hole 2 and the flywheel body 1 are both regarded as standard circles, and the size meets the standard requirement, so the flywheel object is a known quantity and can be directly used in the subsequent step.
The through holes 3 in the invention can be positioning holes, mounting holes, pin holes, nail passing holes or holes with other functions on the flywheel. In this embodiment, the plurality of through holes 3 are arranged along the circular array on the periphery of the shaft hole 2, and all the through holes 3 have the same standard size (required qualified size), and the diameter of the through holes 3 is obviously smaller than that of the shaft hole. It will be appreciated that even though the through holes 3 comprise holes of different types, in principle the method of the invention can be used for detection.
The flywheel detection method comprises the following steps:
1) A marking graph Z 0 is arranged on a flywheel body of the flywheel intermediate in advance, then a overlooking image of the flywheel intermediate under a white background is collected, and a gray level image P 0 is obtained after processing;
Wherein the logo graphic Z 0 is a graphic having marks indicating the X-direction and the Y-direction, for example, a coordinate axis graphic composed of two mutually perpendicular arrows marked with X, Y, as shown in fig. 2;
2) Acquiring a profile image P L of the flywheel body in the P 0, and removing images at the periphery of the profile image P L to obtain a gray image P 1 containing the flywheel body, the shaft holes on the flywheel body and a plurality of through holes;
3) The method comprises the steps of obtaining a shaft hole image P z and images P t of a plurality of through holes from a gray level image P 1, and obtaining a circle center O 1 of the shaft hole image P z, wherein the method specifically comprises the following steps:
3-1) extracting a region P 1g,P1g with the gray value larger than the set gray threshold G T from the gray image P 1, wherein the region P 1g,P1g comprises a shaft hole image P z and a through hole image P t, and taking the region with the largest area in the P 1g as the shaft hole image P z and the rest regions as the through hole images P t; reserving a mark pattern Z 0 preset on a flywheel body of the flywheel intermediate product in P 1g;
The flywheel is generally dark, such as black, gray, etc., and the color of the flywheel is darker than the white background, so that in the gray image P 0, the gray value of the flywheel area is significantly lower than the background area, so that the outline image P L of the flywheel body is easily segmented from P 0, while in the gray image P 1, the shaft hole and the through hole areas are both displayed as background colors, the gray value of the area is significantly higher than the flywheel body, so that by
The shaft hole image P z and the images P t of the plurality of through holes can be easily obtained from the grayscale image P 1 by selecting an appropriate grayscale threshold G T. The diameter of the shaft hole is obviously larger than that of the through hole, and the largest area is the shaft hole image P z in each mutually independent closed area in the area P 1g with the gray value larger than the set gray threshold G T, so that the shaft hole image P z and the images P t of a plurality of through holes can be quickly obtained by the method. In a preferred embodiment, G T =50-200, e.g. G T =120.
3-2) Connecting any two pixel points on the outline of the shaft hole image P z to obtain a plurality of alternative line segments, and extracting the midpoint of the longest alternative line segment in all the alternative line segments, namely the center O 1 of the shaft hole area.
The axle hole area can be regarded as a standard circle, and the longest line segment between any two pixel points on the outline of the axle hole is necessarily the diameter of the axle hole, wherein the point can be regarded as a circle O 1, so that the circle center O 1 of the axle hole image P z can be obtained quickly and simply by the method.
4) Pre-detecting the positions and the sizes of the through holes:
4-1) calculating a total number of pixels Q t in all of the via images P t;
4-2) acquiring the total number Q tB of pixels in all through hole images P tB of the standard flywheel with qualified through hole positions and sizes from a pre-established database V of the standard flywheel;
4-3) comparing Q t with Q tB when When the detection is qualified, the next step is carried out; otherwise, judging that the current flywheel pre-detection is unqualified, and ending the detection.
In this embodiment, the standard flywheel is used as a reference template, and the difference of the total number of pixels in all through hole images is compared, and when the difference is too large, it is indicated that the difference of the occupied areas of the through hole areas is too large (greater than a threshold epsilon 1), and the through holes have larger positions or size errors, so that unqualified flywheel intermediate products can be rapidly screened out, and the overall detection efficiency is improved. In a preferred embodiment, the threshold value epsilon 1 = 0.5-5%, and in a more preferred embodiment epsilon 1 = 1.5%.
The total number of pixels Q tB of the standard flywheel is obtained from a database V of pre-established standard flywheels as a known quantity, and the process of establishing the database V will be described in detail later.
5) Establishing a two-dimensional coordinate system S t according to the mark graph Z 0 and the circle center O 1, and detecting the position accuracy of the through hole on the pre-detected qualified image:
5-1) acquiring a mark graph Z 1 and a circle center O 1 in the P 1g, establishing a two-dimensional coordinate system S t by taking O 1 as an original point and the X, Y direction indicated by the mark graph Z 1 as a corresponding coordinate axis direction, and numbering the positions of the through hole images P ti of each through hole t i;
5-2) for the through-hole image P ti of any one through-hole t i, the center O ti of P ti is obtained by:
The method comprises the steps of obtaining the distance between each pixel point on the outline of a through hole image P ti and a circle center O 1, obtaining all intersection points q of a line segment with the longest distance and the outline of the image P ti, connecting any two points in q to obtain a plurality of line segments l, reserving the line segment l max with the longest length, taking the midpoint of l max as a perpendicular line, marking the line segment between the perpendicular line and two points where the outline of the image P ti intersects as l min, and taking the intersection point of l max and l min as the circle center O ti of P ti;
5-3) acquiring a real coordinate position (x i,yi) of O ti in a two-dimensional coordinate system S t, acquiring a standard coordinate position (x ib,yib) of the center of a through hole with the position number in the standard flywheel from a database V of the standard flywheel, and calculating the position deviation delta i of the real coordinate position and the standard coordinate position:
5-6) when delta i≤ΔT is detected, judging that the position precision of the through hole t i is qualified, and entering the step 6); otherwise, judging that the test is unqualified, and ending the test; where Δ T is a predetermined positional deviation threshold, in a preferred embodiment Δ T =0.05-0.2%, more preferably, for example Δ T =0.1%.
In the above steps, the determined center O 1 and the determined sign pattern Z 1 can determine the origin position and the direction of the X, Y axis, so that a unique two-dimensional coordinate system can be determined, that is, the origin, the X axis and the Y axis of the two-dimensional coordinate system established by other flywheel intermediate products or flywheel standard products according to the method are all coincident, so that all the two-dimensional coordinate systems are consistent, and the positions of points on the flywheel intermediate products and the flywheel standard products can be compared and calculated with each other.
After the two-dimensional coordinate system S t is established, the through hole image P ti of the through hole t i at each position can be uniquely numbered according to a certain rule, after the circle center O ti of the P ti is determined, the position of the circle center O ti in the two-dimensional coordinate system S t can be obtained, the position of the circle center O ti is compared with the position of the circle center O tiB with the same position number in a standard flywheel, the position deviation delta i is calculated, the position precision of the through hole t i can be obtained, and the rapid detection of the index is realized.
In this embodiment, the database V of the standard flywheel is constructed by the following method:
s1, carrying out image acquisition and processing on a standard flywheel with qualified through hole positions and sizes by adopting the same method as that of the steps 1) to 3), and acquiring the following data:
The gray level image P 1B of the standard flywheel comprises a shaft hole image P zB of the standard flywheel, images P tB of all through holes, a circle center O 1B of the shaft hole image P zB, a mark pattern Z B on the standard flywheel, and a mark pattern Z B on the standard flywheel is the same as a mark pattern Z 1 arranged on a flywheel intermediate;
S2, acquiring the total number Q tB of pixels in all shaft hole images P zB;
S3, a two-dimensional coordinate system S tB is established by adopting the same method as the step 5) and taking O 1B as an origin and the X, Y direction indicated by the mark graph Z 1 as a corresponding coordinate axis direction, wherein the two-dimensional coordinate systems S tB and S t are the same, namely, for a certain fixed point, the coordinate positions of the two-dimensional coordinate systems S tB and S t are the same, so that the coordinate points in the two coordinate systems can be directly compared with each other, namely, in the two-dimensional coordinate system S t, the standard coordinate position of the circle center O tBi is (x ib,yib); numbering each through hole image P tBi on the standard flywheel according to the same rule of the step 5-1), obtaining the circle center O tBi of the P tBi, and then obtaining the standard coordinate position (x ib,yib) of the circle center O 1Bi in the two-dimensional coordinate system S tB; the diameter of each through hole on the standard flywheel is the same, and the through hole is a known quantity and is marked as D b;
S4, combining the total number Q tB of pixels in all shaft hole images P zB of the standard flywheel, the standard coordinate position (x ib,yib) of the circle center O tBi of each through hole image P tBi, the number of the P tBi and the diameter D b of the through hole to obtain a database V of the standard flywheel.
6) And detecting the aperture precision of the through hole on the image qualified in the detection of the position precision of the through hole:
The length of l max was taken and noted as D max; the length of l min was taken and noted as D min;
when D b-ε2≤Dmin≤Dmax≤Db+ε2, and And judging that the aperture precision of the through hole t i is qualified, otherwise, judging that the aperture precision is not qualified.
Wherein D b is the diameter of the through hole of the standard flywheel obtained from database V of standard flywheels, epsilon 2 and epsilon 3 are both preset thresholds, in a preferred embodiment epsilon 2=0.001-0.1mm,ε3 =0.01-1%. The threshold may be chosen according to the actual situation, e.g., epsilon 2=0.01,ε3 =0.1%.
7) And judging flywheel intermediate products with all through holes with qualified position precision and aperture precision as qualified products, and judging the rest flywheel intermediate products as unqualified products to finish detection.
Example 2
A flywheel inspection system for a flywheel manufacturing line, which adopts the method of embodiment 1 to inspect the position accuracy and the dimensional accuracy of a through hole of a flywheel intermediate product on the flywheel manufacturing line, the system comprising:
an image acquisition module for realizing the image acquisition in step 1) of embodiment 1; the image acquisition module adopts a CCD camera;
the data storage module is used for storing the image acquired by the image acquisition module and a database V of the standard flywheel and also storing a detection result;
An image processing module for performing through hole position accuracy detection and dimensional accuracy detection by the method of step 2) -step 6) of embodiment 1;
And an output module that outputs a detection result for judging whether the flywheel intermediate product is acceptable, that is, an output for realizing the detection result of step 7) of embodiment 1. In a preferred embodiment, the output module is a display screen, and the detection result is output through text information.
Application example
Aiming at a certain MTU engine flywheel product, the main parameters are as follows: flywheel diameter 314mm, shaft hole 32mm, through-hole 16mm x 8. The same batch of flywheel products are detected by the manual detection and the method of the embodiment 1, the manual detection result is taken as a reference (two-round manual detection, one-round initial detection and one-round repeated detection are taken as the reference, and the detection rate J k and the false detection rate Y k of the unqualified flywheel intermediate products of the method of the embodiment 1 are counted according to the following formulas:
R k represents the number of all failed flywheel products R k detected manually, B k represents the number of flywheels detected by the method of example 1 among the failed flywheel products R k, and BZ k represents the total number of failed flywheel intermediate products detected by the method of example 1. The false detection rate indicates the probability that the manual detection is acceptable, but the detection in example 1 is unacceptable.
In this application example, G T=120,ε1=1.5%,ΔT=0.1%,ε2=0.01,ε3 =0.1%.
The test results are shown in table 1 below:
TABLE 1
Total number of flywheel intermediates detected |
Rate of detection J of unqualified flywheel products k |
False detection rate Y k |
1000 |
100% |
0.5% |
As can be seen from the results in table 1, in the detection of the above number of flywheel intermediates, the method of embodiment 1 realizes the full detection of the unqualified flywheel intermediates, has a low false detection rate, and can meet the application requirements.
Although embodiments of the present invention have been disclosed above, it is not limited to the use of the description and embodiments, it is well suited to various fields of use for the invention, and further modifications may be readily apparent to those skilled in the art, and accordingly, the invention is not limited to the particular details without departing from the general concepts defined in the claims and the equivalents thereof.