Flatness correction method based on objective table

Through the image processing technology of global camera and line laser, the center line of the laser stripes is extracted and the light plane is calibrated, which solves the problem of insufficient flatness of the microscope carrier platform, and improves scanning speed and focus clarity.

CN119437095AInactive Publication Date: 2025-02-14NANJING MUMUSILI TECH CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411491941.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the flatness of the measuring microscope stage, resulting in slow sample scanning and failure to judge the focus clarity.

Method used

The global camera and line laser are used for image processing, and the laser stripe center line is extracted through a single-objective determination and secondary extraction algorithm, and the linear laser is combined with calibration plate to obtain the light plane equation to achieve the plane degree correction of the stage.

Benefits of technology

The planarity correction of the measurement microscope stage through image processing technology eliminates the inherent error of the device, improves the sample scanning splicing speed and focus clarity, and reduces the focus time and total scanning time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119437095A_ABST
    Figure CN119437095A_ABST
Patent Text Reader

Abstract

The invention discloses an objective table-based flatness correction method, which comprises the following steps of: installing a global camera for observing an objective table on a measuring microscope, placing a calibration plate on the objective table of the measuring microscope, and performing single-target calibration through the global camera to obtain a transformation relation between a world coordinate system S where the measuring microscope is located and a camera image coordinate system; starting line laser, projecting the line laser on the calibration plate, collecting a plurality of calibration plate images with laser, and extracting a laser stripe center line based on a secondary extraction algorithm; the line laser is projected on the calibration plate to form a light plane, calibration is carried out through the line laser and the calibration plate, the transformation relation between the calibration plate image plane and the light plane in a camera image coordinate system is obtained, the transformation relation between a world coordinate system S and the light plane is further obtained, and a light plane equation is obtained; and height information is obtained by combining a Z axis of the measuring microscope, so that flatness correction of the objective table is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of precision instrument calibration, and in particular to a flatness correction method based on an object stage. Background Art

[0002] Measuring microscope is a common tool for observing and measuring microscopic objects and is widely used in industrial production and scientific research.

[0003] The measuring microscope includes a stage, a global camera, a line structured light, a microscope camera, an optical objective lens, and a support base. The measuring microscope refers to a lower computer driver that controls the stage to move forward, backward, left, right, and right along the X-axis and Y-axis and up and down along the Z-axis, triggering the microscope camera to shoot sample information, and displaying and saving the sample information in the upper computer software, and measuring and observing the sample.

[0004] Usually, the samples for microscopic observation are placed on the stage, and the samples are observed and measured through bottom transmission, ring light source, and coaxial illumination. If the tolerance of the sample plane is within the focal plane depth of field of the lens, a clear sample image can be taken. At this time, by recording the Z-axis height of the stage, the sample can be quickly scanned in combination with the XY axis.

[0005] How to speed up the scanning and stitching of samples by measuring microscopes and reduce the failure of focus clarity judgment. The traditional method is to improve the flatness of the stage by improving the precision of mechanical processing. However, due to the current mechanical processing precision, there is little room for improvement in the flatness of the stage. At present, precision machine tools can ensure that the flatness of the stage is controlled at 1um. If the flatness is required to be improved, the cost of mechanical processing will be very high and the processing difficulty will be very high. For this reason, we propose a flatness correction method based on the stage. Summary of the invention

[0006] Technical purpose: In view of the defects in the prior art, the present invention discloses a flatness correction method based on a stage.

[0007] Technical solution: In order to achieve the above technical objectives, the present invention adopts the following technical solution.

[0008] A flatness correction method based on a stage, the method comprising:

[0009] A global camera for observing the stage is installed on the measuring microscope, and a calibration plate is placed on the stage of the measuring microscope. The global camera captures the image of the calibration plate. Through single-target calibration of the global camera, the transformation relationship between the calibration plate plane in the world coordinate system S where the measuring microscope is located and the calibration plate image plane in the camera image coordinate system is obtained;

