Method, medium and device for detecting defect rate of end face of optical fiber bundle
By using the brightness ratio of the first light source and the second light source in the optical fiber bundle end surface detection, combined with image processing technology, the problems of low manual detection efficiency and poor accuracy in the prior art are solved, and automated and accurate defect rate calculation is realized.
Patent Information
- Application Number
- CN202510578128.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-15
AI Technical Summary
Existing fiber bundle end surface detectors rely on manual subjective judgment, resulting in low detection efficiency and poor accuracy, easy to miss defects, and easy to fatigue when viewed at the naked eye, making it unable to provide stable image quality.
The first light source and the second light source are irradiated from the proximal and distal ends of the optical fiber bun respectively, and the end face image is collected, and the defect is determined by the brightness ratio of the communication domain, and the defect rate is calculated based on binarization and corrosion treatment.
It realizes automated and accurate fiber bundle end surface defect detection, improves detection efficiency and accuracy, adapts to fiber bundles of different lengths and transmittances, and reduces artificial errors.
Smart Images

Figure CN120489511A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical fiber detection, and in particular to a method, medium and device for detecting the defect rate of an optical fiber bundle end face. Background Art
[0002] Optical fiber is widely used in communications, healthcare, and other fields due to its high-quality light-guiding properties. Laser transmission is particularly common, with fiber bundles being a popular method of transmitting laser light. As a precision transmission medium, fiber bundles are subject to defects such as dust, dirt, scratches, damage, and poor polishing on their end faces, which can severely impact light transmission efficiency and signal integrity. Therefore, strict inspection of the fiber bundle end faces is essential during the production process to maximize their effectiveness.
[0003] The current detectors used on the market for inspecting fiber bundle end faces require the fiber bundle to be inserted into an adapter during use. The inspector then determines whether the fiber bundle end face is qualified by directly observing the image of the fiber bundle end face displayed through an eyepiece or a monitor. The following shortcomings exist when using the above-mentioned detectors to inspect fiber bundle end faces:
[0004] 1) When the detector detects the end face of the optical fiber bundle, the operator needs to use his or her own experience and subjective judgment of the clarity of the detection image to roughly adjust the position of the optical fiber bundle end face relative to the detection lens. Not only are the parameters that can be detected limited, but the efficiency and accuracy are also low. In addition, the inability to provide a suitable lighting source leads to unstable quality of the obtained detection image.
[0005] 2) Fiber optic bundles generally contain tens of thousands of optical fibers, which can easily be missed by naked eye observation, resulting in human errors.
[0006] 3) The end face of the optical fiber bundle is in a honeycomb shape. Observing this dense honeycomb shape with the naked eye a certain number of times can easily cause eye fatigue and discomfort. Summary of the Invention
[0007] The present invention provides a method, medium and device for detecting the defect rate of an optical fiber bundle end face, which solve the above-mentioned technical problems.
[0008] A first aspect of an embodiment of the present invention provides a method for detecting a defect rate of an optical fiber bundle end face, comprising the following steps:
[0009] Step 1: Control a first light source and a second light source to sequentially illuminate the optical fiber bundle to be tested, wherein the light of the first light source is emitted from the proximal end of the optical fiber bundle to be tested, and the light of the second light source is emitted from the distal end of the optical fiber bundle to be tested, and the brightness of the first light source is greater than the brightness of the second light source;
[0010] Step 2, collecting an end face image of the optical fiber bundle to be detected, wherein the end face image includes a first end face image corresponding to when the first light source is turned on and a second end face image corresponding to when the second light source is turned on;
[0011] Step 3: extracting a first brightness value of each connected domain in the first end face image and a second brightness value of the corresponding connected domain in the second end face image, and generating a defect determination result for each connected domain based on a brightness ratio between the second brightness value and the first brightness value;
[0012] Step 4: Mark all connected domains in the second end face image according to the defect determination result, count the number of each preset defect type according to the marking result, and generate the defect rate of the optical fiber bundle end face.
[0013] A second aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above-mentioned method for detecting the defect rate of an optical fiber bundle end face is implemented.
[0014] A third aspect of an embodiment of the present invention provides a device for detecting a defect rate of an optical fiber bundle end face, comprising a first light source, a second light source, a clamping assembly for clamping an optical fiber bundle to be inspected, a lens group, a dichroic mirror, an image acquisition unit, and an image processing unit.
[0015] The second light source is arranged at the distal end of the optical fiber bundle to be detected, and the light source light of the second light source is injected from the distal end of the optical fiber bundle to be detected and emitted from the proximal end, and then is focused by the lens group and transmitted through the dichroic mirror;
[0016] The first light source is arranged above the dichroic mirror, and the light source light of the first light source is reflected by the dichroic mirror and focused by the lens group to enter the proximal end of the optical fiber bundle to be detected;
[0017] The image acquisition unit is used to acquire a first end face image of the optical fiber bundle to be detected when the first light source is turned on and a second end face image of the optical fiber bundle to be detected when the second light source is turned on;
[0018] The image processing unit is used to execute the above-mentioned defect rate detection method.
[0019] The beneficial effects of the present invention are as follows: the present invention provides a method, medium and device for detecting the defect rate of an optical fiber bundle end face, which, compared with the prior art, include but are not limited to the following beneficial effects:
[0020] (1) The connected domain is divided into defective state and non-defective state according to the brightness ratio of the connected domain, and binarization and corrosion processing are performed. The defect rate of the fiber bundle end face is calculated based on the processing results. The calculation result is more accurate and avoids the error caused by naked eye detection.
[0021] (2) Adjust the optimal imaging position of the fiber bundle end face and the optimal light source brightness, so as to accurately generate the fiber bundle end face detection result information, realize automatic detection of the fiber bundle end face, and further improve the detection efficiency and accuracy.
[0022] (3) It can adapt to optical fiber bundles of different lengths and different transmittances, and has a wider range of applications.
[0023] In order to make the above-mentioned objects, features and advantages of the invention more obvious and easy to understand, preferred embodiments of the present invention are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 1 is a flow chart of a method for detecting a defect rate of an optical fiber bundle end face provided in Example 1;
[0026] Figure 2 2 is a schematic structural diagram of a device for detecting a defect rate of an optical fiber bundle end face provided in Example 2;
[0027] Figure 3 3 is a schematic diagram of the structure of the image processing unit in the optical fiber bundle end face defect rate detection device provided in Example 3. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0029] It should be noted that, unless there is a conflict, the various features of the embodiments of the present invention may be combined with each other and are all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematics and the logical order is shown in the flow charts, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flow charts. Furthermore, the terms "first," "second," "third," etc. used in the present invention do not limit the data or execution order, but only distinguish between identical or similar items with substantially the same functions and effects.
[0030] Figure 1 FIG. 1 is a flow chart of a method for detecting the defect rate of an optical fiber bundle end face provided in Example 1. Figure 1 As shown, the following steps are included:
[0031] Step 1: Control a first light source and a second light source to sequentially illuminate the optical fiber bundle to be tested, wherein the light of the first light source is emitted from the proximal end of the optical fiber bundle to be tested, and the light of the second light source is emitted from the distal end of the optical fiber bundle to be tested, and the brightness of the first light source is greater than the brightness of the second light source;
[0032] Step 2, collecting an end face image of the optical fiber bundle to be detected, wherein the end face image includes a first end face image corresponding to when the first light source is turned on and a second end face image corresponding to when the second light source is turned on;
[0033] Step 3: extracting a first brightness value of each connected domain in the first end face image and a second brightness value of the corresponding connected domain in the second end face image, and generating a defect determination result for each connected domain based on a brightness ratio between the second brightness value and the first brightness value;
[0034] Step 4: Mark all connected domains in the second end face image according to the defect determination result, count the number of each preset defect type according to the marking result, and generate the defect rate of the optical fiber bundle end face.
[0035] The above embodiment provides a method for detecting the defect rate of the end face of an optical fiber bundle. The method divides the connected domain into defective state and non-defective state according to the brightness ratio of the connected domain, and identifies different types, such as the number of defects of different shapes on the end face of the optical fiber bundle. The defect rate of the end face of the optical fiber bundle is calculated based on the processing results. The calculation result is more accurate and avoids errors caused by visual inspection.
[0036] Each step of the above method is described in detail below using specific embodiments.
[0037] Exemplarily, the first light source may be a laser light source, and the second light source may be an ordinary lighting light source, to ensure that the brightness of the first light source is higher than that of the second light source.
[0038] Exemplarily, defects on the fiber end face include white spots (chips), black spots (dirt), shadows (internal cracks), and scratches. Chips and scratches are brighter than the fiber end face, while dirt and shadows are darker than the fiber end face. The pixel values corresponding to the defective connected domain are different from the pixel values corresponding to the non-defective connected domain. Based on this, in a specific embodiment, the defect determination result for each connected domain is generated based on the brightness ratio of the second brightness value to the first brightness value, specifically:
[0039] S301, extracting a first brightness value of each connected domain in the first end face image and a second brightness value of the corresponding connected domain in the second end face image, wherein the first brightness value is recorded as The second brightness value is recorded as Wherein K represents the number of connected domains corresponding to the optical fiber bundle to be detected;
[0040] S302: Calculate the second brightness value of each connected region With the first brightness value The brightness ratio of k , k=1,2,…,K;
[0041] S303, for {r k ,k=1,2,…,K} is fitted according to Gaussian distribution to generate Gaussian function parameters u1 and σ1;
[0042] S304, when the brightness ratio r of any connected region k ≥u1-3σ1, the connected domain is determined to be in a non-defective state; otherwise, the connected domain is determined to be in a defective state.
[0043] Specifically, when extracting connected components, the first end-face image or the second end-face image is first segmented. The segmentation method can use a watershed algorithm to divide the pixels in the image into different regions, ensuring that the pixels within the same region have similar characteristics. Specifically, the watershed algorithm is a morphologically based algorithm that calculates the gradient of an image to obtain the gradient value of each pixel in the image. Image segmentation is performed based on this gradient information, effectively segmenting the image while also eliminating over-segmentation.
[0044] Then, for the segmentation results, all connected domains and the centroid of each connected domain are found within the imaging circle. A connected domain in this invention is defined as a region formed by adjacent pixels. Each connected domain represents a fiber in the fiber bundle. By identifying connected domains, isolated noise points or non-target areas can be effectively eliminated, focusing on the area most likely to be the fiber core.
[0045] For example, when any connected domain has only one pixel, the brightness value of the connected domain is the pixel value of the corresponding pixel; when any connected domain has multiple pixels, the brightness value of the connected domain is the maximum value of the pixel values of all pixels, so the brightness value of all connected domains can be recorded as V k , k=1,2,…,K, K is the total number of connected domains.
[0046] In a preferred embodiment, step 4 counts the number of each preset defect type based on the marking results and generates the defect rate of the optical fiber bundle end face, specifically:
[0047] S401, performing Delaunay triangulation on the centroids of all connected domains in the second end face image, and marking the connected domains with defects as a first state, such as bad, and marking the connected domains without defects as a second state, such as good;
[0048] S402, checking the connected domains marked as the first state, if the centroid of any connected domain marked as the first state is directly connected to the centroids of a preset number of other connected domains in the first state in the Delaunay triangulation result, then marking the centroids of the connected connected domains as the third state, for example, worse;
[0049] S403, counting the number of connected domain centroids marked as the first state, recorded as N1, and counting the number of connected domain centroids marked as the third state, recorded as N2, and calculating the defect rate:
[0050] N1+N2
[0051] K, where K represents the total number of connected domains in the second end surface image.
[0052] Specifically, a single bad connected domain represents a black spot on the fiber end face. For example, the number of connected bad connected domain centroids can be determined based on a preset defect type, such as a defect pattern that is prone to appearing in a fiber end face image. For example, in the case of a plum blossom, the number can be set to six. That is, if the centroid of any connected domain marked as bad is directly connected to the centroids of six other bad connected domains in the Delaunay triangulation result, the centroids of all connected connected domains are marked as bad. The preset number here can be set to one or more, thereby representing different defect pattern types.
[0053] In other embodiments, the defect rates of different defect types can be calculated separately. For example, N1 / K can be calculated, which is the ratio of individual black spots. Each defect pattern, such as each plum blossom spot, can also be associated with a different label. For example, if the centroid of a connected domain labeled "bad" is directly connected to the centroids of six other "bad" connected domains in the Delaunay triangulation result, the centroids of these connected connected domains are labeled "worse1," and the others are labeled "worse2," "worse3," and so on. By counting the number of "worse" patterns, the defect rate of the plum blossom spot can be obtained.
[0054] In a preferred embodiment, if there are certain target connected domains in the first state that are not independent, and the number of centroids of connected domains is less than or greater than any preset number, the target connected domain and other connected connected domains are marked as a whole, such as color marking, and an early warning signal is generated to facilitate manual confirmation and further improve the accuracy of defect rate detection.
[0055] Exemplarily, a preferred embodiment further includes a binarization step, specifically: establishing a binary image of the same size as the second end face image, initializing all pixel values of the binary image to 1, and if any connected domain in the defect judgment result is in a non-defective state, assigning the pixel value of the centroid position of the corresponding connected domain to 0, otherwise keeping the current pixel value unchanged, and then performing subsequent steps based on the binary image to obtain the defect rate result.
[0056] Exemplarily, a preferred embodiment further includes a denoising step, specifically: segmenting the binary image after assignment, determining all connected domains and performing Delaunay triangulation, calculating the median of the side lengths of all Delaunay triangles in the Delaunay triangulation result, recorded as el; using a disk structure to perform an erosion operation on the binary image to generate an optimized image, the radius of the disk structure is 0.75*el, and then performing subsequent steps based on the optimized image, thereby further improving the defect rate test results.
[0057] In a preferred embodiment, the first light source is a laser light source, and the second light source is an LED parallel plane light source. In order to determine the optimal brightness of the light source and the optimal position of the optical fiber bundle end face and improve the accuracy of the detection result, the method further includes a light source brightness adjustment method, specifically:
[0058] configuring a plurality of illumination levels with sequentially increasing illumination for a light source, the light source comprising a first light source and a second light source;
[0059] setting the initial illumination of the light source to an intermediate level;
[0060] Collecting a first end face image or a second end face image of the optical fiber bundle to be inspected, and calculating the actual brightness of the light source imaging corresponding to the current illumination level based on the first end face image or the second end face image;
[0061] Determine whether the actual brightness is within the preset brightness range. If so, the current illumination is the optimal illumination. If the actual brightness is higher than the preset brightness range, adjust the current illumination of the light source to the previous illumination level. If the actual brightness is lower than the preset brightness range, adjust the current illumination of the light source to the next illumination level, and repeat the above steps until the actual brightness is within the preset brightness range.
[0062] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0063] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above-mentioned method for detecting the defect rate of an optical fiber bundle end face is implemented.
[0064] Figure 2 FIG. 1 is a schematic diagram of the structure of the defect rate detection device for the end face of an optical fiber bundle provided in Example 2. Figure 2 As shown, it includes a first light source 1, a second light source 3, a clamping assembly for clamping the optical fiber bundle 15 to be detected, a lens group 7, a dichroic mirror 6, an image acquisition unit 5 and an image processing unit 4.
[0065] The second light source 3 is arranged at the distal end of the optical fiber bundle 15 to be detected. The light source light of the second light source 3 is injected from the distal end of the optical fiber bundle 15 to be detected and emitted from the proximal end. After that, it is focused by the lens group 7 and transmitted through the dichroic mirror 6.
[0066] The first light source 1 is arranged above the dichroic mirror 6. The light from the first light source 1 is reflected by the dichroic mirror 6 and focused by the lens group 7 before entering the proximal end of the optical fiber bundle 15 to be detected.
[0067] The image acquisition unit 5 is used to acquire a first end face image of the optical fiber bundle 15 to be detected when the first light source 1 is turned on and a second end face image of the optical fiber bundle 15 to be detected when the second light source 3 is turned on;
[0068] The image processing unit 4 is used to execute the defect rate detection method described in the above embodiment.
[0069] Exemplarily, the clamping assembly includes a proximal clamping device 8 for clamping one end of the optical fiber bundle 15 to be tested near the lens assembly 7, and a distal clamping device 12 for clamping the other end of the optical fiber bundle 15 to be tested. In a preferred embodiment, the defect rate detection device also includes a movement controller 9 connected to the clamping assembly, and the movement controller 9 is used to move the clamping assembly axially to move the end face of the optical fiber bundle 15 to be tested closer to or farther away from the lens assembly 7.
[0070] Exemplarily, the lens assembly 7 can be a collection of two or more lenses, such as a first lens element, a second lens element, a third lens element, and a fourth lens element, wherein the first lens element is a plano-convex lens, the second lens element is a doublet, the third lens element is an aspheric lens, and the fourth lens element is a biconvex lens. This lens assembly can focus light passing through the optical fiber bundle, thereby ensuring a clearer captured image and enabling accurate identification of defects on the end face of the optical fiber bundle.
[0071] The image acquisition unit 5 is a photoelectric conversion module. In a specific scenario, a CCD camera, a CMOS camera, etc. can be used. The upper limit of the brightness thereof varies according to the specific structure and can be recorded as T.
[0072] Figure 3 FIG. 4 is a schematic diagram of the structure of the image processing unit 4 in one embodiment. Figure 3 Shown, including:
[0073] The light source control unit 100 is configured to control a first light source and a second light source to sequentially illuminate the optical fiber bundle to be tested, wherein the light from the first light source is emitted from the proximal end of the optical fiber bundle to be tested, and the light from the second light source is emitted from the distal end of the optical fiber bundle to be tested, and the brightness of the first light source is greater than that of the second light source;
[0074] An acquisition unit 200 is configured to acquire an end face image of the optical fiber bundle to be inspected, wherein the end face image includes a first end face image corresponding to when the first light source is turned on and a second end face image corresponding to when the second light source is turned on;
[0075] a brightness value extraction unit 300 configured to extract a first brightness value of each connected domain in the first end face image and a second brightness value of the corresponding connected domain in the second end face image, and generate a defect determination result for each connected domain based on a brightness ratio between the second brightness value and the first brightness value;
[0076] The result generating unit 400 is configured to mark all connected domains in the second end face image according to the defect determination result, count the number of each preset defect type according to the marking result, and generate a defect rate of the optical fiber bundle end face.
[0077] The above embodiment provides a defect rate detection device for the end face of an optical fiber bundle, which divides the connected domain into defective state and non-defective state according to the brightness ratio of the connected domain, and identifies different types, such as the number of defects of different shapes on the end face of the optical fiber bundle. The calculation result is more accurate and avoids errors caused by visual inspection.
[0078] It should be noted that the above explanation of the embodiment of the method for detecting the defect rate of the end face of an optical fiber bundle is also applicable to the device for detecting the defect rate of the end face of an optical fiber bundle in the above embodiment, and will not be repeated here.
[0079] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0080] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0081] Those skilled in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0082] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0083] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0084] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0085] The present invention is not limited to what is described in the specification and embodiments, and additional advantages and modifications will be readily apparent to those skilled in the art. Therefore, the present invention is not limited to the specific details, representative devices, and illustrative examples shown and described herein without departing from the spirit and scope of the general concept defined by the claims and their equivalents.
Claims
1. A method for detecting the defect rate of an optical fiber bundle end face, characterized in that: The following steps are involved: Step 1: Control a first light source and a second light source to sequentially illuminate the optical fiber bundle to be tested, wherein the light of the first light source is emitted from the proximal end of the optical fiber bundle to be tested, and the light of the second light source is emitted from the distal end of the optical fiber bundle to be tested, and the brightness of the first light source is greater than the brightness of the second light source; Step 2, collecting an end face image of the optical fiber bundle to be detected, wherein the end face image includes a first end face image corresponding to when the first light source is turned on and a second end face image corresponding to when the second light source is turned on; Step 3: extracting a first brightness value of each connected domain in the first end face image and a second brightness value of the corresponding connected domain in the second end face image, and generating a defect determination result for each connected domain based on a brightness ratio between the second brightness value and the first brightness value; Step 4: Mark all connected domains in the second end face image according to the defect determination result, count the number of each preset defect type according to the marking result, and generate the defect rate of the optical fiber bundle end face.
2. The method for detecting defect rate of an optical fiber bundle end face according to claim 1, wherein: The defect determination result of each connected domain is generated according to the brightness ratio of the second brightness value to the first brightness value, specifically: S301, extracting a first brightness value of each connected domain in the first end face image and a second brightness value of the corresponding connected domain in the second end face image, wherein the first brightness value is recorded as The second brightness value is recorded as Wherein K represents the number of connected domains corresponding to the optical fiber bundle to be detected; S302: Calculate the second brightness value of each connected region With the first brightness value The brightness ratio of k , k=1,2,…,K; S303, for {r k ,k=1,2,…,K} is fitted according to Gaussian distribution to generate Gaussian function parameters u1 and σ1; S304, when the brightness ratio r of any connected region k ≥u1-3σ1, the connected domain is determined to be in a non-defective state; otherwise, the connected domain is determined to be in a defective state.
3. The method for detecting defect rate of an optical fiber bundle end face according to claim 2, wherein: When any connected domain has only one pixel, the brightness value of the connected domain is the pixel value of the corresponding pixel; when any connected domain has multiple pixels, the brightness value of the connected domain is the maximum value of the pixel values of all pixels.
4. The method for detecting defect rate of an optical fiber bundle end face according to claim 1, wherein: Step 4 counts the number of each preset defect type based on the marking results and generates the defect rate of the fiber bundle end face, specifically: S401, performing Delaunay triangulation on the centroids of all connected domains in the second end face image, and marking the connected domains with defects as a first state, and marking the connected domains without defects as a second state; S402, checking the connected domains marked as the first state, and if the centroid of any connected domain marked as the first state is directly connected to the centroids of a preset number of other connected domains in the first state in the Delaunay triangulation result, marking the connected centroids of the connected connected domains as the third state; S403, counting the number of connected domain centroids marked as the first state, recorded as N1, and counting the number of connected domain centroids marked as the third state, recorded as N2, and calculating the defect rate: Wherein K represents the total number of connected domains in the second end surface image.
5. The method for detecting defect rate of an optical fiber bundle end face according to any one of claims 1 to 4, characterized in that: It also includes a binarization step, specifically: establishing a binary image of the same size as the second end face image, initializing all pixel values of the binary image to 1, and if any connected domain in the defect judgment result is in a non-defective state, assigning the pixel value of the centroid position of the corresponding connected domain to 0; otherwise, keeping the current pixel value unchanged.
6. The method for detecting defect rate of an optical fiber bundle end face according to claim 5, wherein: It also includes a denoising step, specifically: segmenting the binary image after assignment, determining all connected domains and performing Delaunay triangulation, and calculating the median of the side lengths of all Delaunay triangles in the Delaunay triangulation result, recorded as el; A disk structure is used to perform an erosion operation on the binary image, and the radius of the disk structure is 0.75*el.
7. The method for detecting defect rate of an optical fiber bundle end face according to any one of claims 1 to 4, characterized in that: The first light source is a laser light source, the second light source is an LED parallel surface light source, and the method further includes: configuring a plurality of illumination levels with sequentially increasing illumination for a light source, the light source comprising a first light source and a second light source; setting the initial illumination of the light source to an intermediate level; Collecting a first end face image or a second end face image of the optical fiber bundle to be inspected, and calculating the actual brightness of the light source imaging corresponding to the current illumination level based on the first end face image or the second end face image; Determine whether the actual brightness is within the preset brightness range. If so, the current illumination is the optimal illumination. If the actual brightness is higher than the preset brightness range, adjust the current illumination of the light source to the previous illumination level. If the actual brightness is lower than the preset brightness range, adjust the current illumination of the light source to the next illumination level, and repeat the above steps until the actual brightness is within the preset brightness range.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the defect rate detection method according to any one of claims 1 to 7 is implemented.
9. A device for detecting defect rate of an optical fiber bundle end face, characterized in that: The device comprises a first light source (1), a second light source (3), a clamping assembly for clamping an optical fiber bundle (15) to be detected, a lens group (7), a dichroic mirror (6), an image acquisition unit (5), and an image processing unit (4). The second light source (3) is arranged at the distal end of the optical fiber bundle (15) to be detected, and the light source light of the second light source (3) is injected from the distal end of the optical fiber bundle (15) to be detected and emitted from the proximal end, and then is focused by the lens group (7) and transmitted through the dichroic mirror (6); The first light source (1) is arranged above the dichroic mirror (6), and the light source light of the first light source (1) is reflected by the dichroic mirror (6) and focused by the lens group (7) before entering the proximal end of the optical fiber bundle (15) to be detected; The image acquisition unit (5) is used to acquire a first end face image of the optical fiber bundle (15) to be detected when the first light source (1) is turned on, and a second end face image of the optical fiber bundle (15) to be detected when the second light source (3) is turned on; The image processing unit (4) is used to execute the defect rate detection method according to any one of claims 1 to 8.
10. The optical fiber bundle end face defect rate detection device according to claim 9, characterized in that: It also includes a movement controller (9) connected to the clamping assembly, and the movement controller (9) is used to move the clamping assembly along the axial direction so that the end face of the optical fiber bundle (15) to be detected is close to or away from the lens group (7).