Method and device for detecting dark spots on end face of optical fiber image transmitting element

By acquiring multiple end face images of the fiber image transmission element, using a preset diffusion matrix for secondary diffusion processing, identifying the number of closed areas and the number of pixels, the problem of low detection accuracy caused by manual recognition in the prior art is solved, and automated dark point detection with high accuracy is achieved.

CN119887638APending Publication Date: 2025-04-25CHINA BUILDING MATERIALS ACADEMY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411851907.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the prior art, the detection of dark spots on the end surface of the optical fiber image transmission element relies on manual identification, resulting in a low detection accuracy. Especially when the detector is insufficient experience or in poor condition, it is difficult to accurately detect the number and area of ​​dark spots.

Method used

A method and device for detecting dark spots on the end face of the fiber image transmission element are provided. By acquiring multiple end face images, performing secondary diffusion processing using a preset diffusion matrix, generating secondary diffusion images, identifying the number of closed areas and the number of pixel points, to determine the number and area of ​​dark spots.

Benefits of technology

The accuracy of dark point detection of fiber-optic image transmission components is improved, and the dependence on the work experience and status of the detector is reduced, and an automated dark point detection process is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887638A_ABST
    Figure CN119887638A_ABST
Patent Text Reader

Abstract

The invention discloses an optical fiber image transmission element end face dark spot detection method and device, and relates to the technical field of optical fiber image transmission element detection. The method comprises the steps that multiple end face images corresponding to a to-be-detected optical fiber image transmitting element are acquired, and the multiple end face images are images obtained by shooting different areas of the end face of the to-be-detected optical fiber image transmitting element through a shooting device; secondary diffusion processing is carried out on each end face image according to a plurality of preset diffusion matrixes to generate a secondary diffusion image corresponding to each end face image, and the secondary diffusion image comprises a plurality of closed areas; and determining the number of dark spots contained in each end face image and an area value corresponding to each dark spot according to the number of closed regions contained in each secondary diffusion image and the number of pixel points contained in each closed region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of optical fiber imaging element detection, and in particular to a method and device for detecting dark spots on the end face of an optical fiber imaging element. Background Art

[0002] Fiber optic image transmission components (such as fiber optic panels, image invertors, light cones, etc.) are fiber optic material rod bundles composed of tens to hundreds of thousands of micron-level optical fibers. Based on the principle of total reflection at the interface, images can be transmitted from one end of the fiber optic image transmission component to the other end of the fiber optic image transmission component. Fiber optic image transmission components are widely used in photoelectric devices such as image intensifiers, image intensified CCDs, and particle detectors. Among them, dark spots are an end-face optical defect caused by physical and chemical reactions during the production and processing of fiber optic image transmission components. Visually, they are mainly manifested as shadow spots on the end face of the fiber optic image transmission component. The area of ​​the dark spots is usually 20-250 square microns, which is equivalent to the area of ​​1-10 optical fiber filaments. The number of dark spots on the end face of the fiber optic image transmission component and the area of ​​each dark spot are important indicators for evaluating the production quality of fiber optic image transmission components.

[0003] At present, it is usually the inspection personnel who observe the end face of the optical fiber imaging element under a microscope and detect the number of dark spots on the end face of the optical fiber imaging element and the size of each dark spot by manual identification. However, the inspection personnel's manual identification of dark spots on the optical fiber imaging element is completely dependent on the inspection personnel's work experience and work status. When the inspection personnel are inexperienced or in a bad work status, the inspection personnel cannot accurately detect the number of dark spots on the end face of the optical fiber imaging element and the size of each dark spot. Therefore, the inspection personnel's manual identification of dark spots on the optical fiber imaging element has a low detection accuracy. Summary of the invention

[0004] The embodiments of the present application provide a method and device for detecting dark spots on the end face of an optical fiber imaging element, the main purpose of which is to improve the detection accuracy of dark spots on the optical fiber imaging element.

[0005] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, the present application provides a method for detecting dark spots on the end face of an optical fiber imaging element, the method comprising:

[0007] Acquire a plurality of end face images corresponding to the optical fiber imaging element to be detected, wherein the plurality of end face images are images obtained by photographing different regions of the end face of the optical fiber imaging element to be detected by a photographing device;

[0008] Performing secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images, wherein the secondary diffusion image includes a plurality of closed areas;

[0009] The number of dark spots contained in each end surface image and the area value corresponding to each dark spot are determined according to the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area.

[0010] In a second aspect, the present application further provides a device for detecting dark spots on the end face of an optical fiber imaging element, the device comprising:

[0011] An acquisition unit, used for acquiring a plurality of end face images corresponding to the optical fiber imaging element to be detected, wherein the plurality of end face images are images obtained by photographing different regions of the end face of the optical fiber imaging element to be detected by a photographing device;

[0012] A first processing unit, configured to perform secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images, wherein the secondary diffusion image includes a plurality of closed areas;

[0013] The first determining unit is used to determine the number of dark spots contained in each of the end surface images and the area value corresponding to each dark spot according to the number of closed areas contained in each of the secondary diffusion images and the number of pixels contained in each closed area.

[0014] In a third aspect, an embodiment of the present application provides a storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the method for detecting dark spots on the end face of an optical fiber imaging element described in the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a device for detecting dark spots on the end face of an optical fiber imaging element, the device comprising a storage medium; and one or more processors, the storage medium being coupled to the processor, the processor being configured to execute program instructions stored in the storage medium; when the program instructions are executed, the method for detecting dark spots on the end face of an optical fiber imaging element described in the first aspect is executed.

[0016] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:

[0017] The present application provides a method and device for detecting dark spots on the end face of an optical fiber imaging element. The present application enables a detection staff to obtain multiple end face images corresponding to the optical fiber imaging element to be detected by photographing with a photographing device, and store the multiple end face images corresponding to the optical fiber imaging element to be detected in the local storage space of a target terminal device. Then, a dark spot detection application obtains the multiple end face images corresponding to the optical fiber imaging element to be detected in the local storage space of the target terminal device, and performs secondary diffusion processing on each end face image according to multiple preset diffusion matrices to generate a secondary diffusion image corresponding to each end face image, wherein, for any end face image, its corresponding secondary diffusion image contains multiple closed areas, and for any closed area, it corresponds to a dark spot or a dust; and according to the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area, the number of dark spots contained in each end face image and the area value corresponding to each dark spot are determined. Because, in the present application, the inspection staff only needs to use a shooting device to capture multiple end face images corresponding to the optical fiber imaging element to be inspected, and the dark spot detection application can determine the number of dark spots contained in each end face image and the area value corresponding to each dark spot, and determine the number of dark spots contained in the end face of the optical fiber imaging element to be inspected and the area size of each dark spot. The entire process does not require the intervention of the inspection staff, and is not dependent on the work experience and working status of the inspection staff, which can improve the detection accuracy of dark spot detection of optical fiber imaging elements.

[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0020] Figure 1 A flow chart of a method for detecting dark spots on the end face of an optical fiber imaging element provided in an embodiment of the present application is shown;

[0021] Figure 2 A flow chart of another method for detecting dark spots on the end face of an optical fiber imaging element provided in an embodiment of the present application is shown;

[0022] Figure 3 A block diagram showing a dark spot detection device on the end face of an optical fiber imaging element provided in an embodiment of the present application is shown;

[0023] Figure 4 A block diagram of another device for detecting dark spots on the end face of an optical fiber imaging element provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0025] In addition, the words “first”, “second” and the like used in the present application do not indicate any order, quantity or importance, but are only used to distinguish different parts.

