Visual inspection method and system for optical fiber equipment processing
By using dynamic illumination compensation and adaptive shape threshold adjustment mechanisms, combined with edge detection algorithms and comparison with normal fiber shape models, the problems of uneven illumination and inaccurate feature extraction in fiber optic product inspection are solved, achieving high-precision defect identification and classification.
Patent Information
- Application Number
- CN202510935496.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-24
AI Technical Summary
Existing visual inspection methods lack effective illumination compensation in fiber optic product inspection, resulting in uneven illumination affecting image clarity and contrast. Fixed feature extraction thresholds are difficult to adapt to differences in edge information, leading to insufficient accuracy in defect identification. Furthermore, fixed defect detection thresholds result in missed or false detections.
By dynamically adjusting the defect detection threshold through dynamic illumination compensation, adaptive shape threshold adjustment mechanism and comparison with normal optical fiber shape model, and combining edge detection algorithm to extract features, defects are identified and classified.
It significantly improves the detection accuracy and sensitivity of defect identification, generates detailed detection reports, and improves detection efficiency and accuracy.
Smart Images

Figure CN120831355A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of optical fiber production image detection, and particularly relates to a visual detection method and system for optical fiber equipment processing. BACKGROUND
[0002] In the field of optical fiber equipment processing, product quality detection is a key link to ensure product performance and reliability. With the wide application of optical fiber technology and the increasing demand for optical fiber product quality, traditional manual detection methods have been difficult to meet the needs of large-scale and high-precision production, and visual detection technology has gradually become an important means of quality detection in this field. However, in the actual application process, the existing visual detection method faces many technical problems to be solved.
[0003] On the one hand, in the process of collecting optical fiber product detection images, due to the instability of the detection environment light source and the difference in light reflection characteristics of different shape regions of the optical fiber product, it is easy to cause uneven illumination in the detection image. This uneven illumination will cause significant differences in illumination intensity in different regions of the image, thereby interfering with the clarity and contrast of the image, and bringing great difficulty to subsequent image processing and analysis. Traditional visual detection methods often lack effective illumination compensation means and are difficult to dynamically adjust to the illumination distribution of different shape regions, resulting in missing defects hidden due to illumination problems during detection or misjudging normal regions as defects, greatly reducing the detection accuracy and affecting the accuracy of product quality evaluation.
[0004] On the other hand, optical fiber products have complex geometric shapes with rich and diverse edge information, and different edges have significant differences in length and curvature. Existing visual detection methods usually use fixed feature extraction thresholds when extracting edge features, which are difficult to adaptively adjust according to the actual characteristics of edge information. This leads to the possibility of missing some key features due to the threshold being set too high when extracting long edges, smooth edges, etc. While in the extraction of short edges, multi-branch edges, etc., the threshold may be set too low, introducing a lot of noise, affecting the accuracy of feature extraction, and thus reducing the sensitivity and accuracy of optical fiber product defect recognition, making it difficult to meet the requirements of high-precision detection.
[0005] In addition, in the defect identification link, the existing visual detection method mostly adopts a fixed defect detection threshold, which is difficult to dynamically adjust according to the actual shape difference of different shape regions of the optical fiber product. Due to the complex shape of the optical fiber product, the sensitivity of different shape regions to defects is different, and the use of a fixed threshold for detection may easily lead to missed defects for some regions with large shape difference but light actual defect degree due to the set threshold being too high, and may also lead to false defects for some regions with small shape difference but heavy actual defect degree due to the set threshold being too low. This not only reduces the accuracy of defect identification, but also increases the difficulty of subsequent defect classification, making it difficult to accurately distinguish and classify different types of defects.
[0006] Therefore, it is necessary to provide a visual detection method and system for optical fiber equipment processing to solve the above technical problems. SUMMARY
[0007] To solve the above technical problems, the present application provides a visual detection method and system for optical fiber equipment processing to solve the problems of lack of effective illumination compensation means, lack of accuracy of feature extraction and lack of accuracy of defect identification when the existing visual detection is used to detect optical fiber products.
[0008] The present application provides a visual detection method for optical fiber equipment processing, which comprises the following steps:
[0009] S1, acquiring a detection image of an optical fiber product, and dynamically compensating illumination by setting different shape thresholds according to the illumination distribution of different shape regions in the detection image to obtain a compensated detection image;
[0010] S2, based on the compensated detection image, extracting edge information of the detection image by using an edge detection algorithm;
[0011] S3, based on the edge information of the detection image, adjusting the threshold value of feature extraction by a preset adaptive shape threshold adjustment mechanism, and extracting features from the edge information of the optical fiber product;
[0012] S4, establishing a model of normal shape of the optical fiber, calculating the shape difference degree of each shape region in the detection image and the normal shape model of the optical fiber, and dynamically adjusting the defect detection threshold based on the shape difference degree to obtain a dynamically adjusted defect detection threshold;
[0013] S5, comparing the features extracted from the edge information of the optical fiber product with the dynamically adjusted defect detection threshold, identifying the defects in the optical fiber product, and identifying the regions corresponding to the defects;
[0014] S6, classifying the identified defects in the optical fiber product, and generating a detection report in combination with the identified regions corresponding to the defects.
[0015] Preferably, the specific steps of step S1 include:
[0016] S101, acquiring a detection image of the optical fiber product under a fixed light source environment through an industrial camera, and dividing the detection image into a plurality of different shape regions based on geometric features of the optical fiber product, wherein the shape regions include a circular end face region, a rectangular cladding region, and a tapered transition region;
[0017] S102, presetting a shape threshold for each shape region, including a circular end face region threshold, a rectangular cladding region threshold, and a tapered transition region threshold;
[0018] S103, calculating the average illumination intensity of each shape region and the global illumination, respectively, and judging whether the difference between the average illumination intensity of each shape region and the global illumination exceeds the corresponding shape threshold, and if so, adjusting the brightness of the shape region through histogram equalization to generate a compensated detection image.
[0019] Preferably, the specific steps of step S2 include:
[0020] S201, selecting a Canny edge detection algorithm or a Sobel edge detection algorithm to calculate each pixel point in the compensated detection image to obtain a pixel point calculation result;
[0021] S202, based on the pixel point calculation result, extracting edge information in the detection image.
[0022] Preferably, the specific steps of step S3 include:
[0023] S301, setting an adaptive shape threshold adjustment mechanism, including setting different threshold ranges according to edge length: setting a high feature extraction threshold for long edges, and setting a low feature extraction threshold for short edges; setting different threshold ranges according to edge curvature: setting a low feature extraction threshold if the edge smoothness is high, and setting a high feature extraction threshold if the edge has multiple branches;
[0024] S302, calculating feature parameters of the extracted edge information of the detection image, including edge curvature and length;
[0025] S303, based on the calculated feature parameters, adjusting the feature extraction threshold through the adaptive shape threshold adjustment mechanism, and extracting features from the edge information of the optical fiber product according to the adjusted feature extraction threshold.
[0026] Preferably, the specific steps of step S4 include:
[0027] S401, collecting edge features of a qualified optical fiber sample, and constructing an optical fiber normal shape model through statistical modeling;
[0028] S402, compare each shape region in the detection image with the normal shape model of the optical fiber, and calculate the shape difference degree;
[0029] S403, based on the calculated shape difference degree, dynamically adjust the defect detection threshold value through the preset shape difference degree threshold value, specifically including: for the shape region whose shape difference degree exceeds the shape difference degree threshold value, the defect detection threshold value is reduced; for the shape region whose shape difference degree does not exceed the shape difference degree threshold value, the defect detection threshold value is increased.
[0030] Preferably, the specific steps of step S5 include:
[0031] S501, compare the features extracted from the edge information of the optical fiber product with the dynamically adjusted defect detection threshold value, and obtain a comparison result;
[0032] S502, based on the comparison result, if the value of the feature extracted from the edge information of the optical fiber product in the comparison result exceeds the corresponding defect detection threshold value, the shape region corresponding to the feature has defects; if the value of the feature extracted from the edge information of the optical fiber product in the comparison result does not exceed the corresponding defect detection threshold value, the shape region corresponding to the feature does not have defects, and a defect recognition result is obtained;
[0033] S503, based on the defect recognition result, mark the region corresponding to the defect in the detection image, wherein the marking method uses different colors, marks or contour lines to highlight the defect region.
[0034] Preferably, the specific steps of step S6 include:
[0035] S601, based on the defect recognition result, determine the defect shape and match the preset defect type library to classify the defects;
[0036] S602, combine the classified defects with the identified region information corresponding to the defects, record the type, position and size information of each defect, and generate a detection report.
[0037] A visual detection system for optical fiber equipment processing, the detection system comprising:
[0038] An image supplementing module for obtaining a detection image of an optical fiber product, and dynamically compensating light according to the light distribution of different shape regions in the detection image through different shape threshold values set to obtain a compensated detection image;
[0039] An image processing module for extracting edge information of the detection image from the compensated detection image based on the compensated detection image using an edge detection algorithm;
[0040] The feature extraction module is configured to extract features from the edge information of the optical fiber product based on the edge information of the detection image and by adjusting a threshold value for feature extraction through a preset adaptive shape threshold adjustment mechanism.
[0041] The detection adjustment module is configured to establish a model of a normal shape of the optical fiber, calculate a shape difference degree of each shape region in the detection image from the model of the normal shape of the optical fiber, and dynamically adjust a defect detection threshold value based on the shape difference degree to obtain a dynamically adjusted defect detection threshold value.
[0042] The contrast identification module is configured to compare the features extracted from the edge information of the optical fiber product with the dynamically adjusted defect detection threshold value, identify defects in the optical fiber product, and identify regions corresponding to the defects.
[0043] The report generation module is configured to classify the identified defects in the optical fiber product and generate a detection report in combination with the identified regions corresponding to the defects.
[0044] Compared with the related art, the visual detection method and system for optical fiber equipment processing provided by the present application has the following beneficial effects:
[0045] The present application eliminates the interference of uneven illumination on detection through dynamic illumination compensation, accurately extracts edge features in combination with an adaptive shape threshold adjustment mechanism, significantly improves the detection accuracy, and at the same time, uses a normal shape model of the optical fiber to compare and dynamically adjust the defect detection threshold value, enhances the sensitivity and accuracy of defect identification, and classifies defects. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 FIG. 1 is a flowchart of a visual detection method for optical fiber equipment processing according to the present application;
[0047] Figure 2 FIG. 2 is a system block diagram of a visual detection system for optical fiber equipment processing according to the present application. DETAILED DESCRIPTION
[0048] The present application will be further described below in conjunction with the drawings and embodiments.
[0049] Embodiment 1
[0050] As shown in FIG. 1, a visual detection method for optical fiber equipment processing includes the following steps: Figure 1
[0051] S1, acquire a detection image of the optical fiber product, and based on the light distribution of different shape regions in the detection image, perform dynamic light compensation through different shape threshold values set to obtain a compensated detection image;
[0052] S2, based on the compensated detection image, extract edge information of the detection image from the compensated detection image using an edge detection algorithm;
[0053] S3, based on the edge information of the detection image, adjust the threshold value of feature extraction through a preset adaptive shape threshold adjustment mechanism, and extract features from the edge information of the optical fiber product;
[0054] S4, establish a model of a normal shape of the optical fiber, calculate the shape difference degree of each shape region in the detection image and the normal shape model of the optical fiber, and dynamically adjust a defect detection threshold value based on the shape difference degree to obtain a dynamically adjusted defect detection threshold value;
[0055] S5, compare the features extracted from the edge information of the optical fiber product with the dynamically adjusted defect detection threshold value, identify defects in the optical fiber product, and identify the regions corresponding to the defects;
[0056] S6, classify the identified defects in the optical fiber product, and generate a detection report in combination with the identified regions corresponding to the defects.
[0057] In the specific implementation process, the specific steps of step S1 include:
[0058] S101, acquire a detection image of the optical fiber product through an industrial camera in a fixed light source environment, and divide the detection image into a plurality of different shape regions based on the geometric features of the optical fiber product, wherein the shape regions include a circular end face region, a rectangular cladding region, and a tapered transition region.
[0059] Specifically, in the fixed light source environment, an industrial camera is used to acquire images of the optical fiber product, and based on the geometric features of the optical fiber product itself, the acquired detection image is divided into a plurality of different shape regions, including a circular end face region, a rectangular cladding region, and a tapered transition region.
[0060] S102, preset shape threshold values for each shape region, including a circular end face region threshold value, a rectangular cladding region threshold value, and a tapered transition region threshold value.
[0061] Specifically, in this embodiment, for the circular end face area, since its surface is relatively smooth, the reflection of light is relatively uniform, the preset shape threshold is set to a relatively small value, and then the allowed range of the light intensity mean value and the global light difference value is ±10; for the rectangular cladding area, since the surface has some texture or unevenness, the reflection of light is relatively complex, and then the preset shape threshold is set to ±15; and for the conical transition area, since its shape changes greatly, the light reflection is more complex, and then the preset shape threshold is set to ±20.
[0062] S103, respectively calculate the light intensity mean value and the global light of each shape area, and respectively judge whether the light intensity mean value of each shape area exceeds the corresponding shape threshold value, if it is judged that it exceeds, adjust the brightness of the shape area through histogram equalization to generate a compensated detection image, wherein the light intensity mean value is the average value of the light intensity of all pixel points in the shape area.
[0063] For example, in the collected detection image, the light intensity mean value of the circular end face area is calculated by the existing data statistical calculation software as 120, the global light is 110, and the preset circular end face area threshold is ±10; the difference value is 120-110=10, which is equal to the upper threshold, so no adjustment is needed. If the light intensity mean value of the circular end face area is 125, the difference value is 125-110=15, which exceeds the threshold ±10, then the histogram equalization processing is performed on the circular end face area to adjust its brightness and make the light more uniform. For the rectangular cladding area, the light intensity mean value is 90, the global light is 110, and the preset rectangular cladding area threshold is ±15. The difference value is 90-110=-20, and the absolute value exceeds the threshold ±15, so the histogram equalization processing is performed on the rectangular cladding area to improve the uneven light condition. For the conical transition area, assuming that the light intensity mean value is 135, the global light is 110, and the preset conical transition area threshold is ±20. The difference value is 135-110=25, which exceeds the threshold ±20, so the histogram equalization processing is also performed on the conical transition area to generate a compensated detection image.
[0064] In the specific implementation process, the specific steps of step S2 include:
[0065] S201, selecting a Canny edge detection algorithm or a Sobel edge detection algorithm to calculate each pixel point in the compensated detection image to obtain a pixel point calculation result.
[0066] Specifically, in the embodiment, based on the existing Sobel edge detection algorithm, the Sobel operator is convolved with the detection image, the gradients of the image in the horizontal and vertical directions are calculated respectively, then the gradient amplitude is obtained by calculating the square root of the sum of squares of the two gradients, and finally the gradient amplitude detection image is binarized according to the set threshold value, to obtain the pixel point value, wherein the pixel point with a value of 1 represents an edge point, and the pixel point with a value of 0 represents a non-edge point, and the preset low threshold value is 50.
[0067] S202, based on the pixel point calculation result, edge information in the detection image is extracted.
[0068] Specifically, according to the calculation result of the pixel point, the pixel point with a value of 1 represents an edge point, and the pixel point with a value of 0 represents a non-edge point, and the edge information in the detection image is extracted.
[0069] In the specific implementation process, the specific steps of step S3 include:
[0070] S301, setting an adaptive shape threshold adjustment mechanism, including setting different threshold ranges according to edge length: setting a high feature extraction threshold for long edges, and setting a low feature extraction threshold for short edges; setting different threshold ranges according to edge curvature: setting a low feature extraction threshold if the edge smoothness is high, and setting a high feature extraction threshold if the edge has multiple branches.
[0071] Specifically, in the embodiment, different threshold ranges are set according to the edge length, for long edges, the feature extraction threshold is set to 80, and for short edges, the low feature extraction threshold is set to 50. For high edge smoothness, the low feature extraction threshold is set to 70; for edges with multiple branches, the high feature extraction threshold is set to 120.
[0072] S302, calculating the feature parameters of the extracted edge information of the detection image, including edge curvature and length.
[0073] Specifically, the rate of change of the tangent direction at each point on the edge is calculated to obtain the edge curvature, and the specific calculation method uses the mathematical curvature formula, for example, for a discrete edge point sequence, the curvature value is approximately obtained by calculating the tangent direction change between adjacent points. The length is calculated by counting the number of pixel points on the edge. The edge is composed of a series of continuous pixel points, so the length of the edge is equal to the total number of these pixel points multiplied by the actual distance between the pixel points.
[0074] For example, the curvature of a 50-pixel edge is calculated by calculating the tangent direction change between adjacent pixels. Then, the number of pixels on the edge is 50, and the actual distance between each pixel is 1, so the length of the edge is 50.
[0075] S303, based on the calculated feature parameters, adjusting the feature extraction threshold through the adaptive shape threshold adjustment mechanism, and extracting the features from the edge information of the optical fiber product according to the adjusted feature extraction threshold.
[0076] Specifically, the edge information of the optical fiber product is filtered using the adjusted feature extraction threshold, and the edge features that meet the threshold condition are extracted. For example, in step S301, the feature extraction threshold of the long edge is preset to 80, and the feature extraction threshold of the short edge and the multi-branch edge is preset to 120; in step S302, the length of an edge is calculated to be 60 pixels (belonging to a longer edge), and the curvature is 0.2 (relatively low); according to the adaptive shape threshold adjustment mechanism, the feature extraction threshold of the edge is adjusted from 80 to 75. Then, the feature value of each pixel or edge segment on the edge is calculated, if the feature value of a certain edge segment is 80, which is greater than the adjusted threshold 75, the edge segment is extracted as an effective feature; if the feature value of another edge segment is 70, which is less than the adjusted threshold 75, the edge segment is ignored. Finally, the features that meet the adjusted threshold are extracted from the edge information.
[0077] In the specific implementation process, the specific steps of step S4 include:
[0078] S401, collect the edge features of the qualified optical fiber samples, and construct the normal shape model of the optical fiber by statistical modeling.
[0079] Specifically, the same industrial camera and fixed light source environment as in step S1 are used to collect detection images of multiple qualified optical fiber samples, which should be strictly screened to ensure that their shape, size, etc. meet the production standards, and then the edge information of each qualified optical fiber sample is extracted according to the method of step S2; by using statistical methods such as calculating the mean, variance and other statistical quantities of edge features, the edge features of the collected multiple qualified optical fiber samples are summarized and analyzed, and a parameterized model is used to construct the normal shape model of the optical fiber.
[0080] S402, compare each shape region in the detection image with the normal shape model of the optical fiber, and calculate the shape difference degree.
[0081] Specifically, the Euclidean distance, Mahalanobis distance, etc. are used to measure the difference between the actual edge and the normal shape model. For each shape region, a shape difference value is calculated. The larger the value, the greater the difference between the actual edge and the normal shape model. In this embodiment, the Euclidean distance between the actual edge of the circular end face region and the elliptical model is 5 pixel units, and the length deviation between the actual edge of the rectangular cladding region and the rectangular model is 3 pixel units, and the width deviation is 2 pixel units. According to the pre-set weight (Euclidean distance weight is 0.6, length deviation weight is 0.3, and width deviation weight is 0.1), the shape difference of the circular end face region is 5*0.6=3, and the shape difference of the rectangular cladding region is 3*0.3+2*0.1=1.1.
[0082] S403, based on the calculated shape difference, the defect detection threshold is dynamically adjusted by the pre-set shape difference threshold, specifically: for the shape region whose shape difference exceeds the shape difference threshold, the defect detection threshold is reduced; for the shape region whose shape difference does not exceed the shape difference threshold, the defect detection threshold is increased.
[0083] Specifically, based on the calculated shape difference, the defect detection threshold is dynamically adjusted by the pre-set shape difference threshold. In this embodiment, the pre-set shape difference threshold is 2, the shape difference of the circular end face region is 3, and the shape difference of the rectangular cladding region is 1.1. Since the shape difference of the circular end face region is 3, which exceeds the shape difference threshold of 2, the defect detection threshold of the circular end face region is reduced from the original 100 to 80; and the shape difference of the rectangular cladding region is 1.1, which does not exceed the shape difference threshold of 2, so the defect detection threshold of the rectangular cladding region is increased from the original 100 to 120.
[0084] In the specific implementation process, the specific steps of step S5 include:
[0085] S501, compare the features extracted from the edge information of the optical fiber product with the dynamically adjusted defect detection threshold to obtain a comparison result.
[0086] Specifically, the edge feature values of each shape region are compared with the dynamically adjusted defect detection threshold of the shape region one by one. For example, for the circular end face region, the values of its edge features (such as average curvature, length of the longest edge, etc.) are compared with the dynamically adjusted defect detection threshold corresponding to the circular end face region; for the rectangular cladding region, its edge feature values are also compared with the threshold corresponding to the rectangular cladding region.
[0087] S502, based on the comparison result, if the value of the feature extracted from the edge information of the optical fiber product in the comparison result exceeds the corresponding defect detection threshold, the shape region corresponding to the feature has a defect; if the value of the feature extracted from the edge information of the optical fiber product in the comparison result does not exceed the corresponding defect detection threshold, the shape region corresponding to the feature does not have a defect, and a defect recognition result is obtained.
[0088] S503, based on the defect recognition result, identifying the region corresponding to the recognized defect in the detection image, wherein the identification mode highlights the defect region using different colors, marks or contour lines.
[0089] Specifically, according to the actual situation, the appropriate identification mode is selected to highlight the defect region, and the identification mode includes using different colors, marks or contour lines, etc. For example, red can be used to mark the region with defects, or special symbols (such as asterisks, triangles, etc.) can be used as marks, and thick lines can be used to outline the contour of the defect region.
[0090] In the specific implementation process, the specific steps of step S6 include:
[0091] S601, based on the defect recognition result, determining the defect shape and matching the preset defect type library to classify the defects.
[0092] Specifically, the defect type library is matched with the defect recognition result, and the defects are classified by matching. The defect type library pre-stores shape features, size ranges and other information of various common defects,
[0093] S602, combining the classified defects with the identified region information corresponding to the defects to record the type, position and size information of each defect, and generating a detection report.
[0094] Embodiment two
[0095] As shown in Figure 2 A visual detection system for optical fiber equipment processing applied to a visual detection method for optical fiber equipment processing, comprising:
[0096] An image supplement module for obtaining a detection image of an optical fiber product, and performing dynamic light compensation through different shape thresholds based on the light distribution of different shape regions in the detection image to obtain a compensated detection image;
[0097] An image processing module for extracting edge information of the detection image from the compensated detection image based on the compensated detection image using an edge detection algorithm;
[0098] A feature extraction module is used to adjust the feature extraction threshold based on the edge information of the detected image through a preset adaptive shape threshold adjustment mechanism to extract features from the edge information of the optical fiber product;
[0099] A detection adjustment module is used to establish a model of the normal shape of the optical fiber, calculate the shape difference between each shape area in the detection image and the normal shape model of the optical fiber, and dynamically adjust the defect detection threshold based on the shape difference to obtain a dynamically adjusted defect detection threshold;
[0100] A comparison and recognition module is used to compare the features extracted from the edge information of the optical fiber product with the dynamically adjusted defect detection threshold, identify defects in the optical fiber product, and mark the area corresponding to the defect;
[0101] The report generation module is used to classify the defects in the identified optical fiber products and generate a test report based on the areas corresponding to the identified defects.
[0102] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0103] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer readable storage medium, including Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage, magnetic tape storage, or any other medium that can be used to carry or store data which can be read by a computer.
[0104] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
Claims
1. A visual inspection method for fiber optic device processing, comprising: The detection method comprises the following steps: S1, acquiring a detection image of the optical fiber product, and performing dynamic illumination compensation on different shape threshold values set according to the illumination distribution of different shape regions in the detection image to obtain a compensated detection image; S2, based on the compensated detection image, edge information of the detection image is extracted from the compensated detection image by using an edge detection algorithm; S3, based on the edge information of the detection image, the threshold value of feature extraction is adjusted by a preset adaptive shape threshold adjustment mechanism, and features are extracted from the edge information of the optical fiber product; S4, a model of normal shape of the optical fiber is established, the shape difference degree of each shape region in the detection image and the model of normal shape of the optical fiber is calculated, and a defect detection threshold value is dynamically adjusted based on the shape difference degree to obtain a dynamically adjusted defect detection threshold value; S5, the features extracted from the edge information of the optical fiber product are compared with the dynamically adjusted defect detection threshold value, defects in the optical fiber product are identified, and regions corresponding to the defects are marked; S6, the identified defects in the optical fiber product are classified, and a detection report is generated in combination with the marked regions corresponding to the defects.
2. The method of claim 1, wherein The specific steps of step S1 comprise: S101, acquiring a detection image of the optical fiber product by an industrial camera in a fixed light source environment, and dividing the detection image into a plurality of different shape regions based on the geometric characteristics of the optical fiber product, wherein the shape regions include a circular end face region, a rectangular cladding region and a tapered transition region; S102, presetting a shape threshold value for each shape region, including a circular end face region threshold value, a rectangular cladding region threshold value and a tapered transition region threshold value; S103, calculating the average illumination intensity of each shape region and the global illumination, respectively, and judging whether the difference between the average illumination intensity of each shape region and the global illumination exceeds the corresponding shape threshold value, respectively, if it is judged that it exceeds, adjusting the brightness of the shape region by histogram equalization to generate a compensated detection image.
3. The method of claim 1, wherein The specific steps of step S2 comprise: S201, selecting a Canny edge detection algorithm or a Sobel edge detection algorithm to calculate each pixel point in the compensated detection image to obtain a pixel point calculation result; S202, based on the pixel point calculation result, edge information in the detection image is extracted.
4. The method of claim 1, wherein The specific steps of step S3 comprise: S301, setting an adaptive shape threshold adjustment mechanism, including setting different threshold ranges according to edge length: setting a high feature extraction threshold value for long edges, and setting a low feature extraction threshold value for short edges; setting different threshold ranges according to edge curvature: setting a low feature extraction threshold value if the edge smoothness is high, and setting a high feature extraction threshold value if the edge has multiple branches; S302, calculating the feature parameters of the extracted edge information of the detection image, including edge curvature and length; S303, adjusting the feature extraction threshold value by the adaptive shape threshold adjustment mechanism based on the calculated feature parameters, and extracting features from the edge information of the optical fiber product according to the adjusted feature extraction threshold value.
5. The method of claim 1, wherein The specific steps of step S4 comprise: S401, collecting edge features of a qualified optical fiber sample, and constructing a normal shape model of the optical fiber by statistical modeling; S402, compare each shape region in the detection image with the normal shape model of the optical fiber, and calculate the shape difference degree; S403, based on the calculated shape difference degree, dynamically adjust the defect detection threshold value through the preset shape difference degree threshold value, specifically including: for the shape region whose shape difference degree exceeds the shape difference degree threshold value, the defect detection threshold value is reduced; for the shape region whose shape difference degree does not exceed the shape difference degree threshold value, the defect detection threshold value is increased.
6. The method of claim 1, wherein The specific steps of the step S5 include: S501, compare the features extracted from the edge information of the optical fiber product with the dynamically adjusted defect detection threshold value to obtain a comparison result; S502, based on the comparison result, if the value of the feature extracted from the edge information of the optical fiber product exceeds the corresponding defect detection threshold value in the comparison result, the shape region corresponding to the feature has a defect; if the value of the feature extracted from the edge information of the optical fiber product does not exceed the corresponding defect detection threshold value in the comparison result, the shape region corresponding to the feature does not have a defect, and a defect recognition result is obtained; S503, based on the defect recognition result, mark the region corresponding to the defect in the detection image, wherein the marking method uses different colors, marks or contour lines to highlight the defect region.
7. The method of claim 1, wherein The specific steps of the step S6 include: S601, based on the defect recognition result, determine the defect shape and match the preset defect type library to classify the defects; S602, combine the classified defects with the marked region information corresponding to the defects, record the type, position and size information of each defect, and generate a detection report.
8. A visual inspection system for fiber optic device manufacturing, applied to a visual inspection method for fiber optic device manufacturing according to any one of claims 1-7, characterized in that, The detection system includes: An image supplement module is configured to obtain a detection image of an optical fiber product, and perform dynamic light compensation through different shape threshold values set according to the light distribution of different shape regions in the detection image to obtain a compensated detection image. An image processing module is configured to extract edge information of the detection image from the compensated detection image based on the compensated detection image by using an edge detection algorithm. A feature extraction module is configured to extract features from the edge information of the optical fiber product by adjusting the threshold value of feature extraction through a preset adaptive shape threshold adjustment mechanism based on the edge information of the detection image. A detection adjustment module is configured to establish a model of the normal shape of the optical fiber, calculate the shape difference degree of each shape region in the detection image with respect to the normal shape model of the optical fiber, and dynamically adjust the defect detection threshold value based on the shape difference degree to obtain a dynamically adjusted defect detection threshold value. A comparison and identification module is configured to compare the features extracted from the edge information of the optical fiber product with the dynamically adjusted defect detection threshold value, identify the defects in the optical fiber product, and mark the region corresponding to the defects. A report generation module is configured to classify the identified defects in the optical fiber product, and generate a detection report in combination with the marked region corresponding to the defects.
Citation Information
Patent Citations
Image processing method and device, equipment and medium
CN112561906A
Injection molding part defect detection method and system based on image processing
CN115187602A
Face cover cutting piece quality detection method and system
CN119359664A
Workpiece surface defect detection method and system based on optical technology
CN119413802A
Defect detection method, device and equipment for industrial product and medium
CN119559180A