Method and device for detecting dark spots on end face of optical fiber image transmitting element
By performing secondary window Fourier transformation processing on the end face image of the fiber image transmission element, the closed area is identified to determine the number and area of dark points, the problem of low manual detection accuracy in the prior art is solved, and automatic detection with high accuracy is achieved.
Patent Information
- Application Number
- CN202411851800.4
- 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
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 or in poor condition, it is difficult to accurately detect the number and area of dark spots.
By acquiring multiple end face images of the optical fiber image transmission element, performing secondary window Fourier transformation processing based on a preset window, generating a secondary masked image, and identifying a closed area to determine the number and area of dark points.
The detection accuracy of the end surface dark spot detection of fiber optic image transmission components is improved, and the dependence on the work experience and status of the detector is reduced, and automated detection is realized.
Smart Images

Figure CN119887637A_ABST
Abstract
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 a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images, wherein the secondary shielding image contains a plurality of closed areas;
[0009] According to the number of closed areas contained in each of the secondary shielding images and the number of pixels contained in each of the closed areas, the number of dark spots contained in each of the end surface images and the area value corresponding to each dark spot are determined.
[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 is used to perform a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images, wherein the secondary shielding image contains a plurality of closed areas;
[0013] The first determining unit 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 shielding image 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 can obtain multiple end face images corresponding to the optical fiber imaging element to be detected by a detection staff through a shooting 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 a secondary window Fourier transform process on each end face image based on multiple preset windows to generate a secondary shielding image corresponding to each end face image, wherein, for any end face image, its corresponding secondary shielding 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 shielding 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 window Fourier transform processing on each end surface image based on multiple preset windows to generate a secondary shielding image corresponding to each end surface image.
[0035] 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.
[0036] Among them, the dark spots on the surface of the optical fiber imaging element are composed of one or more optical fiber filaments that cannot emit light normally. In the end face image, the fringe frequency value of the pixel points corresponding to the dark spots (and dust) is lower than the fringe frequency value of the pixel points corresponding to the normally luminous optical fiber filaments.
[0037] After the dark spot detection application obtains multiple end face images corresponding to the optical fiber imaging element to be detected, it is necessary to perform a secondary window Fourier transform on each of the end face images based on multiple preset windows, that is, select a suitable window from the multiple preset windows, and perform two window Fourier transforms on each end face image based on the selected window. Based on the characteristic that the fringe frequency value of the pixel point corresponding to the dark spot (and dust) is lower than the fringe frequency value of the pixel point corresponding to the normal luminous optical fiber single fiber, the grayscale value of the pixel point corresponding to the normal luminous optical fiber single fiber in each end face image is set to 0, so as to shield the pixel point corresponding to the normal luminous optical fiber single fiber, thereby generating a secondary shielded image corresponding to each end face image.
[0038] Among them, for any end face image, its corresponding secondary shielding image contains multiple closed areas, and for any closed area, it corresponds to a dark spot or a dust; for any end face image, in its corresponding secondary shielding image, the grayscale value of the pixel point corresponding to the normal luminous optical fiber single fiber is 0, and the grayscale value of the pixel point corresponding to the dark spot (and dust) is not 0;.
[0039] 103. 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 shielding image and the number of pixels contained in each closed area.
[0040] After the dark spot detection application generates the secondary shielding 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 shielding 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.
[0041] Specifically, in this step, for any end face image, according to the number of closed areas contained in the secondary shielding 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:
[0042] 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 shielding 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 shielding 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.
[0043] 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 a secondary window Fourier transform processing on each end face image based on multiple preset windows to generate a secondary shielding image corresponding to each end face image, wherein, for any end face image, its corresponding secondary shielding 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 shielding 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.
[0044] 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.
[0045] 201. Acquire multiple end face images corresponding to the optical fiber imaging element to be detected.
[0046] 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.
[0047] 202. Perform secondary window Fourier transform processing on each end surface image based on multiple preset windows to generate a secondary shielding image corresponding to each end surface image.
[0048] 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 a secondary window Fourier transform process on each of the end-face images based on multiple preset windows, that is, select a suitable window from the multiple preset windows, and perform two window Fourier transform processes on each end-face image based on the selected window, so that based on the characteristic that the fringe frequency value of the pixel point corresponding to the dark spot (and dust) is lower than the fringe frequency value of the pixel point corresponding to the normal luminous optical fiber single fiber, the grayscale value of the pixel point corresponding to the normal luminous optical fiber single fiber in each end-face image is set to 0, so as to shield the pixel point corresponding to the normal luminous optical fiber single fiber, thereby generating a secondary shielded image corresponding to each end-face image. The following will explain in detail how the dark spot detection application performs a secondary window Fourier transform process on each end-face image based on multiple preset windows to generate a secondary shielded image corresponding to each end-face image:
[0049] The multiple preset windows include multiple first preset windows and multiple second preset windows, the first preset windows are Gaussian windows, and the second preset windows are oblique windows.
[0050] (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.
[0051] (2) generating a target noise reduction matrix according to the number of pixels occupied by the optical fiber single filament diameter, and selecting a target Gaussian window from a plurality of first preset windows according to the number of pixels occupied by the optical fiber single filament diameter.
[0052] 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:
[0053]
[0054] 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;
[0055] Where n1 = 2 / (k+1), i=3, 5, 7…k.
[0056] 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:
[0057]
[0058] 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;
[0059] in, i=2, 4, 6…k.
[0060] The specific process of selecting the target Gaussian window from a plurality of first preset windows according to the number of pixels occupied by the optical fiber single filament diameter is as follows:
[0061] Among them, the multiple first preset windows are all Gaussian windows. For any first preset window, the first preset window is an N*N matrix, and the sum of multiple elements included in the first preset window is 1.
[0062] Among the multiple first preset windows, the first preset window whose rows and columns are both the number of pixels occupied corresponding to the optical fiber single fiber diameter is determined as the target Gaussian window, that is, when the number of pixels occupied corresponding to the optical fiber single fiber diameter is k, the first preset window whose rows and columns are both k is determined as the target Gaussian window.
[0063] (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.
[0064] 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.
[0065] 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.
[0066] (4) Performing a window Fourier transform on each denoised image based on a target Gaussian window to generate a primary shielding image corresponding to each end face image.
[0067] For any end face image:
[0068] First, a window Fourier transform is performed on the denoised image corresponding to the end face image based on a target Gaussian window to obtain a fringe frequency field corresponding to the denoised image, wherein the fringe frequency field contains a fringe frequency value corresponding to each pixel in the denoised image; wherein the specific process of performing a window Fourier transform on the denoised image based on a target Gaussian window to obtain a fringe frequency field corresponding to the denoised image is as follows: first, a window Fourier transform is performed on the denoised image based on a target Gaussian window to determine a horizontal fringe frequency value and a vertical fringe frequency value corresponding to each pixel in the denoised image; then, according to the horizontal fringe frequency value and the vertical fringe frequency value corresponding to each pixel, a fringe frequency value corresponding to each pixel is calculated; finally, according to the fringe frequency values corresponding to a plurality of pixels, a fringe frequency field corresponding to the denoised image is generated;
[0069] Secondly, the fringe frequency value with the highest frequency in the fringe frequency field is determined as the reference fringe frequency value;
[0070] Thirdly, determining a fringe frequency value in the fringe frequency field that is greater than or equal to a reference fringe frequency value as a target fringe frequency value;
[0071] Then, the pixel point corresponding to each target fringe frequency value is determined as the target pixel point;
[0072] Finally, the grayscale value corresponding to each target pixel in the denoised image is set to 0 to generate a primary shielding image corresponding to the end face image.
[0073] It should be noted that in the denoised image, the number of pixels corresponding to the normal luminous optical fiber filament is the largest, therefore, the fringe frequency value with the highest frequency in the fringe frequency field (i.e., the reference fringe frequency value) must be the fringe frequency value corresponding to the pixel corresponding to the normal luminous optical fiber filament, therefore, after determining the fringe frequency value in the fringe frequency field that is greater than or equal to the reference fringe frequency value as the target fringe frequency value, and determining the pixel corresponding to each target fringe frequency value as the target pixel, and setting the grayscale value corresponding to each target pixel in the denoised image to 0, the grayscale values of a large number of pixels corresponding to each normal luminous optical fiber filament can be effectively set to 0, thereby shielding them; however, the fringe frequency values of some pixels corresponding to the normal luminous optical fiber filament will be less than the reference fringe frequency value, and thus these pixels cannot be shielded, therefore, a second window Fourier transform process is required.
[0074] (5) According to the number of pixels occupied by the optical fiber single filament diameter and the multiple primary shielding images, a target oblique window corresponding to each primary shielding image is selected from the multiple second preset windows.
[0075] For any one-time masked image:
[0076] First, unshielded pixel points of optical fiber single filaments are selected in the first shielding image, that is, any pixel point in the unshielded area corresponding to any normal luminescent optical fiber single filament in the first shielding image is determined as the unshielded pixel point of optical fiber single filament, wherein, for any normal luminescent optical fiber single filament, its corresponding unshielded area is an area composed of pixel points that have not been shielded among the pixel points corresponding to the normal luminescent optical fiber single filament after the first window Fourier transform processing;
[0077] Secondly, the horizontal fringe frequency value and the vertical fringe frequency value corresponding to the unshielded pixel point of the optical fiber monofilament are obtained, and the direction angle corresponding to the primary shielding image is calculated according to the horizontal fringe frequency value and the vertical fringe frequency value corresponding to the unshielded pixel point of the optical fiber monofilament, that is, the horizontal fringe frequency value and the vertical fringe frequency value corresponding to the unshielded pixel point of the optical fiber monofilament are substituted into the preset formula to calculate the direction angle corresponding to the primary shielding image, wherein the preset formula is specifically:
[0078] θ=arctan Fy / Fx
[0079] Among them, θ is the direction angle corresponding to the primary shielding image, Fy is the longitudinal fringe frequency value corresponding to the unshielded pixel point of the optical fiber single filament, and Fx is the transverse fringe frequency value corresponding to the unshielded pixel point of the optical fiber single filament;
[0080] Finally, according to the number of pixels corresponding to the optical fiber single-filament diameter and the direction angle corresponding to the primary shielding image, a target oblique window corresponding to the primary shielding image is selected from a plurality of second preset windows, and the specific process is as follows:
[0081] Among them, multiple second preset windows are all slanted window windows, and the multiple second preset windows are divided into N groups, each group contains four second preset windows: second preset window A, second preset window B, second preset window C and second preset window D. For any group, each group corresponds to the number of pixels occupied by the diameter of a single optical fiber.
[0082] First, a target group is selected according to the number of pixels occupied by the optical fiber single filament diameter, and then a target oblique window corresponding to the primary shielding image is selected from the target group according to the direction angle corresponding to the primary shielding image.
[0083] For example, when the number of pixels occupied by the optical fiber monofilament diameter is 30, the group corresponding to the number of pixels occupied by the optical fiber monofilament diameter is determined as the target group, and the target group includes: the second preset window 30A, the second preset window 30B, the second preset window 30C and the second preset window 30D; wherein the second preset window 30A is a 15*30 matrix, and the value of each element in the matrix is 1; the second preset window 30B is a 30*44 matrix, and the values of the 1st to 29th elements in the first row of the matrix are 0, the values of the 30th to 44th elements are 1, and the values of the 44th elements in the second row are 1. The values of the 1st to 28th elements are 0, the values of the 29th to 43rd elements are 1, and the value of the 44th element is 0. The values of the 1st to 27th elements in the third row are 0, the values of the 28th to 42nd elements are 1, and the values of the 43rd to 44th elements are 0…, the values of the 1st to 15th elements in the 30th row are 1, and the values of the 16th to 44th elements are 0. The second preset window 30C is a 30*15 matrix, and the value of each element in the matrix is 1. The second preset window 30D is a 30*44 matrix, and the values of the 1st to 15th elements in the first row of the matrix are 1, the values of the 16th to 44th elements are 0, the value of the 1st element of the second row is 0, the values of the 2nd to 16th elements are 1, the values of the 17th to 44th elements are 0, the values of the 1st to 2nd elements of the third row are 0, the values of the 3rd to 17th elements are 1, the values of the 18th to 44th elements are 0…the values of the 1st to 29th elements of the 30th row are 0, and the values of the 30th to 44th elements are 1; when the direction angle θ∈[0°,22.5°) or ∈(157.5°,180°] corresponding to the primary shielding image, the second preset window 30 A is determined as the target oblique window corresponding to the once-shielded image; when the direction angle θ∈[22.5°,67.5°] corresponding to the once-shielded image, the second preset window 30B is determined as the target oblique window corresponding to the once-shielded image; when the direction angle θ∈[67.5°,112.5°] corresponding to the once-shielded image, the second preset window 30C is determined as the target oblique window corresponding to the once-shielded image; when the direction angle θ∈[112.5°,157.5°] corresponding to the once-shielded image, the second preset window 30D is determined as the target oblique window corresponding to the once-shielded image.
[0084] (6) Performing a window Fourier transform process on each primary shielding image based on the target oblique window corresponding to each primary shielding image to generate a secondary shielding image corresponding to each end face image.
[0085] For any one-time masked image:
[0086] First, a window Fourier transform is performed on the primary shielding image based on a target oblique window window corresponding to the primary shielding image to obtain a fringe frequency field corresponding to the primary shielding image, wherein the fringe frequency field includes a fringe frequency value corresponding to each pixel point in the primary shielding image; the specific process can refer to the above description of performing a window Fourier transform on the denoised image corresponding to the end face image based on a target Gaussian window to obtain a fringe frequency field corresponding to the denoised image, which will not be described in detail in the present embodiment of the application;
[0087] Secondly, the fringe frequency value with the highest frequency in the fringe frequency field is determined as the reference fringe frequency value;
[0088] Thirdly, determining a fringe frequency value in the fringe frequency field that is greater than or equal to a reference fringe frequency value as a target fringe frequency value;
[0089] Then, the pixel point corresponding to each target fringe frequency value is determined as the target pixel point;
[0090] Finally, the grayscale value corresponding to each target pixel in the primary shielding image is set to 0 to generate a secondary shielding image corresponding to the primary shielding image.
[0091] 203. Perform edge processing on each secondary shielding image based on a preset two-dimensional gradient operator to obtain an edge image corresponding to each end face image.
[0092] After the dark spot detection application generates the secondary shielding image corresponding to each end face image, it can perform edge processing on each secondary shielding image based on the preset two-dimensional gradient operator to obtain the edge image corresponding to each end face image. The specific process is: first, each secondary shielding image is binarized, that is, for any secondary shielding image, the gray value of the pixel point whose gray value is not 0 in the secondary shielding image is set to 1, so as to obtain the binary image corresponding to each end face image; secondly, each binary image is convolved using the preset two-dimensional gradient operator to obtain the gradient matrix corresponding to each binary 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 binary image, multiple pixel points in the binary image are convolved with multiple elements in the gradient matrix corresponding to the binary image. The elements in the gradient matrix corresponding to the binary image indicate the gradient values of the corresponding pixels; secondly, edge processing is performed on each binary image according to the gradient matrix corresponding to each binary image to obtain the edge image corresponding to each end face image, that is, for any binary image, the elements with non-0 gradient values in the gradient matrix corresponding to the binary image are determined as target elements, and the pixels corresponding to each target element are determined as target pixels, and in the binary image, the gray value of each target pixel is set to 1, and the gray values of other pixels except the target pixel are set to 0, so as to obtain the edge image, wherein the target pixel is the pixel at the edge of the dark spot (or dust), that is, the gray value of each pixel at the edge of the dark spot (or dust) in the edge image is 1, and the gray value of other pixels is 0. Therefore, the detection staff can quickly know the position of each dark spot (or dust) according to the edge image.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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:
[0098] 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;
[0099] A first processing unit 32 is used to perform a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images, wherein the secondary shielding image contains a plurality of closed areas;
[0100] 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 shielding image and the number of pixels contained in each closed area.
[0101] Further, such as Figure 4 As shown, the plurality of preset windows include a plurality of first preset windows and a plurality of second preset windows, the first preset windows are Gaussian windows, and the second preset windows are oblique windows; the first processing unit 32 includes:
[0102] A calculation module 321, for calculating 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;
[0103] A first selection module 322, used to generate a target noise reduction matrix according to the number of pixels occupied by the optical fiber single filament diameter, and select a target Gaussian window from a plurality of first preset windows according to the number of pixels occupied by the optical fiber single filament diameter;
[0104] A first processing module 323 is used to perform a convolution operation on each of the end face images using the target noise reduction matrix to obtain a noise reduction image corresponding to each of the end face images;
[0105] A second processing module 324 is used to perform a window Fourier transform process on each of the noise reduction images based on the target Gaussian window to generate a primary shielding image corresponding to each of the end surface images;
[0106] A second selection module 325 is used to select a target oblique window corresponding to each of the first shielding images from a plurality of second preset windows according to the number of pixels occupied by the optical fiber single filament diameter and the plurality of first shielding images;
[0107] The third processing module 326 is used to perform window Fourier transform processing on each of the primary shielding images based on the target oblique window corresponding to each of the primary shielding images, so as to generate a secondary shielding image corresponding to each of the end surface images.
[0108] Further, such as Figure 4 As shown, the second processing module 324 is specifically used to perform window Fourier transform processing on the denoised image based on the target Gaussian window to obtain a fringe frequency field corresponding to the denoised image, wherein the fringe frequency field contains a fringe frequency value corresponding to each pixel in the denoised image; the fringe frequency value with the highest frequency in the fringe frequency field is determined as a reference fringe frequency value; the fringe frequency value in the fringe frequency field that is greater than or equal to the reference fringe frequency value is determined as a target fringe frequency value; the pixel point corresponding to each of the target fringe frequency values is determined as a target pixel point; and the grayscale value corresponding to each of the target pixel points in the denoised image is set to 0 to generate a primary shielding image corresponding to the end face image.
[0109] Further, such as Figure 4 As shown, the second processing module 324 is specifically used to perform window Fourier transform processing on the denoised image based on the target Gaussian window to determine the horizontal fringe frequency value and the vertical fringe frequency value corresponding to each pixel in the denoised image; calculate the fringe frequency value corresponding to each pixel according to the horizontal fringe frequency value and the vertical fringe frequency value corresponding to each pixel; generate the fringe frequency field corresponding to the denoised image according to the fringe frequency values corresponding to the multiple pixels;
[0110] The second selection module 325 is specifically used to select unshielded pixel points of the optical fiber single filament in the once-shielded image, wherein the unshielded pixel point of the optical fiber single filament is any pixel point in the unshielded area corresponding to any normal luminous optical fiber single filament; obtain the horizontal stripe frequency value and the vertical stripe frequency value corresponding to the unshielded pixel point of the optical fiber single filament, and calculate the direction angle corresponding to the once-shielded image according to the horizontal stripe frequency value and the vertical stripe frequency value corresponding to the unshielded pixel point of the optical fiber single filament; select the target oblique window corresponding to the once-shielded image from multiple second preset windows according to the number of pixels occupied corresponding to the diameter of the optical fiber single filament and the direction angle corresponding to the once-shielded image.
[0111] Further, such as Figure 4As shown, the third processing module 326 is specifically used to perform window Fourier transform processing on the primary shielding image based on the target oblique window corresponding to the primary shielding image to obtain a fringe frequency field corresponding to the primary shielding image, wherein the fringe frequency field contains a fringe frequency value corresponding to each pixel point in the primary shielding image; the fringe frequency value with the highest frequency in the fringe frequency field is determined as a reference fringe frequency value; the fringe frequency value in the fringe frequency field that is greater than or equal to the reference fringe frequency value is determined as a target fringe frequency value; the pixel point corresponding to each of the target fringe frequency values is determined as a target pixel point; and the grayscale value corresponding to each of the target pixel points in the primary shielding image is set to 0 to generate a secondary shielding image corresponding to the end face image.
[0112] Further, such as Figure 4 As shown, the device also includes:
[0113] The second processing unit 34 is used for, after the first processing unit 32 performs a secondary window Fourier transform process on each of the end face images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end face images, performing a binarization process on each of the secondary shielding images to obtain a binary image corresponding to each of the end face images; performing a convolution operation process on each of the binary images using a preset two-dimensional gradient operator to obtain a gradient matrix corresponding to each of the binary images; and performing an edge processing on each of the binary images according to the gradient matrix corresponding to each of the binary images to obtain an edge image corresponding to each of the end face images;
[0114] The first determining unit 33 is specifically configured 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 edge image and the number of pixels contained in each closed area.
[0115] Further, such as Figure 4 As shown, the device also includes:
[0116] The 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. dark spots; when the total area value corresponding to the multiple first dark spots contained in any one of the end-face images 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 the second dark spots contained in any one of the end-face images 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 the third dark spots contained in any one of the end-face images 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 the fourth dark spots contained in any one of the end-face images 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.
[0117] 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 a secondary window Fourier transform processing on each end face image based on multiple preset windows to generate a secondary shielding image corresponding to each end face image, wherein, for any end face image, its corresponding secondary shielding 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 shielding 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.
[0118] 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.
[0119] 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.
[0120] 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.
[0121] 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:
[0122] 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;
[0123] Performing a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images, wherein the secondary shielding image contains a plurality of closed areas;
[0124] According to the number of closed areas contained in each of the secondary shielding images and the number of pixels contained in each of the closed areas, the number of dark spots contained in each of the end surface images and the area value corresponding to each dark spot are determined.
[0125] Further, the plurality of preset windows include a plurality of first preset windows and a plurality of second preset windows, the first preset windows are Gaussian windows, and the second preset windows are oblique windows; performing a secondary window Fourier transform process on each of the end face images based on the plurality of preset windows to generate a secondary shielding image corresponding to each of the end face images includes:
[0126] 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;
[0127] Generate a target noise reduction matrix according to the number of pixels occupied by the optical fiber single filament diameter, and select a target Gaussian window from a plurality of first preset windows according to the number of pixels occupied by the optical fiber single filament diameter;
[0128] 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;
[0129] Performing a window Fourier transform process on each of the denoised images based on the target Gaussian window to generate a primary shielding image corresponding to each of the end surface images;
[0130] Selecting a target oblique window corresponding to each of the first shielding images from a plurality of second preset windows according to the number of pixels occupied by the optical fiber single filament diameter and the plurality of first shielding images;
[0131] A window Fourier transform process is performed on each of the primary shielding images based on a target oblique window corresponding to each of the primary shielding images to generate a secondary shielding image corresponding to each of the end surface images.
[0132] Further, performing window Fourier transform processing on each of the denoised images based on the target Gaussian window to generate a primary shielding image corresponding to each of the end face images includes:
[0133] Performing a window Fourier transform process on the denoised image based on the target Gaussian window to obtain a fringe frequency field corresponding to the denoised image, wherein the fringe frequency field includes a fringe frequency value corresponding to each pixel in the denoised image;
[0134] Determine the fringe frequency value with the highest frequency in the fringe frequency field as the reference fringe frequency value;
[0135] Determine a fringe frequency value in the fringe frequency field that is greater than or equal to the reference fringe frequency value as a target fringe frequency value;
[0136] Determine the pixel point corresponding to each target fringe frequency value as the target pixel point;
[0137] The grayscale value corresponding to each target pixel in the denoised image is set to 0 to generate a primary shielding image corresponding to the end face image.
[0138] Furthermore, performing a window Fourier transform process on the denoised image based on the target Gaussian window to obtain a fringe frequency field corresponding to the denoised image includes:
[0139] Performing a window Fourier transform process on the denoised image based on the target Gaussian window to determine a horizontal stripe frequency value and a vertical stripe frequency value corresponding to each pixel point in the denoised image;
[0140] Calculating the fringe frequency value corresponding to each pixel point according to the horizontal fringe frequency value and the vertical fringe frequency value corresponding to each pixel point;
[0141] Generate a fringe frequency field corresponding to the denoised image according to the fringe frequency values corresponding to the plurality of pixel points;
[0142] The step of selecting a target oblique window corresponding to each of the first shielding images from a plurality of second preset windows according to the number of pixels occupied by the optical fiber single filament diameter and the plurality of first shielding images comprises:
[0143] Selecting an unshielded pixel point of an optical fiber single filament in the primary shielding image, wherein the unshielded pixel point of an optical fiber single filament is any pixel point in an unshielded area corresponding to any normal luminous optical fiber single filament;
[0144] Obtaining the transverse fringe frequency value and the longitudinal fringe frequency value corresponding to the unshielded pixel point of the optical fiber monofilament, and calculating the direction angle corresponding to the primary shielding image according to the transverse fringe frequency value and the longitudinal fringe frequency value corresponding to the unshielded pixel point of the optical fiber monofilament;
[0145] According to the number of pixels corresponding to the optical fiber single filament diameter and the direction angle corresponding to the primary shielding image, a target oblique window corresponding to the primary shielding image is selected from a plurality of second preset windows.
[0146] Further, performing a window Fourier transform process on each of the primary shielding images based on the target oblique window corresponding to each of the primary shielding images to generate a secondary shielding image corresponding to each of the end surface images includes:
[0147] Performing a window Fourier transform process on the primary shielding image based on a target oblique window corresponding to the primary shielding image to obtain a fringe frequency field corresponding to the primary shielding image, wherein the fringe frequency field includes a fringe frequency value corresponding to each pixel point in the primary shielding image;
[0148] Determine the fringe frequency value with the highest frequency in the fringe frequency field as the reference fringe frequency value;
[0149] Determine a fringe frequency value in the fringe frequency field that is greater than or equal to the reference fringe frequency value as a target fringe frequency value;
[0150] Determine the pixel point corresponding to each target fringe frequency value as the target pixel point;
[0151] The grayscale value corresponding to each target pixel in the primary shielding image is set to 0 to generate a secondary shielding image corresponding to the end face image.
[0152] Furthermore, after performing a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images, the method further includes:
[0153] Performing binarization processing on each of the secondary shielding images to obtain a binary image corresponding to each of the end surface images;
[0154] Using a preset two-dimensional gradient operator to perform a convolution operation on each of the binary images to obtain a gradient matrix corresponding to each of the binary images;
[0155] Performing edge processing on each of the binary images according to the gradient matrix corresponding to each of the binary images to obtain an edge image corresponding to each of the end surface images;
[0156] 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 shielding image and the number of pixels contained in each closed area includes:
[0157] 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.
[0158] Furthermore, the method further comprises:
[0159] 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;
[0160] 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;
[0161] 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;
[0162] 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;
[0163] 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.
[0164] 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 a secondary window Fourier transform process on each of the end face images based on multiple preset windows to generate a secondary shielded image corresponding to each of the end face images, wherein the secondary shielded 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 based on the number of closed areas contained in each of the secondary shielded images and the number of pixels contained in each closed area.
[0165] 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.
[0166] 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.
[0167] 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 including 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.
[0168] 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. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0169] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] 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 a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images, wherein the secondary shielding image contains a plurality of closed areas; According to the number of closed areas contained in each of the secondary shielding images and the number of pixels contained in each of the closed areas, the number of dark spots contained in each of the end surface images and the area value corresponding to each dark spot are determined.
2. The method according to claim 1, characterized in that The plurality of preset windows include a plurality of first preset windows and a plurality of second preset windows, the first preset windows are Gaussian windows, and the second preset windows are oblique windows; The performing a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images comprises: 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, and select a target Gaussian window from the plurality of first preset windows according to the number of pixels occupied by the optical fiber single filament diameter; 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 a window Fourier transform process on each of the denoised images based on the target Gaussian window to generate a primary shielding image corresponding to each of the end surface images; According to the number of pixels occupied by the optical fiber single filament diameter and the plurality of the first shielding images, a target oblique window corresponding to each of the first shielding images is selected from the plurality of the second preset windows; A window Fourier transform process is performed on each of the primary shielding images based on a target oblique window corresponding to each of the primary shielding images to generate a secondary shielding image corresponding to each of the end surface images.
3. The method according to claim 2, characterized in that The performing window Fourier transform processing on each of the noise reduction images based on the target Gaussian window to generate a primary shielding image corresponding to each of the end surface images includes: Performing a window Fourier transform process on the denoised image based on the target Gaussian window to obtain a fringe frequency field corresponding to the denoised image, wherein the fringe frequency field includes a fringe frequency value corresponding to each pixel in the denoised image; Determine the fringe frequency value with the highest frequency in the fringe frequency field as the reference fringe frequency value; Determine a fringe frequency value in the fringe frequency field that is greater than or equal to the reference fringe frequency value as a target fringe frequency value; Determine the pixel point corresponding to each target fringe frequency value as the target pixel point; The grayscale value corresponding to each target pixel in the denoised image is set to 0 to generate a primary shielding image corresponding to the end face image.
4. The method according to claim 3, characterized in that The performing window Fourier transform processing on the denoised image based on the target Gaussian window to obtain a fringe frequency field corresponding to the denoised image includes: Performing a window Fourier transform process on the denoised image based on the target Gaussian window to determine a horizontal stripe frequency value and a vertical stripe frequency value corresponding to each pixel in the denoised image; Calculating the fringe frequency value corresponding to each pixel point according to the horizontal fringe frequency value and the vertical fringe frequency value corresponding to each pixel point; Generating a fringe frequency field corresponding to the denoised image according to the fringe frequency values corresponding to the plurality of pixel points; The step of selecting a target oblique window corresponding to each of the first shielding images from a plurality of second preset windows according to the number of pixels occupied by the optical fiber single filament diameter and the plurality of first shielding images comprises: Selecting an unshielded pixel point of an optical fiber single filament in the primary shielding image, wherein the unshielded pixel point of an optical fiber single filament is any pixel point in an unshielded area corresponding to any normal luminous optical fiber single filament; Obtaining the transverse fringe frequency value and the longitudinal fringe frequency value corresponding to the unshielded pixel point of the optical fiber monofilament, and calculating the direction angle corresponding to the primary shielding image according to the transverse fringe frequency value and the longitudinal fringe frequency value corresponding to the unshielded pixel point of the optical fiber monofilament; According to the number of pixels occupied by the optical fiber single filament diameter and the direction angle corresponding to the primary shielding image, a target oblique window corresponding to the primary shielding image is selected from a plurality of second preset windows.
5. The method according to claim 2, characterized in that: The performing window Fourier transform processing on each of the primary shielding images based on the target oblique window corresponding to each of the primary shielding images to generate a secondary shielding image corresponding to each of the end surface images comprises: Performing a window Fourier transform process on the primary shielding image based on a target oblique window corresponding to the primary shielding image to obtain a fringe frequency field corresponding to the primary shielding image, wherein the fringe frequency field includes a fringe frequency value corresponding to each pixel point in the primary shielding image; Determine the fringe frequency value with the highest frequency in the fringe frequency field as the reference fringe frequency value; Determine a fringe frequency value in the fringe frequency field that is greater than or equal to the reference fringe frequency value as a target fringe frequency value; Determine the pixel point corresponding to each target fringe frequency value as the target pixel point; The grayscale value corresponding to each target pixel in the primary shielding image is set to 0 to generate a secondary shielding image corresponding to the end face image.
6. The method according to claim 1, characterized in that After performing a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images, the method further includes: Performing binarization processing on each of the secondary shielding images to obtain a binary image corresponding to each of the end surface images; Using a preset two-dimensional gradient operator to perform a convolution operation on each of the binary images to obtain a gradient matrix corresponding to each of the binary images; Performing edge processing on each of the binary images according to the gradient matrix corresponding to each of the binary 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 shielding 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 is used to perform a secondary window Fourier transform process on each of the end surface images based on a plurality of preset windows to generate a secondary shielding image corresponding to each of the end surface images, wherein the secondary shielding image contains a plurality of closed areas; The first determining unit 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 shielding image 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.