[0026] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0027] At present, it is usually the inspection personnel who observe the end face of the optical fiber imaging element under a microscope and detect the number of dark spots on the end face of the optical fiber imaging element and the size of each dark spot by manual identification. However, the inspection personnel's manual identification of dark spots on the optical fiber imaging element is completely dependent on the inspection personnel's work experience and work status. When the inspection personnel are inexperienced or in a bad work status, the inspection personnel cannot accurately detect the number of dark spots on the end face of the optical fiber imaging element and the size of each dark spot. Therefore, the inspection personnel's manual identification of dark spots on the optical fiber imaging element has a low detection accuracy.

[0028] Therefore, in order to improve the detection accuracy of dark spot detection on the optical fiber imaging element, the embodiment of the present application provides a method for detecting dark spots on the end face of the optical fiber imaging element, such as Figure 1 As shown, the method at least includes 101-103.

[0029] 101. Acquire multiple end face images corresponding to the optical fiber imaging element to be detected.

[0030] Among them, the inspection staff can divide the end face of the optical fiber imaging element to be inspected into multiple areas, and use a shooting device to respectively shoot the end face image corresponding to each area, so as to obtain multiple end face images corresponding to the optical fiber imaging element to be inspected. At this time, the multiple end face images obtained by shooting completely cover the end face of the optical fiber imaging element to be inspected; the inspection staff can also use the center point of the end face of the optical fiber imaging element to be inspected as the origin, select multiple areas on the end face of the optical fiber imaging element to be inspected, and use a shooting device to respectively shoot the end face image corresponding to each area, so as to obtain multiple end face images corresponding to the optical fiber imaging element to be inspected. At this time, the multiple end face images obtained by shooting partially cover the end face of the optical fiber imaging element to be inspected, but are not limited to this.

[0031] In the embodiment of the present application, the execution subject in each step is a dark spot detection application running in the target terminal device, wherein the target terminal device can be but is not limited to: a computer, a tablet computer, a laptop computer, etc.

[0032] The photographing device is electrically connected to the target terminal device. After the photographing device obtains multiple end-face images corresponding to the optical fiber imaging element to be detected, the multiple end-face images corresponding to the optical fiber imaging element to be detected can be sent to the target terminal device, and the target terminal device can store the multiple end-face images corresponding to the optical fiber imaging element to be detected in the local storage space. When it is necessary to perform dark spot detection on the optical fiber imaging element to be detected, the dark spot detection application can obtain the multiple end-face images corresponding to the optical fiber imaging element to be detected in the local storage space of the target terminal device.

[0033] It should be noted that the photographing device includes an industrial camera and a microscope, and the magnification of the microscope can be but is not limited to 20 times, 30 times, 40 times or 50 times, etc.; wherein the camera chip size and pixel size of the industrial camera are determined according to the diameter of the optical fiber single filament corresponding to the optical fiber imaging element to be detected, the magnification of the microscope and the preset rules. For example, the preset rules are: (1) the diameter of each optical fiber single filament contained in the optical fiber imaging element to be detected occupies at least 25 pixels in the end face image, (2) the larger the field of view of the photographing device, the better, (3) the budget cost of the photographing device is A, the magnification of the microscope is 20 times, and the diameter of the optical fiber single filament corresponding to the optical fiber imaging element to be detected is 5 microns Therefore, the size (side length) of each pixel in the end face image must be less than 0.2 microns (5 microns divided by 25), and the size (side length) of each pixel in the end face image is the pixel size of the industrial camera divided by the magnification. Therefore, the pixel size of the industrial camera needs to be less than 4 microns, and the field of view of the shooting device is equal to the camera chip size of the industrial camera divided by the magnification of the microscope. The magnification of the microscope is fixed, so the larger the camera chip size of the industrial camera, the larger the field of view of the shooting device. However, the larger the camera chip size of the industrial camera, the higher the cost. Therefore, it is necessary to select a larger camera chip while ensuring that the budget cost of the shooting device is less than or equal to A.

[0034] 102. Perform secondary diffusion processing on each end surface image according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each end surface image.

[0035] The sizes of the multiple preset diffusion matrices are different. For any preset diffusion matrix, the preset diffusion matrix includes a central element, multiple elements to be diffused, and multiple other elements. For example, the multiple preset diffusion matrices are a first preset diffusion matrix, a second preset diffusion matrix, and a third preset diffusion matrix. The first preset diffusion matrix is ​​a 3*4 matrix. Specifically, the first preset diffusion matrix is:

[0036]

[0037] or:

[0038]

[0039] The second preset diffusion matrix is ​​a 5*7 matrix. The second preset diffusion matrix is ​​specifically:

[0040]

[0041] The third preset diffusion matrix is ​​a 7*10 matrix. The third preset diffusion matrix is ​​specifically:

[0042]

[0043] or:

[0044]

[0045] Among them, A is the central element, B is the element to be diffused, and C is other elements.

[0046] Among them, for any optical fiber monofilament contained in the optical fiber imaging element to be detected, the optical fiber monofilament includes core glass and skin glass, the core glass is cylindrical, the skin glass is wrapped on the outer surface of the core glass, the end face of the core glass is circular, and the end face of the skin glass is ring-shaped. The ratio of the diameter of the core glass to the diameter of the optical fiber monofilament is usually 5:6.

[0047] Since the core glass in the optical fiber filament emits light, while the skin glass does not emit light, for the optical fiber filament that emits light normally, in the end face image, the grayscale value of the pixel corresponding to the core glass is higher than the grayscale value of the pixel corresponding to the skin glass; since the dark spot on the surface of the optical fiber imaging element is composed of one or more optical fiber filaments that cannot emit light normally, in the end face image, the grayscale value of the pixel corresponding to the dark spot (and dust) is close to the grayscale value of the pixel corresponding to the skin glass of the normal luminous optical fiber filament and the grayscale value of the pixel corresponding to the gap between the optical fiber filaments. In order to avoid the influence of the skin glass of the normal luminous optical fiber filament and the gap between the optical fiber filaments on the dark spot detection, after obtaining multiple end face images corresponding to the optical fiber imaging element to be detected, the dark spot detection application needs to perform secondary diffusion processing on each end face image according to multiple preset diffusion matrices, that is, select a suitable preset diffusion matrix from multiple preset diffusion matrices, and perform two diffusion processing on each end face image based on the selected preset diffusion matrix, so as to generate a secondary diffusion image corresponding to each end face image.

[0048] Among them, for any end face image, in its corresponding secondary diffusion image, the grayscale value of the pixel point corresponding to the skin glass of the normal luminous optical fiber filament and the grayscale value of the pixel point corresponding to the gap between the optical fiber filaments are the same as the grayscale value of the pixel point corresponding to the core glass of the normal luminous optical fiber filament, the grayscale value of the pixel point corresponding to the skin glass of the normal luminous optical fiber filament, the grayscale value of the pixel point corresponding to the gap between the optical fiber filaments, and the grayscale value of the pixel point corresponding to the core glass of the normal luminous optical fiber filament are different from the grayscale value of the pixel point corresponding to the dark spot (and dust) and the grayscale value of the pixel point corresponding to the dust on the end face of the optical fiber imaging element to be detected; for any end face image, its corresponding secondary diffusion image contains multiple closed areas, and for any closed area, it corresponds to a dark spot or a dust.

[0049] 103. Determine the number of dark spots in each end surface image and the area value corresponding to each dark spot according to the number of closed areas in each secondary diffusion image and the number of pixels in each closed area.

[0050] After the dark spot detection application generates the secondary diffusion image corresponding to each end face image, it can determine the number of dark spots contained in each end face image and the area value corresponding to each dark spot based on the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area. In addition, based on the number of dark spots contained in each end face image and the area value corresponding to each dark spot, the number of dark spots contained in the end face of the optical fiber imaging element to be detected and the area size of each dark spot can be determined, that is, when multiple end face images completely cover the end face of the optical fiber imaging element to be detected, the sum of the number of dark spots contained in the multiple end face images is the number of dark spots contained in the end face of the optical fiber imaging element to be detected, and the area value corresponding to each dark spot contained in the multiple end face images is the area size of each dark spot contained in the end face of the optical fiber imaging element to be detected.

