An automatic calibration method, device and storage medium based on edge inspection by a precision inspection camera

Through the automatic calibration method based on the edge patrol of the fine inspection camera, the calibration process between the main inspection camera and the fine inspection camera is automatically completed using motion control components and image recognition technology, and the problems of low manual calibration efficiency and low accuracy in the prior art are solved, and a high-precision and automated calibration process is realized.

CN119559265BActive Publication Date: 2025-05-30SHENZHEN SEICHITECH TECHN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510128211.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-05-30
Estimated Expiration
2045-02-05

AI Technical Summary

Technical Problem

In the prior art, the calibration process between the main inspection camera and the fine inspection camera is highly dependent on manual operation, which easily introduces human error, resulting in low calibration accuracy and efficiency.

Method used

The automatic calibration method based on the edge patrol of the fine camera is adopted, and the fixed offset is obtained through early teaching. The motion control component is used to make the picture center of the fine camera fall into the inside of the calibration plate. The characteristic diagram of the calibration plate is collected through the edge patrol movement, the straight edges and corner points of the border are identified, the mechanical coordinates are calculated, the conversion matrix is ​​constructed, and the calibration is completed.

Benefits of technology

The time and error of manual adjustment is reduced, the efficiency and stability of calibration is improved, the detection error caused by position deviation is reduced, and high-precision calibration between the fine inspection camera and the main inspection camera is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559265B_ABST
    Figure CN119559265B_ABST
Patent Text Reader

Abstract

The present application discloses an automatic calibration method, device and storage medium based on edge inspection by a precision inspection camera, which is used to improve the calibration efficiency and avoid introducing manual errors when the precision inspection camera aligns with the fiducial points. The method of the present application includes: obtaining a fixed offset through prior teaching; according to the fixed offset, making the center of the image of the precision inspection camera fall inside the calibration board through a motion control component, and there are fiducial points arranged inside the calibration board; controlling the precision inspection camera to perform an edge inspection motion through the motion control component to collect the feature map of the calibration board, and identifying the straight edges and corner points of the inner border of the calibration board according to the feature map, and guiding the precision inspection camera to perform an edge inspection motion and corner point alignment based on this; determining the first mechanical coordinates at this time; determining the second mechanical coordinates when the center of the image of the precision inspection camera aligns with the center of the fiducial points on the calibration board according to the physical parameters of the calibration board and the first mechanical coordinates; calculating the affine transformation relationship according to the pre-collected third mechanical coordinates and the second mechanical coordinates to complete the calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of machine vision, and particularly to an automatic calibration method, device, and storage medium based on edge patrol of a fine inspection camera. Background Art

[0002] In the panel industry, there is a composite detection system composed of a main inspection camera and a fine inspection camera. The main inspection camera is used to detect the defect position and defect type, and the fine inspection camera is used to further determine the hierarchical position of the defect in the display screen. Among them, in order to move the defect detected under the field of view of the main inspection camera to the field of view of the fine inspection camera to further judge the defect hierarchical position, it is necessary to calibrate the conversion relationship between the image coordinate system of the main inspection camera and the mechanical coordinate system of the stage. The efficiency and accuracy of the calibration to a certain extent determine whether the fine inspection system can play a role. Therefore, it is crucial to improve the calibration efficiency and calibration accuracy of the image coordinate system of the main inspection camera and the X and Y stage coordinate systems that control the movement of the fine inspection camera.

[0003] Due to the small field of view of the fine inspection camera, only a partial area of the calibration board can be photographed. The traditional solution first takes a complete calibration board image through the main inspection camera, extracts the image coordinates of the center of the fiducial point (Mark) in the calibration board, then manually controls the stage position to align the center of the fine inspection camera with the center of the Mark point, and at the same time records the stage position of the center of the Mark point. Finally, the calibration matrix required for the solution is obtained according to the above coordinates.

[0004] The above calibration process requires manual adjustment of the stage position to align the center of the field of view of the fine inspection camera with the center of the fiducial point (Mark point) on the calibration board. This step is very likely to introduce human errors. Minor deviations in human visual judgment and hand operations may affect the alignment accuracy, and thus affect the accuracy of the subsequent calibration matrix. The entire calibration process highly depends on manual participation. For each Mark point that needs to be calibrated, manual operations are required, which greatly increases the time and labor costs of the calibration work, and the degree of automation is very low. This not only limits the efficiency of the calibration work, but also increases the uncertainty and risk in the operation process. Summary of the Invention

[0005] In order to solve the above technical problems, the present application provides an automatic calibration method, device, and storage medium based on edge patrol of a fine inspection camera.

[0006] The technical solutions provided in the present application are described below:

[0007] The first aspect of the present application provides an automatic calibration method based on edge patrol of a fine inspection camera. The calibration method includes:

[0008] Obtaining a fixed offset through prior teaching, where the fixed offset is the distance from the main inspection camera to the fine inspection camera;

[0009] According to the fixed offset, the motion control component is used to make the center of the fine inspection camera's screen fall inside the calibration board, and calibration points are arranged inside the calibration board;

[0010] The motion control component is used to control the fine inspection camera to perform a border tracing motion to collect the feature map of the calibration board, and identify the straight edges and corner points of the inner border of the calibration board according to the feature map, and then continue to control the fine inspection camera to perform a border tracing motion and corner point alignment;

[0011] Determine the first mechanical coordinates when the center of the fine inspection camera's screen is aligned with the corner points, and the first mechanical coordinates are the coordinates of the stage;

[0012] According to the physical parameters of the calibration board and the first mechanical coordinates, determine the second mechanical coordinates when the center of the fine inspection camera's screen is aligned with the center of the calibration points on the calibration board, and the second mechanical coordinates are the coordinates of the stage;

[0013] Calculate the affine transformation relationship based on the pre-collected third mechanical coordinates and the second mechanical coordinates to complete the calibration, and the third mechanical coordinates are the image coordinates of the main inspection camera.

[0014] Optionally, after obtaining the fixed offset through pre-teaching, the calibration method further includes:

[0015] Calibrate the relationship between the fine inspection camera image coordinate system and the X, Y stage coordinate systems, and construct a transformation matrix;

[0016] Randomly place the calibration board at the main inspection station, control the main inspection camera to collect an image, and extract the third mechanical coordinates through an image algorithm, and the third mechanical coordinates are the image coordinates of the main inspection camera.

[0017] Optionally, calibrating the relationship between the fine inspection camera image coordinate system and the X, Y stage coordinate systems and constructing a transformation matrix includes:

