Visual measurement method for round hole size of sheet metal part with imaging interference characteristic
Through image processing technology, including gradient calculation, brightness enhancement and least squares fitting, the problem of false edges and processing residues in visual measurement is solved, and high-precision dimensional measurement of sheet metal round holes is achieved, with an error of less than 0.05mm. Improved measurement stability and accuracy.
Patent Information
- Application Number
- CN202410975067.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-10-25
AI Technical Summary
When visual measurement technology detects sheet metal round holes, the measurement accuracy is reduced due to false edges and processing residues, which affects the accuracy of target contour detection.
Using steps such as image gradient amplitude calculation and fusion, pseudo-edge distribution range response, image brightness enhancement, target edge point collection, random sampling cluster center fitting and distance clustering, through first-order gradient operator, threshold filtering, brightness enhancement and least squares fitting to reduce the influence of false edges and processing residues on measurement and improve the accuracy of circular hole size measurement.
It achieves high-precision dimensional measurement of false edges and processing residues with an error of less than 0.05mm, overcoming the lack of accuracy of traditional visual measurement methods and providing stable and accurate measurement results.
Smart Images

Figure CN118836770A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of optical measurement, and in particular to a visual measurement method for the size of a circular hole of a sheet metal part containing imaging interference features. Background Art
[0002] Visual measurement technology uses computer vision and image processing to measure and analyze the dimensions of the parts to be inspected. By collecting images of the parts to be inspected, the dimensional parameters of the parts to be inspected are obtained using image processing algorithms. Visual measurement technology is widely used in the industrial field. With its advantages of non-contact and high precision, it solves the problems of large errors, slow speed, and low efficiency caused by traditional inspection methods that rely on manual measurement using tools such as tape measures and vernier calipers.
[0003] However, in actual inspection, the collected image is affected by the thickness of the part and the layout of the light source, and a pseudo-edge area appears on the side of the circular hole feature close to the camera optical axis. As a result, the edge of the real target to be detected is wrapped by the gray semicircular pseudo-edge area, affecting the accuracy of the real target edge extraction; during the processing, improper processing or incomplete cleaning by the staff causes iron filings or burrs to remain on the inner wall of the circular hole, and residual iron filings of random shapes are located on the inner wall of the hole, which aggravates the impact on the correct edge contour extraction. Although both do not affect the normal use of the parts, they both cause interference features to appear in the imaging circular hole image, affecting the accuracy of the real target contour detection. Therefore, reducing the impact of imaging interference features mainly composed of pseudo-edges and processing residues on target contour detection is a key issue in improving the stability and accuracy of visual measurement technology. Summary of the invention
[0004] In view of the existing problems, the present invention aims to reduce the influence of imaging defect features such as false edges and processing residues on the visual size measurement accuracy of sheet metal circular hole images, and provide a visual measurement method for circular hole size of sheet metal parts containing imaging interference features.
[0005] In order to realize the above technical features, the object of the present invention is achieved as follows: 1. A visual measurement method for the size of a circular hole of a sheet metal part containing imaging interference features, characterized in that it comprises the following steps: Step 1: Image acquisition of circular holes of sheet metal parts: According to the requirements of dimensional measurement accuracy, a visual acquisition platform for sheet metal parts is built to collect images of circular holes containing imaging interference features; Step 2: Image gradient amplitude calculation and fusion: The first-order gradient operator is used to calculate the gradient amplitude in the eight gradient directions of the circular hole image, and the maximum gradient amplitude of each pixel is calculated through gradient amplitude fusion; Step 3, circular hole pseudo edge distribution range response: By using the pseudo-edge distribution characteristics and manually setting the screening threshold, the coordinates of pixels with obvious gradient changes are retained; Step 4: Image brightness enhancement and pseudo edge elimination: The reserved pixel point is taken as the center of the 8-neighborhood matrix, and the neighboring pixel information is collected. The pseudo-edge pixels are screened out using the global average pixel of the image and the average pixel of the chamfered area as the threshold conditions. The average value of the pseudo-edge pixels is calculated, and the brightness of the entire image is enhanced based on the average value to eliminate the pseudo-edge. Step 5: Collection of target edge points in the highlighted area: Take the image center point O as the starting point, determine the overall search direction through the positive and negative directions of the X and Y axes of the starting point, take the X / Y axis as the search axis, and find the first pixel mutation point in the positive and negative directions of the other axis. After the search of this axis is completed, change the search axis and repeat this operation; Step 6, random sampling cluster center fitting: The collected contour points are divided into four categories according to the positive and negative directions of the X and Y axes of the starting point. Multiple subsets are created from the four categories of contour points by random sampling. The least squares fitting is used for the subsets to determine the subset fitting accuracy. All high fitting accuracy subsets are reclassified and fitted to determine the final cluster center. Step 7, distance clustering final size output: The Euclidean distance between all contour points and the cluster center is calculated, and the number of contour points corresponding to each distance is counted. The peak point with the largest number jump is used as the judgment condition to classify the contour points into interference class and target contour class. The least squares fitting is performed on the points belonging to the target contour class, and the final size measurement result is output.
[0006] In the step 1 of sheet metal part image acquisition, a planar sheet metal part visual acquisition system consisting of a CMOS camera, a telecentric lens, a coaxial light source, an array surface light source, an image acquisition card and a computer is built; image acquisition is performed through this system to collect circular hole images containing imaging interference features, mainly pseudo edges and processing residues.
[0007] In the step 2 of image gradient amplitude calculation and fusion, since pseudo edges are randomly distributed in the image, the image gradient amplitude is calculated using a first-order gradient operator for multiple gradient directions to obtain the edge distribution in each direction in the image, and then the gradient amplitude is fused for each pixel point so that each pixel point corresponds to the maximum gradient amplitude. The gradient direction is the positive direction of the Y axis as the starting direction, and the 8 directions are created at 45° intervals counterclockwise. The specific angles are ; The first-order gradient operator is used to calculate the weight matrix of the image edge, which is 3 rows and 3 columns in size; Gradient amplitude fusion refers to comparing the gradient amplitudes calculated in multiple directions within a single pixel so that each pixel is associated with the maximum gradient amplitude.
[0008] In the step 3, the pseudo-edge distribution range response of the circular hole, the pseudo-edge distribution characteristics are: often closely attached to the inner side of the target contour in a semicircular arc shape, directly connected to the circular hole highlight area instead of part of the target contour, and having obvious gradient changes in the entire image; by artificially setting the screening threshold, all pixel points of the image are traversed and screened. During the traversal process, if the maximum gradient amplitude of this position is greater than the set threshold, the pixel value of this position is replaced by the maximum gradient amplitude, otherwise the pixel at this position is set to 0. After the traversal is completed, the non-0 pixel point in the image represents that this position has an obvious gradient change, thereby realizing the pseudo-edge distribution range response, wherein the gradient amplitude threshold is set to 210.
[0009] In the step 4 of image brightness enhancement and pseudo-edge elimination, the pixel point with obvious edge is retained as the center of the 8-neighborhood matrix, and the 8 pixel values except the center of the matrix are counted. Since the pseudo-edge pixel is between the global pixel average and the chamfer area pixel average, the highlight area pixels and target contour pixels in the counted pixels are screened by calculating the global pixel average and the chamfer area pixel average, so as to achieve the purpose of only counting pseudo-edge pixels. The pseudo-edge pixel average is calculated, and the image brightness is enhanced by using the calculated pseudo-edge pixel average as the basis to achieve the elimination of pseudo-edge areas. The size of the 8-neighborhood matrix is 3 rows and 3 columns. The image brightness enhancement is to change the size of all pixel values in the image according to a certain proportion through the basis parameters, so that the pixel values higher than the basis are all changed to 255.
[0010] In the collection of target edge points in the highlighted area of step 5, after the image brightness enhancement is completed, most of the pseudo edges are eliminated; for processing residues, a contour point fitting method is adopted, firstly, the target contour points are collected, the contour points are classified by distance clustering, and the contour points of the target contour class are fitted using the least squares method to achieve high-precision size measurement of the circular hole; wherein, the image center point O refers to the size center of the circular hole image, and the pixel mutation point refers to when this point is searched, the pixel value of this point differs from the pixel value of the previous point by more than 100.
[0011] In the step 6 of random sampling cluster center fitting, since the distance clustering algorithm has high requirements on the accuracy of the cluster center, the contour points need to be processed to determine the high-precision cluster center. The collected contour points are classified into 4 categories, and the same number of points are extracted from the 4 categories of contour points multiple times using the random sampling method to form contour point subsets. Each subset is fitted by the least squares method, and the fitting center and fitting radius corresponding to each subset are obtained. The final precise fitting empty array is created, the fitting accuracy of the current subset is judged, and the contour points corresponding to the high fitting accuracy subset are retained in the final precise fitting array. After all subsets are judged, the least squares fitting is performed on all contour points in the final precision fitting array, and the final output fitting circle center is the cluster center. Among them, the category division standard is to divide the contour points into 4 categories according to the X / Y axis coordinates of the center point of the image. The random sampling method is a method that can ensure that each data has the same chance to be selected into the sample, which can avoid selection bias and ensure the reliability of sample selection. The fitting accuracy is judged based on the ratio of the average distance from all contour points to the fitting circle center to the fitting radius. The smaller the ratio, the more uniform the fitting contour and the higher the accuracy. In the final size output of distance clustering in step 7, all contour points are clustered by the Euclidean distance from the contour point to the cluster center. The clustered contour points have distance label attributes. The number of contour points corresponding to each distance is counted in units of cluster distance. The characteristics of the processing residue being close to the center of the circle, the distance distribution range being wide, and the number of contour points being small are utilized to find the peak with the largest jump in the number of contour point distance information. The contour points corresponding to all distances less than the peak are classified as interference classes, and the contour points corresponding to all distances greater than the peak are classified as target contour classes. The least squares fitting is performed on all points belonging to the target contour class, and the final size measurement result is output, wherein the Euclidean distance refers to the straight-line distance between two points in the coordinate system.
[0012] The present invention has the following beneficial effects: The present invention provides a visual measurement method for the size of circular holes of sheet metal parts with imaging interference features. The method can achieve high-precision size measurement in the case of pseudo-edges, processing residues, and coexistence of pseudo-edges and processing residues in the circular holes. By comparing with the detection results of a three-coordinate measuring instrument, the detection accuracy error of the method is less than 0.05mm. The method overcomes the problem of poor measurement accuracy caused by multiple interferences such as pseudo-edges and processing residues in traditional visual size measurement methods, and can provide technical references in the fields of machine vision, size measurement, and automated detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0014] Figure 1 The present invention is a simplified flow chart of a method for visually measuring the size of a circular hole of a sheet metal part containing imaging interference features.
[0015] Figure 2 A schematic diagram of an image acquisition system for a visual measurement method of circular hole size of a sheet metal part containing imaging interference features provided in an embodiment of the present invention.
[0016] Figure 3 A pseudo-edge and processing defect feature diagram of a visual measurement method for circular hole size of a sheet metal part containing imaging interference features provided by an embodiment of the present invention.
[0017] Figure 4 An image brightness enhancement and pseudo-edge elimination effect diagram of a method for visually measuring the size of a circular hole in a sheet metal part containing imaging interference features provided in an embodiment of the present invention, (a) original circular hole image, (b) brightness enhancement result diagram.
[0018] Figure 5 A schematic diagram of obtaining contour points in a highlighted area of a visual measurement method for circular hole size of a sheet metal part containing imaging interference features provided in an embodiment of the present invention.
[0019] Figure 6 A flowchart of randomly sampling and determining a fitting center for a visual measurement method of a circular hole size of a sheet metal part containing imaging interference features provided in an embodiment of the present invention.
[0020] Figure 7 The contour point distance clustering result diagram of a visual measurement method for circular hole size of sheet metal parts with imaging interference features provided by an embodiment of the present invention. (a) All contour point distribution diagram, (b) Distance clustering target contour class distribution diagram.
[0021] Figure 8 A comparison diagram of the final fitting effect of a visual measurement method for circular hole size of a sheet metal part with imaging interference features provided in an embodiment of the present invention: (a) ordinary least squares size detection result diagram, (b) least squares size detection result diagram after clustering classification. DETAILED DESCRIPTION
[0022] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0023] See also Figure 1-8 In order to achieve the above purpose, the technical solution adopted by the present invention is a visual measurement method for the circular hole size of sheet metal parts containing imaging interference features: Step 1, image acquisition of circular holes in sheet metal parts. A visual acquisition system for planar sheet metal parts consisting of a CMOS camera, a telecentric lens, a coaxial light source, an array surface light source, an image acquisition card, and a computer is built. This system is used to acquire images of the parts to be measured, and images of circular holes containing imaging interference features such as pseudo edges and processing residues are collected. Among them, the optical axis of the camera is perpendicular to the measurement plane, and the measured parts are provided with uniform illumination by the coaxial light source and the array surface light source. The optical camera system composed of a telecentric lens and a CMOS camera is used to image, and the image acquisition card transmits the generated image to the computer, which performs visual size measurement. The resolution of the CMOS camera is 5472×3648, and the field of view of the telecentric lens is 119.4×79.6mm. The combination of the two has a single pixel size of approximately 0.022mm, which meets the industrial measurement accuracy requirement of ±0.1mm.
[0024] Step 2: Calculate and fuse the image gradient amplitude. Since the pseudo edge is directly connected to the circular hole highlight area, there is an obvious gradient change in the entire image. By performing multi-directional gradient amplitude calculation on the circular hole grayscale image, a gradient amplitude fusion operation is performed on each pixel to achieve the binding of each pixel to the maximum gradient amplitude. The specific operation steps are as follows: Step 2.1: Calculate the multi-directional gradient amplitude of the image. The gradient direction is 45 degrees counterclockwise. Arrange and create 8 angles, specifically: , a first-order gradient operator of size 3×3 is used to calculate the gradient amplitude of the image. The remaining four directions are symmetrical, and the corresponding gradient amplitude can be obtained by inverting the calculation result.
[0025] Step 2.2, gradient fusion within the pixel range. Create an array of the same size as the image, traverse all the pixels in the image, compare the magnitudes of the gradients in each direction calculated for the current pixel, save the maximum gradient magnitude of this pixel into the array, and traverse the next pixel after saving until all pixels are traversed.
[0026] Step 3, the pseudo-edge distribution range response of the circular hole. Pseudo-edges and processing residues are usually attached to the inner side of the target contour, resulting in the circular hole being divided from the outside to the inside: background area, chamfer area, pseudo-edge area, processing residue area, and highlight through area. Among them, the inner side of the chamfer area is the target contour to be detected, and the through area in the middle of the circular hole is illuminated by the array surface light source, resulting in the edges connected to the highlight through area having obvious edge gradient changes. Therefore, by artificially setting the screening threshold, all pixels of the image are traversed and screened. During the traversal process, if the maximum gradient amplitude of this position is greater than the set threshold, the pixel value of this position is replaced by the maximum gradient amplitude, otherwise the pixel of this position is set to 0. After the traversal is completed. Non-0 pixels in the image represent that this position has obvious gradient changes, realizing the pseudo-edge distribution range response. Among them, the gradient amplitude threshold is set to 210.
[0027] Step 4, image brightness enhancement and pseudo-edge elimination. The pixel with obvious edges is taken as the center of the 8-domain matrix, and the 8 pixel values except the center of the matrix are counted. Since the edges of the processing residues, the target edges, and the pseudo-edges are all connected to the highlight through-area, their edges all have strong gradient changes. Therefore, the statistical pixels are screened by calculating the global pixel average and the chamfer area pixel average to achieve the filtering of non-pseudo-edge pixels. Based on the calculated pseudo-edge pixel average, the image is enhanced in brightness to achieve pseudo-edge elimination. Among them, the size of the 8-neighborhood matrix is 3 rows and 3 columns. The global pixel average reflects the average brightness of the entire image, and its average value is less than the pixel value of the highlight area. The chamfer area has a rough surface, poor reflectivity, and the darkest color, and the pixel average value to which it belongs is the lowest. The global pixel average and the chamfer area pixel average are used as screening conditions to filter non-pseudo-edge pixel values.
[0028] Step 5: Collect target edge points in the highlight area. After the image brightness enhancement is completed, most of the pseudo edges are eliminated. For processing residues, the contour point fitting method is used to first collect target contour points, and then separate the interference points of processing residues by the distance method. The specific steps of collecting target contour points are as follows: Step 5.1, determine the range of the highlight area. Take the image center point O as the starting point, and the positive and negative directions of the X and Y axes as the search direction to find the first pixel mutation point encountered (the pixel point whose difference with the previous pixel value is greater than 100); Step 5.2: Single-axis edge search. Take the X-axis as the search direction and search for the first pixel mutation point in the positive and negative directions of the Y-axis until the search is completed on this axis. Step 5.3, change the direction and repeat the search. Use the Y axis as the search direction to find the first pixel mutation point in the positive and negative directions of the X axis until the search is completed on this axis.
[0029] Step 6: Random sampling cluster center fitting. Since the distance clustering algorithm has high requirements on the accuracy of the cluster center, it is necessary to process the contour points to determine the high-precision cluster center. The specific steps of the random sampling method to determine the cluster center are as follows: Step 6.1, pre-classify contour points. Taking the center of the image as the origin, divide the contour points into 4 categories according to the X and Y axis coordinates of the contour points and the four quadrants of the two-dimensional plane.
[0030] Step 6.2, loop to create subsets. A point is randomly selected from each of the four types of contour points to form a subset of only four points. This operation is looped a certain number of times to create multiple subsets.
[0031] Step 6.3, determine the subset fitting accuracy. Perform a least squares fit on each subset to obtain the fitting center and fitting radius corresponding to each subset, and take the ratio of the average distance from all contour points to the fitting center to the fitting radius as the fitting accuracy evaluation value of the subset, and retain the fitting accuracy evaluation value corresponding to each subset.
[0032] Step 6.4, fitting high-precision cluster centers. Artificially set the screening threshold, create the final precision fitting empty array, and retain the 4 contour points corresponding to the subsets with fitting accuracy evaluation values less than the threshold in the final precision fitting array. After the screening is completed, perform the least squares fitting on all contour points in the final precision fitting array, and the output fitting circle center is the cluster center.
[0033] Step 7, distance clustering final size output. All contour points are clustered by the Euclidean distance from the contour point to the cluster center, and the clustered contour points have distance label attributes. The number of contour points corresponding to each distance is counted in units of cluster distance. The characteristics of the processing residue being close to the center of the circle, the wide range of distance distribution, and the small number of contour points are used to find the peak with the largest jump in the number of contour point distance information. The contour points corresponding to all distances less than the peak are classified as interference classes, and the contour points corresponding to all distances greater than the peak are classified as target contour classes. The least squares fitting is performed on all points belonging to the target contour class, and the final size measurement result is output. Among them, the Euclidean distance refers to the straight-line distance between two points in the coordinate system.
Claims
1. A visual measurement method for circular hole size of sheet metal parts containing imaging interference features, characterized in that: The following steps are involved: Step 1: Image acquisition of circular holes of sheet metal parts: According to the requirements of dimensional measurement accuracy, a visual acquisition platform for sheet metal parts is built to collect images of circular holes containing imaging interference features; Step 2: Image gradient amplitude calculation and fusion: The first-order gradient operator is used to calculate the gradient amplitude in the eight gradient directions of the circular hole image, and the maximum gradient amplitude of each pixel is calculated through gradient amplitude fusion; Step 3, circular hole pseudo edge distribution range response: By using the pseudo-edge distribution characteristics and manually setting the screening threshold, the coordinates of pixels with obvious gradient changes are retained; Step 4: Image brightness enhancement and pseudo edge elimination: The reserved pixel point is taken as the center of the 8-neighborhood matrix, and the neighboring pixel information is collected. The pseudo-edge pixels are screened out using the global average pixel of the image and the average pixel of the chamfered area as the threshold conditions. The average value of the pseudo-edge pixels is calculated, and the brightness of the entire image is enhanced based on the average value to eliminate the pseudo-edge. Step 5: Collection of target edge points in the highlighted area: Take the image center point O as the starting point, determine the overall search direction through the positive and negative directions of the X and Y axes of the starting point, take the X / Y axis as the search axis, and find the first pixel mutation point in the positive and negative directions of the other axis. After the search of this axis is completed, change the search axis and repeat this operation; Step 6, random sampling cluster center fitting: The collected contour points are divided into four categories according to the positive and negative directions of the X and Y axes of the starting point. Multiple subsets are created from the four categories of contour points by random sampling. The least squares fitting is used for the subsets to determine the subset fitting accuracy. All high fitting accuracy subsets are reclassified and fitted to determine the final cluster center. Step 7, distance clustering final size output: The Euclidean distance between all contour points and the cluster center is calculated, and the number of contour points corresponding to each distance is counted. The peak point with the largest number jump is used as the judgment condition to classify the contour points into interference class and target contour class. The least squares fitting is performed on the points belonging to the target contour class, and the final size measurement result is output.
2. The visual measurement method for circular hole size of sheet metal parts containing imaging interference features according to claim 1 is characterized in that: In the step 1 of sheet metal part image acquisition, a planar sheet metal part visual acquisition system consisting of a CMOS camera, a telecentric lens, a coaxial light source, an array surface light source, an image acquisition card and a computer is built; image acquisition is performed through this system to collect circular hole images containing imaging interference features, mainly pseudo edges and processing residues.
3. The visual measurement method for circular hole size of sheet metal parts containing imaging interference features according to claim 1 is characterized in that: In the step 2 of image gradient amplitude calculation and fusion, since pseudo edges are randomly distributed in the image, the image gradient amplitude is calculated using a first-order gradient operator for multiple gradient directions to obtain the edge distribution in each direction in the image, and then the gradient amplitude is fused for each pixel point so that each pixel point corresponds to the maximum gradient amplitude. The gradient direction is the positive direction of the Y axis as the starting direction, and the 8 directions are created at 45° intervals counterclockwise. The specific angles are ; The first-order gradient operator is used to calculate the weight matrix of the image edge, which is 3 rows and 3 columns in size; Gradient amplitude fusion refers to comparing the gradient amplitudes calculated in multiple directions within a single pixel so that each pixel is associated with the maximum gradient amplitude.
4. The visual measurement method for circular hole size of sheet metal parts containing imaging interference features according to claim 1 is characterized in that: In the step 3, the pseudo-edge distribution range response of the circular hole, the pseudo-edge distribution characteristics are: often closely attached to the inner side of the target contour in a semicircular arc shape, directly connected to the circular hole highlight area instead of part of the target contour, and having obvious gradient changes in the entire image; by artificially setting the screening threshold, all pixel points of the image are traversed and screened. During the traversal process, if the maximum gradient amplitude of this position is greater than the set threshold, the pixel value of this position is replaced by the maximum gradient amplitude, otherwise the pixel at this position is set to 0. After the traversal is completed, the non-0 pixel point in the image represents that this position has an obvious gradient change, thereby realizing the pseudo-edge distribution range response, wherein the gradient amplitude threshold is set to 210.
5. The visual measurement method for circular hole size of sheet metal parts containing imaging interference features according to claim 1 is characterized in that: In the step 4 of image brightness enhancement and pseudo-edge elimination, the pixel point with obvious edge is retained as the center of the 8-neighborhood matrix, and the 8 pixel values except the center of the matrix are counted. Since the pseudo-edge pixel is between the global pixel average and the chamfer area pixel average, the highlight area pixels and target contour pixels in the counted pixels are screened by calculating the global pixel average and the chamfer area pixel average, so as to achieve the purpose of only counting pseudo-edge pixels. The pseudo-edge pixel average is calculated, and the image brightness is enhanced by using the calculated pseudo-edge pixel average as the basis to achieve the elimination of pseudo-edge areas. The size of the 8-neighborhood matrix is 3 rows and 3 columns. The image brightness enhancement is to change the size of all pixel values in the image according to a certain proportion through the basis parameters, so that the pixel values higher than the basis are all changed to 255.
6. The visual measurement method for circular hole size of sheet metal parts containing imaging interference features according to claim 1 is characterized in that: In the collection of target edge points in the highlighted area of step 5, after the image brightness enhancement is completed, most of the pseudo edges are eliminated; for processing residues, a contour point fitting method is adopted, firstly, the target contour points are collected, the contour points are classified by distance clustering, and the contour points of the target contour class are fitted using the least squares method to achieve high-precision size measurement of the circular hole; wherein, the image center point O refers to the size center of the circular hole image, and the pixel mutation point refers to when this point is searched, the pixel value of this point differs from the pixel value of the previous point by more than 100.
7. The visual measurement method for circular hole size of sheet metal parts containing imaging interference features according to claim 1 is characterized in that: In the step 6 of random sampling cluster center fitting, since the distance clustering algorithm has high requirements on the accuracy of the cluster center, the contour points need to be processed to determine the high-precision cluster center. The collected contour points are classified into 4 categories, and the same number of points are extracted from the 4 categories of contour points multiple times using the random sampling method to form contour point subsets. Each subset is fitted by the least squares method, and the fitting center and fitting radius corresponding to each subset are obtained. The final precise fitting empty array is created, the fitting accuracy of the current subset is judged, and the contour points corresponding to the high fitting accuracy subset are retained in the final precise fitting array. After all subsets are judged, the least squares fitting is performed on all contour points in the final precision fitting array, and the final output fitting circle center is the cluster center. Among them, the category division standard is to divide the contour points into 4 categories according to the X / Y axis coordinates of the image center point. The random sampling method is a method that can ensure that each data has the same chance to be selected into the sample, which can avoid selection bias and ensure the reliability of sample selection. The fitting accuracy is judged based on the ratio of the average distance from all contour points to the fitting circle center to the fitting radius. The smaller the ratio, the more uniform the fitting contour and the higher the accuracy.
8. The visual measurement method for circular hole size of sheet metal parts containing imaging interference features according to claim 1 is characterized in that: In the final size output of distance clustering in step 7, all contour points are clustered by the Euclidean distance from the contour point to the cluster center. The clustered contour points have distance label attributes. The number of contour points corresponding to each distance is counted in units of cluster distance. The characteristics of the processing residue being close to the center of the circle, the distance distribution range being wide, and the number of contour points being small are utilized to find the peak with the largest jump in the number of contour point distance information. The contour points corresponding to all distances less than the peak are classified as interference classes, and the contour points corresponding to all distances greater than the peak are classified as target contour classes. The least squares fitting is performed on all points belonging to the target contour class, and the final size measurement result is output, wherein the Euclidean distance refers to the straight-line distance between two points in the coordinate system.
Citation Information
Cited By
Motor shaft size measurement and surface defect detection method based on machine vision
CN119515880A
Precise microsphere diameter detection method based on mixed geometrical characteristics
CN119863505A
Image measurement method and system for cable insulation layer concentricity
CN121213568A
An image measurement method and system for cable insulation layer concentricity
CN121213568B