[0051] Specifically, in this step, for any end face image, according to the number of closed areas contained in the secondary diffusion image corresponding to the end face image and the number of pixels contained in each closed area, the specific process of determining the number of dark spots contained in the end face image and the area value corresponding to each dark spot is as follows:

[0052] First, according to the fiber filament diameter corresponding to the optical fiber imaging element to be detected and the pixel size corresponding to the end face image, the number of pixels occupied by the fiber filament diameter is calculated, that is, the fiber filament diameter corresponding to the optical fiber imaging element to be detected is divided by the pixel size (the side length of the pixel) corresponding to the end face image, and the calculation result is determined as the number of pixels occupied by the fiber filament diameter, wherein the number of pixels occupied by the fiber filament diameter is the number of pixels occupied by the fiber filament diameter in the end face image; secondly, according to the number of pixels occupied by the fiber filament diameter, the number of pixels occupied by the fiber filament is calculated, wherein the number of pixels occupied by the fiber filament is the number of pixels occupied by the end face of the fiber filament in the end face image; thirdly, for any closed area contained in the secondary diffusion image, when the number of pixels contained in the closed area is less than the number of pixels occupied by the fiber filament, it is determined that the closed area corresponds to dust, and when the number of pixels contained in the closed area is greater than or equal to the number of pixels occupied by the fiber filament When the number of closed areas is determined, it is determined that the closed area corresponds to the dark spot; finally, the number of closed areas corresponding to dust, the number of closed areas corresponding to dark spots and the number of pixels contained in each closed area corresponding to the dark spots in the multiple closed areas contained in the secondary diffusion image are counted; if the number of closed areas corresponding to dust is greater than a preset threshold, a prompt message is output and displayed to prompt the inspection staff that there is too much dust on the end face of the optical fiber imaging element to be inspected, and it is necessary to wipe the optical fiber imaging element to be inspected and then re-shoot multiple end face images corresponding to the optical fiber imaging element to be inspected; if the number of closed areas corresponding to dust is less than or equal to the preset threshold, the area value corresponding to each closed area is calculated according to the number of pixels contained in each closed area corresponding to the dark spot and the area value of the pixel points corresponding to the end face image (which is calculated according to the side length of the pixel points), and the number of closed areas corresponding to the dark spots is determined as the number of dark spots contained in the end face image, and the area value corresponding to each closed area corresponding to the dark spots is determined as the area value corresponding to each dark spot contained in the end face image.

[0053] An embodiment of the present application provides a method for detecting dark spots on the end face of an optical fiber imaging element. According to the embodiment of the present application, after the detection staff obtains multiple end face images corresponding to the optical fiber imaging element to be detected by photographing with a photographing device, and stores the multiple end face images corresponding to the optical fiber imaging element to be detected in the local storage space of the target terminal device, the dark spot detection application obtains the multiple end face images corresponding to the optical fiber imaging element to be detected in the local storage space of the target terminal device, and performs secondary diffusion processing on each end face image according to multiple preset diffusion matrices to generate a secondary diffusion image corresponding to each end face image, wherein, for any end face image, its corresponding secondary diffusion image contains multiple closed areas, and for any closed area, it corresponds to a dark spot or a dust; and according to the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area, the number of dark spots contained in each end face image and the area value corresponding to each dark spot are determined. Because, in the embodiment of the present application, the inspection staff only needs to use the shooting device to capture multiple end face images corresponding to the optical fiber imaging element to be inspected, and the dark spot detection application can determine the number of dark spots contained in each end face image and the area value corresponding to each dark spot, and determine the number of dark spots contained in the end face of the optical fiber imaging element to be inspected and the area size of each dark spot. The whole process does not require the intervention of the inspection staff, and thus does not rely on the work experience and working status of the inspection staff, which can improve the detection accuracy of dark spot detection on the optical fiber imaging element.

[0054] To explain in more detail below, the present application provides another method for detecting dark spots on the end face of an optical fiber imaging element. Figure 2 As shown, the method at least includes 201-204.

[0055] 201. Acquire multiple end face images corresponding to the optical fiber imaging element to be detected.

[0056] Regarding step 201, obtaining multiple end surface images corresponding to the optical fiber imaging element to be detected, reference may be made to Figure 1 The description of the corresponding parts will not be repeated here in the embodiments of the present application.

[0057] 202. Perform secondary diffusion processing on each end surface image according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each end surface image.

[0058] In order to avoid the influence of the gap between the sheath glass and the optical fiber filament of the normal luminous optical fiber on the dark spot detection, after the dark spot detection application obtains multiple end face images corresponding to the optical fiber imaging element to be detected, it needs to perform secondary diffusion processing on each end face image according to multiple preset diffusion matrices, that is, select a suitable preset diffusion matrix from multiple preset diffusion matrices, and perform two diffusion processes on each end face image based on the selected preset diffusion matrix, so as to generate a secondary diffusion image corresponding to each end face image. The following will explain in detail how the dark spot detection application performs secondary diffusion processing on each end face image according to multiple preset diffusion matrices to generate a secondary diffusion image corresponding to each end face image:

[0059] (1) According to the fiber filament diameter corresponding to the optical fiber imaging element to be detected and the pixel size corresponding to the end face image, the number of pixels occupied by the fiber filament diameter is calculated, that is, the fiber filament diameter corresponding to the optical fiber imaging element to be detected is divided by the pixel size (the side length of the pixel) corresponding to the end face image, and the calculation result is determined as the number of pixels occupied by the fiber filament diameter, wherein the number of pixels occupied by the fiber filament diameter is the number of pixels occupied by the fiber filament diameter in the end face image.

[0060] (2) generating a target noise reduction matrix according to the number of pixels occupied by the optical fiber single filament diameter, selecting a first target diffusion matrix from a plurality of preset diffusion matrices according to the number of pixels occupied by the optical fiber single filament diameter, and selecting a second target diffusion matrix from a plurality of preset diffusion matrices.

[0061] Among them, when the number of pixels occupied by the optical fiber single fiber diameter is an odd number, the generated target noise reduction matrix is ​​specifically:

[0062]

[0063] The target noise reduction matrix is ​​a k*k matrix, with n1 as the center, a circle of elements surrounding n1 is n3, a circle of elements surrounding multiple n3 is n5… the outermost circle of elements is nk, and k is the number of pixels corresponding to the diameter of the optical fiber single fiber; the sum of the multiple elements contained in the target noise reduction matrix is ​​equal to 1;

[0064] Where n1 = 2 / (k+1),

[0065] Among them, when the number of pixels occupied by the optical fiber single fiber diameter is an even number, the generated target noise reduction matrix is ​​specifically:

[0066]

[0067] The target noise reduction matrix is ​​a k*k matrix, with the 2*2 matrix as the center, each element in the 2*2 matrix is ​​n2, a circle of elements surrounding the 2*2 matrix is ​​n4, a circle of elements surrounding multiple n4 is n6… The outermost circle of elements is nk, and k is the number of pixels corresponding to the diameter of the optical fiber single fiber; the sum of the multiple elements contained in the target noise reduction matrix is ​​equal to 1;

[0068] in,

[0069] The specific process of selecting a first target diffusion matrix from a plurality of preset diffusion matrices according to the number of pixels occupied by the optical fiber single filament diameter and selecting a second target diffusion matrix from a plurality of preset diffusion matrices is as follows:

[0070] First, the number of pixels corresponding to the optical fiber single filament diameter is divided by 6 to obtain the value A, and the preset diffusion matrix with the number of columns closest to the value A among multiple preset diffusion matrices is determined as the first target diffusion matrix. For example, the number of pixels corresponding to the optical fiber single filament diameter is 29, then the value A is equal to 4.83, therefore, the first preset diffusion matrix is ​​determined as the first target diffusion matrix; secondly, the second preset diffusion matrix can be determined as the second target diffusion matrix but is not limited to being determined.

[0071] (3) Perform a convolution operation on each end face image using the target denoising matrix to obtain a denoised image corresponding to each end face image.

[0072] The type of convolution operation may specifically be the same convolution operation, that is, for any end face image, the target denoising matrix is ​​used to perform the same convolution operation on the end face image to obtain a denoised image corresponding to the end face image.

[0073] Among them, using the target noise reduction matrix to perform convolution operation processing on the end face image can suppress noise points in the end face image.

[0074] (4) Perform diffusion processing on each denoised image according to the first target diffusion matrix to obtain a primary diffusion image corresponding to each end face image.

[0075] For any end face image:

[0076] First, a convolution operation is performed on the denoised image corresponding to the end face image using a preset two-dimensional gradient operator to obtain a gradient matrix corresponding to the denoised image, wherein the type of convolution operation may specifically be a same convolution operation, and the preset two-dimensional gradient operator may be, but is not limited to, a Laplace operator, a Sobel operator, etc., and multiple pixel points in the denoised image correspond one-to-one to multiple elements in the gradient matrix, and the elements in the gradient matrix indicate the gradient values ​​of the corresponding pixel points;

[0077] Secondly, divide the maximum value of the gradient values ​​corresponding to each element in the gradient matrix by 2 to obtain the target gradient value;

[0078] Thirdly, the elements in the gradient matrix whose gradient values ​​are greater than the target gradient values ​​are determined as target elements, and the pixel points corresponding to each target element are determined as target pixel points, wherein the target pixel points are the pixel points at the edge of the core glass of the normally luminous optical fiber monofilament;

[0079] Then, according to the positional relationship between the central element contained in the first target diffusion matrix and each element to be diffused and the positional coordinates corresponding to each target pixel, the positional coordinates of multiple pixels to be diffused corresponding to each target pixel are determined, wherein the positional coordinates corresponding to the target pixel are the coordinates of the target pixel in the denoised image, and the positional coordinates corresponding to the pixels to be diffused are the coordinates of the pixels to be diffused in the denoised image. For example, the first target diffusion matrix is ​​specifically:

[0080]

[0081] The positional relationship between the central element and each element to be diffused is: the first element to be diffused is directly above the central element, the second element to be diffused is diagonally above and to the right of the central element, the third element to be diffused is to the left of the central element… When the position coordinates corresponding to a target pixel point are (200, 200), that is, the target pixel point is the pixel point at the 200th row and 200th column in the denoised image, the position coordinates of the first pixel point to be diffused corresponding to the target pixel point are (199, 200), the position coordinates of the second pixel point to be diffused are (199, 201), the position coordinates of the third pixel point to be diffused are (200, 199), and so on.

[0082] Finally, according to the position coordinates of the multiple pixel points to be diffused corresponding to each target pixel point, the grayscale value of each pixel point to be diffused in the denoised image is set to the grayscale value of the corresponding target pixel point, so as to obtain a diffusion image corresponding to the end face image, that is, for any target pixel point, according to the position coordinates of each pixel point to be diffused corresponding to the target pixel point, the multiple pixel points to be diffused corresponding to the target pixel point are found in the denoised image, and then the grayscale values ​​of the multiple pixel points to be diffused corresponding to the target pixel point are all set to the grayscale value of the target pixel point.

[0083] (5) Performing inverse binarization processing on each primary diffusion image according to a plurality of preset grayscale thresholds to generate a target binary image corresponding to each end face image.

[0084] For any end face image:

[0085] First, the primary diffusion image corresponding to the end face image is subjected to inverse binarization processing according to a plurality of preset grayscale thresholds to generate a binary image corresponding to each preset grayscale threshold. For example, the plurality of preset grayscale thresholds are 130, 120, 110, 100, 90, 80, etc. The grayscale values ​​of a plurality of pixel points in the primary diffusion image whose grayscale values ​​are greater than 130 are set to 0, and the grayscale values ​​of a plurality of pixel points in the primary diffusion image whose grayscale values ​​are less than or equal to 130 are set to 1 to generate a binary image corresponding to the preset grayscale threshold of 130, the grayscale values ​​of a plurality of pixel points in the primary diffusion image whose grayscale values ​​are greater than 120 are set to 0, and the grayscale values ​​of a plurality of pixel points in the primary diffusion image whose grayscale values ​​are less than or equal to 120 are set to 1 to generate a binary image corresponding to the preset grayscale threshold of 120…;

[0086] Secondly, determine the number of closed areas contained in the binary image corresponding to each preset grayscale threshold;

[0087] Thirdly, the difference in the number of closed areas between the binary images corresponding to two adjacent preset grayscale thresholds is calculated, that is, the difference in the number of closed areas in the binary image corresponding to the first preset grayscale threshold and the number of closed areas in the binary image corresponding to the second preset grayscale threshold is calculated to obtain the first difference in the number of closed areas, the difference in the number of closed areas in the binary image corresponding to the second preset grayscale threshold and the number of closed areas in the binary image corresponding to the third preset grayscale threshold is calculated to obtain the second difference in the number of closed areas, the difference in the number of closed areas in the binary image corresponding to the third preset grayscale threshold and the number of closed areas in the binary image corresponding to the fourth preset grayscale threshold is calculated to obtain the third difference in the number of closed areas…;

[0088] Finally, the preset grayscale threshold with a smaller value among the two adjacent preset grayscale thresholds corresponding to the maximum closed area number difference among multiple closed area number differences is determined as the target grayscale threshold, and the binary image corresponding to the target grayscale threshold is determined as the target binary image corresponding to the end face image. For example, if the difference between the number of closed areas in the binary image corresponding to the preset grayscale threshold 110 and the number of closed areas in the binary image corresponding to the preset grayscale threshold 100 is the maximum closed area number difference among the multiple closed area number differences, then the preset grayscale threshold 100 is determined as the target grayscale threshold, and the binary image corresponding to the preset grayscale threshold 100 is determined as the target binary image corresponding to the end face image.

[0089] (6) Perform diffusion processing on each target binary image according to the second target diffusion matrix to obtain a secondary diffusion image corresponding to each end face image.

[0090] For any end face image:

[0091] First, a convolution operation is performed on a target binary image corresponding to the end face image using a preset two-dimensional gradient operator to obtain a gradient matrix corresponding to the target binary image, wherein the type of convolution operation may specifically be a same convolution operation, and the preset two-dimensional gradient operator may be, but is not limited to, a Laplace operator, a Sobel operator, etc., and multiple pixel points in the target binary image correspond one-to-one to multiple elements in the gradient matrix, and the elements in the gradient matrix indicate the gradient values ​​of the corresponding pixel points;

[0092] Secondly, the elements whose gradient values ​​in the gradient matrix are not 0 are determined as target elements, and the pixel points whose grayscale values ​​are 0 among the pixel points corresponding to the multiple target elements are determined as target pixel points, wherein the target pixel points are the pixel points at the edge of the normally luminous optical fiber single filament;

