Towel rack pipe fitting cutting size measuring method based on machine vision detection
By using machine vision inspection methods, two-dimensional image preprocessing and edge detection are performed on towel rack tubing, combined with three-dimensional feature extraction. This solves the problems of low accuracy and efficiency in existing technologies, and realizes automated and accurate measurement of the cutting dimensions of towel rack tubing.
Patent Information
- Application Number
- CN202511671579.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-14
AI Technical Summary
In the current process of cutting towel rack tubing, the accuracy and efficiency of detecting indicators such as hole diameter, eccentricity, hole spacing and hole edge distance are poor. Manual sampling and two-dimensional image recognition methods are affected by factors such as lighting, resulting in poor detection results.
A machine vision-based detection method is adopted, which combines two-dimensional image preprocessing, edge detection and abnormal edge removal with three-dimensional feature extraction to achieve the size measurement of towel rack tubing. This includes adaptive thresholding, edge sharpening and smoothing, and removal of interference items to obtain accurate size measurement results.
It enables automated and accurate measurement of the cutting dimensions of towel rack fittings, reduces the impact of uneven lighting and metal shavings, improves inspection efficiency and accuracy, and can automatically obtain more accurate dimensional measurement results.
Smart Images

Figure CN121582162A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine vision and towel rack pipe fittings, and particularly relates to a towel rack pipe fitting cutting size measurement method based on machine vision detection. BACKGROUND
[0002] In the cutting process of the towel rack pipe fitting, the pipe fitting needs to be uniformly perforated at equal intervals. Referring to Figure 2 , the center positions of the perforations should be located on the same straight line parallel to the side in the ideal state, and the hole diameter (the communication radius or diameter data of a single hole), eccentricity (the offset value of the center of a single hole from the center of the plane), hole spacing (the center straight line distance between adjacent holes in the detection bottom direction), and hole edge distance (the straight line distance from the top / bottom nearest hole center to the top / bottom edge) should meet the requirements. If there is a large deviation in any of the above indicators, it indicates that the pipe fitting is unqualified.
[0003] The existing method for detecting the above indicators is mostly through artificial sampling inspection, which is measured and judged by sampling and manually measuring according to tools. This method has obvious shortcomings and limited detection tools, and has poor detection accuracy and low work efficiency. Of course, some use image recognition, but it only performs simple edge detection and contour recognition on two-dimensional images, and then performs roundness detection to judge the above indicators. The contour recognition result is poor due to the influence of factors such as perforation and light, which affects the subsequent indicator acquisition result, resulting in poor detection accuracy. SUMMARY
[0004] The purpose of the present application is to at least solve one of the deficiencies of the prior art, and to provide a towel rack pipe fitting cutting size measurement method based on machine vision detection.
[0005] In order to achieve the above purpose, the present application adopts the following technical solutions: Specifically, a towel rack pipe fitting cutting size measurement method based on machine vision detection is proposed, which includes the following: Obtaining a two-dimensional image of the towel rack pipe fitting; Pretreating the two-dimensional image to obtain a first image of denoising and gray scale, and then performing adaptive threshold processing on the first image to obtain a second image of background elimination; Performing edge detection operation on the second image to obtain a plurality of first edges, denoted as a first edge set; Mapping the first edge set back to the original two-dimensional image to obtain a corresponding second edge set; Performing abnormal edge pixel point elimination on each second edge in the second edge set to obtain an updated second edge set; obtaining an updated first edge set based on the updated second edge set; performing edge preprocessing on the updated first edge set to obtain a sharpened and smoothed first edge set; performing size measurement based on the sharpened and smoothed first edge set to obtain a first size measurement result according to a preset size measurement scheme.
[0006] Further, the method further comprises, performing 3D data extraction on the towel rack pipe to obtain a second size measurement result through a 3D feature extraction and positioning algorithm; taking a mean value of the first size measurement result and the second size measurement result to obtain a final size measurement result, and performing size qualification evaluation based on the final size measurement result.
[0007] Further, specifically, performing adaptive threshold processing on the first image to obtain a second image with background eliminated, comprising, performing mean gray value calculation on all pixel points in the first image to obtain mean_gray, and setting the gray value of the pixel points with a gray value lower than mean_gray in the first image to 0 to obtain the second image with background eliminated.
[0008] Further, specifically, performing abnormal edge pixel point elimination on each second edge in the second edge set to obtain an updated second edge set, comprising, For any second edge, traversing all pixel points thereof, for any pixel point, obtaining R, G and B components thereof respectively denoted as Pix_R, Pix_G and Pix_B, and calculating a gray value Pix_g based thereon, Pix_g=0.213*Pix_R+0.715*Pix_G+0.072*Pix_B; judging whether the following formula is established, Max(Pix_R, Pix_G, Pix_B)-Min(Pix_R, Pix_G, Pix_B) < Pix_X; wherein Pix_X represents a preset component channel threshold value, and if the formula is established, calculating an adjustment coefficient Coef=Pix_g / M, M=Median(Pix_R, Pix_G, Pix_B), at this time, judging whether Coef*Max(Pix_R, Pix_G, Pix_B) is greater than 255, if greater than 255, updating Coef as Coef=Pix_g / Max(Pix_R, Pix_G, Pix_B), and if not greater than 255, not updating Coef, Then the pixel point Pix_R is updated to Pix_R*Coef, Pix_G is updated to Pix_G*Coef, and Pix_B is updated to Pix_B*Coef. If not, the R, G and B components of the pixel point are not updated. After the R, G and B component updating operation of all pixel points of the second edge is completed, the Pix_Eva of each pixel point is calculated, Pix_Eva=(Max(Pix_R, Pix_G, Pix_B)+Min(Pix_R, Pix_G, Pix_B)) / 2. The pixel point with Pix_Eva less than Pix_X is marked as an abnormal edge pixel point and is removed to obtain an updated second edge, and further to obtain an updated second edge set.
[0009] Further, the method further comprises, in the process of performing the edge detection operation on the second image to obtain the first edge set, performing interference item removal on the obtained multiple first edges, specifically, The area data of the multiple first edges is obtained, the average value of all the area data at this time is calculated and recorded as a first discrimination threshold, and the first discrimination threshold is reduced in scale, that is, the first discrimination threshold is updated to alpha*first discrimination threshold, and alpha is a scale coefficient, alpha∈(0, 1). The first edge with area data less than the first discrimination threshold in the first edge is removed to obtain a first edge after one-time processing; The area data of the first edge after one-time processing is obtained, the average value of all the area data at this time is calculated and recorded as a second discrimination threshold, and then the second discrimination threshold is reduced by a preset adjustment parameter beta, that is, the second discrimination threshold is updated to second discrimination threshold-beta. Finally, the remaining edge after removing the edge with area data less than the second discrimination threshold in the first edge after one-time processing constitutes the first edge set.
[0010] Further, specifically, The value of Pix_X is set to 128.
[0011] The application also proposes a towel rack pipe cutting size measurement system based on machine vision detection, comprising the following: A data acquisition module is configured to acquire a two-dimensional image of a towel rack pipe; A first preprocessing module is configured to preprocess the two-dimensional image to obtain a denoised and grayscale first image, and then perform adaptive threshold processing on the first image to obtain a second image with the background eliminated; An edge detection module is configured to perform edge detection operation on the second image to obtain multiple first edges, which are recorded as a first edge set; The first data processing module is configured to map the first edge set back to the original two-dimensional image to obtain a corresponding second edge set; The outlier point elimination module is configured to eliminate outlier edge pixels in each second edge in the second edge set to obtain an updated second edge set. The second data processing module is configured to obtain an updated first edge set based on the updated second edge set. The second preprocessing module is configured to perform edge preprocessing on the updated first edge set to obtain a first edge set after sharpening and smoothing. The size measurement module is configured to perform size measurement based on the first edge set after sharpening and smoothing according to a preset size measurement scheme to obtain a first size measurement result.
[0012] Further, the system further comprises, The 3D measurement module is configured to perform 3D data extraction on the towel rack pipe, and obtain a second size measurement result through a 3D feature extraction and positioning algorithm. The first size measurement result and the second size measurement result are averaged to obtain a final size measurement result, and the final size measurement result is used for size qualification evaluation.
[0013] The present application has the following advantages: The present application provides a towel rack pipe cutting size measurement method based on machine vision detection. By collecting two-dimensional images of the towel rack pipe, the two-dimensional images are first subjected to adaptive threshold processing to obtain images with the background eliminated, which can speed up the subsequent processing efficiency and reduce the impact caused by uneven illumination of the production line to a certain extent. Then, considering that the actual scene may have some metal chips on the edge of the hole, which may cause some fluctuations in the edge, the edge pixels obtained by edge detection are mapped back to the original image. By using an enhancement algorithm based on R, G and B channels, the possible abnormal edge pixels can be eliminated, which facilitates subsequent sharpening and smoothing. In addition, the edge interference term elimination mechanism is added during the edge detection process, which can eliminate some small edges or non-closed edges to speed up the operation efficiency. Based on the finally obtained edge set, more accurate results can be obtained. The present application can automatically obtain accurate towel rack pipe cutting size measurement results based on machine vision. BRIEF DESCRIPTION OF DRAWINGS
[0014] The above and other features of the present disclosure will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which like reference numerals denote like elements in the accompanying drawings. As apparent from the following description, the drawings are only some embodiments of the present disclosure, and other drawings can be obtained from the drawings without creative labor. Figure 1 Fig. 1 shows a flow chart of a towel rack pipe cutting size measurement method based on machine vision detection according to the present application; Figure 2 Fig. 2 shows a size measurement index diagram of a circular pipe according to the present application. DETAILED DESCRIPTION
[0015] The concept, specific structure and technical effects of the present application will be described clearly and completely in combination with embodiments and drawings to fully understand the purpose, scheme and effects of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The same reference signs used in the drawings indicate the same or similar parts.
[0016] Embodiment 1, reference Figure 1 The present application provides a towel rack pipe cutting size measurement method based on machine vision detection, comprising the following steps: obtaining a two-dimensional image of a towel rack pipe; preprocessing the two-dimensional image to obtain a first image with denoising and grayscale, and then performing adaptive threshold processing on the first image to obtain a second image with background eliminated; performing edge detection operation on the second image to obtain a plurality of first edges, denoted as a first edge set; mapping the first edge set back to the original two-dimensional image to obtain a corresponding second edge set; performing abnormal edge pixel point rejection on each second edge in the second edge set to obtain an updated second edge set; obtaining an updated first edge set based on the updated second edge set (pixel mapping can be performed to obtain the updated first edge set); performing edge preprocessing on the updated first edge set to obtain a first edge set with sharpening and smoothing; performing size measurement based on the first edge set with sharpening and smoothing according to a preset size measurement scheme (this scheme is a mature measurement method in the art, i.e., the center of the hole is determined by Hough circle detection or straight line detection, and then the corresponding index calculation can be performed according to the background technical introduction) to obtain a first size measurement result.
[0017] In the embodiment 1, by collecting the two-dimensional image of the towel rack pipe, firstly, the two-dimensional image is subjected to adaptive threshold processing to obtain the background-eliminated image, which can speed up the subsequent processing efficiency and reduce the influence caused by the uneven illumination of the production line to a certain extent, then considering that the punching of the pipe in the actual scene may cause some metal chips at the edge of the hole, resulting in a certain fluctuation at the edge, therefore, the edge pixel points obtained by edge detection are mapped back to the original image, and the abnormal edge pixel points that may exist are removed through the enhancement algorithm based on the R, G and B channels, which is convenient for subsequent sharpening and smoothing; and the edge interference term removal mechanism is added in the edge detection process, which can remove part of the small edge or non-closed edge to speed up the operation efficiency, and the size measurement based on the finally obtained edge set can obtain more accurate results.
[0018] As a preferred embodiment of the present application, the method further comprises, After 3D data extraction of the towel rack pipe, a second size measurement result is obtained through 3D feature extraction and positioning algorithm; The first size measurement result and the second size measurement result are averaged to obtain the final size measurement result, and the final size measurement result is used for size qualification evaluation.
[0019] In the preferred embodiment, if the funds permit and higher accuracy is required, three-dimensional detection can be added on the basis of the original two-dimensional detection result to obtain a three-dimensional detection result, and the size qualification evaluation based on the two-dimensional detection result and the three-dimensional detection result can balance the errors and obtain more accurate size qualification evaluation.
[0020] As a preferred embodiment of the present application, specifically, the first image is subjected to adaptive threshold processing to obtain the second image with the background eliminated, comprising, The mean_gray is calculated by averaging the gray values of all pixel points in the first image, and the gray values of the pixel points with gray values lower than the mean_gray in the first image are set to 0 to obtain the second image with the background eliminated.
[0021] In the preferred embodiment, considering that the existing background-eliminated method is to set a fixed threshold to eliminate the non-ROI area, but due to the problem of uneven illumination in the application scene, setting a fixed threshold will cause too many non-ROI areas to be left, affecting the efficiency of subsequent operation, therefore, the global average gray value is used as an adaptive threshold in the above manner, which can basically remove a large number of background pixel points and facilitate subsequent calculation.
[0022] As a preferred embodiment of the present application, specifically, the abnormal edge pixel points of each second edge in the second edge set are removed to obtain an updated second edge set, comprising, For any second edge, traverse all its pixel points, for any pixel point, get its R, G, B components respectively as Pix_R, Pix_G, Pix_B, and calculate its gray value Pix_g based on this, Pix_g=0.213*Pix_R+0.715*Pix_G+0.072*Pix_B; determine whether the following formula is correct, Max(Pix_R, Pix_G, Pix_B)-Min(Pix_R, Pix_G, Pix_B)<Pix_X; wherein Pix_X represents a preset component channel threshold value, if correct, calculate the adjustment coefficient Coef=Pix_g / M, M=Median(Pix_R, Pix_G, Pix_B), At this time, determine whether Coef*Max(Pix_R, Pix_G, Pix_B) is greater than 255, if greater than 255, update Coef as: Coef=Pix_g / Max(Pix_R, Pix_G, Pix_B), if not greater than 255, do not update Coef, then update Pix_R of the pixel point as Pix_R*Coef, update Pix_G as Pix_G*Coef, and update Pix_B as Pix_B*Coef; If not correct, do not update the R, G, B components of the pixel point; After completing the R, G, B component update operation of all pixel points of the second edge, calculate Pix_Eva of each pixel point, Pix_Eva=(Max(Pix_R, Pix_G, Pix_B)+Min(Pix_R, Pix_G, Pix_B)) / 2; Mark the pixel point with Pix_Eva less than Pix_X as an abnormal edge pixel point and remove it to obtain the updated second edge, and further obtain the updated second edge set.
[0023] In the preferred embodiment, considering that in actual application scenarios, the color of the whole pipe is relatively close, if there are metal chips distributed on the outer periphery of the hole during punching, due to the scattered state and small amount of the metal chips, there will be a certain difference in contrast with the whole pipe, therefore, the above-mentioned enhancement algorithm based on R, G, B three channels is used to remove the possible abnormal edge pixel points, which is convenient for subsequent sharpening and smoothing. The value of Pix_X can be set to 128, which is exactly half of the maximum value 255 of the three channels, at this time, the effect is better, wherein Max(), Min() and Median() are maximum value, minimum value and intermediate value respectively.
[0024] As a preferred embodiment of the present application, the method further comprises, in the process of performing the edge detection operation on the second image to obtain the first edge set, performing interference item elimination on the obtained plurality of first edges, specifically, obtaining area data of the plurality of first edges, calculating the average value of all the area data at this time as a first discrimination threshold, and performing scale reduction on the first discrimination threshold, that is, updating the first discrimination threshold as a*first discrimination threshold, where a is a scale coefficient and a∈(0, 1); eliminating the first edges with area data less than the first discrimination threshold from the first edges to obtain first edges after first processing; obtaining area data of the first edges after first processing, calculating the average value of all the area data at this time as a second discrimination threshold, and then subtracting a preset adjustment parameter β from the second discrimination threshold, that is, updating the second discrimination threshold as second discrimination threshold-β; finally, eliminating the edges with area data less than the second discrimination threshold from the first edges after first processing to obtain the remaining edges, which constitute the first edge set.
[0025] In the preferred embodiment, considering that if there are many interference edges when performing edge detection, the subsequent calculation efficiency will be affected, some obviously small interference items are eliminated in the first processing. In the second processing, considering that the punched edge image may have the interference problem of some concentric circles, an adjustment parameter β is set to eliminate the edges less than a certain degree of the second average area, so as to reduce the interference items as much as possible and ensure the efficiency of subsequent operation, where β can be determined through pre-experiment. The Canny operator, which is a better edge detection operator, can be used for edge detection, and OpenCV, ImageMagick, Fiji (ImageJ) or MATLAB can be called for edge area calculation, which is a mature prior art and will not be described in detail.
[0026] In embodiment 2, the present application further provides a towel rack pipe cutting size measurement system based on machine vision detection, which comprises the following: a data acquisition module configured to acquire a two-dimensional image of a towel rack pipe; a first preprocessing module configured to preprocess the two-dimensional image to obtain a denoised and grayscale first image, and to perform adaptive threshold processing on the first image to obtain a second image with the background eliminated; an edge detection module configured to perform an edge detection operation on the second image to obtain a plurality of first edges, denoted as a first edge set; a first data processing module configured to map the first edge set back to the original two-dimensional image to obtain a corresponding second edge set; An outlier elimination module is configured to eliminate outlier edge pixels from each second edge in the second edge set to obtain an updated second edge set. A second data processing module is configured to obtain an updated first edge set based on the updated second edge set. A second preprocessing module is configured to perform edge preprocessing on the updated first edge set to obtain a first edge set after sharpening and smoothing. A size measurement module is configured to perform size measurement on the first edge set after sharpening and smoothing according to a preset size measurement scheme to obtain a first size measurement result.
[0027] In this embodiment 2, this is a hardware system corresponding to the method proposed in the application, which has the same beneficial effects as the method.
[0028] As a preferred embodiment of the application, the system further comprises, A 3D measurement module is configured to perform 3D data extraction on the towel rack pipe, and obtain a second size measurement result through 3D feature extraction and positioning algorithm. The first size measurement result and the second size measurement result are averaged to obtain a final size measurement result, and the final size measurement result is used for size qualification evaluation.
[0029] In addition, each functional module in each embodiment of the application can be integrated in one processing module, or each module can exist physically alone, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software functional module.
[0030] The integrated module, if realized in the form of a software functional module and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer-readable storage medium. When the processor executes the computer program, the steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer-readable medium can include any entity or system, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.
[0031] Although the description of the application has been quite detailed and particularly with respect to several described embodiments, it is not intended to limit the application to any of these details or embodiments or any particular embodiment, but rather it is intended to cover the intended scope of the application as provided by the appended claims, which should be interpreted as broadly as the prior art will permit, effectively encompassing the intended range of the application. Furthermore, the above description of the application is made by way of example with the embodiments that the inventors can foresee, and the purpose is to provide a useful description, and those non-essential changes to the application that have not yet been foreseen can still represent equivalent changes to the application.
[0032] The above description is only the preferred embodiments of the present application, and the present application is not limited to the above-described embodiments, but any technical solutions and / or embodiments within the protection scope of the present application, as long as they achieve the same technical effects by the same means, should belong to the protection scope of the present application.
Claims
1. A method for measuring the cutting dimensions of towel rack tubing based on machine vision inspection, characterized in that, Including the following: Obtain a 2D image of the towel rack fittings; The two-dimensional image is preprocessed to obtain a first image that is denoised and grayscaled, and then the first image is subjected to adaptive thresholding to obtain a second image with background removed; Performing an edge detection operation on the second image yields multiple first edges, denoted as the first edge set; The first edge set is mapped back to the original two-dimensional image to obtain the corresponding second edge set; The updated second edge set is obtained by removing abnormal edge pixels from each second edge in the second edge set. Then, based on the updated second edge set, the updated first edge set is obtained; The updated first edge set is preprocessed to obtain a sharpened and smoothed first edge set. The first dimension measurement result is obtained by performing dimension measurement based on the first sharpened and smoothed edge set according to the preset dimension measurement scheme.
2. The method for measuring the cutting dimensions of towel rack tubing based on machine vision inspection according to claim 1, characterized in that, The method also includes, After extracting 3D data from the towel rack fitting, the second dimension measurement result is obtained through 3D feature extraction and positioning algorithms; The final dimension measurement result is obtained by averaging the first dimension measurement result and the second dimension measurement result, and the dimension conformity is evaluated based on the final dimension measurement result.
3. The method for measuring the cutting dimensions of towel rack tubing based on machine vision inspection according to claim 1, characterized in that, Specifically, the first image is subjected to adaptive thresholding to obtain a second image with the background removed, including: The mean_gray value is calculated by averaging the gray values of all pixels in the first image. The gray values of pixels in the first image whose gray values are lower than the mean_gray value are set to 0, thus obtaining the second image with the background removed.
4. The method for measuring the cutting dimensions of towel rack tubing based on machine vision inspection according to claim 1, characterized in that, Specifically, the updated second edge set is obtained by removing abnormal edge pixels from each second edge in the second edge set, including: For any second edge, iterate through all its pixels. For any pixel, obtain its R, G, and B components, denoted as Pix_R, Pix_G, and Pix_B respectively, and calculate its grayscale value Pix_g based on these components. Pix_g=0.213*Pix_R+0.715*Pix_G+0.072*Pix_B; Determine whether the following expression is true. Max(Pix_R,Pix_G,Pix_B)-Min(Pix_R,Pix_G,Pix_B)<Pix_X; Where Pix_X represents the preset component channel threshold value; if true, the adjustment coefficient Coef = Pix_g / M is calculated. M=Median(Pix_R,Pix_G,Pix_B), At this point, it is determined whether Coef*Max(Pix_R, Pix_G, Pix_B) is greater than 255. If it is greater than 255, Coef is updated to: Coef = Pix_g / Max(Pix_R, Pix_G, Pix_B). If it is not greater than 255, no Coef update is performed. Then update the Pix_R of the pixel to Pix_R*Coef, Pix_G to Pix_G*Coef, and Pix_B to Pix_B*Coef; If the condition is not met, the R, G, and B components of the pixel will not be updated. After updating the R, G, and B components of all pixels on the second edge, calculate the Pix_Eva for each pixel. Pix_Eva=(Max(Pix_R,Pix_G,Pix_B)+Min(Pix_R,Pix_G,Pix_B)) / 2; Pixels with Pix_Eva less than Pix_X are marked as abnormal edge pixels and removed to obtain the updated second edge, and thus the updated second edge set is obtained.
5. The method for measuring the cutting dimensions of towel rack tubing based on machine vision inspection according to claim 1, characterized in that, The method further includes, during the process of performing edge detection on the second image to obtain a first edge set, removing interference items from the obtained multiple first edges. Specifically, Obtain the area data of multiple first edges, calculate the average value of all area data at this time and record it as the first discrimination threshold, and perform scale reduction on the first discrimination threshold, that is, update the first discrimination threshold to α*first discrimination threshold, where α is the scale coefficient, α∈(0,1); First edges whose area data is insufficient to reach the first discrimination threshold are removed to obtain processed first edges; The area data of the first edge is obtained again, and the average value of all area data at this time is calculated and recorded as the second discrimination threshold. Then, the second discrimination threshold is subtracted from the preset adjustment parameter β, that is, the second discrimination threshold is updated to the second discrimination threshold - β. Finally, the edges whose area data is insufficient for the second discrimination threshold in the first edge processing are removed, and the remaining edges constitute the first edge set.
6. The method for measuring the cutting dimensions of towel rack tubing based on machine vision inspection according to claim 4, characterized in that, Specifically, The value of Pix_X is set to 128.
7. A machine vision-based inspection system for measuring the cutting dimensions of towel rack tubing, characterized in that, Including the following: The data acquisition module is used to acquire two-dimensional images of towel rack fittings; The first preprocessing module is used to preprocess the two-dimensional image to obtain a first image that has been denoised and grayscaled, and then perform adaptive thresholding on the first image to obtain a second image with background removed. The edge detection module is used to perform edge detection operations on the second image to obtain multiple first edges, denoted as the first edge set; The first data processing module is used to map the first edge set back into the original two-dimensional image to obtain the corresponding second edge set. The outlier removal module is used to remove outlier edge pixels from each second edge in the second edge set to obtain an updated second edge set. The second data processing module is used to obtain the updated first edge set based on the updated second edge set; The second preprocessing module is used to perform edge preprocessing on the updated first edge set to obtain a sharpened and smoothed first edge set. The dimension measurement module is used to perform dimension measurement based on the first sharpened and smoothed first edge set according to the preset dimension measurement scheme to obtain the first dimension measurement result.
8. A machine vision-based inspection system for measuring the cutting dimensions of towel rack tubing, as described in claim 7, is characterized in that... The system also includes, The 3D measurement module is used to extract 3D data from the towel rack fitting and then obtain the second dimension measurement result through 3D feature extraction and positioning algorithms. The final dimension measurement result is obtained by averaging the first dimension measurement result and the second dimension measurement result, and the dimension conformity is evaluated based on the final dimension measurement result.
Citation Information
Patent Citations
Workpiece size visual measurement method for complex machining environment
CN117011282A
Gear keyway width measuring method applying machine vision
CN120689384A
Linewidth measurement mthod and apparatus, computing and processing device, computer program and computer readable medium
US20240221201A1
Image denoising method and system, and storage medium
US20240394853A1