Multi-core optical fiber alignment method and device based on image difference
Through the multi-core fiber alignment method based on image difference, the calculation logic of multi-core fiber connection is simplified, the problems of complex and time-consuming calculations in the prior art are solved, and a more efficient and reliable alignment process is achieved.
Patent Information
- Application Number
- CN202411641867.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Among the existing multi-core optical fiber connection methods, especially the end-face image alignment algorithm, the calculation is complex and time-consuming, resulting in low continuity efficiency.
Using a multi-core optical fiber alignment method based on image difference, by acquiring the end face images of the two optical fibers, filtering and angle-by-angle rotation difference operations are performed, the optimal alignment angle is determined, and the computing logic is simplified and efficiency is improved.
It significantly shortens the alignment time, improves the efficiency and reliability of multi-core optical fiber connection, and can improve the alignment speed by several times or even more than ten times when high precision is required.
Smart Images

Figure CN119624874A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-core optical fiber automatic alignment, and in particular to a multi-core optical fiber alignment method and device based on image difference. Background Art
[0002] Due to its unique advantages, multi-core optical fiber has been widely used in many high-tech fields such as optical communication, fiber sensing, fiber laser and high-precision measurement. In this context, it is particularly important to achieve high-quality splicing of multi-core optical fibers, which is directly related to the actual performance and reliability of these applications. Unlike single-mode optical fibers, multi-core optical fibers have an internal structure that contains multiple cores. Multiple cores are arranged in a single cladding according to the principle of geometric symmetry, aiming to minimize mutual interference between cores. Each core in a multi-core optical fiber is an independent optical transmission channel, which also makes the end face of the multi-core optical fiber have a more complex structure. In order to ensure that each channel can effectively transmit signals, all cores must be accurately aligned during splicing. Any slight deviation will cause the optical signal to leak or be lost between the cores, causing crosstalk or signal attenuation, affecting the quality and efficiency of data transmission.
[0003] The methods for splicing multi-core optical fibers mainly include active alignment methods and passive alignment methods. The active alignment method uses a light source and an optical power meter to achieve precise alignment, but the equipment is complex and costly, and is suitable for laboratories and specific indoor environments. The passive alignment method uses image processing technology, including side image and end face image alignment. Side image alignment requires obtaining images at different angles when the fusion splicer rotates, which requires high real-time control accuracy and is complex and difficult to process. End face image alignment has the characteristics of wide applicability and high accuracy, and is suitable for the alignment of multi-core optical fibers. However, the current mainstream algorithms for processing end face images are complex and time-consuming when the image accuracy is high, which greatly increases the splicing time.
[0004] In view of this, overcoming the defects of the prior art is an urgent problem to be solved in the field of this technology. Summary of the invention
[0005] The technical problem to be solved by the present invention is how to improve the splicing efficiency of multi-core optical fibers.
[0006] The present invention adopts the following technical solution: In a first aspect, a multi-core optical fiber alignment method based on image difference is provided, comprising: Acquire a first end face image of the first multi-core optical fiber and a second end face image of the second multi-core optical fiber; filtering the first end surface image to obtain a first filtered image, and filtering the second end surface image to obtain a second filtered image; Rotating the first filtered image angle by angle, and performing difference operations on the rotated first filtered image and the second filtered image respectively to obtain a plurality of difference image matrices; Taking the absolute value of each element of the differential image matrix and summing them up to obtain the sum value corresponding to each differential image matrix, and taking the rotation angle corresponding to the minimum sum value as the optimal alignment angle; The first multi-core optical fiber is rotated to the optimal alignment angle to align the first multi-core optical fiber with the second multi-core optical fiber.
[0007] Preferably, the acquiring a first end face image of the first multi-core optical fiber and a second end face image of the second multi-core optical fiber comprises: Stripping the coating layers of the fusion ends of the first multi-core optical fiber and the second multi-core optical fiber, and neatly cutting the fusion end faces of the first multi-core optical fiber and the second multi-core optical fiber, respectively placing the first multi-core optical fiber and the second multi-core optical fiber into the clamps at both ends of the fusion splicer and fixing them; Adjusting the positions of the fusion-joined end faces of the first multi-core optical fiber and the second multi-core optical fiber, and obtaining a first intermediate image of the first multi-core optical fiber and a second intermediate image of the second multi-core optical fiber through end face imaging of a fusion-joining machine; Performing grayscale conversion on the first intermediate image to obtain a first grayscale image, and performing grayscale conversion on the second intermediate image to obtain a second grayscale image; The first grayscale image and the second grayscale image are adjusted to the same size to obtain the first end surface image and the second end surface image.
[0008] Preferably, adjusting the first grayscale image and the second grayscale image to the same size to obtain the first end surface image and the second end surface image comprises: Finding a circular edge of the first grayscale image, and obtaining a first center coordinate and a first optical fiber pixel size of the first multi-core optical fiber; Finding the circular edge of the second grayscale image, and obtaining the second center coordinates and the second optical fiber pixel size of the second multi-core optical fiber; A first square image with the first center coordinate at the center of the first end face image is cut out according to the first center coordinate and the first optical fiber pixel size; A second square image with the second center coordinate at the center of the second end face image is cut out according to the second center coordinate and the second optical fiber pixel size; The sizes of the first square image and the second square image are adjusted to be consistent, so as to obtain the first end surface image and the second end surface image.
[0009] Preferably, the step of rotating the first filtered image angle by angle and performing a difference operation on the rotated first filtered image and the second filtered image to obtain a plurality of difference image matrices comprises: Initialize the angle counter and set the current angle as the starting value of the rotation range; For the first filtered image the coordinates are The pixels are rotated by Perform angle-by-angle rotation, the coordinates are The pixel coordinates after rotation for:
[0010]
[0011] Rotate each pixel point on the first filtered image angle by angle to obtain a rotated first filtered image; A blank two-dimensional matrix is created, and the difference between each pixel point on the rotated first filtered image and the corresponding pixel point on the second filtered image is calculated respectively, and the corresponding difference values are stored in the blank two-dimensional matrix to obtain the differential image matrix.
[0012] Preferably, taking the absolute value of each element of the differential image matrix and summing them to obtain the sum value corresponding to each differential image matrix, and taking the rotation angle corresponding to the minimum sum value as the optimal alignment angle includes: Create a sum variable with an initial value of zero. Starting from the upper left corner of the difference image matrix, traverse each element in the matrix row by row and column by column. For the element currently traversed, first take the absolute value and then accumulate the absolute value into the sum variable. Until the entire differential image matrix is traversed, a sum variable is obtained, wherein the sum variable is the sum value corresponding to the differential image matrix; The sum values corresponding to all differential image matrices are obtained, and the rotation angle corresponding to the differential image matrix with the smallest sum value is taken as the optimal alignment angle.
[0013] Preferably, the filtering process of the first end face image and the second end face image is the same, and filtering the first end face image to obtain the first filtered image includes: Performing logarithmic transformation and Fourier transformation on the first end surface image to obtain a second intermediate image; filtering the second intermediate image by a filter, and performing an inverse Fourier transform on the filtered second intermediate image to obtain a third intermediate image; Perform an exponential transformation on the third intermediate image to obtain the first filtered image.
[0014] Preferably, the expression of the filter is:
[0015] Where n is the order of the filter, is the cutoff frequency of the filter, is the high frequency gain, is the low frequency gain, is the square root function, i and j are the filter coefficients.
[0016] Preferably, the inverse Fourier transform formula is:
[0017] The exponential transformation formula is:
[0018] Where F is the Fourier transform, is the second intermediate image after filtering, is the third intermediate image, is an exponential function.
[0019] In a second aspect, a multi-core optical fiber alignment device based on image difference is provided, the multi-core optical fiber alignment device based on image difference comprises: a processor and a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the multi-core optical fiber alignment method based on image difference described in the first aspect.
[0020] In a third aspect, a non-volatile computer storage medium is provided, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors to complete the multi-core optical fiber alignment method based on image difference as described in the first aspect.
[0021] In a fourth aspect, a chip is provided, comprising: a processor and an interface, for calling and running a computer program stored in the memory from a memory, and executing the multi-core optical fiber alignment method based on image difference as described in the first aspect.
[0022] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer or a processor, enables the computer or the processor to execute the multi-core optical fiber alignment method based on image difference as described in the first to fourth aspects and any one of the aspects.
[0023] Compared with the prior art, the present invention has the following beneficial effects: The present invention simplifies the operation logic through the differential alignment method, which is more efficient. When the pixel value of the end face image is high, the alignment speed can be increased by several times or even dozens of times. In particular, during the alignment process, multiple alignments are often required due to the existence of machine rotation errors. The differential alignment method significantly shortens the time required for the overall alignment by reducing the calculation time required for each alignment, thereby improving the efficiency and reliability of the alignment process. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A multi-core optical fiber alignment method based on image difference is provided in an embodiment of the present invention; Figure 2 is a schematic diagram of a process for obtaining an end face image provided by an embodiment of the present invention; Figure 3 is a schematic diagram of an end face image provided by an embodiment of the present invention; Figure 4 is a more specific flow chart of obtaining an end face image provided by an embodiment of the present invention; Figure 5 is a schematic diagram of extracting the edge of the cladding provided by an embodiment of the present invention; Figure 6 is a schematic diagram of a cropped square image provided by an embodiment of the present invention; Figure 7 is a schematic diagram of a filtered image provided by an embodiment of the present invention; Figure 8 is a schematic diagram of performing a difference between a rotated first filtered image and a second filtered image provided by an embodiment of the present invention; Fig. 9 is a schematic diagram of a process for obtaining an optimal alignment angle provided by an embodiment of the present invention; Fig.10 is a schematic diagram of the relationship between a rotation angle and a sum value of a differential image matrix provided by an embodiment of the present invention; Fig.11 It is a schematic diagram of the fusion splicing of a seven-core optical fiber provided by an embodiment of the present invention; Fig.12 It is a schematic diagram of fusion splicing of a four-core optical fiber provided by an embodiment of the present invention; Fig.13It is a structural schematic diagram of a multi-core optical fiber alignment device based on image difference provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0027] Unless the context requires otherwise, throughout the specification and claims, the term "including" is to be interpreted as open inclusion, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "examples", "specific examples" or "some examples" and the like are intended to indicate that specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner, that is, although they may be carried in the embodiments or examples of the above terms due to reasons such as the order and position of appearance, it is not limited to that they can be carried in combination by one embodiment or example.
[0028] In the description of the present invention, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "multiple" is two or more. In addition, for example, the same type of nouns may be described as two independent individuals by adding "A" and "B" at the end. In this case, the corresponding features defined as "A" and "B" are only used to distinguish the same type of individuals for description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
[0029] When describing some embodiments, the expressions "coupling", "coupling" and "connection" and their derivatives may be used. For example, when describing some embodiments, the term "connection" may be used to indicate that two or more components are in direct physical or electrical contact with each other. For another example, when describing some embodiments, the term "coupling" may be used to indicate that two or more components are in direct physical or electrical contact. However, the terms "connection" or "coupling" may also refer to two or more components that are not in direct contact with each other, but still cooperate or interact with each other, such as "optical path coupling", "wireless connection", etc. The embodiments disclosed herein are not necessarily limited to the contents of the present invention.
[0030] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0031] Embodiment 1: The existing multi-core optical fiber alignment algorithm is inefficient when processing end-face images with high precision. In order to improve the splicing efficiency of multi-core optical fibers, Embodiment 1 of the present invention provides a multi-core optical fiber alignment method based on image difference, such as Figure 1 As shown, including: Step 101: Acquire a first end face image of a first multi-core optical fiber and a second end face image of a second multi-core optical fiber.
[0032] The first end face image is an image corresponding to the surface to be fused of the first multi-core optical fiber, and the second end face image is an image corresponding to the surface to be fused of the second multi-core optical fiber, through which the two multi-core optical fibers are fused.
[0033] Step 102: filtering the first end surface image to obtain a first filtered image, and filtering the second end surface image to obtain a second filtered image.
[0034] The purpose of filtering the first end face image and the second end face image is to remove noise from the image and improve the image quality and clarity. The noise may come from factors such as imaging equipment and environmental interference, which will affect the subsequent extraction and alignment accuracy of the fiber core edge. The specific filtering method will be described below.
[0035] Step 103: Rotate the first filtered image angle by angle, and perform differential operations on the rotated first filtered image and the second filtered image respectively to obtain multiple differential image matrices; take the absolute value of each element of the differential image matrix and sum them to obtain the sum value corresponding to each differential image matrix, and the rotation angle corresponding to the minimum sum value is the optimal alignment angle.
[0036] Among them, rotating by angle means first determining the rotation angle range (from 0° to 360°), starting from the minimum angle in the rotation angle range, and rotating by a preset angle each time until the rotation angle reaches the maximum angle in the rotation angle range. In one embodiment, the preset rotation angle range can be 0.1° to 0.5°. That is, the preset rotation angle can be 0.1° each time, or 0.5° each time, or any angle between 0.1° and 0.5° each time. The smaller the preset rotation angle, the higher the accuracy of the result obtained later.
[0037] For the first filtered image, the image obtained after each rotation of the preset angle is differentially calculated with the second filtered edge image. Each calculation will obtain a differential image matrix. Each differential image matrix is summed, and the rotation angle corresponding to the differential image matrix with the smallest sum value is taken as the optimal alignment angle. Among them, this embodiment chooses to fix the second filtered image and rotate the first filtered image. It is also possible to keep the first filtered image stationary and rotate the second filtered image angle by angle. The calculation method is the same as above and will not be repeated here. The specific steps of differential calculation will be described below.
[0038] Step 104: Rotate the first multi-core optical fiber to the optimal alignment angle to align the first multi-core optical fiber with the second multi-core optical fiber.
[0039] In one embodiment, after the optimal alignment angle is obtained through the above steps, the optimal alignment angle is input into a fusion splicer, and the fusion splicer controls the first multi-core optical fiber to rotate to the optimal alignment angle to align the first multi-core optical fiber with the second multi-core optical fiber, and then performs a fusion splicing operation.
[0040] This embodiment simplifies the calculation logic through the differential alignment method, which is more efficient. When the pixel value of the end face image is high, the alignment speed can be increased by several times or even dozens of times. In particular, during the alignment process, multiple alignments are often required due to the existence of machine rotation errors. The differential alignment method significantly shortens the time required for the overall alignment by reducing the calculation time required for each alignment, thereby improving the efficiency and reliability of the alignment process.
[0041] In one embodiment, Figure 2 As shown, the obtaining of a first end face image of the first multi-core optical fiber and a second end face image of the second multi-core optical fiber includes: Step 1011: strip the coating layer of the fusion end of the first multi-core optical fiber and the second multi-core optical fiber, cut the fusion end faces of the first multi-core optical fiber and the second multi-core optical fiber neatly, and respectively place the first multi-core optical fiber and the second multi-core optical fiber into the clamps at both ends of the fusion splicer and fix them.
[0042] For the first multi-core optical fiber and the second multi-core optical fiber, the coating layer at the fusion end needs to be stripped first. The coating layer is used to protect the optical fiber, but it will affect the fusion quality during fusion, so it needs to be removed. Then the fusion end face of the optical fiber is cut neatly, which helps to improve the accuracy and quality of the fusion and reduce the loss of the optical signal at the fusion. For example, a professional optical fiber cutter can be used for cutting to ensure that the end face is flat and burr-free.
[0043] Step 1012: Adjust the positions of the fusion end faces of the first multi-core optical fiber and the second multi-core optical fiber, and obtain a first intermediate image of the first multi-core optical fiber and a second intermediate image of the second multi-core optical fiber through end face imaging of a fusion splicer.
[0044] Place the processed first multi-core optical fiber and the second multi-core optical fiber into the clamps at both ends of the fusion splicer. The function of the clamp is to fix the optical fiber to ensure that the optical fiber does not move during the fusion splicing process. When fixing, ensure that the position of the optical fiber is accurate and firmly fixed in the clamp to prevent positional deviation in subsequent operations, which will affect the imaging quality and fusion splicing quality.
[0045] like Figure 3 As shown, the end face imaging function of the fusion splicer is used to obtain a first intermediate image of the first multi-core optical fiber and a second intermediate image of the second multi-core optical fiber. End face imaging usually uses an optical system and an image sensor to photograph the end face of the optical fiber to obtain a clear image.
[0046] Step 1013: Perform grayscale conversion on the first intermediate image to obtain a first grayscale image, and perform grayscale conversion on the second intermediate image to obtain a second grayscale image.
[0047] The purpose of grayscale conversion is to simplify image information and reduce the amount of calculation for subsequent processing. Grayscale conversion can be achieved by calculating the color value of each pixel of a color image to obtain a grayscale value. For example, the weighted average method can be used to obtain the grayscale value by weighted averaging the values of the red, green, and blue channels according to the sensitivity of the human eye to different colors.
[0048] In one embodiment, the grayscale conversion process includes: for each pixel in the color image (the first intermediate image and the second intermediate image), its color information is usually represented by the values of the three channels of red (R), green (G), and blue (B). When performing grayscale conversion, different weights are assigned to the values of the three channels, and then they are added to obtain the grayscale value of the pixel. Commonly used weights are 0.299, 0.587, and 0.114, and the calculation formula is Gray=0.299R+0.587G+0.114B. For example, for a pixel, its R=100, G=120, B=80, then its grayscale value Gray=0.299x100+ 0.587x120+0.114x80≈107.4. This weight distribution is based on the different sensitivities of the human eye to different colors. The human eye is most sensitive to green, followed by red, and least sensitive to blue.
[0049] According to the above method, the first intermediate image is converted from a color image to a first grayscale image, and the second intermediate image is converted from a color image to a second grayscale image.
[0050] Step 1014: Adjust the first grayscale image and the second grayscale image to the same size to obtain the first end surface image and the second end surface image.
[0051] After the grayscale image is obtained, in the subsequent image processing and analysis, since the two images need to be compared and calculated, if the image sizes are different, the processing difficulty and complexity will be increased. In one embodiment, the first grayscale image and the second grayscale image are adjusted to the same size in the following manner.
[0052] In one embodiment, Figure 4 As shown, the step 1014 specifically includes: Step 10141: Find the circular edge of the first grayscale image, obtain the first center coordinates and the first fiber pixel size of the first multi-core optical fiber; find the circular edge of the second grayscale image, obtain the second center coordinates and the second fiber pixel size of the second multi-core optical fiber.
[0053] Among them, Figure 5 As shown in the figure, since the end face of the optical fiber is usually circular, the position and size of the optical fiber can be determined by detecting the circular edge. The specific detection process includes: when detecting a circle, the equation of the circle is , where (a, b) is the coordinate of the center of the circle and r is the radius. The three parameters (a, b, r) constitute a three-dimensional space.
[0054] First, perform edge detection on the image to obtain a set of edge pixels. For each edge pixel (x, y), traverse the possible radius r (usually the radius value range is determined based on prior knowledge or a certain range), and then calculate the corresponding circle center coordinates (a, b). According to the circle equation:
[0055] The ± here means there are two possible solutions, and vote for the corresponding (a, b, r) combination in the parameter space.
[0056] For example, assuming that the coordinates of an edge pixel are (50, 50), and considering the radius r = 10, the possible coordinates of the center of the circle can be calculated, and then the counters of these possible (a, b, r) combinations in the parameter space are increased by 1, indicating that this combination has received one vote.
[0057] In the parameter space, after voting for all edge pixels, a three-dimensional "voting space" is formed. Detect the peak in this space, that is, the (a, b, r) combination with the most votes. Usually a threshold can be set, and when the number of votes exceeds this threshold, it is considered that a circle has been found. The setting of this threshold can be adjusted according to factors such as the noise situation of the image and the expected size of the circle. For example, if the threshold is set to 50, then the circle corresponding to the (a, b, r) combination with a vote number greater than 50 in the parameter space is considered to be the detected circle. After finding the (a, b, r) combination corresponding to the peak, the center coordinates (a, b) and radius r of the circle in the image are determined, thereby completing the detection of the circular edge.
[0058] Step 10142: cropping a first square image in which the first center coordinate is at the center of the first end face image using the first center coordinate and the first fiber pixel size; cropping a second square image in which the second center coordinate is at the center of the second end face image using the second center coordinate and the second fiber pixel size.
[0059] Once the circular edge is found, the center coordinates and pixel size of the optical fiber can be determined by calculating the center coordinates and radius of the circle. The specific method includes: for each pixel point on the circular edge, a circle can be fit using methods such as least squares method to obtain the center coordinates and radius of the circle.
[0060] The center coordinates may represent the location of the fiber in the image, while the radius may represent the pixel size of the fiber.
[0061] For example, suppose there are n pixels on the edge of the circle detected by the above method, and their coordinates are (x1, y1), (x2, y2)...(xn, yn). The least squares method can be used to fit a circle, and its equation is , where (a, b) is the center coordinate of the circle and r is the radius. By using the least squares method, the values of a, b and r can be solved to obtain the center coordinate and pixel size of the optical fiber.
[0062] According to the first center coordinates of the first multi-core optical fiber and the first optical fiber pixel size, a first square image with the first center coordinates at the center of the first end face image can be cut out. The specific process includes: firstly determining the side length of the square image, which can be determined according to a certain multiple of the optical fiber pixel size. For example, the side length can be set to twice the optical fiber pixel size. Then, with the first center coordinate as the center, a square image with a side length of a determined value is cut out. For example, if the first optical fiber pixel size is d, the side length of the square image can be set to 2d. With the first center coordinates (x0, y0) as the center, a square image with a side length of 2d is cut out, and its upper left corner coordinates are (x0-d, y0-d), and the lower right corner coordinates are (x0+d, y0+d).
[0063] Similarly, according to the second center coordinates of the second multi-core optical fiber and the second optical fiber pixel size, a second square image with the second center coordinates at the center of the second end face image can be cropped. The cropping method is similar to that of the first square image, and will not be repeated here.
[0064] Step 10143: Adjust the sizes of the first square image and the second square image to be consistent, so as to obtain the first end surface image and the second end surface image.
[0065] Among them, Figure 6 As shown, the specific process of adjusting the sizes of the first square image and the second square image to be consistent includes: First, you need to determine the size of the image you want to resize. You can manually specify a fixed size, such as 500 pixels wide and 500 pixels high. Or you can determine the size of the two images and then find the average as the corresponding size. Using the size of one image as a reference, resize the other image to the same size.
[0066] For the first square image, use the resize function in the image adjustment tool to scale the image according to the specified target size. If the image is enlarged, new pixels will be inserted into the image through an interpolation algorithm; if the image is reduced, the pixels will be merged or discarded. For example, the first image is adjusted to a size of 500 pixels wide and 500 pixels high. After processing, the size of the first square image becomes the target size. The same operation is performed on the second square image. After processing, the second square image also reaches the target size. According to the above operation, the first end face image and the second end face image of the same size are finally obtained.
[0067] In one embodiment, in order to ensure the accuracy of subsequent differential calculation, it is necessary to remove the noise influence on the first end surface image and the second end surface image. In one embodiment, Figure 7 As shown, the filtering process of the first end face image and the second end face image is the same, and the filtering of the first end face image to obtain the first filtered image includes: performing logarithmic transformation and Fourier transformation on the first end face image to obtain a second intermediate image; filtering the second intermediate image through a filter, and performing inverse Fourier transformation on the filtered second intermediate image to obtain a third intermediate image; and performing exponential transformation on the third intermediate image to obtain the first filtered image.
[0068] Among them, the expression of the filter is:
[0069] Where n is the order of the filter, is the cutoff frequency of the filter, is the high frequency gain, is the low frequency gain, is the square root function, i and j are the filter coefficients.
[0070] The inverse Fourier transform formula is:
[0071] The exponential transformation formula is:
[0072] Where F is the Fourier transform, is the second intermediate image after filtering, is the third intermediate image, is an exponential function.
[0073] After obtaining the first filtered image and the second filtered image, Figure 8 As shown, the first filtered image is rotated angle by angle, and the rotated first filtered image is subjected to difference operation with the second filtered image to obtain a plurality of difference image matrices, including: initializing an angle counter, setting the current angle to the starting value of the rotation range; for the coordinates in the first filtered image The pixels are rotated by Rotate by angle, the coordinates are The pixel coordinates after rotation for:
[0074]
[0075] Each pixel point on the first filtered image is rotated angle by angle to obtain a rotated first filtered image; a blank two-dimensional matrix is created, and the difference between each pixel point on the rotated first filtered image and the corresponding pixel point on the second filtered image is calculated respectively, and the corresponding difference is stored in the blank two-dimensional matrix to obtain the differential image matrix.
[0076] First, determine the range of rotation, which is generally from 0 to 360 degrees. However, if there are certain physical limitations or a known approximate alignment range based on the actual situation of the optical fiber, this angle range can be narrowed. At the same time, determine the step size of the rotation, that is, the angle increment of each rotation. The smaller the step size, the higher the accuracy of the calculation may be, but the amount of calculation will also be greater. For example, the step size can be set to 0.1 or 0.5 degrees.
[0077] The first fiber core edge image is rotated according to the set step size, starting from the initial angle (usually 0 degrees).
[0078] Create a variable to store the current angle, such as "current_angle", and initialize it to the starting angle. Starting from the upper left corner of the first filtered image, traverse each pixel in the image in row-first order. For each pixel, according to the current rotation angle , use the above formula to calculate its rotated coordinates.
[0079] Create a blank two-dimensional matrix of the same size as the first and second filtered images. This can be done using data structures in a programming language, such as two-dimensional lists or NumPy arrays in Python. For example, if the first and second filtered images are both MxN pixels in size, then the blank two-dimensional matrix created is also MxN in size. For each pixel in the rotated first filtered image, find its corresponding position in the second filtered image. Calculate the difference between the two pixels, that is, the value of the pixel in the rotated first filtered image minus the value of the corresponding pixel in the second filtered image, and then store the difference in the corresponding position in the blank two-dimensional matrix.
[0080] For example, the value of the pixel with coordinates (50, 50) in the rotated first filter image is 120, and the value of the pixel with coordinates (50, 50) in the second filter image is 100, then the difference 20 is stored in the corresponding position with coordinates (50, 50) in the blank two-dimensional matrix. The value of the pixel represents the grayscale intensity of the pixel, and usually the grayscale value ranges from 0 to 255. 0 represents black, that is, no light intensity; 255 represents white, representing the highest light intensity.
[0081] The above operation is performed on each pixel in the rotated first filtered image until all pixels are processed, thus obtaining a differential image matrix at the current rotation angle. Through the above steps, the first filtered image can be accurately rotated angle by angle, and a differential operation is performed with the second filtered image to obtain multiple differential image matrices.
[0082] In one embodiment, Fig. 9 As shown, taking the absolute value of each element of the differential image matrix and summing them to obtain the sum value corresponding to each differential image matrix, and taking the rotation angle corresponding to the minimum sum value as the optimal alignment angle includes: Step 1031: Create a sum variable with an initial value of zero, start from the upper left corner of the differential image matrix, traverse each element in the matrix row by row and column by column, and for the element currently traversed, first take the absolute value and then add the absolute value to the sum variable.
[0083] Create a variable for the sum, for example, "total_sum". Because the sum does not have any value before we start calculating it, we set its initial value to zero.
[0084] The difference image matrix is a two-dimensional array that represents the difference between the two filtered images at different rotation angles. Start from the upper left corner of the difference image matrix and make sure that every element is processed. Traverse the matrix row by row in row-first order. For each row, traverse each element column by column from left to right.
[0085] For the element currently traversed, first take its absolute value. For example, if the current element is -5, it becomes 5 after taking its absolute value. Accumulate the element value after taking its absolute value into the sum variable "total_sum". For example, if the current value of the sum variable is 10 and the absolute value of the current element is 5, then after accumulating it into the sum variable, the value of "total_sum" becomes 15.
[0086] Step 1032: until the entire differential image matrix is traversed, a sum variable is obtained, wherein the sum variable is the sum value corresponding to the differential image matrix.
[0087] Continue to traverse row by row and column by column until all elements in the differential image matrix are processed. At this point, the value of the sum variable "total_sum" is the sum value corresponding to the current differential image matrix. This value represents the overall difference between the two filtered images at the current rotation angle.
[0088] Step 1033: Obtain the sum values corresponding to all differential image matrices, and take the rotation angle corresponding to the differential image matrix with the smallest sum value as the optimal alignment angle.
[0089] Repeat the above steps for the differential image matrix at different rotation angles to obtain the sum value corresponding to each differential image matrix. In this way, there is a set of sum values, each of which corresponds to a rotation angle. Compare the sizes of all the sum values. Find the smallest sum value among them. The differential image matrix corresponding to this value indicates that the difference between the two filtered images is the smallest at this rotation angle. The rotation angle corresponding to the differential image matrix with the smallest sum value is the optimal alignment angle. At this angle, the cores of the two multi-core optical fibers are best aligned and suitable for fusion splicing. In one embodiment, Fig.10 As shown in the figure, the horizontal axis is the rotation angle, the vertical axis is the sum value corresponding to each differential image matrix, the left is the first filtered image after rotation, and the right is the second filtered image. It can be seen that when the rotation angle is 166.5°, the sum value is the smallest, and the correspondence between the two images is the best at this time.
[0090] After obtaining the optimal alignment angle through the above steps, the optimal alignment angle is input into the fusion splicer, and the fusion splicer controls the first multi-core optical fiber to rotate to the optimal alignment angle to align the first multi-core optical fiber with the second multi-core optical fiber, and then performs the fusion splicing operation. Fig.11 and Fig.12 As shown in the figure, the alignment results of seven-core optical fiber and four-core optical fiber are respectively shown, and the final fusion splicing effect is better.
[0091] Through the above steps, the optimal alignment angle can be accurately determined to improve the quality and efficiency of multi-core optical fiber fusion splicing.
[0092] Embodiment 2: In Example 1, a multi-core optical fiber alignment method based on image difference is provided. In this example, a multi-core optical fiber alignment device based on image difference is proposed. The multi-core optical fiber alignment device based on image difference includes: a processor and a memory for storing processor executable instructions; wherein the processor is configured to execute the multi-core optical fiber alignment method based on image difference described in Example 1.
[0093] like Fig.13 As shown, the multi-core optical fiber alignment device based on image difference includes a processor 21 and a memory 22, wherein the processor 21 and the memory 22 can be connected via a bus or other means.
[0094] The processor 21 may be a central processing unit (CPU). The processor 21 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0095] The memory 22, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the multi-core optical fiber alignment method based on image difference in Embodiment 1 of the present invention. The processor executes various functional applications and training processes of the processor by running the non-transitory software programs, instructions and modules stored in the memory.
[0096] The memory 22 may include a program storage area and a training storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the training storage area may store training created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 22 may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The one or more modules are stored in the memory 22, and when executed by the processor 21, execution such as Figure 1 The multi-core optical fiber alignment method based on image difference in the embodiment 1 is shown. The specific details of the multi-core optical fiber alignment method based on image difference can be found in Figure 1 , Figure 2 and Figure 3 The corresponding descriptions and effects in the embodiments shown in the figure can be understood and will not be repeated here.
[0097] This embodiment further provides a computer storage medium, which stores a computer program. The computer program can be executed by a processor to complete the multi-core optical fiber alignment method based on image difference described in Embodiment 1.
[0098] The computer storage medium stores computer executable instructions, and the computer executable instructions can execute the multi-core optical fiber alignment method based on image difference in any of the above method embodiments. Wherein, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory. The specific steps of the multi-core optical fiber alignment method based on image difference refer to Example 1, which will not be repeated in this embodiment.
[0099] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A multi-core optical fiber alignment method based on image difference, characterized in that: include: Acquire a first end face image of the first multi-core optical fiber and a second end face image of the second multi-core optical fiber; filtering the first end surface image to obtain a first filtered image, and filtering the second end surface image to obtain a second filtered image; Rotating the first filtered image angle by angle, and performing difference operations on the rotated first filtered image and the second filtered image respectively to obtain a plurality of difference image matrices; Taking the absolute value of each element of the differential image matrix and summing them up to obtain the sum value corresponding to each differential image matrix, and taking the rotation angle corresponding to the minimum sum value as the optimal alignment angle; The first multi-core optical fiber is rotated to the optimal alignment angle to align the first multi-core optical fiber with the second multi-core optical fiber.
2. The multi-core optical fiber alignment method based on image difference according to claim 1, characterized in that: The obtaining of a first end face image of the first multi-core optical fiber and a second end face image of the second multi-core optical fiber comprises: Stripping the coating layers of the fusion ends of the first multi-core optical fiber and the second multi-core optical fiber, and neatly cutting the fusion end faces of the first multi-core optical fiber and the second multi-core optical fiber, respectively placing the first multi-core optical fiber and the second multi-core optical fiber into the clamps at both ends of the fusion splicer and fixing them; Adjusting the positions of the fusion-joined end faces of the first multi-core optical fiber and the second multi-core optical fiber, and obtaining a first intermediate image of the first multi-core optical fiber and a second intermediate image of the second multi-core optical fiber through end face imaging of a fusion-joining machine; Performing grayscale conversion on the first intermediate image to obtain a first grayscale image, and performing grayscale conversion on the second intermediate image to obtain a second grayscale image; The first grayscale image and the second grayscale image are adjusted to the same size to obtain the first end surface image and the second end surface image.
3. The multi-core optical fiber alignment method based on image difference according to claim 2, characterized in that: The step of adjusting the first grayscale image and the second grayscale image to the same size to obtain the first end surface image and the second end surface image comprises: Finding a circular edge of the first grayscale image, and obtaining a first center coordinate and a first optical fiber pixel size of the first multi-core optical fiber; Finding the circular edge of the second grayscale image, and obtaining the second center coordinates and the second optical fiber pixel size of the second multi-core optical fiber; A first square image with the first center coordinate at the center of the first end face image is cut out according to the first center coordinate and the first optical fiber pixel size; A second square image with the second center coordinate at the center of the second end face image is cut out according to the second center coordinate and the second optical fiber pixel size; The sizes of the first square image and the second square image are adjusted to be consistent, so as to obtain the first end surface image and the second end surface image.
4. The multi-core optical fiber alignment method based on image difference according to claim 1, characterized in that: The step of rotating the first filtered image angle by angle and performing difference operations on the rotated first filtered image and the second filtered image to obtain a plurality of difference image matrices includes: Initialize the angle counter and set the current angle as the starting value of the rotation range; For the first filtered image the coordinates are The pixels are rotated by Rotate by angle, the coordinates are The pixel coordinates after rotation for: Rotate each pixel point on the first filtered image angle by angle to obtain a rotated first filtered image; A blank two-dimensional matrix is created, and the difference between each pixel point on the rotated first filtered image and the corresponding pixel point on the second filtered image is calculated respectively, and the corresponding difference values are stored in the blank two-dimensional matrix to obtain the differential image matrix.
5. The multi-core optical fiber alignment method based on image difference according to claim 1, characterized in that: The step of taking the absolute value of each element of the differential image matrix and summing them to obtain the sum value corresponding to each differential image matrix, and taking the rotation angle corresponding to the minimum sum value as the optimal alignment angle comprises: Create a sum variable with an initial value of zero. Starting from the upper left corner of the difference image matrix, traverse each element in the matrix row by row and column by column. For the element currently traversed, first take the absolute value and then accumulate the absolute value into the sum variable. Until the entire differential image matrix is traversed, a sum variable is obtained, wherein the sum variable is the sum value corresponding to the differential image matrix; The sum values corresponding to all differential image matrices are obtained, and the rotation angle corresponding to the differential image matrix with the smallest sum value is taken as the optimal alignment angle.
6. The multi-core optical fiber alignment method based on image difference according to claim 1, characterized in that: The filtering process of the first end face image and the second end face image is the same, and filtering the first end face image to obtain the first filtered image includes: Performing logarithmic transformation and Fourier transformation on the first end surface image to obtain a second intermediate image; filtering the second intermediate image by a filter, and performing an inverse Fourier transform on the filtered second intermediate image to obtain a third intermediate image; Perform an exponential transformation on the third intermediate image to obtain the first filtered image.
7. The multi-core optical fiber alignment method based on image difference according to claim 6, characterized in that: The expression of the filter is: Where n is the order of the filter, is the cutoff frequency of the filter, is the high frequency gain, is the low frequency gain, is the square root function, i and j are the filter coefficients.
8. The multi-core optical fiber alignment method based on image difference according to claim 6, characterized in that: The inverse Fourier transform formula is: The exponential transformation formula is: Where F is the Fourier transform, is the second intermediate image after filtering, is the third intermediate image, is an exponential function.
9. A multi-core optical fiber alignment device based on image difference, characterized in that: The multi-core optical fiber alignment device based on image difference includes: a processor and a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the multi-core optical fiber alignment method based on image difference as described in any one of claims 1-8.
10. A non-volatile computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors to complete the multi-core optical fiber alignment method based on image difference as described in any one of claims 1-8.
Citation Information
Patent Citations
Fault slice image registration method based on target object pixel projection judgment
CN104268894A
Optical fiber polarization-maintaining fusion welding rotation angle alignment method based on end face image cross correlation
CN105891955A
End face image self-correlation based optical fiber polarization-maintaining fusion-welding rotation angle alignment method
CN106257317A