[0093] Thirdly, according to the positional relationship between the central element contained in the second target diffusion matrix and each element to be diffused and the positional coordinates corresponding to each target pixel, the positional coordinates of the multiple pixels to be diffused corresponding to each target pixel are determined, wherein the positional coordinates corresponding to the target pixel are the coordinates of the target pixel in the target binary image, and the positional coordinates corresponding to the pixel to be diffused are the coordinates of the pixel to be diffused in the target binary image. The specific process can refer to the above process of determining the positional coordinates of the multiple pixels to be diffused corresponding to each target pixel according to the positional relationship between the central element contained in the first target diffusion matrix and each element to be diffused and the positional coordinates corresponding to each target pixel, which will not be described in detail in the embodiment of the present application.

[0094] Finally, the grayscale value of each pixel to be diffused in the target binary image is set to 0 according to the position coordinates of the multiple pixel to be diffused corresponding to each target pixel, so as to obtain the secondary diffusion image corresponding to the end face image. That is, for any target pixel, according to the position coordinates of each pixel to be diffused corresponding to the target pixel, the multiple pixel to be diffused corresponding to the target pixel is found in the target binary image, and then the grayscale values ​​of the multiple pixel to be diffused corresponding to the target pixel are all set to 0.

[0095] It should be noted that when performing the first diffusion processing, the grayscale value of the pixel points corresponding to the skin glass of the normal luminous optical fiber single filament can be set to be consistent with the grayscale value of the pixel points corresponding to the core glass of the normal luminous optical fiber single filament; when performing the second diffusion processing, the grayscale value of the pixel points corresponding to the gap between the optical fiber single filaments can be set to be consistent with the grayscale value of the pixel points corresponding to the core glass of the normal luminous optical fiber single filament, thereby effectively avoiding the influence of the gap between the skin glass of the normal luminous optical fiber single filament and the optical fiber single filament on the dark spot detection.

[0096] 203. Perform edge processing on each secondary diffusion image based on a preset two-dimensional gradient operator to obtain an edge image corresponding to each end face image.

[0097] After the dark spot detection application generates the secondary diffusion image corresponding to each end face image, it can perform edge processing on each secondary diffusion image based on the preset two-dimensional gradient operator to obtain the edge image corresponding to each end face image. The specific process is as follows: first, use the preset two-dimensional gradient operator to perform convolution operation on each secondary diffusion image to obtain the gradient matrix corresponding to each secondary diffusion image, wherein the type of convolution operation can be specifically the same convolution operation, and the preset two-dimensional gradient operator can be but not limited to the Laplace operator, the Sobel operator, etc. For any secondary diffusion image, multiple pixel points in the secondary diffusion image correspond to multiple elements in the gradient matrix corresponding to the secondary diffusion image one by one, and the elements in the gradient matrix corresponding to the secondary diffusion image indicate the gradient values ​​of the corresponding pixel points; secondly, according to The gradient matrix corresponding to each secondary diffusion image performs edge processing on each secondary diffusion image to obtain an edge image corresponding to each end face image, that is, for any secondary diffusion image, the elements whose gradient values ​​in the gradient matrix corresponding to the secondary diffusion image are not 0 are determined as target elements, and the pixels corresponding to each target element are determined as target pixels, and in the secondary diffusion image, the grayscale value of each target pixel is set to 1, and the grayscale values ​​of other pixels except the target pixel are set to 0, so as to obtain an edge image, wherein the target pixel is the pixel at the edge of the dark spot (or dust), that is, the grayscale value of each pixel at the edge of the dark spot (or dust) in the edge image is 1, and the grayscale values ​​of other pixels are 0, so that the detection staff can quickly know the position of each dark spot (or dust) according to the edge image.

[0098] 204. Determine the number of dark spots contained in each end surface image and the area value corresponding to each dark spot according to the number of closed areas contained in each edge image and the number of pixels contained in each closed area.

[0099] Among them, regarding 204, determining the number of dark spots contained in each end face image and the area value corresponding to each dark spot based on the number of closed areas contained in each edge image and the number of pixels contained in each closed area, you can refer to the relevant description of the above-mentioned step 103, and the embodiment of the present application will not be repeated here.

[0100] Furthermore, in an embodiment of the present application, after determining the number of dark spots contained in each end face image corresponding to the optical fiber imaging element to be detected and the area value corresponding to each dark spot, it is also possible to determine whether the optical fiber imaging element to be detected is a qualified element for dark spot detection based on the number of dark spots contained in each end face image and the area value corresponding to each dark spot. The specific process is: first, determine the total area value corresponding to multiple first dark spots contained in each end face image, and determine the number of second dark spots, the number of third dark spots, and the number of fourth dark spots contained in each end face image, wherein the first dark spot is a dark spot in the end face image whose area value is less than or equal to a first preset area threshold, the second dark spot is a dark spot in the end face image whose area value is greater than the first preset area threshold and less than or equal to the second preset area threshold, and the third dark spot is a dark spot in the end face image whose area value is greater than the first preset area threshold and less than or equal to the second preset area threshold. The fourth dark spot is a dark spot whose area value is greater than the second preset area threshold and is less than or equal to the third preset area threshold in the end face image; when the total area value corresponding to the multiple first dark spots contained in any one end face image is greater than the fourth preset area threshold, the optical fiber imaging element to be detected is determined to be an unqualified element for dark spot detection; when the number of second dark spots contained in any one end face image is greater than the first number threshold, the optical fiber imaging element to be detected is determined to be an unqualified element for dark spot detection; when the number of third dark spots contained in any one end face image is greater than the second number threshold, the optical fiber imaging element to be detected is determined to be an unqualified element for dark spot detection; when the number of fourth dark spots contained in any one end face image is greater than the third number threshold, the optical fiber imaging element to be detected is determined to be an unqualified element for dark spot detection.

[0101] The first preset area threshold may be, but is not limited to, the total area value of the end faces corresponding to three optical fiber filaments, the total area value of the end faces corresponding to four optical fiber filaments, the total area value of the end faces corresponding to five optical fiber filaments, etc. The second preset area threshold may be, but is not limited to, the total area value of the end faces corresponding to eight optical fiber filaments, the total area value of the end faces corresponding to ten optical fiber filaments, the total area value of the end faces corresponding to twelve optical fiber filaments, etc. The third preset area threshold may be, but is not limited to, the total area value of the end faces corresponding to thirteen optical fiber filaments, the total area value of the end faces corresponding to fifteen optical fiber filaments, the total area value of the end faces corresponding to seventeen optical fiber filaments, etc. The third preset area threshold is greater than the second preset area threshold, the second preset area threshold is greater than the first preset area threshold, the fourth preset area threshold may be, but is not limited to, 2% of the end face image area, 3% of the end face image area, 4% of the end face image area, etc.; the first quantity threshold may be, but is not limited to, 3, 4, 5, etc., the second quantity threshold may be, but is not limited to, 1, 2, etc., and the third quantity threshold may be, but is not limited to, 1, etc.

[0102] Furthermore, as a response to the above Figure 1 and Figure 2In order to realize the method shown in the figure, another embodiment of the present application also provides a device for detecting dark spots on the end face of an optical fiber imaging element. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. This device is used to improve the detection accuracy of dark spots on optical fiber imaging elements, specifically as follows Figure 3 As shown, the device comprises:

[0103] An acquisition unit 31 is used to acquire a plurality of end face images corresponding to the optical fiber imaging element to be detected, wherein the plurality of end face images are images obtained by photographing different regions of the end face of the optical fiber imaging element to be detected by a photographing device;

[0104] A first processing unit 32 is configured to perform secondary diffusion processing on each of the end surface images acquired by the acquisition unit 31 according to a plurality of preset diffusion matrices, so as to generate a secondary diffusion image corresponding to each of the end surface images, wherein the secondary diffusion image includes a plurality of closed areas;

[0105] The first determining unit 33 is used to determine the number of dark spots contained in each end surface image and the area value corresponding to each dark spot according to the number of closed areas contained in each secondary diffusion image generated by the first processing unit 32 and the number of pixels contained in each closed area.