[0010] Turn on the line laser, which is projected onto the calibration plate, so that the global camera can be used to collect the image of the calibration plate with the laser. Transform the position of the calibration plate on the calibration plate plane in the world coordinate system S, collect several images of the calibration plate with the laser, and extract the center line of the laser stripe for each calibration plate image with the laser in the camera image coordinate system based on the secondary extraction algorithm.

[0011] Line laser is projected onto the calibration plate to form a light plane. The line laser and the calibration plate are calibrated to obtain the transformation relationship between the calibration plate image plane and the light plane in the camera image coordinate system. Combined with the transformation relationship between the calibration plate plane in the world coordinate system S and the calibration plate image plane in the camera image coordinate system obtained in STEP1, the transformation relationship between the calibration plate plane in the world coordinate system S and the light plane is obtained, and the light plane equation is obtained. Combined with the Z axis of the measuring microscope, the height information is obtained to realize the flatness correction of the stage.

[0012] Furthermore, the extraction process of the laser stripe centerline based on the secondary extraction algorithm includes: in the calibration plate image with laser, the laser stripe skeleton is first roughly extracted by the skeleton refinement algorithm, and then the edge and gradient direction of the laser stripe skeleton are calculated by the Sobel operator, and the edge sub-pixel coordinates are obtained along its gradient direction by the Lagrange polynomial interpolation method, and finally the sub-pixel center of the laser stripe is obtained secondary by the grayscale centroid method, and the sub-pixel centers of the laser stripes are connected to form the laser stripe centerline.

[0013] Furthermore, the skeleton refinement algorithm roughly extracts the laser stripe skeleton, including: binarizing the calibration plate image with laser to obtain a binary laser image; scanning the binary laser image row by row and column by column, defining the pixel points with a pixel value of 255 in the binary laser image as target points, and the pixel points with a pixel value of 0 as background points. If there is at least one background point in the 8-neighborhood of the target point, the target point is called a boundary point. When the boundary point satisfies the skeleton condition formula, the boundary point is judged to be a skeleton point, and all skeleton points constitute the laser stripe skeleton.

[0014] Furthermore, the skeleton condition formula includes:

[0015] Step 1: Set any target point as point P0. When it is a boundary point, judge point P0 formula (1) to formula (4) in sequence:

[0016] 2≤M(P0)≤6(1)

[0017] S(P0)=l(2)

[0018] Pixel(P1)×Pixel(P3)×Pixe1(P5)=0(3)

[0019] Pixel(P3)×Pixe1(P5)×Pixel(P7)=0(4)

[0020] Where: M(P0) represents the number of target points in the 8-neighborhood of point P0; S(P0) represents the number of times the value of the pixel points from P1 to P8 in the 8-neighborhood of point P0 jumps from 0 to 1; Pixel() represents the pixel value of the extracted point;

[0021] Step 2: To ensure that there are connected target points in the 8-neighborhood of the target point P0, and that the conditions for forming a skeleton are still met after deletion, it is necessary to first determine whether the conditions of formula (1) and formula (2) are met, and then determine whether the conditions of formula (5) and formula (6) are met:

[0022] Pixel(P 1)×Pixel(P5)×Pixel(P7)=0(5)

[0023] Pixel(P 1)×Pixel(P3)×Pixel(P7)=0(6)

[0024] Among them, P1~P8 represent the eight neighboring pixels of the target point P0.

[0025] Furthermore, the line laser and the calibration plate calibration include: the line laser is projected onto the calibration plate, and there is an angle between the line laser and the straight line connecting the calibration points on the calibration plate. In the camera image coordinate system, the coordinates of the intersections with the straight line are respectively obtained according to the center lines of several laser stripes extracted in STEP2, so as to obtain the transformation relationship between the image plane of the calibration plate and the light plane in the camera image coordinate system.

