An automated measurement method for geometric dimensions of coated bellows parts
By acquiring the sealing ring cross-section and ruler images, and using edge detection algorithms and image processing technology, the sealing ring size is automatically calculated, which solves the problem of low measurement efficiency of coated corrugated pipe parts and achieves efficient automated measurement.
Patent Information
- Application Number
- CN202410751699.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-06-12
AI Technical Summary
The measurement efficiency of geometric dimensions of coated corrugated pipe parts is low. The existing technology requires destroying the parts for measurement, which relies on manual operation and is not efficient.
By acquiring the sealing ring cross-sectional image and ruler image, use edge detection algorithms to detect the edges of the coating and steel rings, divide the areas, eliminate noise areas, fit edge curves, and automatically calculate the size of the sealing ring combined with image processing technology.
It realizes fully automatic measurement of seal ring size, improves measurement efficiency, reduces dependence on manual labor, removes noise in images, and improves calculation efficiency.
Smart Images

Figure CN118328917B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of automatic measurement of part dimensions, and in particular relates to an automatic measurement method for geometric dimensions of a corrugated pipe part with a coating. Background Art
[0002] The small size of coated bellows parts and the metal coating on the outer surface make it difficult to measure the geometric dimensions of the parts. At present, the overall dimensions of the parts are usually measured by profilometers, vernier calipers, etc. In order to measure the thickness of the metal coating or the size of the internal steel ring, it is usually necessary to destroy the parts, grind the fracture surface and then measure further. The above process is not efficient and highly dependent on manual labor. Summary of the invention
[0003] An object of the present invention is to provide an automated method for measuring the geometric dimensions of coated bellows-like parts, which can solve the technical problem of low efficiency in measuring the geometric dimensions of coated bellows-like parts in the prior art.
[0004] According to a first aspect of the present invention, a method for automatically measuring the geometric dimensions of a bellows-type part with a coating is provided, wherein the bellows-type part is a sealing ring, and the sealing ring comprises a steel ring and a coating on the surface of the steel ring. The method comprises:
[0005] Acquire a sealing ring cross-section image and a scale image;
[0006] Detect the sealing ring cross-section image by an edge detection algorithm to obtain a first edge image, wherein the first edge image includes coating edge pixels and non-edge pixels;
[0007] Dividing the first edge image into a plurality of regions of the same size according to a preset size;
[0008] Eliminate the area in the first edge image where the number of coating edge pixels is less than a first preset threshold, to obtain a second edge image;
[0009] Fitting the second edge image to obtain a coating edge image, wherein the coating edge image includes a first fitting curve and a second fitting curve;
[0010] Acquire a steel ring edge image according to the coating edge image, wherein the steel ring edge image includes a third fitting curve and a fourth fitting curve;
[0011] The size of the sealing ring is determined according to the coating edge image, the steel ring edge image and the ruler image.
[0012] Optionally, before detecting the sealing ring cross-sectional image by using an edge detection algorithm, the method further includes:
[0013] enhancing the contrast of the sealing ring cross-section image by an image enhancement algorithm;
[0014] Before fitting the second edge image, the method further includes:
[0015] determining whether there is an error between the second edge image and the sealing ring cross-section image;
[0016] If yes, adjusting the parameters of the image enhancement algorithm according to the error, and re-performing the step of enhancing the contrast of the sealing ring cross-section image by the image enhancement algorithm;
[0017] If not present, the step of fitting the second edge image is performed.
[0018] Optionally, acquiring the steel ring edge image according to the coating edge image includes:
[0019] According to the coating edge image and the sealing ring cross-sectional image, removing the coating area in the sealing ring cross-sectional image to obtain a steel ring image;
[0020] Detecting the steel ring image by an edge detection algorithm to obtain a third edge image, wherein the third edge image includes steel ring edge pixels and non-edge pixels;
[0021] The third edge image is fitted to obtain the steel ring edge image.
[0022] Optionally, fitting the third edge image to obtain the steel ring edge image includes:
[0023] Determine a first pixel and a second pixel in the third edge image, wherein the first pixel is a steel ring edge pixel with the smallest row coordinate in each row of the third edge image, and the second pixel is a steel ring edge pixel with the largest row coordinate in each row of the third edge image;
[0024] Using the first pixel as a fitting point of the third fitting curve;
[0025] Using the second pixel as a fitting point of the fourth fitting curve;
[0026] Fitting is performed according to the fitting points of the third fitting curve and the fitting points of the fourth fitting curve to obtain the steel ring edge image.
[0027] Optionally, fitting the second edge image to obtain a coating edge image includes:
[0028] Determine a third pixel and a fourth pixel in the second edge image, wherein the third pixel is a coating edge pixel with the smallest row coordinate in each row of the second edge image, and the fourth pixel is a coating edge pixel with the largest row coordinate in each row of the second edge image;
[0029] Determine a fifth pixel and a sixth pixel in the second edge image, wherein the fifth pixel and the sixth pixel are two adjacent coating edge pixels in the same row, and a difference between a row coordinate of the fifth pixel and a row coordinate of the sixth pixel is greater than a second preset threshold;
[0030] Using the third pixel and the fourth pixel as fitting points of the first fitting curve;
[0031] Using the fifth pixel and the sixth pixel as fitting points of the second fitting curve;
[0032] The coating edge image is obtained by performing fitting according to the fitting points of the first fitting curve and the fitting points of the second fitting curve.
[0033] Optionally, determining the size of the sealing ring according to the coating edge image, the steel ring edge image and the ruler image includes:
[0034] determining the length of a single pixel according to the ruler image;
[0035] Determine the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image, wherein the preset index includes at least one of the following: coating thickness, steel ring thickness, end face step height, and total thickness of the sealing ring;
[0036] The size of the sealing ring under the preset indicator is determined according to the number of pixels corresponding to the sealing ring under the preset indicator and the length of the single pixel.
[0037] Optionally, the preset indicator is the coating thickness;
[0038] The step of determining the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image includes:
[0039] calculating a first slope of a tangent line of the first fitting curve and a second slope of a tangent line of the second fitting curve at a first position;
[0040] If the first slope and the second slope are the same, determining a first vertical line at the first position;
[0041] The number of pixels corresponding to the coating thickness is determined according to the first vertical line.
[0042] Optionally, the preset indicator is the thickness of the steel ring;
[0043] The step of determining the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image includes:
[0044] Determine a second perpendicular line of the third fitting curve at a second position;
[0045] Acquire the coordinates of a first intersection point between the second perpendicular line and the third fitting curve, and the coordinates of a second intersection point between the second perpendicular line and the fourth fitting curve;
[0046] Determine the number of pixels corresponding to the thickness of the steel ring according to the coordinates of the first intersection point and the coordinates of the second intersection point.
[0047] Optionally, the preset indicator is the end face step height;
[0048] The step of determining the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image includes:
[0049] Divide the first fitting curve into Y equal parts according to row coordinates;
[0050] Obtaining a target pixel point in the first curve, wherein the target pixel point is a coating edge pixel point with the smallest row coordinate;
[0051] Fitting a plurality of circles based on the target pixel point, wherein the radii of the plurality of circles increase sequentially from a first preset radius to a second preset radius;
[0052] Determine a target fitting circle from the multiple circles, wherein the target fitting circle is a circle having the largest number of pixel points overlapping with the first curve;
[0053] Obtaining the coordinates of the highest point of the top of the sealing ring cross section and the coordinates of the tangent point between the target fitting circle and the first curve;
[0054] The number of pixels corresponding to the end face step height is determined according to the coordinates of the tangent point and the coordinates of the highest point of the top of the sealing ring cross section.
[0055] Optionally, the preset indicator is the total thickness of the sealing ring;
[0056] The step of determining the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image includes:
[0057] Determine the coordinates of the highest point of the upper end of the sealing ring and the coordinates of the lowest point of the lower end of the sealing ring according to the coating edge image;
[0058] The number of pixels corresponding to the total thickness of the sealing ring is determined according to the coordinates of the highest point of the upper end of the sealing ring and the coordinates of the lowest point of the lower end of the sealing ring.
[0059] The beneficial effects of the present invention are as follows: the present invention obtains a cross-sectional image and a scale image of the sealing ring by scanning the sealing ring, and then calculates the size of the sealing ring by image processing, thereby realizing fully automatic measurement of the size of the sealing ring, improving measurement efficiency, and reducing dependence on manual labor. Moreover, after detecting the first edge image by the edge detection algorithm, by dividing the first edge image into multiple regions, determining whether the region is a redundant region according to the number of edge pixels in each region, the noise in the image can be effectively removed. Moreover, compared with the method of calculating pixel gradient values in the prior art, the calculation efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 The present invention is a flow chart of a method for automatically measuring geometric dimensions of a plated corrugated pipe-like part.
[0061] Figure 2 This is the scanning result image of the sealing ring in the present invention.
[0062] Figure 3 It is the sealing ring interface image in the present invention.
[0063] Figure 4 It is the ruler image in the present invention.
[0064] Figure 5 It is the coating edge image containing noise in the present invention.
[0065] Figure 6 It is the coating edge image with noise removed in the present invention.
[0066] Figure 7 It is the steel ring edge image in the present invention.
[0067] Figure 8 It is a cross-sectional image of the coating after contrast enhancement in the present invention.
[0068] Fig. 9 It is the steel ring image in the present invention.
[0069] Fig.10 It is an edge image of one side of the steel ring in the present invention.
[0070] Fig.11 It is the edge image of the other side of the steel ring in the present invention.
[0071] Fig.12It is a schematic diagram of a geometric dimension measuring device for a plated corrugated pipe-like part according to the present invention. DETAILED DESCRIPTION
[0072] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0073] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0074] The techniques, methods and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods and devices should be considered as part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0075] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0076] In the specification and claims of the present invention, if the term "first" or "second" is involved, it may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the related objects are in an "or" relationship.
[0077] like Figure 1 As shown, the present invention provides an automated measurement method for geometric dimensions of a bellows-like part with a coating, wherein the bellows-like part is a sealing ring, and the sealing ring includes a steel ring and a coating on the surface of the steel ring. For example, the surface of the steel ring can be silver-plated. The method includes steps 1100-1700.
[0078] Step 1100: Acquire a sealing ring cross-sectional image and a scale image.
[0079] The sealing ring can be scanned by XCT (X-ray Computed Tomography) equipment. XCT is a major method of industrial non-destructive testing, with the advantages of fast scanning speed and accurate provision of true information on the entire structure of the test piece. The detection principle is to use the penetrating characteristics of X-rays. After penetrating an object, the X-rays are absorbed or scattered by different material components and attenuated. After the rays are attenuated, they are incident on the detector to form a two-dimensional grayscale projection image.
[0080] like Figure 2 As shown, by scanning the sealing ring, a series of images containing the internal structure of the sealing ring can be obtained. For example, the overall structure diagram of the sealing ring at different viewing angles and the cross-sectional diagrams of various parts of the sealing ring. The corresponding images can be scanned according to actual needs. In this solution, the cross-sectional diagram of the sealing ring is used to calculate the size of the sealing ring. The scanned image also includes a ruler image. The ruler image includes a ruler area and the corresponding actual length.
[0081] By locating the row number of the scale area in the scanned image and the upper left corner coordinates and lower right corner coordinates of the sealing ring cross-section area, the scanned image is cropped to obtain the following: Figure 3 The seal ring cross-section image shown and Figure 4 Ruler image shown.
[0082] Step 1200: Detect the sealing ring cross-section image using an edge detection algorithm to obtain a first edge image, wherein the first edge image includes coating edge pixels and non-edge pixels.
[0083] The edge detection algorithm is used to detect the edge of an object in an image. For example, the edge detection algorithm can be a Canny edge detection algorithm, or other edge detection algorithms can be used. In the cross-sectional image of the sealing ring, a steel ring and a coating are included, wherein the coating is wrapped around the outside of the steel ring. Since the coating also has a certain thickness, the edge detection algorithm can detect the outer edge of the coating and the inner edge of the coating. The inner side of the coating is the side where the coating is close to the steel ring.
[0084] like Figure 5 As shown, the first edge image includes the outer edge of the coating and the inner edge of the coating. The coating edge pixels include the outer edge pixels of the coating and the inner edge pixels of the coating, and the non-edge pixels are other pixels in the image except the edge pixels. For example, the first edge image obtained after edge detection is a black and white image, in which black pixels are edge pixels and non-edge pixels are white.
[0085] Step 1300: Divide the first edge image into a plurality of regions of the same size according to a preset size.
[0086] Due to the accuracy of the edge detection algorithm, the detected edges will contain some noise points, and the noise points in the image need to be removed. The preset size can be determined according to the size of the scanned image. The larger the size of the scanned image, the larger the preset size.
[0087] Step 1400: Eliminate the area in the first edge image where the number of coating edge pixels is less than a first preset threshold to obtain a second edge image.
[0088] After dividing the first edge image into a plurality of regions of the same size, each region is traversed. The number of edge pixels contained in each region is counted. If the number of edge pixels in a region is less than a first preset threshold, the region is considered to be a redundant edge and is removed. Figure 6 The first preset threshold can be determined according to the size of the coating cross-sectional image. For example, if the length and width of the coating cross-sectional image are 388 and 906 respectively, the first preset threshold can be set to 60.
[0089] Step 1500: Fit the second edge image to obtain a coating edge image, wherein the coating edge image includes a first fitting curve and a second fitting curve.
[0090] The first fitting curve is the fitting curve for the outer side of the coating, and the second fitting curve is the fitting curve for the inner side of the coating. Figure 6 As shown, the coating edge includes end A and end B, which correspond to the inner side of the sealing ring and the outer side of the sealing ring respectively. The first fitting curve includes the first fitting curve of end A and the first fitting curve of end B, and the second fitting curve also includes the second fitting curve of end A and the second fitting curve of end B.
[0091] Step 1600: Acquire a steel ring edge image according to the coating edge image, wherein the steel ring edge image includes a third fitting curve and a fourth fitting curve.
[0092] like Figure 7 In the steel ring edge image shown, the third fitting curve and the fourth fitting curve correspond to the inner side of the sealing ring and the outer side of the sealing ring respectively.
[0093] Step 1700: Determine the size of the sealing ring according to the coating edge image, the steel ring edge image and the ruler image.
[0094] The size of the sealing ring can be the coating thickness, steel ring thickness, total thickness of the sealing ring, and end face step height of the sealing ring. Measurements can be made according to actual needs. For example, when the coating thickness needs to be measured, the coating thickness is calculated based on the coating edge image. If the steel ring thickness needs to be measured, the steel ring thickness is calculated based on the steel ring edge image.
[0095] The present invention obtains a sealing ring cross-sectional image and a scale image by scanning the sealing ring, and then calculates the size of the sealing ring by image processing, thereby realizing fully automatic measurement of the sealing ring size, improving measurement efficiency, and reducing dependence on manual labor. After the first edge image is detected by the edge detection algorithm, the first edge image is divided into multiple regions, and whether the region is a redundant region is determined according to the number of edge pixels in each region, thereby effectively removing noise from the image. Compared with the method of calculating pixel gradient values in the prior art, the calculation efficiency can be improved.
[0096] In this embodiment, before step 1200, the method further includes step 2100: enhancing the contrast of the sealing ring cross-section image by using an image enhancement algorithm.
[0097] Before edge detection is performed on the sealing ring cross-section image, the contrast of the sealing ring cross-section image is enhanced by an image enhancement algorithm to obtain the following Figure 8 The enhanced image shown. For example, the image enhancement algorithm may be a histogram stretching algorithm. By increasing the contrast of the sealing ring cross-section image, it is easier to identify the edge area and the non-edge area, thereby improving the accuracy of the edge detection algorithm.
[0098] Before fitting the second edge image, the method further includes steps 2200 - 2400 .
[0099] Step 2200: Determine whether there is an error between the second edge image and the sealing ring cross-section image.
[0100] The second edge image includes an outer edge of the coating and an inner edge of the coating, and the area between the outer edge of the coating and the inner edge of the coating is the coating area. By comparing the coating area in the second edge image with the coating area in the sealing ring cross-section image, it is determined whether there is an error.
[0101] Specifically, pixels are filled in the area between the outer edge of the coating and the inner edge of the coating in the second edge image to obtain the coating area, and then the coating area is brought into the sealing ring cross-section image for comparison to determine the error.
[0102] Step 2300: If yes, adjust the parameters of the image enhancement algorithm according to the error, and re-execute the step of enhancing the contrast of the sealing ring cross-section image by the image enhancement algorithm.
[0103] If there is an error, it means that the accuracy of the edge detection result is low. In this case, it is necessary to re-perform edge detection. Before re-performing edge detection, adjust the parameters of the image enhancement algorithm, re-enhance the contrast of the sealing ring cross-section image, and then perform edge detection again.
[0104] Step 2400: If not present, executing the step of fitting the second edge image.
[0105] If there is no error, it means that the edge detection result has a high accuracy. In this case, you can proceed to the subsequent steps.
[0106] The present invention can effectively improve the accuracy of edge detection by contrast enhancing the sealing ring cross-sectional image before edge detection of the sealing ring cross-sectional image. After detection, by comparing whether there is an error between the detection result and the sealing ring cross-sectional image, if there is an error, re-detection is performed to ensure the accuracy of the edge detection result.
[0107] In this embodiment, step 1600 includes steps 1610-1630.
[0108] Step 1610: According to the coating edge image and the sealing ring cross-sectional image, the coating area in the sealing ring cross-sectional image is removed to obtain a steel ring image.
[0109] Step 1620: Detect the steel ring image through an edge detection algorithm to obtain a third edge image, wherein the third edge image includes steel ring edge pixels and non-edge pixels.
[0110] Step 1630: Fit the third edge image to obtain the steel ring edge image.
[0111] The coating area in the coating edge image can be brought into the sealing ring cross-section image, and the coating area can be removed from the sealing ring cross-section image to obtain the following: Fig. 9 Image of steel ring shown.
[0112] After the steel ring image is obtained, the steel ring image is detected by an edge detection algorithm. The third edge image contains the edge of the steel ring. Then the edge of the steel ring is fitted to improve the accuracy of the edge of the steel ring.
[0113] In this embodiment, step 1630 includes steps 1631-1634.
[0114] Step 1631: Determine the first pixel and the second pixel in the third edge image, wherein the first pixel is the steel ring edge pixel with the smallest row coordinate in each row of the third edge image, and the second pixel is the steel ring edge pixel with the largest row coordinate in each row of the third edge image.
[0115] Step 1632: Use the first pixel as a fitting point of the third fitting curve.
[0116] Step 1633: Use the second pixel as a fitting point of the fourth fitting curve.
[0117] Step 1634: Fitting is performed according to the fitting points of the third fitting curve and the fitting points of the fourth fitting curve to obtain the steel ring edge image.
[0118] Traverse the third edge image in row order. Determine the steel ring edge pixel with the smallest row coordinate and the steel ring edge pixel with the largest row coordinate in each row. For example, a certain row includes 7 steel ring edge pixels, namely steel ring edge pixel 1, steel ring edge pixel 2, steel ring edge pixel 3, steel ring edge pixel 4, steel ring edge pixel 5, steel ring edge pixel 6, and steel ring edge pixel 7. Among them, the row coordinate of steel ring edge pixel 1 is the smallest, and the row coordinate of steel ring edge pixel 7 is the largest, so steel ring edge pixel 1 is used as the first pixel of the row, and steel ring edge pixel 7 is used as the second pixel of the row.
[0119] According to the steel ring edge pixel with the smallest row coordinate in each row of the third edge image, the third fitting curve is obtained, such as Fig.10 As shown. According to the steel ring edge pixel with the largest row coordinate in each row of the third edge image, the fourth fitting curve is obtained, as shown in Fig.11 As shown. Figure 7 As shown, the curve on the left side of the figure is the third fitting curve, and the curve on the right side of the figure is the fourth fitting curve. The third fitting curve and the fourth fitting curve constitute the edge of the steel ring.
[0120] This embodiment fits the edge of the steel ring after edge detection of the steel ring image, so that the edge of the steel ring is closer to the actual edge, thereby improving the accuracy of the steel ring edge and ensuring the accuracy of the geometric dimension measurement results of corrugated pipe parts with coating.
[0121] In this embodiment, step 1500 includes steps 1510-1550.
[0122] Step 1510: Determine a third pixel and a fourth pixel in the second edge image, wherein the third pixel is a coating edge pixel with the smallest row coordinate in each row of the second edge image, and the fourth pixel is a coating edge pixel with the largest row coordinate in each row of the second edge image.
[0123] Step 1520: Determine the fifth pixel and the sixth pixel in the second edge image, wherein the fifth pixel and the sixth pixel are two adjacent coating edge pixels in the same row, and the difference between the row coordinates of the fifth pixel and the row coordinates of the sixth pixel is greater than a second preset threshold.
[0124] Step 1530: Use the third pixel and the fourth pixel as fitting points of the first fitting curve.
[0125] Step 1540: Use the fifth pixel and the sixth pixel as fitting points of the second fitting curve.
[0126] Step 1550: Perform fitting according to the fitting points of the first fitting curve and the fitting points of the second fitting curve to obtain the coating edge image.
[0127] According to the cross-sectional view of the sealing ring, there are coatings all around the steel ring, such as the coating on the left side of the steel ring and the coating on the right side of the steel ring. Figure 6 As shown in the figure, the left side of the steel ring is end A, and the right side of the steel ring is end B. The coating on end A includes the outer side and the inner side of the coating, and the coating on end B also includes the outer side and the inner side of the coating. Figure 6 There are four fitting curves from left to right in the figure. The first and fourth ones are the fitting curves for the outer side of the coating, and the second and third ones are the fitting curves for the inner side of the coating.
[0128] The second edge image is traversed in row order to find all coating edge pixels in each row. In each row, the coating edge pixel with the smallest row coordinate and the edge pixel with the largest row coordinate are both pixels outside the coating.
[0129] Since the thickness of the coating is much smaller than the thickness of the steel ring, the difference in row coordinates between the coating edge pixels on the same side of the steel ring is small. However, the difference between the row coordinates of the coating edge pixels on the left side of the steel ring and the row coordinates of the coating edge pixels on the right side of the steel ring is large. The difference in row coordinates between two coating edge pixels can be used to determine whether the two coating edge pixels are on the same side of the steel ring. By traversing the coating edge pixels in the same row, two adjacent coating edge pixels are found, and the difference between the row coordinates of the two coating edge pixels is greater than the second preset threshold.
[0130] For example, in a certain row, there are 8 coating edge pixels, and the row coordinates are 10, 11, 14, 15, 25, 26, 29, and 30 respectively. It can be concluded that the pixels with row coordinates of 10, 11, 14, and 15 are pixels on the same side of the coating edge, while the pixels with row coordinates of 25, 26, 29, and 30 are pixels on the other side of the coating edge. The minimum row coordinate is 10, and the maximum row coordinate is 30. Then the pixel with row coordinates of 10 and the pixel with row coordinates of 30 can be determined as pixels on the outside of the coating, as the fitting points of the first fitting curve. The coating edge pixel with row coordinates of 15 and the coating edge pixel with row coordinates of 25 are two adjacent coating edge pixels, and the difference in row coordinates between the two pixels is large. Then the coating edge pixel with row coordinates of 15 and the coating edge pixel with row coordinates of 25 can be determined as pixels on the inside of the coating, as the fitting points of the second fitting curve. After fitting, the coating edge image is obtained.
[0131] In this embodiment, in order to make the edge fitting result consistent with the actual edge as much as possible, polynomial fitting is also performed on the steel ring edge and the coating edge. Specifically, the steel ring edge and the coating edge are divided into 20 equal parts, and each curve is fitted with a polynomial function in turn.
[0132] In this embodiment, step 1700 includes steps 1710-1730.
[0133] Step 1710: Determine the length of a single pixel according to the ruler image.
[0134] Calculate the number of pixels in the scale area in the row direction in the scale image. The length in the scale image represents the actual length of the scale area in the row direction. Calculate the actual length corresponding to each pixel based on the number of pixels in the scale area in the row direction and the actual length of the scale area in the row direction.
[0135] For example, if the actual length of the ruler area in the row direction is 0.6 mm, and the number of pixels in the ruler area in the row direction is 139, then it can be calculated that the length of a single pixel is 0.0043 mm.
[0136] Step 1720: Determine the number of pixels corresponding to the sealing ring under preset indicators based on the coating edge image and the steel ring edge image, wherein the preset indicators include at least one of the following: coating thickness, steel ring thickness, end face step height, and total thickness of the sealing ring.
[0137] The pixel length corresponding to the sealing ring size can be calculated based on the coating edge image and the steel ring edge image. For example, if the sealing ring size is the coating thickness, then the coating thickness calculated based on the coating edge image is 6 pixels.
[0138] Step 1730: Determine the size of the sealing ring under the preset indicator according to the number of pixels corresponding to the sealing ring under the preset indicator and the length of the single pixel.
[0139] For example, if the actual length of each pixel is 0.0043 mm and the coating thickness is 6 pixels, then the coating thickness can be calculated to be 0.0258 mm.
[0140] In this embodiment, the preset indicator is the coating thickness. Step 1720 includes: calculating a first slope of a tangent line of a first fitting curve at a first position and a second slope of a tangent line of a second fitting curve; if the first slope and the second slope are the same, determining a first vertical line at the first position; and determining the number of pixels corresponding to the coating thickness according to the first vertical line.
[0141] Affected by the coating process, the coating thickness at different positions on the surface of the steel ring may be inconsistent. The first position indicates the position where the coating thickness needs to be measured. When measuring the coating thickness, the coating thickness can be measured at different positions to obtain the maximum and minimum thickness of the coating.
[0142] First, determine the tangent of the first fitting curve at the first position and calculate the slope of the tangent. Then determine the tangent of the second fitting curve at the first position and calculate the slope of the tangent. If the two slopes are the same, then continue to calculate the first vertical line at the first position, which is perpendicular to the first fitting curve and the second fitting curve. The distance between the first vertical line and the two intersection points of the first fitting curve and the second fitting curve is the coating thickness.
[0143] For example, by measuring multiple positions, the minimum coating thickness is 6 pixels, the maximum coating thickness is 13 pixels, and the actual length of each pixel is 0.0043mm. Then it can be concluded that the minimum coating thickness is 0.0258mm and the maximum coating thickness is 0.0559mm.
[0144] In this embodiment, the preset indicator is the thickness of the steel ring. Step 1720 includes: determining a second perpendicular line of the third fitting curve at a second position; obtaining the coordinates of a first intersection point between the second perpendicular line and the third fitting curve, and the coordinates of a second intersection point between the second perpendicular line and the fourth fitting curve; and determining the number of pixels corresponding to the thickness of the steel ring according to the coordinates of the first intersection point and the coordinates of the second intersection point.
[0145] The second position indicates the position where the thickness of the steel ring needs to be measured. The thickness of the steel ring can be expressed as the distance between a point on the third fitting curve and its corresponding point on the fourth fitting curve, and the line between these two points is perpendicular to the third fitting curve and the fourth fitting curve. When measuring the thickness of the steel ring, the thickness of the steel ring can also be measured at different positions to obtain the maximum thickness and minimum thickness of the steel ring. For example, by measuring multiple positions, the minimum thickness of the steel ring is 815 pixels and the maximum is 819 pixels. Then it can be calculated that the minimum thickness of the steel ring is 3.5045mm and the maximum thickness of the steel ring is 3.5217mm.
[0146] In this embodiment, the preset index is the end face step height. The step 1720 includes: dividing the first fitting curve into Y equal parts according to the row coordinates; obtaining the target pixel point in the first curve, wherein the target pixel point is the coating edge pixel point with the smallest row coordinate; fitting multiple circles based on the target pixel point, wherein the radius of the multiple circles increases from the first preset radius to the second preset radius in sequence; determining the target fitting circle from the multiple circles, wherein the target fitting circle is the circle with the largest number of pixel points overlapping with the first curve; obtaining the coordinates of the highest point of the top of the sealing ring cross section, and the coordinates of the tangent point of the target fitting circle and the first curve; determining the number of pixels corresponding to the end face step height according to the coordinates of the tangent point and the coordinates of the highest point of the top of the sealing ring cross section.
[0147] When calculating the end face step height, first find the target pixel point. Then make multiple fitting circles of different radii based on the target pixel point, and each fitting circle passes through the target pixel point. For example, the radius range of multiple fitting circles can be 0.2-0.32mm. Then calculate the number of overlapping points of each fitting circle with the first curve, and find the fitting circle with the largest number of overlapping points. Then calculate the tangent point of the fitting circle with the largest number of overlapping points and the first curve, and then calculate the longitudinal distance between the tangent point and the highest point of the top, which is the end face step height.
[0148] In this embodiment, the preset indicator is the total thickness of the sealing ring. Step 1720 includes: determining the coordinates of the highest point of the upper end of the sealing ring and the coordinates of the lowest point of the lower end of the sealing ring according to the coating edge image; and determining the number of pixels corresponding to the total thickness of the sealing ring according to the coordinates of the highest point of the upper end of the sealing ring and the coordinates of the lowest point of the lower end of the sealing ring.
[0149] The total thickness of the sealing ring represents the vertical distance between the highest point on the upper end and the lowest point on the lower end of the sealing ring. The highest point on the upper end and the lowest point on the lower end of the sealing ring are both outside the coating. The coordinates of the highest point on the upper end and the lowest point on the lower end can be obtained through the coating edge image. The difference between the ordinate of the highest point on the upper end and the ordinate of the lowest point on the lower end is the number of pixels corresponding to the total thickness of the sealing ring. For example, the number of pixels corresponding to the total thickness of the sealing ring is 835, and the length of each pixel is 0.0043 mm. The total thickness of the sealing ring is calculated to be 3.5905.
[0150] like Fig.12 As shown, this embodiment introduces a device for measuring the geometric dimensions of a bellows-like part with a coating, wherein the bellows-like part is a sealing ring, and the sealing ring includes a steel ring and a coating on the surface of the steel ring. The device includes:
[0151] A first image acquisition module, used to acquire a sealing ring cross-section image and a scale image;
[0152] A second image acquisition module, configured to detect the sealing ring cross-section image by an edge detection algorithm to obtain a first edge image, wherein the first edge image includes coating edge pixels and non-edge pixels;
[0153] A first processing module, configured to divide the first edge image into a plurality of regions of the same size according to a preset size;
[0154] A third image acquisition module, used to remove the area in the first edge image where the number of coating edge pixels is less than a first preset threshold, to obtain a second edge image;
[0155] a fourth image acquisition module, configured to fit the second edge image to obtain a coating edge image, wherein the coating edge image includes a first fitting curve and a second fitting curve;
[0156] A fifth image acquisition module, used for acquiring a steel ring edge image according to the coating edge image, wherein the steel ring edge image includes a third fitting curve and a fourth fitting curve;
[0157] The second processing module is used to determine the size of the sealing ring according to the coating edge image, the steel ring edge image and the ruler image.
[0158] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
[0159] Those of ordinary skill in the art will appreciate that the modules and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0160] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0161] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0162] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0163] In addition, each functional module in the embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0164] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the energy-saving signal sending / receiving method of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
[0165] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
[0166] It should be understood that the size of the sequence number of each step in the content of the invention and the embodiments of the present invention does not absolutely mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. For the purpose of example and description, the foregoing description of the implementation of the present disclosure has been given. The foregoing description is not exhaustive and is not intended to limit the present disclosure to the exact form disclosed. Various deformations and modifications may exist according to the above teachings, or various deformations and modifications may be obtained from the practice of the present disclosure. These embodiments are selected and described to illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can use the present disclosure in various embodiments and various modifications suitable for the specific purpose conceived.
Claims
1. An automated measurement method for geometric dimensions of coated bellows parts, characterized in that: The bellows-type part is a sealing ring, which includes a steel ring and a coating on the surface of the steel ring. The method includes: Acquire a sealing ring cross-section image and a scale image; Detect the sealing ring cross-section image by an edge detection algorithm to obtain a first edge image, wherein the first edge image includes coating edge pixels and non-edge pixels; Dividing the first edge image into a plurality of regions of the same size according to a preset size; Eliminate the area in the first edge image where the number of coating edge pixels is less than a first preset threshold, to obtain a second edge image; Fitting the second edge image to obtain a coating edge image, wherein the coating edge image includes a first fitting curve and a second fitting curve; Acquire a steel ring edge image according to the coating edge image, wherein the steel ring edge image includes a third fitting curve and a fourth fitting curve; Determine the size of the sealing ring according to the coating edge image, the steel ring edge image and the ruler image; Before detecting the sealing ring cross-sectional image by using an edge detection algorithm, the method further includes: enhancing the contrast of the sealing ring cross-section image by an image enhancement algorithm; Before fitting the second edge image, the method further includes: determining whether there is an error between the second edge image and the sealing ring cross-section image; If yes, adjusting the parameters of the image enhancement algorithm according to the error, and re-performing the step of enhancing the contrast of the sealing ring cross-section image by the image enhancement algorithm; If not, performing the step of fitting the second edge image; Determining the size of the sealing ring according to the coating edge image, the steel ring edge image and the ruler image includes: determining the length of a single pixel according to the ruler image; Determine the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image, wherein the preset index includes at least one of the following: coating thickness, steel ring thickness, end face step height, and total thickness of the sealing ring; Determining the size of the sealing ring under the preset indicator according to the number of pixels corresponding to the sealing ring under the preset indicator and the length of the single pixel; The preset index is the coating thickness; The step of determining the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image includes: calculating a first slope of a tangent line of the first fitting curve and a second slope of a tangent line of the second fitting curve at a first position; If the first slope and the second slope are the same, determining a first vertical line at the first position; Determine the number of pixels corresponding to the coating thickness according to the first vertical line; The preset index is the thickness of the steel ring; The step of determining the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image includes: Determine a second perpendicular line of the third fitting curve at a second position; Acquire the coordinates of a first intersection point between the second perpendicular line and the third fitting curve, and the coordinates of a second intersection point between the second perpendicular line and the fourth fitting curve; Determine the number of pixels corresponding to the thickness of the steel ring according to the coordinates of the first intersection point and the coordinates of the second intersection point; The preset index is the end face step height; The step of determining the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image includes: Divide the first fitting curve into Y equal parts according to row coordinates; Obtaining a target pixel point in the first curve, wherein the target pixel point is a coating edge pixel point with the smallest row coordinate; Fitting a plurality of circles based on the target pixel point, wherein the radii of the plurality of circles increase sequentially from a first preset radius to a second preset radius; Determine a target fitting circle from the multiple circles, wherein the target fitting circle is a circle having the largest number of pixel points overlapping with the first curve; Obtaining the coordinates of the highest point of the top of the sealing ring cross section and the coordinates of the tangent point between the target fitting circle and the first curve; Determine the number of pixels corresponding to the end face step height according to the coordinates of the tangent point and the coordinates of the highest point of the top of the sealing ring cross section; The preset index is the total thickness of the sealing ring; The step of determining the number of pixels corresponding to the sealing ring under a preset index according to the coating edge image and the steel ring edge image includes: Determine the coordinates of the highest point of the upper end of the sealing ring and the coordinates of the lowest point of the lower end of the sealing ring according to the coating edge image; The number of pixels corresponding to the total thickness of the sealing ring is determined according to the coordinates of the highest point of the upper end of the sealing ring and the coordinates of the lowest point of the lower end of the sealing ring.
2. The method according to claim 1, characterized in that The step of acquiring the steel ring edge image according to the coating edge image comprises: According to the coating edge image and the sealing ring cross-sectional image, removing the coating area in the sealing ring cross-sectional image to obtain a steel ring image; Detecting the steel ring image by an edge detection algorithm to obtain a third edge image, wherein the third edge image includes steel ring edge pixels and non-edge pixels; The third edge image is fitted to obtain the steel ring edge image.
3. The method according to claim 2, characterized in that The step of fitting the third edge image to obtain the steel ring edge image includes: Determine a first pixel and a second pixel in the third edge image, wherein the first pixel is a steel ring edge pixel with the smallest row coordinate in each row of the third edge image, and the second pixel is a steel ring edge pixel with the largest row coordinate in each row of the third edge image; Using the first pixel as a fitting point of the third fitting curve; Using the second pixel as a fitting point of the fourth fitting curve; Fitting is performed according to the fitting points of the third fitting curve and the fitting points of the fourth fitting curve to obtain the steel ring edge image.
4. The method according to claim 1, characterized in that The fitting of the second edge image to obtain a coating edge image includes: Determine a third pixel and a fourth pixel in the second edge image, wherein the third pixel is a coating edge pixel with the smallest row coordinate in each row of the second edge image, and the fourth pixel is a coating edge pixel with the largest row coordinate in each row of the second edge image; Determine a fifth pixel and a sixth pixel in the second edge image, wherein the fifth pixel and the sixth pixel are two adjacent coating edge pixels in the same row, and a difference between a row coordinate of the fifth pixel and a row coordinate of the sixth pixel is greater than a second preset threshold; Using the third pixel and the fourth pixel as fitting points of the first fitting curve; Using the fifth pixel and the sixth pixel as fitting points of the second fitting curve; The coating edge image is obtained by performing fitting according to the fitting points of the first fitting curve and the fitting points of the second fitting curve.
Citation Information
Patent Citations
Edge detection apparatus
CA1143455A
Method and apparatus for acquiring laser scanning path
CN106895794A
Method for determining large-plastic bending section profile curve of thin-walled pipe
CN108332681A
Optical fiber geometric parameter detecting method based on machine vision
CN109341524A
Part aperture size measurement method based on machine vision technology
CN109974608A
