Optical fiber end face detection method and system based on variance
Through the variance-based fiber end face detection method and system, the existing fiber end face detection methods are solved, and the problem of time-consuming and labor-intensive and lack of unified standards is achieved, and the rapid and accurate detection of fiber end faces and effective evaluation of fiber fusion quality is achieved.
Patent Information
- Application Number
- CN202510210223.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-13
AI Technical Summary
The existing fiber end surface detection methods are time-consuming and labor-intensive, unsuitable for rapid detection and lack of unified standards, which makes it difficult to effectively evaluate the fiber fusion quality.
The variance-based fiber end face detection method and system are used to collect the fiber end face images through the camera, perform grayscale, denoising and binarization processing, establish a two-dimensional image matrix, and calculate the variance value of the image to compare with the standard value to judge the smoothness of the fiber end face.
It realizes fast and accurate detection of the end surface of the optical fiber, and is suitable for various types of optical fibers. It can effectively evaluate the quality of fiber fusion and improve the versatility and efficiency of detection.
Smart Images

Figure CN120147245A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of polarization-maintaining fiber fusion splicers, and specifically relates to a fiber end face detection method and system based on variance. Background Art
[0002] A polarization-maintaining fiber fusion splicer is a device used for fiber connection. It can accurately align and fuse two fibers together to establish a connection between the two fibers. In optical fiber communication, since the optical fiber transmits optical signals, it is necessary to ensure that the end face of the optical fiber is smooth and clean during connection to avoid loss and failure of optical signals. For example, the Chinese invention patent with the publication number CN116883387A discloses a method and system for aligning a polarization-maintaining fiber fusion splicer based on ZYNQ. This method solves the problem of fiber butt joint, and the factors affecting the end face mainly include particle contamination or incomplete fiber cutting, etc., which will ultimately lead to fiber fusion failure or large loss, having a great impact on subsequent production. In the market, there are mainly three methods for fiber end face detection: manual detection, semi-automatic detection, and automatic detection cDn optical wave communication. Manual detection requires a video microscope, a video monitor, and a set of fixing devices. Then, the fiber end face is magnified and displayed on the monitor, and then the specific situation of the end face is observed. Semi-automatic detection is similar to manual detection. The fiber needs to be placed in the test platform, the fiber to be tested is positioned, and the microscope is adjusted. Once a suitable image is obtained, the graph can be captured by software for analysis, and then the obtained indexes are compared with the preset indexes to judge whether the fiber end face is qualified. Automatic detection cDn optical wave communication was initially developed by optical system manufacturers themselves. These standards have their own goals. The detection criteria define a series of regions centered on the fiber core, and the importance of different regions is different. These regions and specific diameter values depend on the type of fiber (single-mode or multi-mode) and the type of sleeve. In other words, these regions are divided according to the type of fiber and the type of sleeve, and different regions have different impacts on the quality and performance of fiber joints.
[0003] Among the above methods, manual detection and semi-automatic detection are time-consuming and laborious and are not suitable for rapid detection. Automatic detection cDn optical wave communication detection has no unified standard and no wide applicability. Summary of the Invention
[0004] The purpose of the present invention is to solve the deficiencies in the prior art and propose a fiber end face detection method and system based on variance, which can be applicable to various types of fibers and can accurately detect various defects on the fiber end face.
[0005] To achieve the above purpose, the present invention is realized through the following technical solutions: A fiber end face detection method based on variance, the method includes the following steps:
[0006] Step S1: Collect the image of the fiber end face, and the acquisition direction of the camera is set perpendicular to the central axis of the fiber;
[0007] Step S2: Preprocess the collected image, including grayscale conversion and denoising;
[0008] Step S3: Process the preprocessed image obtained in Step S2 using the P-parameter binarization algorithm to obtain a binary image;
[0009] Step S4: Perform two-dimensional modeling on the binary image obtained in Step S3. Establish a rectangular coordinate system with the length of the binary image as the x-axis and the width as the y-axis to obtain a two-dimensional image matrix;
[0010] Step S5: Calculate the variance of the data of the x-axis coordinates of the two-dimensional image matrix corresponding to the fiber end face, and compare the calculated variance value with the standard value. If the variance value is less than or equal to the standard value, it indicates that the fiber end face is smooth; if the variance value is greater than the standard value, it indicates that the fiber end face is not smooth.
[0011] Preferably, in Step S1, an 8-bit grayscale camera is used in combination with a lens barrel with a 6-fold magnification to collect the image of the fiber end face. The fiber end face image is set to a resolution of 800*480, and the image is an 8-bit grayscale image.
[0012] Preferably, in Step S2, the preprocessing of the collected image, including grayscale conversion and denoising, is specifically as follows:
[0013] Step S2.1 Weighted grayscale conversion method: Calculate the grayscale value of the image using the weighted average method. The specific formula is as follows:
[0014] Igray = 0.30R + 0.59G + 0.11B
[0015] where Igray is the grayscale image, and R, G, and B are the red, green, and blue channels of the image respectively;
[0016] Step S2.2 Adaptive brightness enhancement: Optimize the brightness distribution of the grayscale image through the histogram equalization method;
[0017] Step S2.3 Noise suppression: Smooth the image after adaptive brightness enhancement using median filtering.
[0018] Preferably, the adaptive brightness enhancement in Step S2.2 is specifically as follows:
[0019] Step S2.2.1: Calculate the normalized histogram of the RGB three channels of the image, that is, the number of occurrences of each gray level divided by the total number of all gray levels;
[0020] Step S2.2.2: Calculate the transformation function
[0021]
[0022] Among them, s = T(k) is the output pixel value, k is the input pixel value, L represents the number of pixel values, and p r (r j ) represents the probability of the pixel point with pixel value j, MN represents the number of pixel points, and n j represents the number of pixel points with pixel value j, k ∈ [0, L - 1];
[0023] For each pixel point of each channel, a new RGB image is combined by calculating the transformation function.
[0024] Preferably, in step S3: The preprocessed image obtained in step S2 is processed by using the P-parameter binarization algorithm to obtain a binarized image, specifically:
[0025] The global optimal threshold h of the preprocessed image is determined by using the P-parameter binarization algorithm. After determining the global optimal threshold h, the preprocessed image is binarized. The pixels in the preprocessed image with gray values less than or equal to h are uniformly set to 0, and the pixels with gray values greater than h are set to 1 to obtain the corresponding binarized image.
[0026] Preferably, the variance formula is:
[0027]
[0028] Among them, m represents the average value, n represents the number of data on the x-axis of the fiber end face, and x n represents the specific numerical value of the data on the x-axis of the fiber end face, and s represents the variance value.
[0029] Preferably, the standard value in step S5 is less than or equal to 0.3.
[0030] In a second aspect, the present invention provides a fiber end face detection system based on variance. The system uses the detection method described above. The system includes: a collection module, a preprocessing module, a binarization module, a migration module, a modeling module, a variance module, and a data evaluation module;
[0031] The collection module includes a camera. The position where the camera is deployed is perpendicular to the central axis of the optical fiber. The collection module is used to collect the fiber end face image and input the image into the preprocessing module;
[0032] The preprocessing module preprocesses the collected image. The preprocessing includes graying and denoising processing, and inputs the preprocessed image into the binarization module;
[0033] The binarization module processes the preprocessed image using the P-parameter binarization algorithm to obtain a binarized image and stores it in the migration module;
[0034] The modeling module establishes a rectangular coordinate system with the length of the binarized image as the x-axis and the width as the y-axis for the binarized image in the migration module to obtain a two-dimensional image matrix;
[0035] The migration module scans the data of the x-axis coordinate values of the two-dimensional image matrix corresponding to the fiber end face, and the variance module calculates the variance of the data of the x-axis coordinate values of the two-dimensional image matrix corresponding to the fiber end face;
[0036] The data evaluation module compares the variance value with the standard value. If the variance value is less than or equal to the standard value, it indicates that the fiber end face is smooth. If the variance value is greater than the standard value, it indicates that the fiber end face is not smooth.
[0037] The present invention has the following beneficial effects: The present invention discloses a method and system for detecting the fiber end face based on variance, aiming to improve the versatility and efficiency of end face detection. The variance algorithm based on FPGA is used to analyze and judge the fiber end face. This method collects the image of the fiber end face, uses image processing technology to calculate the variance value of the image, thereby evaluating the smoothness of the fiber end face, and then judging the quality of fiber splicing. Each module works together to achieve automatic detection of the fiber end face.
[0038] In the created two-dimensional coordinate axis, the coordinate data of the fiber end face is processed. Therefore, there is no requirement for the type of fiber, and the determination of the smoothness of the end faces of various types of fibers can be realized. It has a wide range of uses, strong versatility, high real-time performance, and a fixed and very small delay. Since this method performs parallel pipeline processing and the variance algorithm is described using a hardware circuit description language, the image processing speed is fast. That is, scanning the image once can complete the calibration of the fiber end face coordinates, and at the same time complete the calculation of the variance value and the judgment of the fiber end face. Description of the Drawings
[0039] Figure 1 It is a schematic structural diagram of the fiber end face detection system based on variance of the present invention;
[0040] Figure 2 It is the collected fiber end face image;
[0041] Figure 3 It is the image after contrast enhancement;
[0042] Figure 4 It is the preprocessed image;
[0043] Figure 5 It is the rectangular coordinate system established for the binarized image;
[0044] Figure 6 It is a two-dimensional image matrix diagram;
[0045] Figure 7 It is the variance calculation result of the optical fiber end face. Specific implementation manner
[0046] The present invention will be further described below in conjunction with embodiments, but it shall not be used as a basis for limiting the present invention.
[0047] As Figure 1 shown, a method for detecting the end face of an optical fiber based on variance includes the following steps:
[0048] Step S1: Collect the image of the optical fiber end face. Use an 8-bit grayscale camera in cooperation with a lens barrel with a 6-fold magnification to collect the image of the optical fiber end face. The image of the optical fiber end face is set to a resolution of 800*480, and the image is an 8-bit grayscale image. And splice the data into RGB888 for subsequent operations. As Figure 2 shown, the collection direction of the camera is set perpendicular to the central axis of the optical fiber;
[0049] Step S2: Preprocess the collected image, including grayscale conversion and denoising processing;
[0050] Specifically: Step S2.1 Weighted grayscale conversion method: Use the weighted average method to calculate the grayscale value of the image. According to the sensitivity difference of the human eye to different color channels, different weights are assigned to the R, G, and B channels. The specific formula is as follows:
[0051] Igray = 0.30R + 0.59G + 0.11B
[0052] Among them, Igray is the grayscale image, and R, G, and B are the red, green, and blue channels of the image respectively. Using this method to process the image can better conform to the visual characteristics of the human eye and retain more detailed information;
[0053] Step S2.2 Adaptive brightness enhancement: As Figure 3 shown, through the histogram equalization method, optimize the brightness distribution of the grayscale image to enhance the contrast and improve the visual effect. Through the histogram equalization method, optimize the brightness distribution of the grayscale image to avoid local over-dark or over-bright, which affects subsequent processing;
[0054] Step S2.2.1: Calculate the normalized histogram of the RGB three channels of the image, that is, the ratio of the number of occurrences of each gray level (such as 255) to the total number of all gray levels;
[0055] Step S2.2.2: Calculate the transformation function
[0056]
[0057] Among them, s = T(k) is the output pixel value, k is the input pixel value, L represents the number of pixel values, and p r (r j ) represents the probability of the pixel point with pixel value j, MN represents the number of pixel points, and n j represents the number of pixel points with pixel value j, k ∈ [0, L - 1];
[0058] For each pixel point of each channel, a new RGB image is combined by calculating the transformation function.
[0059] Step S2.3 Noise suppression: Median filtering is used to smooth the image after adaptive brightness enhancement to suppress noise interference while retaining the image edges and detail information.
[0060] Step S3: The preprocessed image obtained in Step S2 is processed using the P-parameter binarization algorithm to obtain a binarized image;
[0061] The P-parameter binarization algorithm is used to determine the global optimal threshold h of the preprocessed image. This algorithm has an adaptive feature and can automatically search for a suitable threshold h for different fiber end-face images. After determining the global optimal threshold h, the preprocessed image is binarized. The pixels in the preprocessed image with gray values less than or equal to h are uniformly set to 0, and the pixels with gray values greater than h are set to 1 to obtain the corresponding binarized image.
[0062] Step S4: Two-dimensional modeling is performed on the binarized image obtained in Step S3. As Figure 5 shown, a rectangular coordinate system is established with the length of the binarized image as the x-axis and the width as the y-axis to obtain a two-dimensional image matrix, as Figure 6 shown;
[0063] Step S5: Variance calculation is performed on the data of the x-axis coordinates of the two-dimensional image matrix corresponding to the fiber end face. The variance formula is:
[0064]
[0065] Among them, m represents the average value, n represents the number of data on the x-axis of the fiber end face, x n represents the specific value of the data on the x-axis of the fiber end face, and s represents the variance value.
[0066] The variance value is compared with the standard value. If the variance value is less than or equal to the standard value, it indicates that the fiber end face is smooth. If the variance value is greater than the standard value, it indicates that the fiber end face is not smooth. In this embodiment, the standard value is 0.3.
[0067] To quickly obtain clear and less noisy images, an FPGA board of model MPSOC XCZU15EG from Xilinx is adopted, which supports parallel processing and hardware acceleration. ZU15EG provides high-bandwidth memory and rich interface resources, capable of efficiently processing high-resolution images and video streams. Subsequent image processing-related algorithms are all operated on this board. A fiber optic end face detection system based on variance, the system includes: an acquisition module, a preprocessing module, a binarization module, a migration module, a modeling module, a variance module, and a data evaluation module;
[0068] The acquisition module includes a camera, and the position where the camera is deployed is perpendicular to the central axis of the optical fiber. The acquisition module is used to acquire the fiber optic end face image and input the image into the preprocessing module;
[0069] The preprocessing module preprocesses the acquired image. The preprocessing includes grayscale conversion and denoising processing, and inputs the preprocessed image into the binarization module;
[0070] The binarization module processes the preprocessed image using the P-parameter binarization algorithm, obtains the binarized image and stores it in the migration module;
[0071] The modeling module establishes a rectangular coordinate system with the length of the binarized image in the migration module as the x-axis and the width as the y-axis, obtaining a two-dimensional image matrix; in this coordinate system, the fiber optic end face can be displayed with the coordinate axes, that is, (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 )…(x n , y n ). To determine whether the end face is smooth, only the data on the x-axis is needed;
[0072] Use Verilog to write the variance calculation algorithm. First, store the coordinates of the obtained fiber optic end face data in a Double Data Rate Synchronous Dynamic Random Access Memory (DDR), and then scan and process the data of the x-axis coordinate values in the DDR in the order from left to right and from top to bottom; the variance module calculates the variance of the data of the x-axis coordinate values of the two-dimensional image matrix corresponding to the fiber optic end face;
[0073] The data evaluation module compares the variance value with the standard value. If the variance value is less than or equal to the standard value, it indicates that the fiber optic end face is smooth. If the variance value is greater than the standard value, it indicates that the fiber optic end face is not smooth.
[0074] The experimental data is as Figure 7 , and it can be seen that the smaller the convergence index (variance value), the smoother the fiber end face, and the better the fiber splicing quality at this time.
[0075] The basic principle, main features and advantages of the present invention have been described above. However, the above are only specific embodiments of the present invention, and the technical features of the present invention are not limited thereto. Any other implementation manners obtained by those skilled in the art without departing from the technical solution of the present invention should be covered within the patent scope of the present invention.
Claims
1. A method for detecting an optical fiber end face based on variance, characterized in that: The method comprises the following steps: Step S1: collecting an image of the optical fiber end face, with the camera collecting in a direction perpendicular to the central axis of the optical fiber; Step S2: preprocessing the collected image, including grayscale and denoising; Step S3: using a P parameter binarization algorithm to process the preprocessed image obtained in step S2 to obtain a binarized image; Step S4: Perform two-dimensional modeling on the binary image obtained in step S3, establish a rectangular coordinate system with the length of the binary image as the x-axis and the width as the y-axis, and obtain a two-dimensional image matrix; Step S5: Calculate the variance of the x-axis coordinate value of the two-dimensional image matrix corresponding to the optical fiber end face, and compare the calculated variance value with the standard value. If the variance value is less than or equal to the standard value, it means that the optical fiber end face is smooth. If the variance value is greater than the standard value, it means that the optical fiber end face is not smooth.
2. The optical fiber end face detection method based on variance according to claim 1, characterized in that: In step S1, an 8-bit grayscale camera is used in conjunction with a 6-fold magnification lens tube to collect an optical fiber end face image. The optical fiber end face image is set to a resolution of 800*480, and the image is an 8-bit grayscale image.
3. The optical fiber end face detection method based on variance according to claim 1, characterized in that: Step S2 preprocesses the collected image, including grayscale and denoising, specifically: Step S2.1 Weighted grayscale method: The grayscale value of the image is calculated using the weighted average method. The specific formula is as follows: Igray=0.30R+0.59G+0.11B Among them, Igray is a grayscale image, R, G, and B are the red, green, and blue channels of the image respectively; Step S2.2 Adaptive brightness enhancement: Optimize the brightness distribution of the grayscale image through the histogram equalization method; Step S2.3: Noise suppression: The image after adaptive brightness enhancement is smoothed using median filtering.
4. The optical fiber end face detection method based on variance according to claim 3, characterized in that: The adaptive brightness enhancement in step S2.2 is specifically as follows: Step S2.2.1: Calculate the normalized histogram of the three channels of RGB of the image, that is, the number of occurrences of each gray level divided by the sum of the number of all gray levels; Step S2.2.2: Calculate the transformation function Among them, s = T (k) is the output pixel value, k is the input pixel value, L represents the number of pixel values, p r (r j ) represents the probability of a pixel with pixel value j, MN represents the number of pixels, and n j Represents the number of pixels with pixel value j, k∈[0,L-1]; For each pixel of each channel, a new RGB image is formed by calculating the transformation function.
5. The optical fiber end face detection method based on variance according to claim 1, characterized in that: Step S3: Using the P parameter binarization algorithm to process the preprocessed image obtained in step S2 to obtain a binarized image, specifically: The P parameter binarization algorithm is used to determine the global optimal threshold h of the preprocessed image. After determining the global optimal threshold h, the preprocessed image is binarized. The pixels in the preprocessed image with grayscale values less than or equal to h are uniformly set to 0, and the pixels with grayscale values greater than h are set to 1, thereby obtaining the corresponding binary image.
6. The optical fiber end face detection method based on variance according to claim 1, characterized in that: The variance formula is: Among them, m represents the average number, n represents the number of data on the x-axis of the optical fiber end face, and x n It represents the specific value of the x-axis data of the optical fiber end face, and s represents the variance value.
7. The optical fiber end face detection method based on variance according to claim 1, characterized in that: The standard value in step S5 is less than or equal to 0.
3.
8. A fiber end face detection system based on variance, characterized in that: The system uses the detection method according to any one of claims 1 to 7, and the system comprises: an acquisition module, a preprocessing module, a binarization module, a migration module, a modeling module, a variance module and a data evaluation module; The acquisition module includes a camera, the camera is deployed at a position perpendicular to the central axis of the optical fiber, and the acquisition module is used to acquire an image of the optical fiber end face and input the image into the preprocessing module; The preprocessing module preprocesses the collected image, including grayscale and denoising, and inputs the preprocessed image into the binarization module; The binarization module processes the preprocessed image using a P parameter binarization algorithm to obtain a binarized image and stores it in the migration module; The modeling module establishes a rectangular coordinate system for the binary image in the migration module with the length of the binary image as the x-axis and the width as the y-axis to obtain a two-dimensional image matrix; The migration module scans the data of the x-axis coordinate value of the two-dimensional image matrix corresponding to the optical fiber end face, and the variance module performs variance calculation on the data of the x-axis coordinate value of the two-dimensional image matrix corresponding to the optical fiber end face; The data evaluation module compares the variance value with the standard value. If the variance value is less than or equal to the standard value, it means that the optical fiber end face is smooth. If the variance value is greater than the standard value, it means that the optical fiber end face is not smooth.
Citation Information
Patent Citations
ZYNQ-based polarization maintaining fiber fusion splicer axis alignment method and system
CN116883387A
Cited By
Underwater micro optical fiber automatic cutting device and cutting method
CN120652617A