Optical fiber automatic leveling and aligning method based on image processing
Through the automatic leveling and alignment method of optical fiber based on image processing, combined with the synchronous control of the displacement stage and the rotary stage, the problems of manual leveling time and focus surface difference are solved, and the efficient automatic leveling and writing grating effect of optical fiber are improved.
Patent Information
- Application Number
- CN202510265987.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-06-27
AI Technical Summary
In the existing production methods of fiber gratings, manual leveling takes a long time and the focusing focal surface is relatively poor, resulting in the unsatisfactory grating effect.
The optical fiber automatic leveling and alignment method based on image processing is adopted, combined with the synchronization control strategy between the displacement stage and the rotary stage, the position information of the optical fiber is calculated through the image algorithm, and the pitch angle and deflection angle of the optical fiber are automatically adjusted to realize fully automatic leveling and alignment of the optical fiber in the engraving field of view.
It realizes efficient automatic leveling of optical fibers, greatly improving the reliability and efficiency of the alignment process, ensuring the improvement of the effect of the engraving grating and the sensing range.
Smart Images

Figure CN120215012A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of laser scribing fiber processing, and particularly relates to an automatic fiber leveling and alignment method based on image processing. Background Art
[0002] As one of the rapidly developing technologies in the world today, sensing technology has become an important symbol to measure the development level of a country's science and technology. Fiber optic sensing has been greatly developed due to its properties such as high temperature resistance, corrosion resistance, and resistance to electromagnetic and atomic radiation interference. At present, the fabrication methods of fiber Bragg gratings include ultraviolet light mask plate scribing and femtosecond laser scribing. Because the ultraviolet scribing method uses a fixed mask plate for scribing, the grating frequency is not flexible, and the ultraviolet light energy is weak, resulting in poor grating scribing effect and low sensing range. The femtosecond laser scribing method has greater advantages. The femtosecond laser directly focuses the scribing laser on the core of a single-mode fiber, and can scribe gratings without damaging the coating layer and cladding of the fiber surface. Moreover, the femtosecond laser has strong energy, making the scribed grating have a good effect and a large sensing range. However, before scribing, the fiber to be scribed needs to be placed on the device for leveling. At present, the leveling method is mostly manual control, which takes a long time and uses experience as the evaluation criterion, and the focusing focal plane is relatively poor, and the scribed grating effect is not as expected. Summary of the Invention
[0003] In view of the above problems, the present invention proposes an automatic fiber leveling and alignment method based on image processing, which combines image processing technology with the synchronous control strategy of a displacement stage and a rotary stage to achieve a fully automated and high-efficiency leveling and alignment process of the fiber in the scribing field of view.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] An automatic fiber leveling and alignment method based on image processing, comprising the following steps:
[0006] Step 1: Place the fiber in a fixing device for fixing and enter the camera field of view, turn on the laser, and record the spot coordinates;
[0007] Step 2: Control the movement of the displacement stage to capture the image information of the fiber at different positions presented on the camera and save it;
[0008] Step 3: Control the Z-axis movement of the displacement stage, obtain the change of the fiber imaging on the camera, calculate the focal plane position, and call the image algorithm to calculate the position information of the fiber;
[0009] Step 4: Calculate the pitch angle and yaw angle according to the obtained coordinate positions, and control the movement of the rotary stage to make the fiber balanced horizontally and aligned with the focal plane.
[0010] Control the movement of the rotary stage by controlling the information of the camera imaging at different positions when the displacement stage moves, and perform coordinated control through the image algorithm, so that the optical fiber completes the leveling work under the automatic scheduling of the control logic. All the parameters required for control are calculated by the algorithm, and the reliability is stronger.
[0011] Preferably, the specific method of step 1 is:
[0012] Place the optical fiber into the fixing device and fix the optical fiber. Move the Y-axis and Z-axis of the displacement stage to make the optical fiber image at the center of the camera. Turn on the laser switch button, locate the fixed position of the laser spot in the camera field of view, and record the position coordinates (X L , Y L ) of the spot.
[0013] The position coordinates (X L , Y L ) of the spot are used for positioning, and the starting position is recorded.
[0014] Preferably, the specific method of step 2 is:
[0015] Step 2: Control the Z-axis of the displacement stage to move in the interval (Z C1 , Z C2 ) at a unit distance S, and save the photo in the current camera field of view after each movement ends.
[0016] The camera records the optical fiber at different Z-axis positions by moving the displacement stage along the Z-axis.
[0017] Preferably, the specific method of step 3 is:
[0018] Step 3.1: Calculate the index corresponding to each picture by using the focal plane recognition algorithm for the images saved in step 2, obtain the image order I C1 corresponding to the best index, and obtain the best focal plane imaging position coordinate information Z1 = Z C1 + I C1 × S, and move the displacement stage to the Z1 position;
[0019] Step 3.2: Save the image in the camera field of view at the focal plane position, call the core recognition algorithm, and obtain the position coordinates (X1, Y1) of the core;
[0020] Step 3.3: Control the X-axis of the displacement stage to move L microns to the next field of view, repeat step 2, step 3.1 and step 3.2, obtain the image order I C2 corresponding to the best index, and calculate the best focal plane imaging position coordinate information Z2 = Z C1 + I C2 × S and the position coordinates (X2, Y2) of the core.
[0021] The optimal focal plane imaging position when the displacement stage moves along the Z-axis is obtained through the focal plane recognition algorithm, that is, the clearest optical fiber image is obtained, and its image sequence I is recorded. C1 According to the unit distance S of the displacement stage moving along the Z-axis, the position coordinate Z1 of the optical fiber when the clearest optical fiber image is obtained is calculated, and the position coordinates (X1, Y1) of the fiber core at this time are obtained according to the fiber core recognition algorithm.
[0022] Move the displacement stage along the X-axis to the next field of view, repeat step 2, and use the same method to calculate the optimal focal plane imaging position coordinate Z2 and the position coordinates (X2, Y2) of the fiber core in this field of view.
[0023] Preferably, the specific method of step 4 is as follows:
[0024] Step 4.1: Control the displacement stage to move -L microns along the X-axis to the original field of view, and calculate the pitch angle and tilt angle of the current optical fiber, where P is the actual length corresponding to the size of 1 pixel, and control the rotary stage to adjust the pitch angle θ1 and tilt angle θ2 of the optical fiber;
[0025] Step 4.2: Repeat step 2, step 3.1 and step 3.2 to obtain the image sequence I corresponding to the optimal index C3 , calculate the optimal focal plane imaging position coordinate information Z3 = Z C1 +I C3 ×S and the position coordinates (X3, Y3) of the fiber core, calculate the distance X3 - X between the fiber core position and the laser spot position L , control the displacement stage to move along the Y-axis, and move the fiber core to the laser spot position for scribing preparation.
[0026] According to the optimal focal plane imaging position coordinates of the fiber core in two different fields of view, calculate the pitch angle θ1 and tilt angle θ2 of the rotary stage. After rotating the rotary stage according to the pitch angle and tilt angle, use the same method to align the camera with the optical fiber for the third time, and move the optical fiber core to the starting position, that is, the position of the spot (X L , Y L ), to complete the leveling and alignment of the optical fiber.
[0027] Preferably, in step 3, the calculation method of the focal plane recognition algorithm is as follows:
[0028] 3.1.1 Input the image Img[R, G, B], where R, G, and B are the pixel information of the red, green, and blue channels of the image respectively;
[0029] 3.1.2 Convert the image from three channels to a single channel value GRAY = B×0.114 + G×0.387 + R×0.299;
[0030] 3.1.3 Calculate the gradient change in the x - direction of the image using the cross - differential algorithm, and detect the change of information features of the image through local difference calculation:
[0031] 3.1.4 Calculate the texture feature information of the image through convolution, Feature = {F1, F2, … F n};
[0032] 3.1.5 Use the L2 norm to normalize the data result of the convolution in 3.1.4;
[0033] 3.1.6 Take the average value of Feature as the evaluation parameter for image alignment;
[0034] 3.1.7 Take the image index I of the lowest value among all evaluation parameters C1 ;
[0035] 3.1.8 Calculate the obtained index with the initial moving position to get the focal plane position Z1 = Z C1 +I C1 *S.
[0036] Convert the RGB picture into a grayscale picture, perform edge detection through the gradient change of the image in the x - direction, obtain the texture feature information of the image through convolution, normalize the texture feature information with the L2 norm and calculate its average value as the evaluation parameter, select the image with the lowest evaluation parameter as the best focal plane imaging picture, and record its image index I C1 .
[0037] Preferably, in step 3, the specific theory of the fiber core recognition algorithm is as follows:
[0038] 3.2.1 Input the image Img[R, G, B], where R, G, and B are the pixel information of the red, green, and blue channels of the image respectively;
[0039] 3.2.2 Convert the image from three channels to a single - channel image GRAY = B×0.114 + G×0.387 + R×0.299;
[0040] 3.2.3 Filter and denoise the image through Gaussian blur, enhance the texture details of the image through sharpening calculation, extract the edge contour data information of the image, smooth the image boundary, and invert the image by pixel value;
[0041] 3.2.4 Find all contour regions of the image, judge according to the area of the contour regions, and fill the contour regions when the area is less than the fixed value θ;
[0042] 3.2.5 The unfilled contour area obtains the vertex coordinates (x i , y i ) of the minimum circumscribed rectangle of this area through calculation;
[0043] 3.2.6 Calculate the center points of the rectangle vertex coordinates, and calculate the Euclidean distance d between the center points. When d is less than the preset standard α, return this group of center points as the result;
[0044] 3.2.7 Take the average value of this group of center point coordinates to obtain the coordinates of the optical fiber core.
[0045] Convert the RGB image into a grayscale image, use Gaussian blur to remove the influence of noise, use the Laplace operator to sharpen the edge of the optical fiber, extract the significant edges in the image through Canny edge detection, smooth the edges to make its contour more complete, invert the image by pixel value to make the originally dark area brighter, which is convenient for subsequent contour detection, find all the contours on the image, calculate the center points of all the contours, and take the average value of this group of center point coordinates to obtain the coordinates of the optical fiber core. The fixed value θ and the standard α are determined according to the actual situation.
[0046] Due to the above technical solutions, the present invention has the following beneficial effects:
[0047] 1. It integrates image processing technology and can capture and calculate the position information of the optical fiber in the current field of view of the camera in real time.
[0048] 2. It combines the synchronous control strategy of the displacement stage and the rotation stage, and coordinates the control through image algorithms, enabling the optical fiber to complete the leveling work under the automatic scheduling of the control logic. All the required control parameters are calculated through algorithms, and the reliability is stronger.
[0049] 3. It uses the image as the input, maximizing the retention of the comprehensive feature information of the current optical fiber.
[0050] 3. Through image algorithms, the present invention can efficiently extract the key feature information of the optical fiber, calculate the pitch angle, yaw angle and focal plane position of the optical fiber, control the rotation stage to adjust the angle, and control the displacement stage to move the focal plane position, realizing the automation of the leveling and alignment process.
[0051] 5. The input command information is more reliable and accurate, thus effectively solving the problems of long time consumption, low efficiency, unstable and unsatisfactory results in the traditional manual leveling and alignment process. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The present invention will be further described below with reference to the accompanying drawings.
[0053] Figure 1 is the imaging result 1 of the initial position of the optical fiber in Embodiment 1 of the present invention;
[0054] Figure 2 It is the imaging result 2 of the initial position of the optical fiber in Embodiment 1 of the present invention.
[0055] Figure 3 It is the optical fiber after leveling in Embodiment 1 of the present invention.
[0056] Figure 4 It is the actual grating writing effect in Embodiment 1 of the present invention.
[0057] Figure 5 It is the grating writing spectrum result in Embodiment 1 of the present invention. Detailed implementation manners
[0058] Embodiment 1
[0059] An automatic leveling and alignment method for optical fibers based on image processing includes the following steps:
[0060] Step 1: Place the optical fiber on the fixing device and fix the optical fiber. The imaging effects at different positions of the displacement stage are as shown in Figure 1 and Figure 2 . Among them, the problem of unclear imaging is due to the uncompensated pitch angle, and the different positions of the optical fiber are due to the uncompensated tilt angle. Move the Y-axis and Z-axis of the displacement stage to make the optical fiber image at the center of the camera. Turn on the laser switch button, locate the fixed position of the laser spot in the camera field of view, and record the position coordinates (X L , Y L ) of the spot in the camera. X L = 3021, Y L = 1996.
[0061] Step 2: Control the Z-axis of the displacement stage in the interval (Z C1 , Z C2 ), Z C1 = 3500um, Z C2 = 4000um, move it at a unit distance S = 10um, and save the photo in the current camera field of view at the end of each movement.
[0062] Step 3: Control the Z-axis of the displacement stage to move, obtain the change of the optical fiber imaging on the camera to calculate the focal plane position, and call the image algorithm to calculate the position information of the optical fiber. The specific steps are as follows:
[0063] 3.1: Calculate the index corresponding to each picture through the focal plane recognition algorithm for the above saved images, and obtain the image order I C1 = 42 of the best index, and obtain the best focal plane imaging position coordinate information Z1 = Z C1 + I C1×S = 3500 + 42×10 = 3920um. Move the displacement stage to position Z1. The calculation method for the optimal focal plane imaging position Z1 is as follows:
[0064] The calculation method for the coordinate information Z1 of the optimal focal plane imaging position is as follows:
[0065] 3.1.1 Input the image Img[R, G, B], where R, G, and B are the pixel information of the red, green, and blue channels of the image respectively.
[0066] 3.1.2 Convert the image from three channels to a single-channel value: GRAY = B×0.114 + G×0.387 + R×0.299.
[0067] 3.1.3 Use the cross-differential algorithm to calculate the gradient change of the image in the x direction, and detect the information feature change of the image through local difference calculation:
[0068] 3.1.4 Calculate the texture feature information of the image through convolution: Feature = {F1, F2, … F n}
[0069] 3.1.5 Use the L2 norm for the convolution result in 3.1.4 to normalize the data result.
[0070] 3.1.7 Take the average value of Feature as the evaluation parameter for image alignment.
[0071] 3.1.7 Take the image index I with the lowest value among all evaluation parameters C1 .
[0072] 3.1.8 Calculate the obtained index with the initial moving position to get the focal plane position Z1 = Z C1 + I C1 * S.
[0073] 3.2: Save the image within the camera's field of view at the focal plane position, call the core recognition algorithm, and obtain the position coordinates (X1, Y1) of the core image. X1 = 2883, Y1 = 1772. As Figure 3 shown, the core position is indicated by the arrow.
[0074] Among them, the specific theory of the core recognition algorithm is as follows:
[0075] 3.2.1 Input the image Img[R, G, B], where R, G, and B are the pixel information of the red, green, and blue channels of the image respectively.
[0076] 3.2.2 Convert the image from three channels to a single-channel image: GRAY = B×0.114 + G×0.387 + R×0.299.
[0077] 3.2.3 Use the Gaussian kernel function to filter and denoise the image.
[0078] 3.2.4 Use the Laplace operator to sharpen and enhance the image.
[0079] 3.2.5 Extract the edge contour data information of the image through the Canny edge detection algorithm.
[0080] 3.2.6 Fill the small black holes or black areas in the image through morphological closing operation to smooth the boundary.
[0081] 3.2.7 Invert the image by pixel value.
[0082] 3.2.8 Find all contour regions of the image, judge according to the area of the contour region, and fill the contour region when the area is less than the fixed value θ.
[0083] 3.2.9 For the unfilled contour region, obtain the vertex coordinates (x i , y i ) of the minimum bounding rectangle of this region through calculation.
[0084] 3.2.10 Calculate the center point of the rectangle vertex coordinates, and calculate the Euclidean distance d between the center points. When d is less than the preset standard α, return this group of center points as the result.
[0085] 3.2.11 Take the average value of this group of center point coordinates to obtain the coordinates of the fiber core.
[0086] 3.3: Control the X-axis of the displacement stage to move L = 3000 um to the next field of view, repeat steps 3.1 and 3.2, and obtain the image order I C2 = 26, calculate the best focal plane imaging position coordinate information Z2 = Z C1 + I C2 × S = 3500 + 10 × 26 = 3760 um and the image position coordinates (X2, Y2) of the fiber core, X2 = 3948, Y2 = 1772.
[0087] Step 4: Calculate the pitch angle and yaw angle according to the obtained coordinate positions, and control the rotation stage to move so that the optical fiber is balanced horizontally and aligned with the focal plane. The specific method is as follows:
[0088] 4.1: Control the X-axis of the displacement stage to move -L = -3000 um to the original field of view, and calculate the pitch angle and tilt angle , where 0.037 is the actual length corresponding to the size of 1 pixel, with the unit of um. Control the rotary table to adjust the pitch angle θ1 and tilt angle θ2 of the optical fiber.
[0089] 4.2: Obtain the current focal plane of 3840 um in the order of coarse focusing. The focusing range becomes the upper and lower intervals of 30 um around the current focal plane, that is, 3810 um - 3870 um, with a step of 1 um. Repeat Step 2, Step 3.1, and Step 3.2 to obtain the image order I corresponding to the best index C3 = 25, and calculate the coordinate information Z3 of the best focal plane imaging position as Z3 = Z C1 + I C3 × S = 3810 + 25 × 1 = 3835 um. Move the displacement stage to the Z3 position. The effect of the optical fiber after leveling is as Figure 3 shown. The image position coordinates (X3, Y3) of the fiber core are X3 = 2853 and Y3 = 1776. Calculate the distance between the fiber core position and the laser spot position X3 - X L = (2853 - 3021) × 0.037 = -6.216 um. Control the Y-axis movement of the displacement stage to move the fiber core to the laser spot position for writing. The actual effect of writing the grating is as Figure 4 shown, and the grating spectrum result is as Figure 5 shown.
[0090] The above are only specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent substitutions, or modifications made based on the present invention to solve substantially the same technical problems and achieve substantially the same technical effects are all covered by the protection scope of the present invention.
Claims
1. An automatic optical fiber leveling and alignment method based on image processing, characterized in that: The steps include: Step 1: Place the optical fiber into the fixture and fix it in the camera field of view, turn on the laser, Record the light spot coordinates; Step 2: Control the movement of the translation stage to capture and save the image information of the optical fiber at different positions on the camera; Step 3: Control the Z-axis movement of the translation stage, obtain the change of the optical fiber imaging on the camera to calculate the focal plane position, and call the image algorithm to calculate the position information of the optical fiber; Step 4: Calculate the pitch angle and the deflection angle based on the obtained coordinate position, and control the movement of the rotating stage so that the optical fiber is horizontally balanced and aligned with the focal plane.
2. According to claim 1, a method for automatic optical fiber leveling and alignment based on image processing, characterized in that: The specific method of step 1 is as follows: place the optical fiber on the fixture and fix it, move the Y-axis and Z-axis of the translation stage to make the optical fiber image in the center of the camera, turn on the laser light switch, locate the fixed position of the laser spot in the camera field of view, and record the position coordinates of the spot (X L ,Y L ).
3. The method for automatic optical fiber leveling and alignment based on image processing according to claim 2, characterized in that: The specific method of step 2 is: control the Z axis of the translation stage in the interval (Z C1 ,Z C2 ) moves by unit distance S, and saves the photos in the current camera field of view at the end of each movement.
4. According to claim 2, the method for automatic optical fiber leveling and alignment based on image processing is characterized in that: The specific method of step 3 is: 3.1: Use the focal plane recognition algorithm to calculate the image saved in step 2 to obtain the index corresponding to each image, and obtain the image order corresponding to the best index I C1 , get the best focal plane imaging position coordinate information Z1 = Z C1 +I C1 ×S, move the stage to the Z1 position; 3.2: Save the image in the camera field of view at the focal plane position, call the fiber core recognition algorithm, and obtain the position coordinates of the fiber core (X1, Y1); 3.3: Control the X-axis of the translation stage to move L micrometers to the next field of view, repeat steps 3.1 and 3.2, and obtain the image order I corresponding to the best index C2 , calculate the best focal plane imaging position coordinate information Z2 = Z C1 +I C2 ×S and the position coordinates of the fiber core (X2, Y2).
5. The method for automatic optical fiber leveling and alignment based on image processing according to claim 4, characterized in that: The specific method of step 4 is: 4.1: Control the X-axis of the translation stage to move -L micrometers to the original field of view and calculate the current pitch angle of the optical fiber and tilt angle Where P is the actual length corresponding to the size of one pixel, and the rotating stage is controlled to adjust the pitch angle θ1 and the tilt angle θ2 of the optical fiber; 4.2: Repeat steps 3.1 and 3.2 to obtain the image order I corresponding to the best index C3 , calculate the best focal plane imaging position coordinate information Z3 = Z C1 +I C3 ×S and the position coordinates of the fiber core (X3, Y3), calculate the distance X3-X between the fiber core position and the laser spot position L , control the Y-axis movement of the translation stage and move the fiber core to the position of the laser spot to prepare for writing.
6. The optical fiber automatic leveling and alignment method based on image processing according to claim 4, characterized in that: In step 3, the focal plane identification algorithm is calculated as follows: 3.1.1 Input image Img[R,G,B], where R, G, and B are the pixel information of the red, green, and blue channels of the image respectively; 3.1.2 Convert the image from three channels to a single channel value GRAY = B × 0.114 + G × 0.387 + R × 0.299; 3.1.3 Use the cross differential algorithm to calculate the gradient change in the X direction of the image, and detect the information feature change of the image through local difference calculation: 3.1.4 The texture feature information of the image is calculated by convolution method Feature = {F1, F2, ... F n }; 3.1.5 Use L2 norm for the convolution result in 3.1.4 Normalize data results; 3.1.6 Take the feature average as the evaluation parameter for image alignment; 3.1.7 Image index I with the lowest value for all evaluation parameters C1 ; 3.1.8 Calculate the acquired index and the initial moving position to obtain the focal plane position Z1 = Z C1 + I C1 / S。 7. The method for automatic optical fiber leveling and alignment based on image processing according to claim 4, characterized in that: In step 3, the specific theory of the core identification algorithm is as follows: 3.2.1 Input image Img[R,G,B], where R, G, and B are the pixel information of the red, green, and blue channels of the image respectively; 3.2.2 Convert the image from three channels to a single channel image GRAY = B × 0.114 + G × 0.387+R×0.299; 3.2.3 Filter and reduce noise of the image by Gaussian blur, enhance the texture details of the image by sharpening calculation, extract the edge contour data information of the image, smooth the image boundary, and invert the image according to the pixel value; 3.2.4 Find all contour areas of the image, make judgments based on the area of the contour area, and fill the contour area when the area is less than a fixed value θ; 3.2.5 The unfilled contour area is obtained by calculating the vertex coordinates (x i ,y i ); 3.2.6 Calculate the center point of the rectangle vertex coordinates and calculate the Euclidean distance d between each center point. When d is less than the preset standard α, return the group of center points as the result; 3.2.7 Take the average of the coordinates of the center points of this group to obtain the coordinates of the optical fiber core.
Citation Information
Patent Citations
Automatic positioning and placing apparatus and method for fiber
CN105759390A
Optical fiber end face detection method and system
CN109612689A
High-power laser automatic coupling device and coupling method
CN112269229A
Femtosecond laser inscribing fiber grating device and inscribing method
CN116840965A
Alignment processing method and device for realizing on-chip integrated waveguide laser focusing processing
CN117921168A
Cited By
Optical fiber inclination angle calculation method based on image algorithm
CN121163472A