[0026] Furthermore, n*m calibration points are drawn on the calibration plate, and the values ​​of n and m are both integers greater than 1.

[0027] Beneficial effects: The present invention corrects the flatness of the measuring microscope stage by image processing, eliminating the problems of unclear pictures, inability to find the focal plane, long focusing time, and long total scanning time caused by inherent errors of the equipment (process, assembly, etc.). BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a flow chart of the method of the present invention;

[0029] Figure 2 It is a schematic diagram of the system structure of the present invention;

[0030] Figure 3 It is a schematic diagram of the laser image of the present invention;

[0031] Figure 4 Schematic diagram of the relationship between the world coordinate system S, the camera image coordinate system and the light plane;

[0032] Figure 5 It is a schematic diagram of the calibration plate of the present invention;

[0033] Figure 6 Schematic diagram of eight neighborhood pixels of the present invention. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] Example:

[0036] As attached Figure 1 As shown, a flatness correction method based on a stage in this embodiment includes:

[0037] STEP1. Install a global camera for observing the stage on the measuring microscope, and place a calibration plate on the stage of the measuring microscope. The global camera captures the image of the calibration plate. Through single-target calibration of the global camera, obtain the transformation relationship between the calibration plate plane in the world coordinate system S of the measuring microscope and the calibration plate image plane in the camera image coordinate system.

[0038] As attached Figure 2 As shown, the calibration plate is placed on the stage so that the calibration plate image is located at the center of the global camera image. The global camera is used to collect a calibration plate image, and the calibration plate image is used for single-target calibration of the global camera. There are n*m ​​calibration points drawn on the calibration plate, and the values ​​of n and m are both integers greater than 1; in this embodiment, the calibration plate is drawn with 7*7 circular calibration points, as shown in the attached figure. Figure 5 As shown;

[0039] The calibration plate plane is the plane formed by the X-axis and Y-axis where the stage is located, and is also the scanning plane of the measuring microscope;

[0040] The process of global camera single target positioning includes:

[0041] STEP1.1. After placing the calibration plate on the stage and below the global camera, ensure that the calibration plate is parallel to the global camera and the objective lens, take an image of the calibration plate, and obtain the center coordinates of the calibration points in the calibration plate image. The calculation formula is as follows:

[0042] make

[0043] Where θ represents the rotation angle α and β close to 0°, given by:

[0044]

[0045] in,

[0046] Since the calibration plate is placed parallel to the microscope, we get:

[0047]

[0048] Where R is the rotation matrix, d x is the pixel height, d y is the pixel width, γ is the rotation amount, that is, the deviation of the pixel point in the coordinate direction of the calibration point, and f is the focal length;

[0049] STEP1.2. Calculate the translation amount and the pixel coordinates of the origin of the calibration plate image plane in the camera image coordinate system according to the center coordinates of the calibration point in the calibration plate image, and substitute the pixel coordinates of the origin to obtain the rotation matrix.

[0050] The calculation formula of the translation amount includes:

[0051]

[0052] Where T is the translation matrix, t x ,t y is the translation amount; t z is the translation in the z direction (in the direction of the camera optical axis), x w ,y w 、z w is the real coordinate of the calibration point, that is, the coordinate in the world coordinate system S, x c ,y c 、z c is the coordinate of a point on the calibration plate in the camera image coordinate system, which is the center coordinate of the calibration point in the present invention;

[0053] when When , the camera coordinate system is transformed into the camera image coordinate system:

[0054]

[0055] Among them, f represents the focal length of the camera; converted into homogeneous coordinates:

[0056]

[0057] The calculation formula for microscope lens distortion correction is as follows:

[0058]

[0059] Among them, k1 and k2 are the first two distortion parameters of radial distortion, x d ,y d is the distorted imaging coordinate, rd is the distance from the image pixel to the center of the image; the relationship between the imaging surface coordinates and the pixel coordinates is expressed as follows:

[0060]