[0018] When the corner points of the calibration board are in the fine inspection camera's screen, control the fine inspection camera to collect a first image, and extract the first corner point coordinates of the corner points in the first image;

[0019] The motion control component controls the fine inspection camera to move separately along the X-axis or Y-axis, and the fine inspection camera collects a second image and a third image, and extracts the second corner point coordinates and the third corner point coordinates of the corner points;

[0020] Calculate the first offset after the calibration board moves along the X-axis and Y-axis;

[0021] Calculate the transformation matrix according to the first corner point coordinates, the second corner point coordinates, the third corner point coordinates and the first offset.

[0022] Optionally, the corner points include 5 inner border corner points;

[0023] Controlling the fine inspection camera by the motion control component to perform a border patrol motion to collect the feature map of the calibration board, and identifying the straight line edges and corner points of the inner border of the calibration board according to the feature map, and guiding the fine inspection camera to perform border patrol motion and corner point alignment accordingly, includes:

[0024] Controlling the fine inspection camera by the motion control component to perform a border patrol motion to collect the feature map of the calibration board, and identifying the straight line edges of the inner border of the calibration board and 5 inner border corner points according to the feature map, and guiding the fine inspection camera to perform border patrol motion and alignment of 5 inner border corner points accordingly.

[0025] Optionally, the controlling the fine inspection camera by the motion control component to perform a border patrol motion to collect the feature map of the calibration board, and identifying the straight line edges of the inner border of the calibration board and 5 inner border corner points according to the feature map, and guiding the fine inspection camera to perform border patrol motion and alignment of 5 inner border corner points accordingly, includes:

[0026] Step 1: Controlling the fine inspection camera by the motion control component to move along the X-axis or Y-axis direction with a specified step size;

[0027] Step 2: After each movement, controlling the fine inspection camera to collect the feature map of the calibration board, and extracting the image features in the feature map through an image processing algorithm;

[0028] Step 3: Judging whether the image features include straight line edges and inner border corner points;

[0029] If the feature map does not include straight line edges and inner border corner points, return to Step 1;

[0030] If the feature map only includes straight line edges, calculate a special step size by combining the starting point information of the straight line edges and a pre-constructed transformation matrix, control the fine inspection camera to move with the special step size, and return to Step 2 after the movement;

[0031] If the feature map includes both straight line edges and inner border corner points, identify the inner border corner points, control the center of the fine inspection camera's screen to align with the inner border corner points and perform an autofocus operation;

[0032] Step 4: Repeat Steps 1 to 3 until all 5 inner border corner points in the calibration board are identified.

[0033] Optionally, after Step 4, it further includes:

[0034] Step 5: Judging whether all 5 inner border corner points in the calibration board are obtained;

[0035] If so, stop the loop from Step 1 to Step 3;

[0036] Step 6: If the loop has not stopped, re - calibrate the relationship between the fine - inspection camera image coordinate system and the X, Y stage coordinate systems, and update the transformation matrix;

[0037] Step 7: After determining that there are no corner points in the fine - inspection camera view, loop through Steps 1 to 3 in the other direction until all 5 inner - border corner points on the calibration board are recognized, where the other direction means a direction different from the previous movement direction of the fine - inspection camera.

[0038] Optionally, the step of determining the second mechanical coordinate when the center of the fine - inspection camera view is aligned with the center of the calibration point on the calibration board according to the physical parameters of the calibration board and the first mechanical coordinate, where the second mechanical coordinate is the coordinate of the stage, includes:

[0039] Calculate the calibration point coordinates of each calibration point on the calibration board according to the physical parameters of the calibration board;

[0040] Calculate a two - dimensional vector based on the first mechanical coordinate;

[0041] Calculate the second mechanical coordinate based on the two - dimensional vector, calibration point coordinates, and the first mechanical coordinate.

[0042] Optionally, the step of calculating a two - dimensional vector based on the first mechanical coordinate includes:

[0043] Use the following formula 1 for calculating the two - dimensional vector:

[0044] Formula 1;

[0045] Where, and represent the first mechanical coordinates of 2 diagonal - corner points among the 5 inner - border corner points on the calibration board on the stage; represents the vector component in the X - axis direction in the two - dimensional space; represents the vector component in the Y - axis direction in the two - dimensional space.

[0046] Optionally, the step of calculating the second mechanical coordinate based on the two - dimensional vector, calibration point coordinates, and the first mechanical coordinate includes:

[0047] Use the following formula 2 for calculating the second mechanical coordinate:

[0048] Formula 2;

[0049] Where, It represents the coordinates of the calibration points, that is, the coordinates of the centers of each fiducial point in the physical calibration board coordinate system, and i is the number of fiducial points on the calibration board; It represents the second mechanical coordinate, that is, the mechanical coordinate when the center of the image of the fine inspection camera is aligned with the center of the fiducial point.

[0050] Optionally, calculating the affine transformation relationship based on the pre-collected third mechanical coordinate and the second mechanical coordinate to complete the calibration includes:

[0051] Using the following formula 3 to obtain the affine transformation relationship:

[0052] Formula 3;

[0053] where M represents the affine transformation relationship, represents the two-dimensional vector obtained by converting the second mechanical coordinate, represents the two-dimensional vector obtained by converting the third mechanical coordinate.

[0054] The second aspect of the present application provides an automatic calibration device based on the edge inspection of a fine inspection camera. The calibration device includes:

[0055] A teaching unit for obtaining a fixed offset in advance through teaching. The fixed offset is the distance and direction that the main inspection camera needs to move to the fine inspection camera;

[0056] A first control unit for making the center of the image of the fine inspection camera fall inside the calibration board, and calibration points are arranged inside the calibration board;

[0057] A second control unit for controlling the fine inspection camera to move along the X-axis or Y-axis direction at a specified step size to collect the feature map of the calibration board, and identifying the target corner points in the calibration board according to the feature map;

[0058] A first processing unit for determining the first mechanical coordinate when the center of the image of the fine inspection camera is aligned with the corner point. The first mechanical coordinate is the coordinate of the stage;

[0059] A second processing unit for determining the second mechanical coordinate when the center of the image of the fine inspection camera is aligned with the center of the calibration point on the calibration board. The second mechanical coordinate is the coordinate of the stage;

[0060] A conversion unit for calculating the affine transformation relationship to complete the calibration.

[0061] Optionally, the calibration device further includes:

[0062] A calibration unit for calibrating the relationship between the image coordinate system of the fine inspection camera and the X, Y stage coordinate systems, and constructing a transformation matrix;