[0106] Further, such as Figure 4 As shown, the first processing unit 32 is specifically used to calculate the number of pixels occupied by the optical fiber single fiber diameter according to the optical fiber single fiber diameter corresponding to the optical fiber imaging element to be detected and the pixel size corresponding to the end face image;

[0107] Generate a target noise reduction matrix according to the number of pixels occupied by the optical fiber single filament diameter, select a first target diffusion matrix from a plurality of preset diffusion matrices according to the number of pixels occupied by the optical fiber single filament diameter, and select a second target diffusion matrix from a plurality of preset diffusion matrices;

[0108] Using the target denoising matrix, performing a convolution operation on each of the end face images to obtain a denoised image corresponding to each of the end face images;

[0109] Performing diffusion processing on each of the denoised images according to the first target diffusion matrix to obtain a primary diffusion image corresponding to each of the end face images;

[0110] Performing inverse binarization processing on each of the primary diffusion images according to a plurality of preset grayscale thresholds to generate a target binary image corresponding to each of the end surface images;

[0111] Diffusion processing is performed on each of the target binary images according to the second target diffusion matrix to obtain a secondary diffusion image corresponding to each of the end surface images.

[0112] Further, such as Figure 4 As shown, the first target diffusion matrix includes a central element and a plurality of elements to be diffused; the first processing unit 32 is specifically used to perform a convolution operation on the denoised image using a preset two-dimensional gradient operator to obtain a gradient matrix corresponding to the denoised image, wherein a plurality of pixel points in the denoised image correspond one-to-one to a plurality of elements in the gradient matrix, and the elements in the gradient matrix indicate the gradient values ​​of the corresponding pixel points;

[0113] Divide the maximum value of the gradient values ​​corresponding to each element in the gradient matrix by 2 to obtain a target gradient value;

[0114] Determine an element in the gradient matrix whose gradient value is greater than the target gradient value as a target element, and determine a pixel point corresponding to each target element as a target pixel point;

[0115] Determine the position coordinates of a plurality of pixels to be diffused corresponding to each target pixel according to the position relationship between the central element and each of the elements to be diffused and the position coordinates corresponding to each of the target pixels;

[0116] The grayscale value of each pixel to be diffused in the denoised image is set to the grayscale value of its corresponding target pixel according to the position coordinates of multiple pixel to be diffused corresponding to each target pixel, so as to obtain a primary diffusion image corresponding to the end face image.

[0117] Further, such as Figure 4 As shown, the first processing unit 32 is specifically used to perform inverse binarization processing on the primary diffusion image according to the plurality of preset grayscale thresholds to generate a binary image corresponding to each of the preset grayscale thresholds;

[0118] Determine the number of closed areas corresponding to each of the binary images;

[0119] Calculating the difference in the number of closed areas between two adjacent binary images corresponding to the preset grayscale threshold;

[0120] Determine the preset grayscale threshold with a smaller value among two adjacent preset grayscale thresholds corresponding to the maximum closed area number difference among the plurality of closed area number differences as the target grayscale threshold;

[0121] The binary image corresponding to the target grayscale threshold is determined as the target binary image corresponding to the end face image.

[0122] Further, such as Figure 4As shown, the second target diffusion matrix includes a central element and a plurality of elements to be diffused; the first processing unit 32 is specifically used to perform a convolution operation on the target binary image using a preset two-dimensional gradient operator to obtain a gradient matrix corresponding to the target binary image, wherein a plurality of pixel points in the target binary image correspond one-to-one to a plurality of elements in the gradient matrix, and the elements in the gradient matrix indicate the gradient values ​​of the corresponding pixel points;

[0123] Determine an element whose gradient value is not 0 in the gradient matrix as a target element, and determine a pixel point whose gray value is 0 among the pixel points corresponding to the target elements as a target pixel point;

[0124] Determine the position coordinates of a plurality of pixels to be diffused corresponding to each target pixel according to the position relationship between the central element and each of the elements to be diffused and the position coordinates corresponding to each of the target pixels;

[0125] The grayscale value of each pixel to be diffused in the target binary image is set to 0 according to the position coordinates of a plurality of pixel points to be diffused corresponding to each target pixel point, so as to obtain a secondary diffusion image corresponding to the end face image.

[0126] Further, such as Figure 4 As shown, the device also includes:

[0127] The second processing unit 34 is configured to, after the first processing unit 32 performs secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images, perform convolution processing on each of the secondary diffusion images using a preset two-dimensional gradient operator to obtain a gradient matrix corresponding to each of the secondary diffusion images; and perform marginalization processing on each of the secondary diffusion images according to the gradient matrix corresponding to each of the secondary diffusion images to obtain an edge image corresponding to each of the end surface images;

[0128] The first determining unit 33 is specifically configured to determine the number of dark spots contained in each of the end surface images and the area value corresponding to each dark spot according to the number of closed areas contained in each of the edge images and the number of pixels contained in each closed area.

[0129] Further, such as Figure 4 As shown, the device also includes:

[0130] A second determination unit 35 is used to determine the total area value corresponding to the multiple first dark spots contained in each of the end face images, and determine the number of second dark spots, the number of third dark spots, and the number of fourth dark spots contained in each of the end face images, wherein the first dark spot is a dark spot in the end face image whose area value is less than or equal to a first preset area threshold, the second dark spot is a dark spot in the end face image whose area value is greater than the first preset area threshold and less than or equal to the second preset area threshold, the third dark spot is a dark spot in the end face image whose area value is greater than the second preset area threshold and less than or equal to the third preset area threshold, and the fourth dark spot is a dark spot in the end face image whose area value is greater than the third preset area threshold;

[0131] When the total area value corresponding to the plurality of first dark spots included in any one of the end face images is greater than a fourth preset area threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection;

[0132] When the number of the second dark spots included in any one of the end face images is greater than a first number threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection;

[0133] When the number of the third dark spots contained in any one of the end face images is greater than a second number threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection;

[0134] When the number of the fourth dark spots included in any one of the end face images is greater than a third number threshold, it is determined that the optical fiber imaging element to be detected is an unqualified element for dark spot detection.

[0135] The embodiment of the present application provides a method and device for detecting dark spots on the end face of an optical fiber imaging element. The embodiment of the present application can, after the detection staff obtains multiple end face images corresponding to the optical fiber imaging element to be detected by photographing with a photographing device, and stores the multiple end face images corresponding to the optical fiber imaging element to be detected in the local storage space of the target terminal device, the dark spot detection application obtains the multiple end face images corresponding to the optical fiber imaging element to be detected in the local storage space of the target terminal device, and performs secondary diffusion processing on each end face image according to multiple preset diffusion matrices to generate a secondary diffusion image corresponding to each end face image, wherein, for any end face image, its corresponding secondary diffusion image contains multiple closed areas, and for any closed area, it corresponds to a dark spot or a dust; and according to the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area, the number of dark spots contained in each end face image and the area value corresponding to each dark spot are determined. Because, in the embodiment of the present application, the inspection staff only needs to use the shooting device to capture multiple end face images corresponding to the optical fiber imaging element to be inspected, and the dark spot detection application can determine the number of dark spots contained in each end face image and the area value corresponding to each dark spot, and determine the number of dark spots contained in the end face of the optical fiber imaging element to be inspected and the area size of each dark spot. The whole process does not require the intervention of the inspection staff, and thus does not rely on the work experience and working status of the inspection staff, which can improve the detection accuracy of dark spot detection on the optical fiber imaging element.

[0136] An embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above-mentioned method for detecting dark spots on the end face of an optical fiber imaging element.

[0137] The storage medium may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.