[0061] Among them, d x ,d y is the pixel size, C x , C y is the pixel coordinate of the origin of the imaging coordinate system, x p ,y p is the pixel coordinate; in pixels, the focal length f is expressed as:

[0062]

[0063] Among them, f x is the horizontal equivalent focal length, f y is the vertical equivalent focal length;

[0064] From this we can get:

[0065]

[0066] make Substituting into the calculation, we get:

[0067]

[0068] in, is the process quantity matrix, when the process quantity matrix After finding, the rotation γ and translation t x ,t y The calculation formula is as follows:

[0069]

[0070] STEP2, turn on the line laser, project the line laser on the calibration plate, and use the global camera to collect the calibration plate image with laser; transform the calibration plate on the calibration plate plane in the world coordinate system S, collect several calibration plate images with laser, and extract the center line of the laser stripe for each calibration plate image with laser in the camera image coordinate system based on the secondary extraction algorithm;

[0071] The extraction process of the laser stripe center line based on the secondary extraction algorithm includes: in the calibration plate image with laser, the laser stripe skeleton is first roughly extracted by the skeleton refinement algorithm, and then the edge and gradient direction of the laser stripe skeleton are calculated by the Sobel operator, and the edge sub-pixel coordinates are obtained along the gradient direction by the Lagrange polynomial interpolation method, and finally the sub-pixel center of the laser stripe is obtained by the grayscale centroid method. The sub-pixel centers of the laser stripes are connected to form the center line of the laser stripe. The laser image extracted by the present invention is shown in the attached figure. Figure 3 The specific steps are as follows:

[0072] 1) The skeleton refinement algorithm roughly extracts the laser stripe skeleton;

[0073] The image of the calibration plate with laser is binarized to obtain a binary laser image; the binary laser image is scanned row by row and column by column, and the pixel points with a pixel value of 255 in the binary laser image are defined as target points, and the pixel points with a pixel value of 0 are defined as background points. If there is at least one background point in the 8-neighborhood of the target point, the target point is called a boundary point. If the boundary point satisfies the skeleton condition formula, it is judged to be a skeleton point, and all skeleton points constitute the laser stripe skeleton. The skeleton condition formula includes:

[0074] Step 1: Set any target point as point P0. When it is a boundary point, determine whether point P0 meets the following conditions:

[0075] 2≤M(P0)≤6(1)

[0076] S(P0)=1(2)

[0077] Pixel(P1)×Pixe1(P3)×Pixel(P5)=0(3)

[0078] Pixel(P3)×Pixel(P5)×Pixel(P7)=0(4)

[0079] Where: M(P0) represents the number of target points in the 8-neighborhood of point P0; S(P0) represents the number of times the value of the pixel points from P1 to P8 in the 8-neighborhood of point P0 jumps from 0 to 1, and Pixel() represents the pixel value of the extracted point. P1~P8 represent the 8-neighborhood pixel points of the target point P0, as shown in the attached figure. Figure 6 shown.

[0080] Step 2: To ensure that there are connected target points in the 8-neighborhood of the target point P0, and that the conditions for forming a skeleton are still met after deletion, it is necessary to first determine whether the conditions of equations (1) and (2) are met, and then determine whether the following conditions are met:

[0081] Pixel(P 1)×Pixel(P5)×Pixel(P7)=0(5)

[0082] Pixel(P 1)×Pixel(P3)×Pixel(P7)=0(6)

[0083] In the two refinement processes, (3)(4)(5)(6) are to mark the non-skeleton pixels at the four corners within the 8-neighborhood threshold.

[0084] 2) Use the Sobel operator to calculate the skeleton edge and gradient direction of the laser stripe skeleton;

[0085] The Sobel operator is a differential operator with discreteness. It operates on the brightness function of the image and obtains the approximate value of its gradient value. The operator can calculate the corresponding normal vector or gradient vector for each point in the image. The operator contains two convolution factors Gx and Gy, which represent the horizontal matrix and the vertical matrix respectively. The two convolution factors Gx and Gy are shown in the following table:

[0086] Table 1 Gx convolution factor

[0087] -1 0 1 -2 0 2 -1 0 1

[0088] Table 2 Gy convolution factor

[0089] 1 2 1 0 0 0 -1 -2 1

[0090] By convolving the image with the convolution factors Gx and Gy, we can obtain the approximate grayscale difference in the horizontal and vertical directions. If A is used to represent the original image, the calculation formula is as follows:

[0091]

[0092] Among them, * represents the convolution operation.

[0093] The horizontal and vertical gradient values ​​of any pixel coordinate point in the image can be calculated by the following formula to get the gradient value of the point:

[0094]

[0095] In order to shorten the calculation time, the sum of the absolute values ​​of the horizontal and vertical gradient values ​​is used as the magnitude of the gradient value at this point:

[0096] |G|=|Gx|+|Gy|

[0097] Assume that one of the thresholds is T. If the gradient value G>T of a pixel point, then the point (x, y) is identified as an edge point. Its gradient direction is: The operator uses grayscale weighted difference to reduce edge blur and can provide a gradient image more accurately.

[0098] In the present invention, the Sobel operator is used to calculate the gradient value of all pixel points in the laser stripe skeleton. If the gradient value is greater than a preset threshold, the pixel point is judged as a skeleton edge point. All skeleton edge points are calculated and the gradient direction of each skeleton edge point is calculated.

[0099] 3) Using Lagrange polynomial interpolation method to obtain edge sub-pixel coordinates of skeleton edge points along their gradient direction;

[0100] The Lagrange polynomial interpolation method obtains the sub-pixel edge coordinates by using the Canny algorithm to find the edge point (X i , Y i ), the gradient value U(i, j) extracted by the Sobel operator is interpolated using polynomials in the X and Y directions to obtain the sub-pixel edge coordinates (X e , Y e ), the calculation formula is as follows:

[0101]

[0102] Where i and j are pixel coordinate indices in the X and Y directions respectively; (X e , Y e ) are sub-pixel edge coordinates.

[0103] 4) The sub-pixel coordinates of the edge are obtained by using the grayscale centroid method to obtain the sub-pixel center of the laser stripe, and the sub-pixel centers of the laser stripe are connected to form the center line of the laser stripe;

[0104] The grayscale centroid method is to use the centroid of the grayscale value of each cross section of the laser stripe as the center of the laser stripe. e and Y e The pixel point set C(x,y) is formed. The sub-pixel center point (x) of the laser stripe is obtained by using the grayscale centroid method in the point set C(x,y). r ,y r ), the formula is as follows:

[0105]

[0106] Among them, t(x i ,y i ) is the point (x i ,y i ) is the gray value in the binary laser image; M is the number of pixels in the point set C(x,y);

[0107] STEP3. Line laser is projected onto the calibration plate to form a light plane. The line laser is used to calibrate the calibration plate to obtain the transformation relationship between the calibration plate image plane and the light plane in the camera image coordinate system. Combined with the transformation relationship between the calibration plate plane in the world coordinate system S and the calibration plate image plane in the camera image coordinate system obtained in STEP1, the transformation relationship between the calibration plate plane in the world coordinate system S and the light plane is obtained, and the light plane equation is obtained. Combined with the Z axis of the measuring microscope to obtain height information, the flatness correction of the stage is realized.

[0108] The line laser is projected onto the calibration plate, and there is an angle between it and the straight line connecting the calibration points on the calibration plate. In the camera image coordinate system, the coordinates of the intersection points with the straight line are respectively obtained according to the center lines of several laser stripes extracted in STEP2, and the transformation relationship between the image plane of the calibration plate and the light plane in the camera image coordinate system is obtained; then, according to the invariance of the cross ratio, combined with the transformation relationship between the calibration plate plane in the world coordinate system S obtained in STEP1 and the calibration plate image plane in the camera image coordinate system, the position coordinates of the intersection point coordinates in the world coordinate system S are obtained, and finally the transformation relationship between the calibration plate plane and the light plane in the world coordinate system S is obtained, and the light plane equation is obtained by fitting;