[0063] An extraction unit is used to control the main inspection camera to collect images and extract the third mechanical coordinates through an image algorithm, where the third mechanical coordinates are the image coordinates of the main inspection camera.

[0064] In the third aspect of the present application, an automatic calibration device based on edge inspection by a fine inspection camera is provided. The calibration device includes:

[0065] A processor, a memory, an input / output unit, and a bus;

[0066] The processor is connected to the memory, the input / output unit, and the bus;

[0067] The memory stores a program, and the processor calls the program to execute the calibration method in the first aspect and any optional one of the first aspect.

[0068] In the fourth aspect of the present application, a computer-readable storage medium is provided. A program is stored on the computer-readable storage medium, and when the program is executed on a computer, it executes the calibration method in the first aspect and any optional one of the first aspect.

[0069] It can be seen from the above technical solutions that the present application has the following advantages:

[0070] In the present application, first, a fixed offset is obtained through prior teaching. After the large-field main inspection camera at the main inspection station completes the acquisition of the calibration plate image, the fixed offset can be used to quickly and accurately adjust the position of the stage, so that the center of the fine inspection camera can accurately fall inside the calibration plate. This process reduces the time and error of manual adjustment, and improves the efficiency and stability of calibration. According to the fixed offset, there is no need for cumbersome manual adjustment or multiple trial-and-errors. The center of the fine inspection camera's screen can be accurately aligned inside the calibration plate, and the detection error caused by position deviation is also reduced.

[0071] The precise control of the motion control component ensures that the fine inspection camera can stably move in the X-axis or Y-axis direction according to a preset specified step size. This high-precision motion control enables the fine inspection camera to capture the feature maps of the calibration plate at different positions, providing a data basis for subsequent corner recognition. Through the fine analysis of the feature maps, the target corners in the calibration plate can be accurately identified. From the camera motion control to the feature map acquisition, and then to the fully automated processing of corner recognition, the entire recognition process can be automatically completed without manual intervention, improving the calibration efficiency.

[0072] By determining the first mechanical coordinates when the center of the fine inspection camera's screen is aligned with the target corner points, ensuring that the first mechanical coordinates serve as the coordinates of the stage can simplify the operation process and avoid frequent coordinate conversion or calibration in subsequent steps. By combining the physical parameters of the calibration board and the first mechanical coordinates, the second mechanical coordinates, i.e., the coordinates of the stage when the center of the fine inspection camera's screen is aligned with the center of any calibration point on the calibration board, can be accurately calculated. Once the second mechanical coordinates are determined, the stage can be quickly moved to the specified position to align the center of the fine inspection camera's screen with the center of the calibration point on the calibration board.

[0073] By calculating the affine transformation relationship, the image coordinates of the main inspection camera can be accurately converted into the actual mechanical coordinates of the stage, or vice versa. This transformation relationship enables high-precision positioning and calibration, ensures the accurate alignment between the main inspection camera and the fine inspection camera, thereby improving the positioning accuracy of the overall system. The affine transformation relationship can be used for coordinate conversion and calibration operations without the need for cumbersome manual adjustment each time, improving the calibration efficiency and avoiding introducing manual errors when the fine inspection camera aligns with the fiducial points. Brief Description of the Drawings

[0074] To more clearly illustrate the technical solutions in this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0075] Figure 1 Schematic diagram of an embodiment of the automatic calibration method based on the fine inspection camera's edge patrol for this application;

[0076] Figure 2 Schematic diagram of an embodiment of the method for obtaining the transformation matrix and the third mechanical coordinates for this application;

[0077] Figure 3 Schematic diagram of an embodiment of the method for constructing the transformation matrix for this application;

[0078] Figure 4 Schematic diagram of an embodiment of the method for identifying all 5 inner border corner points in the calibration board for this application;

[0079] Figure 5 Schematic diagram of an embodiment of the method for obtaining the second mechanical coordinates for this application;

[0080] Figure 6 Schematic diagram of a structure of the automatic calibration device based on the fine inspection camera's edge patrol for this application;

[0081] Figure 7This is another structural schematic diagram of the automatic calibration device based on the edge detection of the fine inspection camera in the present application;

[0082] Figure 8 This is a schematic flow diagram of obtaining the offset from the teaching main inspection station to the fine inspection station in the present application;

[0083] Figure 9 This is a structural schematic diagram of the calibration plate in the present application;

[0084] Figure 10 This is a schematic flow diagram of calibrating the relationship between the image coordinate system of the fine inspection camera and the stage coordinate system in the present application. Detailed implementation manners

[0085] The present application discloses an automatic calibration method, device and storage medium based on the edge detection of the fine inspection camera, which is used to improve the calibration efficiency and avoid introducing manual errors when the fine inspection camera aligns with the fiducial points.

[0086] Next, the technical solutions in the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0087] The method of the present application can be applied to a server, a device, a terminal or other devices with logical processing capabilities. In this regard, the present application makes no limitation. For the sake of convenience of description, the following description is made taking the execution subject as a terminal as an example.

[0088] Please refer to Figure 1 , the present application first provides an embodiment of an automatic calibration method based on the edge detection of the fine inspection camera, and this embodiment includes:

[0089] S101. Obtain a fixed offset through prior teaching, and the fixed offset is the distance and direction that the main inspection camera needs to move to the fine inspection camera;

[0090] In this embodiment, first, a fixed offset needs to be obtained through prior teaching , the main inspection station is the detection preset position of the large-field main inspection camera, the fine inspection station is the detection preset position of the fine inspection camera, and the fixed offset is the distance and direction that the calibration plate needs to move from the main inspection station to the fine inspection station and the center of the fine inspection camera falls inside the calibration plate.

[0091] After obtaining the fixed offset, save the final fixed offset in the configuration file of the system for use in subsequent calibration processes.

[0092] Please refer to Figure 8 , Figure 8It is a schematic flow diagram showing the process of obtaining the offset from the main inspection station to the fine inspection station. The green frame part in the figure is the main inspection station. At this time, it is shown that the fine inspection camera has not been adjusted.

[0093] Please refer to Figure 9 , Figure 9 It is a schematic structure diagram of a calibration board. The calibration board has 9 clear fiducial points so that the camera can accurately capture and identify them. And the inherent physical parameters of the calibration board are known. Let the midpoint of the oblique side of the calibration board be set, and a physical coordinate system (right-handed coordinate system) of the calibration board is established with the midpoint. The y-axis of its coordinate system is a unit vector perpendicular to the oblique side and pointing from the inside to the outside of the calibration board. The x-axis of the physical coordinate system of the calibration board can be obtained by rotating the y-axis according to the properties of the right-handed coordinate system. Based on this, the coordinates of the centers of each fiducial (Mark) point in the physical coordinate system of the calibration board can be obtained according to the inherent physical parameters of the calibration board.