[0138] An embodiment of the present application also provides a device for detecting dark spots on the end face of an optical fiber imaging element, the device comprising a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; and the method for detecting dark spots on the end face of an optical fiber imaging element described above is executed when the program instructions are executed.

[0139] The embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented:

[0140] Acquire a plurality of end face images corresponding to the optical fiber imaging element to be detected, wherein the plurality of end face images are images obtained by photographing different regions of the end face of the optical fiber imaging element to be detected by a photographing device;

[0141] Performing secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images, wherein the secondary diffusion image includes a plurality of closed areas;

[0142] The number of dark spots contained in each end surface image and the area value corresponding to each dark spot are determined according to the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area.

[0143] Furthermore, performing secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images includes:

[0144] Calculate the number of pixels occupied by the optical fiber single-filament diameter according to the optical fiber single-filament diameter corresponding to the optical fiber imaging element to be detected and the pixel size corresponding to the end face image;

[0145] Generate a target noise reduction matrix according to the number of pixels occupied by the optical fiber single filament diameter, select a first target diffusion matrix from a plurality of preset diffusion matrices according to the number of pixels occupied by the optical fiber single filament diameter, and select a second target diffusion matrix from a plurality of preset diffusion matrices;

[0146] Using the target denoising matrix, performing a convolution operation on each of the end face images to obtain a denoised image corresponding to each of the end face images;

[0147] Performing diffusion processing on each of the denoised images according to the first target diffusion matrix to obtain a primary diffusion image corresponding to each of the end face images;

[0148] Performing inverse binarization processing on each of the primary diffusion images according to a plurality of preset grayscale thresholds to generate a target binary image corresponding to each of the end surface images;

[0149] Diffusion processing is performed on each of the target binary images according to the second target diffusion matrix to obtain a secondary diffusion image corresponding to each of the end surface images.

[0150] Furthermore, the first target diffusion matrix includes a central element and a plurality of elements to be diffused; and the diffusion processing is performed on each of the denoised images according to the first target diffusion matrix to obtain a primary diffusion image corresponding to each of the end face images, including:

[0151] Using a preset two-dimensional gradient operator to perform a convolution operation on the denoised image to obtain a gradient matrix corresponding to the denoised image, wherein a plurality of pixels in the denoised image correspond one-to-one to a plurality of elements in the gradient matrix, and the elements in the gradient matrix indicate the gradient values ​​of the corresponding pixels;

[0152] Divide the maximum value of the gradient values ​​corresponding to each element in the gradient matrix by 2 to obtain a target gradient value;

[0153] Determine an element in the gradient matrix whose gradient value is greater than the target gradient value as a target element, and determine a pixel point corresponding to each target element as a target pixel point;

[0154] Determine the position coordinates of a plurality of pixels to be diffused corresponding to each target pixel according to the position relationship between the central element and each of the elements to be diffused and the position coordinates corresponding to each of the target pixels;

[0155] The grayscale value of each pixel to be diffused in the denoised image is set to the grayscale value of its corresponding target pixel according to the position coordinates of multiple pixel to be diffused corresponding to each target pixel, so as to obtain a primary diffusion image corresponding to the end face image.

[0156] Furthermore, the inverse binarization processing is performed on each of the primary diffusion images according to a plurality of preset grayscale thresholds to generate a target binary image corresponding to each of the end surface images, including:

[0157] Performing inverse binarization processing on the primary diffusion image according to the plurality of preset grayscale thresholds to generate a binary image corresponding to each of the preset grayscale thresholds;

[0158] Determine the number of closed areas corresponding to each of the binary images;

[0159] Calculating the difference in the number of closed areas between two adjacent binary images corresponding to the preset grayscale threshold;

[0160] Determine the preset grayscale threshold with a smaller value among two adjacent preset grayscale thresholds corresponding to the maximum closed area number difference among the plurality of closed area number differences as the target grayscale threshold;

[0161] The binary image corresponding to the target grayscale threshold is determined as the target binary image corresponding to the end face image.

[0162] Furthermore, the second target diffusion matrix includes a central element and a plurality of elements to be diffused; and the diffusion processing is performed on each of the target binary images according to the second target diffusion matrix to obtain a secondary diffusion image corresponding to each of the end face images, including:

[0163] Using a preset two-dimensional gradient operator to perform a convolution operation on the target binary image to obtain a gradient matrix corresponding to the target binary image, wherein a plurality of pixels in the target binary image correspond one-to-one to a plurality of elements in the gradient matrix, and the elements in the gradient matrix indicate the gradient values ​​of the corresponding pixels;

[0164] Determine an element whose gradient value is not 0 in the gradient matrix as a target element, and determine a pixel point whose gray value is 0 among the pixel points corresponding to the target elements as a target pixel point;

[0165] Determine the position coordinates of a plurality of pixels to be diffused corresponding to each target pixel according to the position relationship between the central element and each of the elements to be diffused and the position coordinates corresponding to each of the target pixels;

[0166] The grayscale value of each pixel to be diffused in the target binary image is set to 0 according to the position coordinates of a plurality of pixel points to be diffused corresponding to each target pixel point, so as to obtain a secondary diffusion image corresponding to the end face image.

[0167] Furthermore, after performing secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images, the method further includes:

[0168] Using a preset two-dimensional gradient operator to perform a convolution operation on each of the secondary diffusion images to obtain a gradient matrix corresponding to each of the secondary diffusion images;

[0169] Performing edge processing on each of the secondary diffusion images according to a gradient matrix corresponding to each of the secondary diffusion images to obtain an edge image corresponding to each of the end surface images;

[0170] Determining the number of dark spots contained in each end surface image and the area value corresponding to each dark spot according to the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area includes:

[0171] The number of dark spots contained in each end surface image and the area value corresponding to each dark spot are determined according to the number of closed areas contained in each edge image and the number of pixels contained in each closed area.

[0172] Furthermore, the method further comprises:

[0173] Determine the total area value corresponding to the multiple first dark spots contained in each of the end face images, and determine the number of second dark spots, the number of third dark spots, and the number of fourth dark spots contained in each of the end face images, wherein the first dark spot is a dark spot in the end face image whose area value is less than or equal to a first preset area threshold, the second dark spot is a dark spot in the end face image whose area value is greater than the first preset area threshold and less than or equal to the second preset area threshold, the third dark spot is a dark spot in the end face image whose area value is greater than the second preset area threshold and less than or equal to the third preset area threshold, and the fourth dark spot is a dark spot in the end face image whose area value is greater than the third preset area threshold;

[0174] When the total area value corresponding to the plurality of first dark spots included in any one of the end face images is greater than a fourth preset area threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection;

[0175] When the number of the second dark spots included in any one of the end face images is greater than a first number threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection;

[0176] When the number of the third dark spots contained in any one of the end face images is greater than a second number threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection;

[0177] When the number of the fourth dark spots included in any one of the end face images is greater than a third number threshold, it is determined that the optical fiber imaging element to be detected is an unqualified element for dark spot detection.

[0178] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program code that initializes the following method steps: obtaining multiple end face images corresponding to the optical fiber imaging element to be detected, wherein the multiple end face images are images obtained by photographing different areas of the end face of the optical fiber imaging element to be detected by a photographing device; performing secondary diffusion processing on each of the end face images according to multiple preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end face images, wherein the secondary diffusion image contains multiple closed areas; determining the number of dark spots contained in each of the end face images and the area value corresponding to each dark spot according to the number of closed areas contained in each of the secondary diffusion images and the number of pixels contained in each closed area.

