Optical fiber end face contamination identification method based on image processing
By subdividing the end face image of the fiber into a sector-shaped area, a gray-scale frequency sequence and a main gray-scale frequency sequence are constructed, and the degree of pollution of the end face of the fiber is calculated, the problem of no obvious edge pollution in the prior art is solved, and high-accurate fiber end face pollution detection is achieved.
Patent Information
- Application Number
- CN202510864692.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-06-26
AI Technical Summary
The prior art cannot effectively identify the absence of obvious edge contamination on the end surface of the optical fiber, resulting in a decrease in detection accuracy.
The circular area images of the end face of the optical fiber are divided into several fan-shaped areas. By constructing a gray-scale frequency sequence and a main gray-scale frequency sequence, combining the mean and extreme differences of the gray-scale values, the initial abnormality and pollution degree are calculated to achieve pollution identification of the end face of the optical fiber.
It improves the accuracy and objectivity of identification of fiber end surface pollution, can detect pollution without obvious edges, and is suitable for real-time online detection of embedded systems and industrial cameras.
Smart Images

Figure CN120374623B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and more particularly to a method for identifying contamination on an optical fiber end face based on image processing. Background Art
[0002] Optical fiber plays a vital role in the communications field as an important medium for information transmission. Optical fiber information transmission is achieved by converting information into optical signals and achieving this through total reflection of light. When there is contamination on the end face of the optical fiber (such as oil or dust), the contaminants will scatter or absorb the optical signals, thereby affecting information transmission.
[0003] The Chinese patent application document with publication number CN117288764A discloses a method and system for detecting the quality of an optical fiber end face, which includes: obtaining an optical fiber end face image, and determining the center and radius of the optical fiber based on the optical fiber end face image; dividing the optical fiber end face image into regions based on the center and radius of the optical fiber to obtain detection areas, and the detection areas include a core detection area, a cladding detection area, and a ceramic detection area; masking each detection area to obtain a corresponding mask pattern, and detecting the mask pattern based on the Canny edge detection method to determine the stain position information of each detection area; marking the optical fiber end face image based on the stain position information, determining the stain mark outline, and judging the quality of the optical fiber end face based on the stain mark outline.
[0004] However, when using the above-mentioned file to determine the stain location information of each detection area during detection, since different types of stains on the optical fiber end face in the image have different image characteristics, some stains have obvious edges in the image, while some stains do not have obvious edges in the image. Therefore, the above-mentioned file can identify the stain with obvious edges through edge detection, but cannot detect the stain without obvious edges, thereby reducing the accuracy of detection and making it impossible to effectively identify the stain on the optical fiber end face. Summary of the Invention
[0005] In order to solve the problem that different types of stains on the optical fiber end face in the image have different image features, some stains have obvious edges in the image, while some stains do not have obvious edges in the image. Traditional edge detection can identify stains with obvious edges but cannot detect stains without obvious edges, resulting in reduced detection accuracy and thus inability to effectively identify stains on the optical fiber end face, the present invention proposes an optical fiber end face stain identification method based on image processing, which includes the following steps:
[0006] The circular area image of the optical fiber end face to be detected is divided into several sector-shaped area images; the circular area image and any image among all the sector-shaped area images are recorded as target images, and the gray frequency sequence of the target image is constructed according to the frequency of occurrence of each gray value in the target image. According to the size of the frequency, the main gray frequency sequence of the target image is constructed, and the main gray value of the target image is obtained; according to the frequency of occurrence of each main gray value in the target image, the number of pixels in the target image, and the correlation between the gray frequency sequence of the target image and the main gray frequency sequence, the initial abnormality degree of the target image is determined; for any sector-shaped area image, Obtain a representative grayscale value for each radius line in the sector-shaped area image, wherein the representative grayscale value is the average of the grayscale values of all pixel points on the corresponding radius line in the sector-shaped area; determine the abnormality degree of the sector-shaped area image based on the difference between the initial abnormality degree of the circular area image and the sector-shaped area image, and the extreme difference of the representative grayscale values of all radius lines in the sector-shaped area image; determine the contamination degree of the optical fiber end face to be detected based on the initial abnormality degree of the circular area image and the maximum and minimum values of the abnormality degrees of all the sector-shaped area images; and realize contamination identification of the optical fiber end face based on the magnitude of the contamination degree.
[0007] By subdividing the circular area of the optical fiber end face into several sector-shaped areas, the present invention can perform local analysis on the pollution characteristics of different areas, thereby more comprehensively capturing the image characteristics of various types of pollution; using the frequency of the grayscale value of the target image to construct a grayscale frequency sequence and a main grayscale frequency sequence, and based on the main grayscale value of the grayscale value and its frequency, calculate the degree of abnormality, thereby enhancing the detection ability of grayscale distribution abnormalities and compensating for the defect of traditional edge detection in the absence of obvious edge pollution; through the grayscale mean and range of multiple radius lines in the sector-shaped area, the details of local grayscale changes can be reflected, the degree of regional pollution can be further accurately characterized, and effective identification of subtle pollution can be achieved; combining the overall abnormality degree of the circular area and the maximum and minimum values of the abnormality degree in all sector-shaped areas, the overall situation of pollution can be comprehensively judged, thereby improving the objectivity and accuracy of pollution degree assessment.
[0008] Furthermore, the circular area image is obtained by obtaining the original image of the optical fiber end face to be detected, using Hough circle detection to obtain all circular areas in the original image, and taking the circular area with the largest radius after grayscale processing as the circular area image of the optical fiber end face to be detected.
[0009] Furthermore, the constructing of the grayscale frequency sequence of the target image includes: forming the grayscale frequency sequence of the target image by the frequency of occurrence of each grayscale value in the target image in the order of grayscale values.
[0010] Furthermore, the construction of the main grayscale frequency sequence of the target image includes: sorting the frequency of occurrence of each grayscale value in the target image from large to small, retaining the frequency of occurrence of a preset number of grayscale values in order, and assigning the frequency of occurrence of the remaining grayscale values to 0, wherein the preset number is the same as the number of layers of the optical fiber end face to be detected; and forming the main grayscale frequency sequence of the target image according to the order of grayscale values by the frequency of occurrence of each grayscale value in the target image.
[0011] Furthermore, the obtaining of the main grayscale value among the grayscale values in the target image includes: sorting the frequency of occurrence of each grayscale value in the target image from large to small, and selecting the grayscale values corresponding to the frequency of occurrence of a preset number of grayscale values in sequence as the main grayscale value of the target image, and the preset number is the same as the number of layers of the optical fiber end face to be detected.
[0012] Furthermore, the initial abnormality degree satisfies:
[0013] Where, is the initial abnormality degree of the target image, is the number of primary grayscale values, The target image The frequency of occurrence of the main gray value, is the number of pixels in the target image, is the correlation between the grayscale frequency sequence of the target image and the main grayscale frequency sequence.
[0014] The present invention calculates the initial abnormality degree by uniformly quantifying the occurrence frequency of the main grayscale value, the total number of pixels, and the correlation between the grayscale frequency sequence and the main grayscale frequency sequence in the target image, thereby avoiding the subjectivity of traditional empirical judgment; the weighted sum of the occurrence frequency of the main grayscale value reflects the proportion of the main grayscale value in the image, and combined with the correlation between the grayscale frequency sequence and the main grayscale frequency sequence, it not only focuses on the distribution of the main grayscale, but also takes into account the changes in the grayscale pattern, thereby improving the detection ability of subtle abnormalities.
[0015] Furthermore, the correlation is cosine similarity.
[0016] Furthermore, the abnormality degree satisfies:
[0017] Where, For the The abnormality degree of the fan-shaped area image, is the initial abnormality degree of the circular area image, For the The initial abnormality degree of the fan-shaped area image, For the The range of the representative gray values of all the radial lines in the fan-shaped area image is is the absolute value symbol.
[0018] The degree of abnormality of the present invention accurately reflects the abnormal deviation between the local area and the whole by comparing the difference in the initial abnormality degree between the circular area (whole) and the sector-shaped area (local), which helps to locate the specific pollution location; the representative grayscale value extreme difference of all radius lines in the sector-shaped area is used to reflect the grayscale fluctuation range of the area, and the difference in abnormality degree is combined as a weight to make the abnormality degree of areas with drastic grayscale changes (which may correspond to obvious pollution) higher, thereby improving the ability to identify different types of pollution; the grayscale extreme difference is divided by the maximum possible grayscale value of 255 to achieve normalization, making the abnormality degrees of different images or optical fiber end faces under different acquisition conditions comparable, thereby improving the practicality and stability of the method.
[0019] ;in, is the contamination degree of the optical fiber end face, is the initial abnormality degree of the circular area image, is the maximum value of the abnormality degree of all fan-shaped area images, It is the minimum value of the abnormality degree of all sector area images.
[0020] This invention uses a power exponential term to nonlinearly adjust the cardinality, ensuring that the pollution level not only depends on the overall and maximum outlier values, but also dynamically adjusts based on the distribution of outlier levels, enhancing the detailed characterization of pollution conditions. When the range of outlier levels within a sector is large, the exponent decreases, thereby suppressing the numerical value of the pollution level, reflecting uneven pollution distribution, where large local differences may not be severe overall. Conversely, when the range is small, the exponent approaches 1, highlighting the overall pollution level and improving the scientific nature of the assessment.
[0021] Furthermore, the method for realizing contamination identification of the optical fiber end face includes: in response to the contamination degree being greater than a preset contamination threshold, determining that the optical fiber end face to be inspected is contaminated, and issuing an early warning prompt, completing the optical fiber end face contamination identification based on image processing, wherein the contamination threshold is the average of the contamination degrees of multiple uncontaminated optical fiber end faces.
[0022] By comparing the pollution degree with a preset pollution threshold, the present invention enables the system to automatically identify the pollution status of the optical fiber end face without manual intervention, thereby improving detection efficiency and accuracy. The pollution threshold is set based on the average pollution degree of multiple unpolluted optical fiber end faces, ensuring that the threshold is representative and objective, avoiding misjudgments or missed judgments caused by fixed thresholds, and helping to adapt to detection needs in different equipment and environments. Once it is detected that the pollution degree exceeds the threshold, the system immediately issues an early warning prompt, achieving early detection and early treatment, reducing the impact of pollution on optical fiber transmission performance, and improving the reliability of the communication system.
[0023] The present invention has the following beneficial effects:
[0024] (1) Traditional methods rely on edge detection and can only identify contamination with obvious edges. However, the present invention can capture contamination without obvious edges (such as uniformly attached stains, diffusely reflected impurities, etc.) by analyzing the grayscale frequency sequence and the main grayscale frequency sequence. For example, when oil stains evenly cover the fiber end face, although there is no clear edge, the grayscale distribution will deviate from the normal state. Through the frequency and correlation analysis of the main grayscale value, it can be accurately identified; combining the initial abnormality level (based on grayscale distribution) and the abnormality level of the fan-shaped area (based on the grayscale extreme difference of the radius line), the pollution is judged from both the global (circular area) and local (fan-shaped area) perspectives to avoid misjudgment in a single dimension. For example, when there is local stain in a fan-shaped area, the grayscale extreme difference of its radius line will increase significantly, forming a difference with other areas, and thus can be accurately detected.
[0025] (2) The present invention processes data by grayscale mean (representing grayscale value) and frequency statistics, which can weaken the influence of random noise. For example, when there are a small number of noise points in the image, the grayscale value appears at a low frequency and will not significantly interfere with the construction of the main grayscale frequency sequence. The grayscale changes in the contaminated area are effectively captured due to their regularity (such as the grayscale offset of continuous pixels). Whether it is point-shaped, strip-shaped or large-area pollution, it can be located through the subdivision of the sector area and the analysis of the radius line. For example, for scratches distributed along the radial direction, the grayscale mean of the radius line of the sector area where it is located will show regular fluctuations, and the range will increase, so it will be identified as an abnormal area.
[0026] (3) The present invention mainly involves basic operations such as grayscale statistics, mean calculation, and correlation analysis. It does not require complex deep learning models or high-computing hardware support and can be quickly deployed in embedded systems or industrial cameras. It is suitable for real-time online detection scenarios. Parameters such as the number of sector areas and the main grayscale frequency sequence screening threshold can be adjusted according to the material and reflective characteristics of the end faces of different types of optical fibers to improve the versatility and adaptability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 Schematic diagram of optical fiber end face contamination according to an optical fiber end face contamination identification method based on image processing according to an embodiment of the present invention.
[0028] Figure 2 Schematic diagram of edge detection of an optical fiber end face in an optical fiber end face contamination identification method based on image processing according to an embodiment of the present invention.
[0029] Figure 3 This is a flowchart of the steps of the optical fiber end face contamination identification method based on image processing according to an embodiment of the present invention.
[0030] Figure 4It is a schematic diagram of dividing an image into sector-shaped areas according to the optical fiber end face contamination identification method based on image processing according to an embodiment of the present invention.
[0031] Figure 5 It is a schematic diagram of multiple radius lines of any sector area image in the optical fiber end face contamination identification method based on image processing according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following is a clear and complete description of the technical solutions in the embodiments of the present invention. The described embodiments are part of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of the present invention.
[0033] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0034] like Figure 1 and Figure 2 As shown, edge detection cannot detect Figure 1 The pollution on the left side without obvious edges makes it impossible to effectively identify the pollution on the optical fiber end face. Therefore, the present invention proposes an optical fiber end face pollution identification method based on image processing.
[0035] See also Figure 3 , which shows a flowchart of a method for identifying optical fiber end face contamination based on image processing according to an embodiment of the present invention, the method comprises the following steps:
[0036] S01: Acquire a circular area image of the optical fiber end face to be inspected.
[0037] Specifically, the original image of the optical fiber end face to be detected is obtained, and Hough circle detection is used to obtain all circular areas in the original image. The circular area with the largest radius after grayscale processing is used as the circular area image of the optical fiber end face to be detected.
[0038] S02: dividing the circular region image of the optical fiber end face to be inspected into a plurality of sector-shaped region images, and determining the initial abnormality levels of the circular region images and the sector-shaped region images.
[0039] It should be noted that due to the characteristics of optical fiber usage, even tiny contaminants on the fiber can have a significant impact on its performance. The various structures on the fiber end face have a fixed shape, and the fiber end face is centrally symmetrical. When contaminants are present on the fiber end face, the image characteristics of some areas in the image will be altered. To refine the identification of fiber end face contamination and enable the identification of even tiny contaminants, this step divides the circular area image into several sector-shaped area images; and based on the grayscale information, determines the grayscale frequency sequence, the main grayscale frequency sequence, and the main grayscale value.
[0040] The circular area image of the optical fiber end face to be inspected is divided into several sector-shaped area images. The circular area image and any image among all the sector-shaped area images are recorded as target images. According to the frequency of occurrence of each grayscale value in the target image, the grayscale frequency sequence of the target image is constructed. According to the size of the frequency, the main grayscale frequency sequence of the target image is constructed, and the main grayscale value of the target image is obtained.
[0041] like Figure 4 As shown, implementers can set the number of sector area images according to specific implementation conditions, for example, 8.
[0042] Specifically, constructing the grayscale frequency sequence of the target image includes:
[0043] According to the gray value sequence, the frequency of occurrence of each gray value in the target image constitutes the gray frequency sequence of the target image (serialized representation of the gray histogram of the target image).
[0044] Specifically, constructing the main grayscale frequency sequence of the target image includes:
[0045] Sort the frequencies of occurrence of each grayscale value in the target image from largest to smallest, retain a preset number of grayscale value frequencies in order, and assign the frequencies of the remaining grayscale values to 0. The preset number is the same as the number of layers of the optical fiber end face to be inspected (4 in this example, and can be set by the implementer according to the actual number of layers of the optical fiber to be inspected);
[0046] According to the gray value sequence, the frequency of occurrence of each gray value in the target image constitutes the main gray frequency sequence of the target image.
[0047] Specifically, obtaining the main grayscale value among the grayscale values in the target image includes:
[0048] The frequency of occurrence of each grayscale value in the target image is sorted from large to small, and the grayscale values corresponding to the frequency of occurrence of a preset number of grayscale values are selected in sequence as the main grayscale values of the target image. The preset number is the same as the number of layers of the optical fiber end face to be detected.
[0049] It should be noted that optical fibers are typically composed of four components: the core, inner cladding, outer cladding, and protective layer. Because these components are made of different materials, the core, cladding, and protective layer in the fiber end-face image have different color characteristics. If an area in the image deviates from the image characteristics of the four components, contaminants are present on the fiber end-face. Therefore, contamination can be identified by the color distribution of the fiber end-face image. Therefore, this step determines the initial abnormality level of the fiber end-face image based on the grayscale value distribution of the image.
[0050] The initial abnormality degree of the target image is determined based on the frequency of occurrence of each main grayscale value in the target image, the number of pixels in the target image, and the correlation between the grayscale frequency sequence of the target image and the main grayscale frequency sequence.
[0051] Specifically, the initial abnormality degree satisfies:
[0052] ;
[0053] Where, is the initial abnormality degree of the target image, is the number of primary grayscale values, The target image The frequency of occurrence of the main gray value, is the number of pixels in the target image, is the correlation between the grayscale frequency sequence of the target image and the main grayscale frequency sequence.
[0054] Specifically, the correlation is cosine similarity.
[0055] Among them, since the fiber end face structure in this example has 4 layers, corresponding to 4 areas, different areas have different color characteristics. Therefore, when the fiber end face is not contaminated, the sum of the number of pixels corresponding to the top 4 grayscale values (main grayscale values) of the target image is Should be close to the number of pixels in the target image When there is contamination on the fiber end face, the contaminated part will cover the fiber, so the gray value distribution of the target image will change to a certain extent. Deviation ;therefore The larger it is, the more likely that the target image does not contain pollution, and the smaller the initial abnormality of the target image; The smaller it is, the more likely the target image contains pollution, and the greater the initial abnormality of the target image. The larger it is, the more positions the four main grayscale values with the largest frequency in the target image occupy in the target image, and the more likely it is that there is no pollutant in the target image, and the smaller the initial abnormality of the target image. The smaller it is, the fewer positions the four main grayscale values with the highest frequency in the target image occupy in the target image, and the more likely the target image is to contain pollutants, and the greater the initial abnormality of the target image.
[0056] S03: Determine the abnormality level of the fan-shaped area image.
[0057] It's important to note that contamination on a fiber endface can exhibit localized and directional characteristics (e.g., scratches distributed along the radius or localized stains within a sector-shaped area). This makes it difficult to accurately locate the contaminated area based solely on the global initial anomaly level. Therefore, this step analyzes the grayscale distribution of radial lines within the sector-shaped area, combining global and local anomaly differences to achieve refined contamination location.
[0058] For any sector-shaped image, such as Figure 5 As shown, the representative grayscale value of each radius line in the sector-shaped area image is obtained (the implementer can set the number of radius lines according to the specific implementation situation, for example, one is set every 1°), and the representative grayscale value is the average of the grayscale values of all pixels on the corresponding radius line in the sector-shaped area. The abnormality degree of the sector-shaped area image is determined according to the difference between the initial abnormality degree of the circular area image and the sector-shaped area image, and the extreme difference of the representative grayscale values of all radius lines in the sector-shaped area image.
[0059] Specifically, the abnormality degree satisfies:
[0060] ;
[0061] Where, For the The abnormality degree of the fan-shaped area image, is the initial abnormality degree of the circular area image, For the The initial abnormality degree of the fan-shaped area image, For the The range of the representative gray values of all the radial lines in the fan-shaped area image is is the absolute value symbol.
[0062] Among them, since the optical fiber end face is centrally symmetrical, when there is no contamination on the optical fiber end face, the grayscale value distribution of the pixels in the circular area image should be similar to the grayscale value distribution of the fan-shaped area image. Therefore, when there is no contamination on the optical fiber end face, the initial abnormality degree of the circular area image should be similar to the initial abnormality degree of the fan-shaped area image. Therefore, The smaller the hour, the The more likely it is that there is no pollutant in the image of the sector area, the The smaller the abnormality of the fan-shaped area image is; The larger the The more likely there is contamination in the fan-shaped area image, the Similarly, since the fiber end face is centrally symmetrical, when there is no contaminant on the fiber end face, the mean grayscale value (representative grayscale value) of the pixel points on the radius line corresponding to each sector area image should be the same or similar. When contaminants appear on the fiber end face, there will be certain differences between the corresponding representative grayscale values of the sector area images. Therefore, The bigger, The more likely there is contamination in the fan-shaped area image, the The greater the abnormality of the image in each sector area; The smaller, the The more likely it is that there is no pollutant in the image of the sector area, the The smaller the abnormality of the fan-shaped area image, the smaller the abnormality of the fan-shaped area image. For the convenience of calculation, the Normalized.
[0063] S04: Determine the contamination level of the optical fiber end face to be inspected.
[0064] It should be noted that when contamination occurs on the fiber end face, the image characteristics of the various arc-shaped regions of the fiber end face image will also change accordingly. Therefore, this step determines the degree of contamination on the fiber end face based on the initial abnormality level of the circular region image and the abnormality level of the fan-shaped region image.
[0065] The contamination degree of the optical fiber end face to be inspected is determined based on the initial abnormality degree of the circular area image and the maximum and minimum values of the abnormality degrees of all the sector area images.
[0066] Specifically, the pollution level satisfies:
[0067] ;
[0068] in, is the contamination degree of the optical fiber end face, is the initial abnormality degree of the circular area image, is the maximum value of the abnormality degree of all fan-shaped area images, It is the minimum value of the abnormality degree of all sector area images.
[0069] in, The larger the value, the more likely it is that there are contaminants on the fiber end face, which changes the gray value distribution of the fiber end face image, and the greater the degree of contamination of the fiber end face; The smaller the value, the more likely it is that there are no contaminants on the optical fiber end face, and the smaller the abnormality of the optical fiber end face. The larger the value, the greater the difference between the abnormality levels of the images in each sector area. When the fiber end face has no defects, the abnormality levels of the images in each sector area should be similar. In order to make the contamination level of the defective fiber end face more prominent, right Make an upward correction. The bigger it is, The smaller the right The greater the degree of correction, the greater the degree of contamination of the contaminated optical fiber end face; The smaller the time, The larger the The closer it is to 1, right The smaller the correction degree, there are two situations at this time. One is when the pollution of each sector area image is relatively uniform. Smaller, but due to and The value itself is large, The overall pollution level will still be reflected, and the pollution level will be greater at this time. In the other case, when the fiber end face is not polluted, the abnormality level of the image in each sector area is close to 0, so approaches 0, and When it approaches 1, the contamination level is relatively low, thus preventing the uncontaminated fiber end face from being mistakenly identified as contaminated.
[0070] S05: Identifying the contamination of the optical fiber end face according to the degree of contamination.
[0071] Specifically, the method for realizing contamination identification of the optical fiber end face includes:
[0072] In response to the contamination level being greater than a preset contamination threshold, it is determined that the optical fiber end face to be inspected is contaminated, and an early warning is issued to complete the optical fiber end face contamination identification based on image processing. The contamination threshold is the average of the contamination levels of multiple uncontaminated optical fiber end faces (implementers can also set it according to the specific implementation situation, and can also set multiple thresholds to refine the contamination status).
[0073] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for identifying optical fiber end face contamination based on image processing, characterized in that: include: The circular area image of the optical fiber end face to be inspected is divided into a number of sector-shaped area images; The circular area image and any one of all the sector area images are recorded as a target image. A grayscale frequency sequence of the target image is constructed based on the frequency of occurrence of each grayscale value in the target image. A main grayscale frequency sequence of the target image is constructed based on the magnitude of the frequency, and the main grayscale value of the target image is obtained. The initial abnormality degree of the target image is determined based on the frequency of occurrence of each main grayscale value in the target image, the number of pixels in the target image, and the correlation between the grayscale frequency sequence of the target image and the main grayscale frequency sequence. For any sector-shaped area image, obtain the representative grayscale value of each radius line in the sector-shaped area image, where the representative grayscale value is the mean of the grayscale values of all pixels on the corresponding radius line in the sector-shaped area. Determine the abnormality degree of the sector-shaped area image based on the difference between the initial abnormality degree of the circular area image and the sector-shaped area image, and the range of the representative grayscale values of all radius lines in the sector-shaped area image. Determine the contamination degree of the optical fiber end face to be inspected based on the initial abnormality degree of the circular area image and the maximum and minimum values of the abnormality degrees of all the fan-shaped area images; According to the degree of the contamination, contamination identification of the optical fiber end face is achieved.
2. The optical fiber end face contamination identification method based on image processing according to claim 1, characterized in that: The circular area image is obtained as follows: The original image of the optical fiber end face to be inspected is obtained, and Hough circle detection is used to obtain all circular areas in the original image. The circular area with the largest radius after grayscale processing is used as the circular area image of the optical fiber end face to be inspected.
3. The optical fiber end face contamination identification method based on image processing according to claim 1, characterized in that: The step of constructing a grayscale frequency sequence of a target image includes: According to the gray value sequence, the frequency of occurrence of each gray value in the target image constitutes the gray frequency sequence of the target image.
4. The optical fiber end face contamination identification method based on image processing according to claim 1, characterized in that: The constructing of the main grayscale frequency sequence of the target image includes: Sort the frequencies of occurrence of each grayscale value in the target image from large to small, retain a preset number of grayscale value frequencies in order, and assign the frequencies of occurrence of the remaining grayscale values to 0, where the preset number is the same as the number of layers of the optical fiber end face to be inspected; According to the gray value sequence, the frequency of occurrence of each gray value in the target image constitutes the main gray frequency sequence of the target image.
5. The optical fiber end face contamination identification method based on image processing according to claim 1, characterized in that: The obtaining of the main grayscale value among the grayscale values in the target image includes: The frequency of occurrence of each grayscale value in the target image is sorted from large to small, and the grayscale values corresponding to the frequency of occurrence of a preset number of grayscale values are selected in sequence as the main grayscale values of the target image. The preset number is the same as the number of layers of the optical fiber end face to be detected.
6. The optical fiber end face contamination identification method based on image processing according to claim 1, characterized in that: The initial abnormality level satisfies: ; Where, is the initial abnormality degree of the target image, is the number of primary grayscale values, The target image The frequency of occurrence of the main gray value, is the number of pixels in the target image, is the correlation between the grayscale frequency sequence of the target image and the main grayscale frequency sequence.
7. The optical fiber end face contamination identification method based on image processing according to claim 1 or 6, characterized in that: The correlation is cosine similarity.
8. The optical fiber end face contamination identification method based on image processing according to claim 1, characterized in that: The degree of abnormality meets the following requirements: ; Where, For the The abnormality degree of the fan-shaped area image, is the initial abnormality degree of the circular area image, For the The initial abnormality degree of the fan-shaped area image, For the The range of the representative gray values of all the radial lines in the fan-shaped area image is is the absolute value symbol.
9. The optical fiber end face contamination identification method based on image processing according to claim 1, characterized in that: The pollution degree meets the following requirements: ; in, is the contamination degree of the optical fiber end face, is the initial abnormality degree of the circular area image, is the maximum value of the abnormality degree of all fan-shaped area images, It is the minimum value of the abnormality degree of all sector area images.
10. The optical fiber end face contamination identification method based on image processing according to claim 1, characterized in that: The method for realizing contamination identification of the optical fiber end face includes: In response to the contamination level being greater than a preset contamination threshold, it is determined that the optical fiber end face to be inspected is contaminated, and an early warning prompt is issued to complete the optical fiber end face contamination identification based on image processing. The contamination threshold is the average of the contamination levels of multiple uncontaminated optical fiber end faces.
Citation Information
Patent Citations
Optical fiber end face quality detection method and system
CN117288764A
System and method for online monitoring filth of fiber bragg grating transmission line
CN102768183A
Image enhancement method and system of surface defect detector based on image processing
CN114972329A