[0094] S102. According to the fixed offset, the motion control component is used to make the center of the fine inspection camera's picture fall inside the calibration board, and there are calibration points set inside the calibration board;

[0095] The motion control component consists of a high-precision XYZ platform and three sets of high-precision stepper motors and controllers. The control signal is output from the system end to accurately adjust the spatial photographing positions of the main inspection camera and the fine inspection camera.

[0096] The system will read the previously saved fixed offset from the configuration file; the system parses the fixed offset and converts it into instructions that the motion control component can understand, such as the number of steps of the motor, the rotation angle, or the moving distance of the moving platform, etc.

[0097] After receiving the instruction, the motion control component will drive the stage to move according to the specified distance and direction and stop at the target position; when the stage moves to the target position, the center of the fine inspection camera's picture has accurately fallen inside the calibration board.

[0098] S103. The motion control component is used to control the fine inspection camera to perform a border tracing motion to collect the feature map of the calibration board, and identify the straight edges and corner points of the inner border of the calibration board according to the feature map, and then continue to control the fine inspection camera to perform a border tracing motion and corner alignment;

[0099] After ensuring that the center of the fine inspection camera's picture falls inside the calibration board, the system sends a moving instruction to the stage through the motion control component to make the center of the fine inspection camera's picture move along the X-axis or Y-axis direction. After each move in place, the fine inspection camera immediately collects the image of the calibration board to form a series of feature maps.

[0100] The system performs inner border straight edge and corner point detection on the feature map, and matches the detected corner points with the preset target corner points on the calibration plate. By comparing the features such as the positions and shapes of the corner points, the corner points that match the target corner points are screened out. The target corner points are preset as 2 diagonal corner points among the 5 inner border corner points of the calibration plate.

[0101] S104. Determine the first mechanical coordinates when the center of the fine inspection camera's screen is aligned with the corner point. The first mechanical coordinates are the coordinates of the stage.

[0102] After the recognized corner points are determined as the target corner points, since the corner points have been located in the fine inspection camera coordinate system, a translation vector needs to be calculated to make the center of the screen coincide with the target corner points. This translation vector is defined as the image offset.

[0103] According to the image offset between the current corner point and the center of the fine inspection camera image, calculate the movement amounts of the stage in the X and Y axes to move the corner point to the center of the fine inspection camera image, and move the stage to align the corner point with the center of the fine inspection camera image. The system records the first mechanical coordinates at this time , where n represents the number of corner points in the calibration plate.

[0104] S105. Determine the second mechanical coordinates when the center of the fine inspection camera's screen is aligned with the center of the calibration point on the calibration plate according to the physical parameters of the calibration plate and the first mechanical coordinates. The second mechanical coordinates are the coordinates of the stage.

[0105] Based on the calibration plate coordinate system established in the previous step S101, according to the inherent parameters of the calibration plate, the coordinates of the centers of each Mark in the physical calibration plate coordinate system are , where n is the number of Mark points on the calibration plate.

[0106] Extract the first mechanical coordinates of the preset corner points (2 diagonal corner points) in the previous step S104 and .

[0107] According to the coordinates of the Mark points in the physical calibration plate coordinate system on the calibration plate and the first mechanical coordinates, calculate the second mechanical coordinates of each Mark point in the stage coordinate system , where n is the number of Mark points on the calibration plate.

[0108] S106. Calculate the affine transformation relationship based on the pre-collected third mechanical coordinates and the second mechanical coordinates to complete the calibration. The third mechanical coordinates are the main inspection camera image coordinates.

[0109] An affine transformation is a two-dimensional coordinate transformation that preserves straight lines and parallelism, but can change the size, orientation, and position of a figure. Mathematically, an affine transformation can be represented by a 3x3 matrix, where one element constitutes the rotation and scaling part, and the other element constitutes the translation part.

[0110] According to the third mechanical coordinate and the second mechanical coordinate The affine transformation matrix M is calculated. This affine transformation matrix M calibrates the affine transformation relationship between the image coordinate system of the large-field main inspection camera and the stage coordinate system, completing the calibration.

[0111] In this embodiment, first, a fixed offset is obtained through prior teaching. After the large-field main inspection camera at the main inspection station completes the acquisition of the calibration plate image, using the fixed offset, the stage position can be quickly and accurately adjusted so that the center of the fine inspection camera can accurately fall inside the calibration plate. This process reduces the time and error of manual adjustment, improving the efficiency and stability of calibration. According to the fixed offset, without the need for cumbersome manual adjustment or multiple trial-and-errors, the center of the fine inspection camera's screen can be accurately aligned inside the calibration plate, also reducing the detection error caused by position deviation.

[0112] The precise control of the motion control component ensures that the fine inspection camera can stably move in the X-axis or Y-axis direction according to a preset specified step size. This high-precision motion control enables the fine inspection camera to capture the feature maps of the calibration plate at different positions, providing a data basis for subsequent corner point recognition. Through the fine analysis of the feature maps, the corner points in the calibration plate can be accurately identified. From camera motion control to feature map acquisition, and then to corner point recognition, the entire recognition process can be automatically completed without manual intervention, improving the calibration efficiency.

[0113] By determining the first mechanical coordinate when the center of the fine inspection camera's screen is aligned with the corner point, ensuring that the first mechanical coordinate serves as the coordinate of the stage can simplify the operation process and avoid frequent coordinate conversion or calibration in subsequent steps. By combining the physical parameters of the calibration plate and the first mechanical coordinate, the second mechanical coordinate can be accurately calculated, that is, the stage coordinate when the center of the fine inspection camera's screen is aligned with the center of any calibration point on the calibration plate. Once the second mechanical coordinate is determined, the stage can be quickly moved to the specified position to align the center of the fine inspection camera's screen with the center of the calibration point on the calibration plate.

[0114] By calculating the affine transformation relationship, the image coordinates of the main inspection camera can be accurately converted into the actual mechanical coordinates of the stage, or vice versa. This conversion relationship enables high-precision positioning and calibration, ensuring accurate calibration between the large-field main inspection camera image coordinate system and the stage coordinate system, thereby improving the positioning accuracy of the overall system. The affine transformation relationship can be used for coordinate conversion and calibration operations without the need for cumbersome manual adjustment each time, improving the calibration efficiency and avoiding human errors introduced when aligning the fiducial points of the fine inspection camera.