[0179] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0180] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0183] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0184] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0185] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0186] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0187] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0188] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for detecting dark spots on the end face of an optical fiber imaging element, characterized in that: The method comprises: Acquire a plurality of end face images corresponding to the optical fiber imaging element to be detected, wherein the plurality of end face images are images obtained by photographing different regions of the end face of the optical fiber imaging element to be detected by a photographing device; Performing secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images, wherein the secondary diffusion image includes a plurality of closed areas; The number of dark spots contained in each end surface image and the area value corresponding to each dark spot are determined according to the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area.

2. The method according to claim 1, characterized in that The performing secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images includes: Calculate the number of pixels occupied by the optical fiber single-filament diameter according to the optical fiber single-filament diameter corresponding to the optical fiber imaging element to be detected and the pixel size corresponding to the end face image; Generate a target noise reduction matrix according to the number of pixels occupied by the optical fiber single filament diameter, select a first target diffusion matrix from a plurality of preset diffusion matrices according to the number of pixels occupied by the optical fiber single filament diameter, and select a second target diffusion matrix from a plurality of preset diffusion matrices; Using the target denoising matrix, performing a convolution operation on each of the end face images to obtain a denoised image corresponding to each of the end face images; Performing diffusion processing on each of the denoised images according to the first target diffusion matrix to obtain a primary diffusion image corresponding to each of the end face images; Performing inverse binarization processing on each of the primary diffusion images according to a plurality of preset grayscale thresholds to generate a target binary image corresponding to each of the end surface images; Diffusion processing is performed on each of the target binary images according to the second target diffusion matrix to obtain a secondary diffusion image corresponding to each of the end surface images.

3. The method according to claim 2, characterized in that The first target diffusion matrix includes a central element and a plurality of elements to be diffused; The step of performing diffusion processing on each of the denoised images according to the first target diffusion matrix to obtain a primary diffusion image corresponding to each of the end surface images includes: Using a preset two-dimensional gradient operator to perform a convolution operation on the denoised image to obtain a gradient matrix corresponding to the denoised image, wherein a plurality of pixels in the denoised image correspond one-to-one to a plurality of elements in the gradient matrix, and the elements in the gradient matrix indicate the gradient values ​​of the corresponding pixels; Divide the maximum value of the gradient values ​​corresponding to each element in the gradient matrix by 2 to obtain a target gradient value; Determine an element in the gradient matrix whose gradient value is greater than the target gradient value as a target element, and determine a pixel point corresponding to each target element as a target pixel point; Determine the position coordinates of a plurality of pixels to be diffused corresponding to each target pixel according to the position relationship between the central element and each of the elements to be diffused and the position coordinates corresponding to each of the target pixels; The grayscale value of each pixel to be diffused in the denoised image is set to the grayscale value of its corresponding target pixel according to the position coordinates of multiple pixel to be diffused corresponding to each target pixel, so as to obtain a primary diffusion image corresponding to the end face image.

4. The method according to claim 2, characterized in that: The performing inverse binarization processing on each of the primary diffusion images according to a plurality of preset grayscale thresholds to generate a target binary image corresponding to each of the end surface images includes: Performing inverse binarization processing on the primary diffusion image according to the plurality of preset grayscale thresholds to generate a binary image corresponding to each of the preset grayscale thresholds; Determine the number of closed areas corresponding to each of the binary images; Calculating the difference in the number of closed areas between two adjacent binary images corresponding to the preset grayscale threshold; Determine the preset grayscale threshold with a smaller value among two adjacent preset grayscale thresholds corresponding to the maximum closed area number difference among the plurality of closed area number differences as the target grayscale threshold; The binary image corresponding to the target grayscale threshold is determined as the target binary image corresponding to the end face image.

5. The method according to claim 2, characterized in that: The second target diffusion matrix includes a central element and a plurality of elements to be diffused; The step of performing diffusion processing on each of the target binary images according to the second target diffusion matrix to obtain a secondary diffusion image corresponding to each of the end surface images includes: Using a preset two-dimensional gradient operator to perform a convolution operation on the target binary image to obtain a gradient matrix corresponding to the target binary image, wherein a plurality of pixels in the target binary image correspond one-to-one to a plurality of elements in the gradient matrix, and the elements in the gradient matrix indicate the gradient values ​​of the corresponding pixels; Determine an element whose gradient value is not 0 in the gradient matrix as a target element, and determine a pixel point whose gray value is 0 among the pixel points corresponding to the target elements as a target pixel point; Determine the position coordinates of a plurality of pixels to be diffused corresponding to each target pixel according to the position relationship between the central element and each of the elements to be diffused and the position coordinates corresponding to each of the target pixels; The grayscale value of each pixel to be diffused in the target binary image is set to 0 according to the position coordinates of a plurality of pixel points to be diffused corresponding to each target pixel point, so as to obtain a secondary diffusion image corresponding to the end face image.

6. The method according to claim 1, characterized in that After performing secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images, the method further includes: Using a preset two-dimensional gradient operator to perform a convolution operation on each of the secondary diffusion images to obtain a gradient matrix corresponding to each of the secondary diffusion images; Performing edge processing on each of the secondary diffusion images according to a gradient matrix corresponding to each of the secondary diffusion images to obtain an edge image corresponding to each of the end surface images; Determining the number of dark spots contained in each end surface image and the area value corresponding to each dark spot according to the number of closed areas contained in each secondary diffusion image and the number of pixels contained in each closed area includes: The number of dark spots contained in each end surface image and the area value corresponding to each dark spot are determined according to the number of closed areas contained in each edge image and the number of pixels contained in each closed area.

7. The method according to claim 1, characterized in that The method further comprises: Determine the total area value corresponding to the multiple first dark spots contained in each of the end face images, and determine the number of second dark spots, the number of third dark spots, and the number of fourth dark spots contained in each of the end face images, wherein the first dark spot is a dark spot in the end face image whose area value is less than or equal to a first preset area threshold, the second dark spot is a dark spot in the end face image whose area value is greater than the first preset area threshold and less than or equal to the second preset area threshold, the third dark spot is a dark spot in the end face image whose area value is greater than the second preset area threshold and less than or equal to the third preset area threshold, and the fourth dark spot is a dark spot in the end face image whose area value is greater than the third preset area threshold; When the total area value corresponding to the plurality of first dark spots included in any one of the end face images is greater than a fourth preset area threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection; When the number of the second dark spots included in any one of the end face images is greater than a first number threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection; When the number of the third dark spots contained in any one of the end face images is greater than a second number threshold, determining that the optical fiber imaging element to be detected is an unqualified element for dark spot detection; When the number of the fourth dark spots included in any one of the end face images is greater than a third number threshold, it is determined that the optical fiber imaging element to be detected is an unqualified element for dark spot detection.

8. A device for detecting dark spots on the end face of an optical fiber imaging element, characterized in that: The device comprises: An acquisition unit, used for acquiring a plurality of end face images corresponding to the optical fiber imaging element to be detected, wherein the plurality of end face images are images obtained by photographing different regions of the end face of the optical fiber imaging element to be detected by a photographing device; A first processing unit, configured to perform secondary diffusion processing on each of the end surface images according to a plurality of preset diffusion matrices to generate a secondary diffusion image corresponding to each of the end surface images, wherein the secondary diffusion image includes a plurality of closed areas; The first determining unit is used to determine the number of dark spots contained in each of the end surface images and the area value corresponding to each dark spot according to the number of closed areas contained in each of the secondary diffusion images and the number of pixels contained in each closed area.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the method for detecting dark spots on the end face of an optical fiber imaging element according to any one of claims 1 to 7.

10. A device for detecting dark spots on the end face of an optical fiber imaging element, characterized in that: The device includes a storage medium; and one or more processors, the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the method for detecting dark spots on the end face of an optical fiber imaging element according to any one of claims 1 to 7 is executed.