[0109] As attached Figure 4 As shown, li is a straight line connecting the calibration points on the calibration plate image plane in the camera image coordinate system, Li is a straight line connecting the calibration points on the calibration plate plane in the world coordinate system S, MN is a laser stripe formed by the linear laser projected on the calibration plate, qi is the intersection of the straight line connecting the calibration points and the laser stripe on the calibration plate image plane in the camera image coordinate system, similar to qi, bi is another intersection point in the process of linear laser posture transformation; Qi is the intersection of the straight line connecting the calibration points and the laser stripe on the calibration plate plane in the world coordinate system S; similar to Qi, Bi is another intersection point in the process of linear laser posture transformation;

[0110] Among them, according to the invariance of the cross ratio, the intersection and complex ratio in the camera image coordinate system is equal to the intersection and complex ratio in the world coordinate system S, and the three-dimensional position coordinates of the intersection point on the calibration plate are obtained.

[0111] In some embodiments of the present invention, let li=aici, Li=AiCi (i=0, 1, 2...), and the maximum value of i is determined by the number of calibration points in the straight line connecting the calibration points on the calibration plate.

[0112] From the cross-ratio invariance, we know that: li / Li = k (i = 0, 1, 2...) where k is an arbitrary constant, thus we can get: Where s is an arbitrary constant;

[0113] From the above formula, we can know that the center line segment of the laser stripe in the camera image coordinate system has the following relationship with the laser stripe in the world coordinate system S:

[0114]

[0115] The two-dimensional coordinates of these points are known. By using the camera model to calculate their positions in the spatial coordinate system, the position of point Q can be obtained, and then the solution of the structured light plane equation can be completed. That is, using line laser and calibration plate calibration, the transformation relationship between the image plane of the calibration plate and the light plane in the camera image coordinate system can be obtained.

[0116] The intersection points on the calibration plate are converted to the coordinates in the camera coordinate system according to the external references of the calibration plate. The points obtained from multiple laser calibration plates are plane-fitted to obtain the light plane in the camera coordinate system, that is, according to the cross ratio invariance, combined with the transformation relationship between the calibration plate plane in the world coordinate system S obtained in STEP1 and the calibration plate image plane in the camera image coordinate system, the position coordinates of the intersection point coordinates in the world coordinate system S are obtained, and finally the transformation relationship between the calibration plate plane and the light plane in the world coordinate system S is obtained.

[0117] After the flatness correction is completed, the present invention can use the sample for inspection; the sample is placed on the stage, and the object is pre-scanned in three dimensions using a global camera and line structured light to obtain the three-dimensional point cloud data of the sample. Then, when the sample is scanned with a high-magnification objective lens, the motion coordinates of the objective lens run along the three-dimensional point cloud coordinates, and there will be no situation where the objective lens touches the sample and the steps of repeated focusing will not occur, thereby improving the scanning efficiency of the objective lens. The three-dimensional point cloud data of the sample is used to test the effect of calibration, that is, whether the contour of the sample can be obtained after line laser scanning.