[0115] Please refer to Figure 2 , in a specific embodiment, after obtaining the fixed offset through prior teaching, the present application provides an embodiment of a method for obtaining the transformation matrix and the third mechanical coordinates, including:

[0116] S201. Calibrate the relationship between the fine inspection camera image coordinate system and the X, Y stage coordinate systems, and construct a transformation matrix;

[0117] Place the calibration plate on the stage, and by moving the stage, different point features on the calibration plate appear in the field of view of the fine inspection camera in sequence. The point features can be inner frame corner points, fiducial points, or any recognizable points on the fiducial board. For each point feature, record its position in the fine inspection camera image coordinate system (i.e., image coordinates), and the X, Y coordinates (mechanical coordinates) of the stage at this time.

[0118] Using the collected image coordinates and mechanical coordinates, calculate the transformation matrix between the fine inspection camera image coordinate system and the X, Y stage coordinate systems through mathematical methods (such as the least squares method, etc.). This matrix can convert image coordinates into mechanical coordinates, or vice versa.

[0119] S202. Randomly place the calibration plate at the main inspection station, control the main inspection camera to collect an image, and extract the third mechanical coordinates through an image algorithm. The third mechanical coordinates are the main inspection camera image coordinates.

[0120] Randomly place the calibration plate at the main inspection station. Here, "random" means that the position and orientation of the calibration plate should not be determined in advance to simulate various possible situations in actual work.

[0121] Start the main inspection camera, adjust the parameters to trigger the camera to take a picture, and collect the image of the current position of the calibration plate.

[0122] Use an image processing algorithm to identify the fiducial points in the calibration plate image and calculate the positions of each fiducial point in the image, that is, the third mechanical coordinates , where n is the number of Mark points on the calibration plate.

[0123] In this embodiment, by constructing a transformation matrix, points in the fine inspection camera image can be accurately transformed into actual positions on the stage, or points on the stage can be transformed into positions in the image. Once the transformation matrix is established, coordinate transformation can be performed quickly without the need for cumbersome manual adjustment each time. By reducing the errors introduced due to improper coordinate transformation, the system can ensure high-precision positioning capabilities under various conditions.

[0124] By randomly placing the calibration plate, various positions and angles that may occur in the actual production environment can be simulated, thus ensuring that the camera system can accurately capture and identify the target under various conditions. The image algorithm can automatically extract the third mechanical coordinates, reducing the workload of manual calibration and data processing, and at the same time helping to eliminate the influence of factors such as camera lens distortion and installation errors on the measurement results, thereby simplifying the calibration process.

[0125] Please refer to Figure 3 , in a specific embodiment, the present application provides an embodiment of a method for constructing a transformation matrix, including:

[0126] S301. When the corner points of the calibration plate are located in the fine inspection camera screen, control the fine inspection camera to collect the first image and extract the first corner point coordinates of the corner points in the first image;

[0127] S302. The motion control component controls the fine inspection camera to move separately along the X-axis or Y-axis, the fine inspection camera collects the second image and the third image, and extracts the second corner point coordinates and the third corner point coordinates of the corner points;

[0128] Please refer to Figure 10 , Figure 10 is a schematic flow chart for calibrating the relationship between the fine inspection camera image coordinate system and the stage coordinate system. First, when the stage position is at , control the fine inspection camera to collect the first image and extract the first corner point coordinates of the corner points in the first image .

[0129] The motion control component controls the fine inspection camera to move alone along the Y-axis, collect the second image, and extract the second corner point coordinates of the corner points . The motion control component controls the fine inspection camera to restore the stage position , and then move alone along the X-axis, collect the third image, and extract the second corner point coordinates of the corner points .

[0130] S303. Calculate the first offset after the calibration plate moves along the X-axis and Y-axis;

[0131] S304. Calculate the transformation matrix according to the first corner point coordinates, the second corner point coordinates, the third corner point coordinates and the first offset.

[0132] Based on Equation 4, calculations are performed by combining the coordinates of the first inner border corner points, the second inner border corner points, and the third inner border corner points:

[0133] Equation 4;

[0134] wherein, is the movement direction and distance of the stage along the X and Y axes, is the first offset of the calibration plate corner points in the fine inspection camera image coordinate system, is the transformation matrix for converting the X and Y axis platform offsets into the corresponding offsets of points in the fine inspection camera image.

[0135] In this embodiment, by controlling the fine inspection camera to collect the first image when the calibration plate corner points are in the picture and extracting the first corner point coordinates of the corner points, accurate initial reference points are provided for subsequent calculations. By controlling the fine inspection camera to move separately along the X axis or the Y axis through the motion control component and collecting the second image and the third image, the displacement of the camera in different directions can be accurately simulated. Based on the extracted second corner point coordinates and third corner point coordinates, combined with the initial first corner point coordinates, the transformation matrix between the fine inspection camera image coordinate system and the stage coordinate system can be accurately calculated.

[0136] The whole process is realized through program control, and steps such as image acquisition, corner point extraction, offset calculation, and transformation matrix calculation can be automatically completed without manual intervention. This not only improves the accuracy of the calculation but also reduces the errors caused by human factors, making the whole system more intelligent and automated.

[0137] Please refer to Figure 4 , in a specific embodiment, the corner points of the calibration plate include 5 inner border corner points. This application provides an embodiment of a method for identifying all 5 inner border corner points in the calibration plate, including:

[0138] Step 1: Control the fine inspection camera to move along the X axis or the Y axis in a specified step length through the motion control component;

[0139] The system pre-sets the specified step length for the movement of the fine inspection camera, and this specified step length is usually determined according to actual requirements, the resolution of the camera, the field of view range, and the accuracy requirements of the system.

[0140] According to the calibration requirements, determine whether the fine inspection camera moves along the X axis or the Y axis. For the movement direction, it can move along the X axis, move along the Y axis, or alternate between the two.

[0141] Step 2: After each movement, control the fine inspection camera to collect the feature map of the calibration plate and extract the image features in the feature map through the image processing algorithm;

[0142] After each fine inspection camera movement, the motion control component sends a signal to the system indicating that the fine inspection camera has completed the movement of the specified step size.

[0143] After receiving the signal, the system triggers the fine inspection camera to perform image acquisition. The fine inspection camera captures an image of the calibration board through its lens and converts it into a digital signal, i.e., a feature map. The feature map contains image information such as color, brightness, texture, and shape.

[0144] Before extracting image features, it is usually necessary to preprocess the acquired feature map. The preprocessing steps may include denoising, enhancing contrast, adjusting color balance, etc., to improve the quality and clarity of the image.

[0145] After preprocessing, image processing algorithms are used to extract the image features in the feature map. The image processing algorithms can select edge detection, corner detection, template matching, etc. Image features refer to the significant characteristics in the image that can be used to distinguish different objects or scenes, such as edges, corners, texture patterns, etc. The extracted image features will be used for subsequent image matching, recognition, analysis, or positioning tasks.

[0146] Step 3: Determine whether the image features contain inner border corner points;

[0147] If the image features do not contain straight edges and inner border corner points, return to Step 1;

[0148] If the image features only contain straight edges, calculate the special step size by combining the starting point information of the straight edges and the pre-constructed transformation matrix, control the fine inspection camera to move at the special step size, and return to Step 2 after the movement;

[0149] If the image features contain both straight edges and inner border corner points, identify the inner border corner points and control the center of the fine inspection camera's screen to align with the inner border corner points;

[0150] First, perform image analysis on the image features extracted in Step 2. The image features include edges, corners, textures, etc. In this application, we mainly focus on whether straight edges and inner border corner points are included. Straight edges usually appear as the straight segment borders in the calibration board, while the inner border corner points are the intersections of the straight borders of the calibration board, usually located on the inner border of the calibration board.

[0151] If the image features contain neither straight edges nor inner border corner points, this usually means that the fine inspection camera may not be aligned with the calibration board border, or the calibration board border is not within the camera's field of view. In this case, the system returns to Step 1.

[0152] If the image features only contain straight edges and no inner border corner points, this may be because although the fine inspection camera is aligned with the calibration plate border, it is not fully aligned with the border corner points of the calibration plate. At this time, it is necessary to calculate the special step length by combining the starting point information of the straight edge and the pre-constructed transformation matrix. The motion control component can control the fine inspection camera to move along the straight line at this special step length to obtain the inner border corner points of the calibration plate more quickly. After the fine inspection camera completes the movement, return to step two, re-acquire the image and extract the features to check whether the inner border corner points are successfully captured.

[0153] The special step length calculated by formula 5:

[0154] Formula 5;

[0155] Where, is expressed as the special step length, , is expressed as the starting point information, is expressed as the inverse matrix of the transformation matrix .

[0156] If the image features contain both straight edges and inner border corner points, this means that the fine inspection camera has been aligned with the inner border of the calibration plate. In this case, the system identifies and locates the inner border corner points. Once the inner border corner points are identified, the motion control component controls the center of the fine inspection camera's screen to align with this corner point. At the same time, the accuracy of corner point recognition and alignment can be improved through the autofocus operation of the fine inspection camera to ensure that the corner point is located at the center of the screen. Record the current corner point position and store it in the system's database.

[0157] Step four: Loop through steps one to three until all 5 inner border corner points in the calibration plate are identified;

[0158] There are 5 inner border corner points in the calibration plate, and only 1 inner border corner point can be collected in one loop. Therefore, it is necessary to loop multiple times to identify all 5 inner border corner points and collect the intersection coordinates of the 5 inner border corner points to provide data support for subsequent calibration.

[0159] Step five: Determine whether all 5 inner border corner points in the calibration plate have been obtained; if so, stop looping through steps one to three;

[0160] In each loop, when the system identifies the inner border corner points, the position information of these corner points will be recorded. The recorded corner point information will be saved in a data structure, such as a list or an array, for subsequent use.

[0161] The system checks the number of inner border corner points that have been recorded. If the number is equal to 5, it means that all the inner border corner points on the calibration board have been successfully identified and recorded. In addition to checking the number of corner points, the system also performs position verification to ensure that 5 different corner point positions are recognized.

[0162] Step 6: If the loop has not stopped, recalibrate the relationship between the image coordinate system of the fine inspection camera and the coordinate systems of the X and Y stages, and update the transformation matrix;

[0163] If the loop has not stopped, it means that the system has not recognized all 5 inner border corner points.

[0164] Since the autofocus operation was performed after finding the focus in the aforementioned Step 3, the relationship between the image coordinate system of the fine inspection camera and the coordinate systems of the X and Y stages needs to be recalibrated for the Z-axis transformation;

[0165] Based on the current position, the system recalibrates the relationship between the image coordinate system of the fine inspection camera and the coordinate systems of the X and Y stages, and updates the transformation matrix ;

[0166] Step 7: After determining that there are no corner points in the fine inspection camera view, loop through Steps 1 to 3 in the other direction until all 5 inner border corner points on the calibration board are recognized. The other direction means a direction different from the previous movement direction of the fine inspection camera.

[0167] Because generally two straight line edges in different directions will be extracted at the inner border corners of the calibration board, in order to determine the direction for the next edge inspection stage movement reference, it is necessary to refer to the output detection result of the previous frame of the fine inspection camera view image. If there are no corner point features in the previous frame image, select another straight line edge direction that is inconsistent with the output line edge direction of the previous frame image as the next edge inspection reference direction;

[0168] Then, based on the starting point information of the other straight line edge and the transformation matrix updated in Step 6 calculate the next movement direction and movement amount of the stage, and loop through Steps 1 to 3 to control the fine inspection camera to acquire images.

[0169] The system stops looping until all 5 inner border corner points on the calibration board are recognized.

[0170] In this embodiment, through the motion control component, the fine inspection camera can be accurately controlled to move along the X-axis or Y-axis direction at a specified step size, ensuring that the fine inspection camera can move according to the preset path and speed. After each movement of the fine inspection camera, a feature map of the calibration board is acquired, and key image features such as edges and corner points in the feature map are extracted.

[0171] The system can determine whether the image features contain inner border corner points and whether they only contain straight edges. According to the judgment results of the image features, the system can flexibly adjust the position of the camera. If the image features do not contain straight edges and inner border corner points, it returns to step one to reposition the camera; if it only contains straight edges, it calculates a special step size and makes adjustments; if it contains both straight edges and inner border corner points, it performs corner point recognition and camera alignment.

[0172] By repeatedly executing step one to step three, the system can ensure that all 5 inner border corner points in the calibration board are recognized. This loop mechanism ensures the integrity and accuracy of the system, avoiding calibration errors or positioning failures caused by missing corner points. The process of repeated execution not only ensures the complete recognition of corner points but also improves the efficiency and accuracy of the system through continuous adjustment and calibration. This enables the system to complete calibration in a shorter time and provide more accurate positioning results.

[0173] The system determines whether the task of recognizing the inner border corner points of the calibration board has been completed. If the recognition task has not been completed, it re-calibrates and loops in another direction to recognize all 5 inner border corner points of the calibration board.