[0118] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A flatness correction method based on a stage, characterized in that: The method comprises: A global camera for observing the stage is installed on the measuring microscope, and a calibration plate is placed on the stage of the measuring microscope. The global camera captures the image of the calibration plate. Through single-target calibration of the global camera, the transformation relationship between the calibration plate plane in the world coordinate system S where the measuring microscope is located and the calibration plate image plane in the camera image coordinate system is obtained; Turn on the line laser, which is projected onto the calibration plate, so that the global camera can be used to collect the image of the calibration plate with the laser. Transform the position of the calibration plate on the calibration plate plane in the world coordinate system S, collect several images of the calibration plate with the laser, and extract the center line of the laser stripe for each calibration plate image with the laser in the camera image coordinate system based on the secondary extraction algorithm. A line laser is projected onto a calibration plate to form a light plane. The line laser and the calibration plate are calibrated to obtain the transformation relationship between the image plane of the calibration plate and the light plane in the camera image coordinate system. Combined with the transformation relationship between the calibration plate plane in the world coordinate system S and the image plane of the calibration plate in the camera image coordinate system, the transformation relationship between the calibration plate plane in the world coordinate system S and the light plane is obtained, and the light plane equation is obtained. Combined with the Z axis of the measuring microscope, the height information is obtained to realize the flatness correction of the stage.

2. The flatness correction method based on a stage according to claim 1, characterized in that: The extraction process of the laser stripe centerline based on the secondary extraction algorithm includes: in the calibration plate image with laser, the laser stripe skeleton is first roughly extracted by the skeleton refinement algorithm, and then the edge and gradient direction of the laser stripe skeleton are calculated by the Sobel operator, and the edge sub-pixel coordinates are obtained along its gradient direction by the Lagrange polynomial interpolation method. Finally, the grayscale centroid method is used to secondary obtain the sub-pixel center of the laser stripe, and the sub-pixel centers of the laser stripes are connected to form the laser stripe centerline.

3. The flatness correction method based on a stage according to claim 2, characterized in that: The skeleton refinement algorithm roughly extracts the laser stripe skeleton, including: binarizing the calibration plate image with laser to obtain a binary laser image; scanning the binary laser image row by row and column by column, defining the pixel points with a pixel value of 255 in the binary laser image as target points, and the pixel points with a pixel value of 0 as background points. If there is at least one background point in the 8-neighborhood of the target point, the target point is called a boundary point. When the boundary point satisfies the skeleton condition formula, the boundary point is judged to be a skeleton point, and all skeleton points constitute the laser stripe skeleton.

4. The flatness correction method based on a stage according to claim 3, characterized in that: The skeleton condition formula includes: Step 1: Set any target point as point P0. When it is a boundary point, judge point P0 formula (1) to formula (4) in sequence: 2≤M(P0)≤6 (1) S(P0)=1 (2) Pixel(P1)×Pixel(P3)×Pixel(P5)=0 (3) Pixel(P3)×Pixel(P5)×Pixel(P7)=0 (4) Where: M(P0) represents the number of target points in the 8-neighborhood of point P0; S(P0) represents the number of times the value of the pixel points from P1 to P8 in the 8-neighborhood of point P0 jumps from 0 to 1; Pixel( ) represents the pixel value of the extracted point; Step 2: To ensure that there are connected target points in the 8-neighborhood of the target point P0, and that the conditions for forming a skeleton are still met after deletion, it is necessary to first determine whether the conditions of formula (1) and formula (2) are met, and then determine whether the conditions of formula (5) and formula (6) are met: Pixel(P1)×Pixel(P5)×Pixel(P7)=0 (5) Pixel(P1)×Pixel(P3)×Pixel(P7)=0 (6) Among them, P1~P8 represent the eight neighboring pixels of the target point P0.

5. The flatness correction method based on a stage according to claim 1, characterized in that: Line laser and calibration plate calibration, including: projecting the line laser onto the calibration plate, with an angle between the line laser and the straight line connecting the calibration points on the calibration plate, obtaining the coordinates of the intersections with the straight line in the camera image coordinate system according to the center lines of several laser stripes extracted in STEP2, and obtaining the transformation relationship between the image plane of the calibration plate and the light plane in the camera image coordinate system.

6. The flatness correction method based on a stage according to claim 1, characterized in that: The calibration plate is provided with n*m calibration points, and the values ​​of n and m are both integers greater than 1.

Citation Information

Patent Citations

  • Line laser plane equation calibration method based on checkerboard

    CN118408492A