[0174] Please refer to Figure 5 , in a specific embodiment, the present application provides an embodiment of a method for obtaining second mechanical coordinates, including:

[0175] S501. Calculate the calibration point coordinates of each calibration point on the calibration board according to the physical parameters of the calibration board;

[0176] The physical parameters of the calibration board include the overall size of the calibration board (such as length, width), shape (such as rectangle, circle, etc.), the number of corner points, and the positional relationship, etc.

[0177] Calculate the calibration point coordinates of each calibration point on the calibration board coordinate system according to the physical parameters of the calibration board.

[0178] S502. Calculate a two-dimensional vector according to the first mechanical coordinates;

[0179] Use the following formula 1 to calculate the two-dimensional vector:

[0180] Formula 1;

[0181] Where, and represent the first mechanical coordinates of 2 diagonal corner points among the 5 inner border corner points on the calibration board on the stage; represents the vector component in the X-axis direction in the two-dimensional space; represents the vector component in the Y-axis direction in the two-dimensional space.

[0182] S503. Calculate the second mechanical coordinate based on the two-dimensional vector, the calibrated point coordinates, and the first mechanical coordinate.

[0183] Use the following formula 2 to calculate the second mechanical coordinate:

[0184] Formula 2;

[0185] Where, represents the calibrated point coordinates, that is, the coordinates of the centers of the respective fiducial points in the physical calibration board coordinate system, and i is the number of fiducial points on the calibration board; represents the second mechanical coordinate, that is, the mechanical coordinate when the center of the image of the fine inspection camera is aligned with the center of the fiducial point.

[0186] In this embodiment, calculate the calibrated point coordinates of each calibrated point on the calibration board according to the physical parameters of the calibration board; then use Formula 1 and Formula 2, combined with the first mechanical coordinate and the calibrated point coordinates, to finally calculate the second mechanical coordinate.

[0187] Calculate the second mechanical coordinate through the preset formula of the system to ensure the accuracy of the data and provide accurate data support for subsequent calibration.

[0188] In a specific embodiment, the system calculates the affine transformation relationship by presetting the following formula 3:

[0189] Formula 3;

[0190] Where, M represents the affine transformation relationship, represents the two-dimensional vector obtained by converting the second mechanical coordinate, represents the two-dimensional vector obtained by converting the third mechanical coordinate.

[0191] Please refer to Figure 6 , this application provides an embodiment of an automatic calibration device based on the edge inspection of a fine inspection camera, including:

[0192] A teaching unit 601 for obtaining a fixed offset in advance by teaching, and the fixed offset is the distance and direction required for the main inspection camera to move to the fine inspection camera;

[0193] A first control unit 602 for making the center of the image of the fine inspection camera fall inside the calibration board, and fiducial points are arranged inside the calibration board;

[0194] A second control unit 603 for controlling the fine inspection camera to move along the X-axis or Y-axis direction at a specified step size to collect the characteristic image of the calibration board, and identifying the corner points in the calibration board according to the characteristic image;

[0195] The first processing unit 604 is configured to determine a first mechanical coordinate when the center of the picture of the fine inspection camera is aligned with the corner point, and the first mechanical coordinate is the coordinate of the stage;

[0196] The second processing unit 605 is configured to determine a second mechanical coordinate when the center of the picture of the fine inspection camera is aligned with the center of the calibration point on the calibration plate, and the second mechanical coordinate is the coordinate of the stage;

[0197] The conversion unit 606 is configured to calculate an affine transformation relationship to complete calibration.

[0198] Optionally, the calibration device further includes:

[0199] The calibration unit 607 is configured to calibrate the relationship between the image coordinate system of the fine inspection camera and the X and Y stage coordinate systems, and construct a transformation matrix;

[0200] The extraction unit 608 is configured to control the main inspection camera to collect images, and extract a third mechanical coordinate through an image algorithm, and the third mechanical coordinate is the image coordinate of the main inspection camera.

[0201] Please refer to Figure 7 , this application also provides an automatic calibration device based on the edge inspection of the fine inspection camera, including:

[0202] A processor 701, a memory 702, an input / output unit 703, and a bus 704;

[0203] The processor 701 is connected to the memory 702, the input / output unit 703, and the bus 704;

[0204] The memory 702 stores a program, and the processor 701 calls the program to execute any of the above calibration methods.

[0205] This application also relates to a computer-readable storage medium, on which a program is stored. When the program runs on a computer, the computer is caused to execute any of the above calibration methods.

[0206] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0207] In several embodiments provided by this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.

[0208] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0209] In addition, in each embodiment of this application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0210] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of this application. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, read-only memory), random access memories (RAM, random access memory), magnetic disks, or optical discs and other various media that can store program codes.

Claims

1. An automatic calibration method based on edge inspection camera, characterized in that: The calibration method comprises: A fixed offset is obtained by teaching in advance, where the fixed offset is the distance and direction required to move from the main inspection camera to the precision inspection camera; According to the fixed offset, the center of the image of the precision inspection camera is made to fall inside the calibration plate through the motion control component, and the calibration point is arranged inside the calibration plate; Control the precision inspection camera to perform patrol motion through a motion control component to collect a feature map of the calibration plate, and identify the straight line edge and corner points of the inner frame of the calibration plate according to the feature map, and continue to control the precision inspection camera to continue patrol motion and corner point alignment accordingly; The corner points include 5 inner frame corner points; The precision inspection camera is controlled by a motion control component to perform patrol motion to collect a feature map of the calibration plate, and the straight line edge and corner point of the inner frame of the calibration plate are identified according to the feature map, and the precision inspection camera is controlled to continue patrol motion and corner point alignment, including: The precision inspection camera is controlled to perform patrol motion through a motion control component to collect a feature map of the calibration plate, and the straight edge of the inner frame and five inner frame corner points of the calibration plate are identified according to the feature map, and the precision inspection camera is continuously controlled to perform patrol motion and align the five inner frame corner points accordingly; The motion control component controls the precision inspection camera to perform patrol motion to collect the characteristic map of the calibration plate, and identifies the straight edge of the inner frame and five inner frame corner points of the calibration plate according to the characteristic map, and continues to control the precision inspection camera to perform patrol motion and align the five inner frame corner points accordingly, including: Step 1: Control the precision inspection camera to move along the X-axis or Y-axis direction with a specified step length through the motion control component; Step 2: After each movement, control the precision inspection camera to collect the feature map of the calibration plate, and extract the image features in the feature map through an image processing algorithm; Step 3: Determine whether the image features include straight line edges and inner frame corner points; If the image feature does not include straight line edges and inner frame corner points, return to step 1; If the image feature only includes a straight edge, a special step length is calculated by combining the starting point information of the straight edge and a pre-constructed transformation matrix, the precision inspection camera is controlled to move with the special step length, and the process returns to step 2 after the movement; If the image features include both straight edges and inner frame corners, the inner frame corners are identified, the center of the image of the precision inspection camera is controlled to align with the inner frame corners, and an automatic focusing operation is performed; Step 4: looping steps 1 to 3 until all five inner frame corner points of the calibration plate are identified; Determine the first mechanical coordinate when the center of the image of the precision inspection camera is aligned with the corner point , where i represents the i-th corner point on the calibration plate, and the first mechanical coordinate is the coordinate of the stage; Determine the second mechanical coordinate when the center of the image of the precision inspection camera is aligned with the center of the calibration point on the calibration plate according to the physical parameters of the calibration plate and the first mechanical coordinate , wherein mi represents the mi-th calibration Mark point on the calibration plate, n is the number of calibration Mark points on the calibration plate, and the second mechanical coordinate is the coordinate of the stage; The calibration is completed by calculating the affine transformation relationship based on the pre-collected third mechanical coordinates and the second mechanical coordinates, and the third mechanical coordinates are the image coordinates of the main inspection camera.

2. The automatic calibration method based on edge inspection of a precision inspection camera according to claim 1, characterized in that: After the fixed offset is obtained by advance teaching, the calibration method further includes: Calibrate the relationship between the precision inspection camera image coordinate system and the X, Y stage coordinate system, and construct a transformation matrix; The calibration plate is randomly placed at the main inspection station, the main inspection camera is controlled to collect images, and the third mechanical coordinates are extracted through the image algorithm, and the third mechanical coordinates are the image coordinates of the main inspection camera.

3. The automatic calibration method based on edge inspection camera according to claim 2, characterized in that: The calibration of the relationship between the image coordinate system of the precision inspection camera and the X, Y stage coordinate system to construct a transformation matrix includes: When a corner point of the calibration plate is located in the picture of the precision inspection camera, controlling the precision inspection camera to capture a first image, and extracting first corner point coordinates of the corner point in the first image; The motion control component controls the precision inspection camera to move along the X-axis or the Y-axis separately, and the precision inspection camera collects the second image and the third image, and extracts the second corner point coordinates and the third corner point coordinates of the corner point; Calculating a first offset of the calibration plate after movement along the X-axis and the Y-axis; A transformation matrix is ​​calculated according to the first corner point coordinates, the second corner point coordinates, the third corner point coordinates and the first offset.

4. The automatic calibration method based on edge inspection camera according to claim 1, characterized in that: After step 4, the method further includes: Step 5: Determine whether all five inner frame corner points in the calibration plate are obtained; If yes, stop looping steps 1 to 3; Step 6: If the loop does not stop, recalibrate the relationship between the precision inspection camera image coordinate system and the X, Y stage coordinate system, and update the transformation matrix; Step 7: After determining that there are no corner points in the precision inspection camera image, loop steps 1 to 3 in another direction until all five inner frame corner points in the calibration plate are identified, wherein the other direction indicates a direction different from the last movement direction of the precision inspection camera.

5. The automatic calibration method based on edge inspection of a precision inspection camera according to any one of claims 1 to 4, characterized in that: The method of determining the second mechanical coordinate when the center of the image of the precision inspection camera is aligned with the center of the calibration point on the calibration plate according to the physical parameters of the calibration plate and the first mechanical coordinate comprises: Calculating the calibration point coordinates of each calibration point on the calibration plate according to the physical parameters of the calibration plate; Calculate a two-dimensional vector according to the first mechanical coordinates; The second mechanical coordinate is calculated according to the two-dimensional vector, the coordinates of the calibration point and the first mechanical coordinate.

6. The automatic calibration method based on edge inspection of a precision inspection camera according to claim 5, characterized in that: The calculating and obtaining a two-dimensional vector according to the first mechanical coordinates includes: Use the following formula 1 to calculate the two-dimensional vector: Formula 1; in, and Indicates the first mechanical coordinates of two beveled corner points among the five inner frame corner points on the calibration plate on the stage; Represents the vector component in the X-axis direction in two-dimensional space; Represents the vector component in the Y-axis direction in two-dimensional space.

7. The automatic calibration method based on edge inspection of a precision inspection camera according to claim 2, characterized in that: The step of calculating an affine transformation relationship based on the pre-collected third mechanical coordinate and the second mechanical coordinate to complete the calibration includes: Use the following formula 3 to get the affine transformation relationship: Formula 3; Among them, M represents the affine transformation relationship, Represents the two-dimensional vector obtained by converting the second mechanical coordinates, Represents the two-dimensional vector obtained by converting the third machine coordinate system.

8. An automatic calibration device based on edge inspection camera, characterized in that: The device is used to execute the automatic calibration method based on edge inspection camera according to any one of claims 1 to 7, the device comprising: A teaching unit, used to obtain a fixed offset by teaching in advance, wherein the fixed offset is the distance and direction required to move from the main inspection camera to the precision inspection camera; A first control unit, configured to make the center of the image of the precision inspection camera fall inside the calibration plate through a motion control component according to the fixed offset, wherein the calibration plate is provided with calibration points inside; A second control unit is used to control the precision inspection camera to perform patrol motion through a motion control component to collect a feature map of the calibration plate, and identify the straight line edges and corner points of the inner frame of the calibration plate according to the feature map, and continue to control the precision inspection camera to continue patrol motion and corner point alignment accordingly; A first processing unit, used to determine a first mechanical coordinate when the center of the image of the precision inspection camera is aligned with a corner point, wherein the first mechanical coordinate is a coordinate of the stage; A second processing unit is used to determine a second mechanical coordinate when the center of the image of the precision inspection camera is aligned with the center of the calibration point on the calibration plate according to the physical parameters of the calibration plate and the first mechanical coordinate, wherein the second mechanical coordinate is the coordinate of the stage; The conversion unit is used to calculate an affine transformation relationship according to the pre-collected third mechanical coordinates and the second mechanical coordinates to complete the calibration, wherein the third mechanical coordinates are the image coordinates of the main inspection camera.

9. An automatic calibration device based on edge inspection camera, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the calibration method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed on a computer, the calibration method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Industrial robot demonstration device and method based on visual recognition

    CN105234943A

  • Depth camera hand-eye calibration method based on CALTag and point cloud information

    CN110555889A